Skip to content

Commit 10fba6f

Browse files
committed
Merge branch 'feature/glossary' into develop
2 parents 2d9769b + 512c73e commit 10fba6f

File tree

9 files changed

+58
-16
lines changed

9 files changed

+58
-16
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,4 @@ TSWLatexianTemp*
188188

189189
## Generated LaTeX files:
190190
*.tex
191-
!book.tex
192-
src/auto/
191+
src/auto/

docs/pdf/sf-idris-2016.pdf

-1.71 KB
Binary file not shown.

src/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
!book.tex
2+
!footer.tex
3+
!glossary.tex

src/Basics.lidr

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
pandoc-minted:
3-
language: idris
4-
---
5-
61
= Basics
72

83
**REMINDER**:
@@ -111,8 +106,7 @@ Type the following:
111106
nextWeekday : Day -> Day
112107
```
113108

114-
Then with point on `nextWeekday`, call \mintinline[]{elisp}{idris-add-clause}
115-
(\mintinline[]{elisp}{M-RET d} in Spacemacs).
109+
Then with point on `nextWeekday`, call \gls{idris-add-clause}.
116110

117111
```idris
118112
nextWeekday : Day -> Day
@@ -195,9 +189,8 @@ observing that both sides of the equality evaluate to the same thing, after some
195189
simplification."
196190
\color{black}
197191

198-
(For simple proofs like this, you can call
199-
\mintinline[]{elisp}{idris-add-clause} (\mintinline[]{elisp}{M-RET d}) with the
200-
point on the name (`testNextWeekday`) in the type signature and then call
192+
(For simple proofs like this, you can call \gls{idris-add-clause} with the point
193+
on the name (`testNextWeekday`) in the type signature and then call
201194
\mintinline[]{elisp}{idris-proof-search} (\mintinline[]{elisp}{M-RET p}) with
202195
the point on the resultant hole to have Idris solve the proof for you.)
203196

src/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,21 @@ TEXFILES := $(LIDRFILES:.lidr=.tex)
2323
.PHONY: all clean
2424

2525

26-
clean:
27-
rm -rf all.{aux,log,out,toc,pdf} _minted-all $(TEXFILES)
26+
clean: clean-tex
27+
rm -rf all.* auto _minted-all $(TEXFILES)
28+
29+
30+
clean-tex: all.tex
31+
latexmk -pdf -CA all.tex
2832

2933

3034
all.pdf: all.tex
31-
latexmk -xelatex -e '$$pdflatex=q/xelatex %O --shell-escape %S/' $<
35+
latexmk -pdf $<
3236

3337

3438
all.tex: book.tex $(TEXFILES)
3539
$(PANDOC) $(PANDOC_FLAGS) -N --toc -o $@ \
36-
$(foreach texfile,$(TEXFILES),-A $(texfile)) $<
40+
$(foreach texfile,$(TEXFILES),-A $(texfile)) -A footer.tex $<
3741

3842

3943
%.tex: %.lidr

src/book.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,18 @@
2323
papersize: b5
2424
geometry: margin=1in
2525
header-includes:
26+
- \makeatletter
27+
- \let\RequirePackage\original@RequirePackage
28+
- \let\usepackage\RequirePackage
29+
- \makeatother
30+
-
2631
- \usepackage{minted}
32+
- \usemintedstyle{lovelace}
33+
-
34+
- \usepackage[xindy]{glossaries}
35+
- \makeglossaries
36+
- \input{glossary}
37+
-
2738
- \usepackage{todonotes}
2839
include-before: \frontmatter
2940
---

src/footer.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
\printglossaries

src/glossary.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\longnewglossaryentry{idris-add-clause}{
2+
name=\mintinline[]{elisp}{idris-add-clause},
3+
sort=i
4+
}
5+
{
6+
\mintinline[]{elisp}{(idris-add-clause PROOF)}
7+
8+
\mintinline[]{text}{M-RET d} in Spacemacs.
9+
10+
Add clauses to the declaration at point.
11+
}

src/latexmkrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
$clean_ext .= ' %R.ist %R.xdy';
2+
$pdflatex = q/xelatex %O --shell-escape %S/;
3+
4+
5+
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
6+
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
7+
8+
9+
sub run_makeglossaries {
10+
if ( $silent ) {
11+
system "makeglossaries -q '$_[0]'";
12+
}
13+
else {
14+
system "makeglossaries '$_[0]'";
15+
};
16+
}
17+
18+
19+
push @generated_exts, 'glo', 'gls', 'glg';
20+
push @generated_exts, 'acn', 'acr', 'alg';

0 commit comments

Comments
 (0)