-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtest.sh
executable file
·41 lines (30 loc) · 1.43 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
# produces the readme in various formats
# the filter processVerbatim.lua add the verbatim examples as real markdown
# assumes Pandoc and a full Latex install
# langsci-gb4e.sty is made available here
# note that there are various errors in the output
# they show current limitations
# basic formats
for format in html docx epub
do
pandoc ../readme.md -t markdown -L processVerbatim.lua -s --wrap=preserve | \
pandoc -t $format -o readme.$format -L ../pandoc-ling.lua -s -N --toc --mathml -F pandoc-crossref --wrap=preserve
done
# various latex variants, both tex and pdf
for package in linguex gb4e langsci-gb4e
do
pandoc ../readme.md -t markdown -L processVerbatim.lua -s | \
pandoc -t latex -o readme_$package.tex -L ../pandoc-ling.lua -s -N --toc \
--metadata latexPackage="$package"
pandoc ../readme.md -t markdown -L processVerbatim.lua -s | \
pandoc -o readme_$package.pdf -L ../pandoc-ling.lua -N --toc \
--metadata latexPackage="$package" --pdf-engine=xelatex
done
# special settings for expex, errors with chapternumbers
pandoc ../readme.md -t markdown -L processVerbatim.lua -s | \
pandoc -t latex -o readme_expex.tex -L ../pandoc-ling.lua -s -N --toc \
--metadata latexPackage="expex" --metadata addChapterNumber="false"
pandoc ../readme.md -t markdown -L processVerbatim.lua -s | \
pandoc -o readme_expex.pdf -L ../pandoc-ling.lua -N --toc \
--metadata latexPackage="expex" --metadata addChapterNumber="false"