Skip to content

Commit 7119967

Browse files
authored
Merge pull request #137 from Seasawher/fix-mdbook-setting
fix issue on mdbook config
2 parents 3ef475b + 4988633 commit 7119967

File tree

6 files changed

+39
-41
lines changed

6 files changed

+39
-41
lines changed

.github/workflows/book.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ jobs:
1818
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain $(cat lean-toolchain)
1919
echo "$HOME/.elan/bin" >> $GITHUB_PATH
2020
21-
# note: `lake run build` raise an error in GitHub Action
2221
- name: build markdown files by mdgen
23-
run: lake exe mdgen lean md
22+
run: lake run build
2423

2524
- name: Install Dependencies
2625
run: sudo apt update && sudo apt install -y pandoc texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-luatex fonts-dejavu python3-pygments
@@ -31,7 +30,7 @@ jobs:
3130
3231
- name: Build Some LaTeX
3332
run: |
34-
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 |
33+
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 |
3534
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
3635
3736
- name: Build a PDF

.github/workflows/deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ jobs:
3131
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain $(cat lean-toolchain)
3232
echo "$HOME/.elan/bin" >> $GITHUB_PATH
3333
34-
# note: `lake run build` raise an error in GitHub Action
3534
- name: build markdown files by mdgen
36-
run: lake exe mdgen lean md
35+
run: lake run build
3736

3837
- name: setup mdBook
3938
uses: peaceiris/actions-mdbook@v1

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/build
21
.lake/
3-
book
4-
md/
2+
/book
3+
/md/*
4+
!/md/SUMMARY.md

SUMMARY.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Arthur Paulino, Damiano Testa, Edward Ayers, Evgenia Karunus, Henrik Böving, Jannis Limperg, Siddhartha Gadgil, Siddharth Bhat"]
33
language = "en"
44
multilingual = false
5-
src = "."
5+
src = "md"
66
title = "Metaprogramming in Lean 4"
77

88
[output.html]

md/SUMMARY.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Summary
2+
3+
# Main
4+
5+
- [Introduction](./main/01_intro.md)
6+
- [Overview](./main/02_overview.md)
7+
- [Expressions](./main/03_expressions.md)
8+
- [MetaM](./main/04_metam.md)
9+
- [Syntax](./main/05_syntax.md)
10+
- [Macros](./main/06_macros.md)
11+
- [Elaboration](./main/07_elaboration.md)
12+
- [Embedding DSLs By Elaboration](./main/08_dsls.md)
13+
- [Tactics](./main/09_tactics.md)
14+
- [Lean4 Cheat-sheet](./main/10_cheat-sheet.md)
15+
16+
# Extra
17+
18+
- [Options](./extra/01_options.md)
19+
<!-- - [Attributes]() -->
20+
- [Pretty Printing](./extra/03_pretty-printing.md)
21+
22+
# Solutions
23+
24+
<!-- - [Introduction]() -->
25+
<!-- - [Overview]() -->
26+
- [Expressions](./solutions/03_expressions.md)
27+
- [`MetaM`](./solutions/04_metam.md)
28+
- [`Syntax`](./solutions/05_syntax.md)
29+
<!-- - [Macros]() -->
30+
- [Elaboration](./solutions/07_elaboration.md)
31+
<!-- - [DSLs]() -->
32+
- [Tactics](./solutions/09_tactics.md)

0 commit comments

Comments
 (0)