@@ -41,37 +41,43 @@ pandoc \
41
41
42
42
echo " Generated initial PDF with index commands"
43
43
44
- # Run makeindex to generate the index file
45
- echo " Running makeindex on SoarManual.idx"
46
- cd output && makeindex SoarManual.idx && cd ..
47
- echo " Makeindex completed"
44
+ # Check if index file was generated and run makeindex if needed
45
+ if [ -f " output/SoarManual.idx" ]; then
46
+ echo " Index entries found, running makeindex..."
47
+ cd output && makeindex SoarManual.idx && cd ..
48
+ echo " Makeindex completed"
48
49
49
- echo " Starting second pandoc run to include index"
50
+ echo " Starting second pandoc run to include index"
50
51
51
- # Run pandoc again to include the index in the final PDF
52
- pandoc \
53
- --pdf-engine=lualatex \
54
- --resource-path=docs/soar_manual/ \
55
- --template=docs/soar_manual/template.tex \
56
- --listings \
57
- --number-sections \
58
- --lua-filter=docs/soar_manual/path_filter.lua \
59
- --lua-filter=docs/soar_manual/index_filter.lua \
60
- -V geometry:" left=3cm, top=2.5cm, right=3cm, bottom=3cm" \
61
- -V has-index \
62
- docs/soar_manual/01_Introduction.md \
63
- docs/soar_manual/02_TheSoarArchitecture.md \
64
- docs/soar_manual/03_SyntaxOfSoarPrograms.md \
65
- docs/soar_manual/04_ProceduralKnowledgeLearning.md \
66
- docs/soar_manual/05_ReinforcementLearning.md \
67
- docs/soar_manual/06_SemanticMemory.md \
68
- docs/soar_manual/07_EpisodicMemory.md \
69
- docs/soar_manual/08_SpatialVisualSystem.md \
70
- docs/soar_manual/09_SoarUserInterface.md \
71
- output/cli.tex \
72
- -o output/SoarManual.pdf
52
+ # Run pandoc again to include the index in the final PDF
53
+ pandoc \
54
+ --pdf-engine=lualatex \
55
+ --resource-path=docs/soar_manual/ \
56
+ --template=docs/soar_manual/template.tex \
57
+ --listings \
58
+ --number-sections \
59
+ --lua-filter=docs/soar_manual/path_filter.lua \
60
+ --lua-filter=docs/soar_manual/index_filter.lua \
61
+ -V geometry:" left=3cm, top=2.5cm, right=3cm, bottom=3cm" \
62
+ -V has-index \
63
+ docs/soar_manual/01_Introduction.md \
64
+ docs/soar_manual/02_TheSoarArchitecture.md \
65
+ docs/soar_manual/03_SyntaxOfSoarPrograms.md \
66
+ docs/soar_manual/04_ProceduralKnowledgeLearning.md \
67
+ docs/soar_manual/05_ReinforcementLearning.md \
68
+ docs/soar_manual/06_SemanticMemory.md \
69
+ docs/soar_manual/07_EpisodicMemory.md \
70
+ docs/soar_manual/08_SpatialVisualSystem.md \
71
+ docs/soar_manual/09_SoarUserInterface.md \
72
+ output/cli.tex \
73
+ -o output/SoarManual.pdf
74
+
75
+ echo " Generated final PDF with index"
76
+ else
77
+ echo " No index entries found, skipping makeindex and second pandoc run"
78
+ fi
73
79
74
- echo " Generated PDF successfully "
80
+ echo " PDF generation completed "
75
81
76
82
# Clean up the temporary CLI file
77
83
if [ -f " output/cli.tex" ]; then
0 commit comments