Skip to content

Commit a462403

Browse files
committed
WIP fix build
1 parent 9f79d4a commit a462403

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

docs/soar_manual/build.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/sh
2+
set -e # Exit on any error
23

34
# Run this file from the root directory of this repository, otherwise
45
# the template.tex file path does not match.
56
mkdir -p output
7+
echo "Created output directory"
68

79
pandoc \
810
--pdf-engine=lualatex \
@@ -13,6 +15,8 @@ pandoc \
1315
--shift-heading-level-by=1 \
1416
-o output/cli.tex
1517

18+
echo "Generated CLI LaTeX file"
19+
1620
pandoc \
1721
--pdf-engine=lualatex \
1822
--resource-path=docs/soar_manual/ \
@@ -35,8 +39,14 @@ pandoc \
3539
output/cli.tex \
3640
-o output/SoarManual.pdf
3741

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"
3946
cd output && makeindex SoarManual.idx && cd ..
47+
echo "Makeindex completed"
48+
49+
echo "Starting second pandoc run to include index"
4050

4151
# Run pandoc again to include the index in the final PDF
4252
pandoc \
@@ -61,7 +71,11 @@ pandoc \
6171
output/cli.tex \
6272
-o output/SoarManual.pdf
6373

74+
echo "Generated PDF successfully"
75+
6476
# Clean up the temporary CLI file
6577
if [ -f "output/cli.tex" ]; then
6678
rm output/cli.tex
6779
fi
80+
81+
echo "Build completed"

docs/soar_manual/template.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
\documentclass[12pt,a4paper]{article}
1313
\usepackage{makeidx} % for index
14+
$if(has-index)$
15+
\makeindex
16+
$endif$
1417
\usepackage{epsfig} % for figures (was 'psfig')
1518
\usepackage[colorlinks]{hyperref} % for hyperlinks
1619
\usepackage[figure,figure*]{hypcap} % to correct anchor placement for figures
@@ -435,9 +438,6 @@
435438
$endif$
436439
437440
\begin{document}
438-
$if(has-index)$
439-
\makeindex
440-
$endif$
441441
\begin{titlepage}
442442
\vspace{1.5in}
443443

0 commit comments

Comments
 (0)