diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 4f46812..1bf7a52 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -1,6 +1,11 @@ name: Book -on: [push, pull_request] +on: + pull_request: + push: + branches: + - master + workflow_dispatch: jobs: book: @@ -26,7 +31,7 @@ jobs: - name: Build Some LaTeX run: | - pandoc --to latex md/cover.md $(grep -o '\(md/.*\.md\)' CONTENTS.md | tr -d '(' | tr -d ')') --toc --template ./eisvogel.latex --top-level-division=chapter -V documentclass=book -V classoption=oneside --no-highlight | + pandoc --to latex md/cover.md $(grep -o '\(md/.*\.md\)' SUMMARY.md | tr -d '(' | tr -d ')') --toc --template ./eisvogel.latex --top-level-division=chapter -V documentclass=book -V classoption=oneside --no-highlight | sed -e 's/\\begin{verbatim}/\\begin{minted}{Lean}/' -e 's/{verbatim}/{minted}/' -e's/% Listings/\\usepackage{minted}\n\\newmintinline[lean]{pygments\/lean4.py:Lean4Lexer -x}{bgcolor=white}\n\\newminted[leancode]{pygments\/lean4.py:Lean4Lexer -x}{fontsize=\\footnotesize}\n\\setminted{fontsize=\\footnotesize, breaklines}\n/' >out.tex - name: Build a PDF diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 110d52d..b322b9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,11 @@ name: Deploy to github pages -on: [push, pull_request] +on: + pull_request: + push: + branches: + - master + workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: diff --git a/.gitignore b/.gitignore index 3247634..0c1dd39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /build .lake/ book -md/ -!md/SUMMARY.md \ No newline at end of file +md/ \ No newline at end of file diff --git a/CONTENTS.md b/CONTENTS.md deleted file mode 100644 index 678e5c1..0000000 --- a/CONTENTS.md +++ /dev/null @@ -1,26 +0,0 @@ -# CONTENTS - -* Main - 1. [Introduction](md/main/01_intro.md) - 2. [Overview](md/main/02_overview.md) - 3. [Expressions](md/main/03_expressions.md) - 4. [`MetaM`](md/main/04_metam.md) - 5. [`Syntax`](md/main/05_syntax.md) - 6. [Macros](md/main/06_macros.md) - 7. [Elaboration](md/main/07_elaboration.md) - 8. [DSLs](md/main/08_dsls.md) - 9. [Tactics](md/main/09_tactics.md) - 10. [Cheat sheet](md/main/10_cheat-sheet.md) - 1. [Options](md/extra/01_options.md) - 2. [Attributes](md/extra/02_attributes.md) - 3. [Pretty Printing](md/extra/03_pretty-printing.md) -* Solutions to exercises - 1. Introduction - 2. Overview - 3. [Expressions](md/solutions/03_expressions.md) - 4. [`MetaM`](md/solutions/04_metam.md) - 5. [`Syntax`](md/solutions/05_syntax.md) - 6. Macros - 7. [Elaboration](md/solutions/07_elaboration.md) - 8. DSLs - 9. [Tactics](md/solutions/09_tactics.md) \ No newline at end of file diff --git a/README.md b/README.md index 04b686f..1286c18 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Authors: Arthur Paulino, Damiano Testa, Edward Ayers, Evgenia Karunus, Henrik Böving, Jannis Limperg, Siddhartha Gadgil, Siddharth Bhat -* Tha textbook in html format is [here](https://leanprover-community.github.io/lean4-metaprogramming-book/). +* The textbook in html format is [here](https://leanprover-community.github.io/lean4-metaprogramming-book/). * A PDF is [available here for download](../../releases/download/latest/Metaprogramming.in.Lean.4.pdf) (and is rebuilt on each change). diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..34cca69 --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,32 @@ +# Summary + +# Main + +- [Introduction](md/main/01_intro.md) +- [Overview](md/main/02_overview.md) +- [Expressions](md/main/03_expressions.md) +- [MetaM](md/main/04_metam.md) +- [Syntax](md/main/05_syntax.md) +- [Macros](md/main/06_macros.md) +- [Elaboration](md/main/07_elaboration.md) +- [Embedding DSLs By Elaboration](md/main/08_dsls.md) +- [Tactics](md/main/09_tactics.md) +- [Lean4 Cheat-sheet](md/main/10_cheat-sheet.md) + +# Extra + +- [Options](md/extra/01_options.md) +- [Attributes]() +- [Pretty Printing](md/extra/03_pretty-printing.md) + +# Solutions + +- [Introduction]() +- [Overview]() +- [Expressions](md/solutions/03_expressions.md) +- [`MetaM`](md/solutions/04_metam.md) +- [`Syntax`](md/solutions/05_syntax.md) +- [Macros]() +- [Elaboration](md/solutions/07_elaboration.md) +- [DSLs]() +- [Tactics](md/solutions/09_tactics.md) diff --git a/book.toml b/book.toml index 5a46334..cfd8de7 100644 --- a/book.toml +++ b/book.toml @@ -2,7 +2,7 @@ authors = ["Arthur Paulino, Damiano Testa, Edward Ayers, Evgenia Karunus, Henrik Böving, Jannis Limperg, Siddhartha Gadgil, Siddharth Bhat"] language = "en" multilingual = false -src = "md" +src = "." title = "Metaprogramming in Lean 4" [output.html] diff --git a/md/SUMMARY.md b/md/SUMMARY.md deleted file mode 100644 index e382e16..0000000 --- a/md/SUMMARY.md +++ /dev/null @@ -1,18 +0,0 @@ -# Summary - -- [Introduction](./main/01_intro.md) -- [Overview](./main/02_overview.md) -- [Expressions](./main/03_expressions.md) -- [MetaM](./main/04_metam.md) -- [Syntax](./main/05_syntax.md) -- [Macros](./main/06_macros.md) -- [Elaboration](./main/07_elaboration.md) -- [Embedding DSLs By Elaboration](./main/08_dsls.md) -- [Tactics](./main/09_tactics.md) -- [Lean4 Cheat-sheet](./main/10_cheat-sheet.md) - -# Extra - -- [Options](./extra/01_options.md) -- [Attributes]() -- [Pretty Printing](./extra/03_pretty-printing.md) \ No newline at end of file