Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add solutions #1

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Book

on: [push, pull_request]
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
book:
Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/build
.lake/
book
md/
!md/SUMMARY.md
md/
26 changes: 0 additions & 26 deletions CONTENTS.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
32 changes: 32 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
18 changes: 0 additions & 18 deletions md/SUMMARY.md

This file was deleted.