Skip to content

Commit

Permalink
Merge pull request #137 from Seasawher/fix-mdbook-setting
Browse files Browse the repository at this point in the history
fix issue on mdbook config
  • Loading branch information
Julian authored Apr 15, 2024
2 parents 3ef475b + 4988633 commit 7119967
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 41 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain $(cat lean-toolchain)
echo "$HOME/.elan/bin" >> $GITHUB_PATH
# note: `lake run build` raise an error in GitHub Action
- name: build markdown files by mdgen
run: lake exe mdgen lean md
run: lake run build

- name: Install Dependencies
run: sudo apt update && sudo apt install -y pandoc texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-luatex fonts-dejavu python3-pygments
Expand All @@ -31,7 +30,7 @@ jobs:
- name: Build Some LaTeX
run: |
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 |
pandoc --to latex md/cover.md $(grep -o '\(\/.*\.md\)' md/SUMMARY.md | sed 's/^/md/') --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
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ jobs:
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain $(cat lean-toolchain)
echo "$HOME/.elan/bin" >> $GITHUB_PATH
# note: `lake run build` raise an error in GitHub Action
- name: build markdown files by mdgen
run: lake exe mdgen lean md
run: lake run build

- name: setup mdBook
uses: peaceiris/actions-mdbook@v1
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/build
.lake/
book
md/
/book
/md/*
!/md/SUMMARY.md
32 changes: 0 additions & 32 deletions SUMMARY.md

This file was deleted.

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 = "."
src = "md"
title = "Metaprogramming in Lean 4"

[output.html]
Expand Down
32 changes: 32 additions & 0 deletions md/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Summary

# Main

- [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)

# Solutions

<!-- - [Introduction]() -->
<!-- - [Overview]() -->
- [Expressions](./solutions/03_expressions.md)
- [`MetaM`](./solutions/04_metam.md)
- [`Syntax`](./solutions/05_syntax.md)
<!-- - [Macros]() -->
- [Elaboration](./solutions/07_elaboration.md)
<!-- - [DSLs]() -->
- [Tactics](./solutions/09_tactics.md)

0 comments on commit 7119967

Please sign in to comment.