File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
+ set -e # Exit on any error
2
3
3
4
# Run this file from the root directory of this repository, otherwise
4
5
# the template.tex file path does not match.
5
6
mkdir -p output
7
+ echo " Created output directory"
6
8
7
9
pandoc \
8
10
--pdf-engine=lualatex \
@@ -13,6 +15,8 @@ pandoc \
13
15
--shift-heading-level-by=1 \
14
16
-o output/cli.tex
15
17
18
+ echo " Generated CLI LaTeX file"
19
+
16
20
pandoc \
17
21
--pdf-engine=lualatex \
18
22
--resource-path=docs/soar_manual/ \
@@ -35,8 +39,14 @@ pandoc \
35
39
output/cli.tex \
36
40
-o output/SoarManual.pdf
37
41
38
- # Run makeindex to generate the index file (only if .idx file was created)
42
+ echo " Generated initial PDF with index commands"
43
+
44
+ # Run makeindex to generate the index file
45
+ echo " Running makeindex on SoarManual.idx"
39
46
cd output && makeindex SoarManual.idx && cd ..
47
+ echo " Makeindex completed"
48
+
49
+ echo " Starting second pandoc run to include index"
40
50
41
51
# Run pandoc again to include the index in the final PDF
42
52
pandoc \
@@ -61,7 +71,11 @@ pandoc \
61
71
output/cli.tex \
62
72
-o output/SoarManual.pdf
63
73
74
+ echo " Generated PDF successfully"
75
+
64
76
# Clean up the temporary CLI file
65
77
if [ -f " output/cli.tex" ]; then
66
78
rm output/cli.tex
67
79
fi
80
+
81
+ echo " Build completed"
Original file line number Diff line number Diff line change 11
11
12
12
\documentclass [12pt,a4paper ]{article }
13
13
\usepackage {makeidx } % for index
14
+ $ if(has-index)$
15
+ \makeindex
16
+ $ endif$
14
17
\usepackage {epsfig } % for figures (was 'psfig')
15
18
\usepackage [colorlinks ]{hyperref } % for hyperlinks
16
19
\usepackage [figure,figure* ]{hypcap } % to correct anchor placement for figures
435
438
$ endif$
436
439
437
440
\begin {document}
438
- $ if(has-index)$
439
- \makeindex
440
- $ endif$
441
441
\begin {titlepage}
442
442
\vspace {1.5in}
443
443
You can’t perform that action at this time.
0 commit comments