fixing builds of PDFs

This commit is contained in:
2025-11-04 19:31:11 +01:00
parent 84b600c13c
commit 3cf56cfcb9
2 changed files with 4 additions and 3 deletions

View File

@@ -16,10 +16,11 @@ mkdir -p "$(dirname "$OUTPUT_FILE")"
add_file() {
local filepath="$1"
local relpath="${filepath#$PROJECT_ROOT/}"
local escaped_path="${relpath//_/\\_}"
# Add section header and code listing (no language-specific highlighting)
echo "\\subsection{${relpath}}" >> "$OUTPUT_FILE"
echo "\\begin{lstlisting}[caption={${relpath}}]" >> "$OUTPUT_FILE"
echo "\\subsection{${escaped_path}}" >> "$OUTPUT_FILE"
echo "\\begin{lstlisting}[caption={${escaped_path}}]" >> "$OUTPUT_FILE"
cat "$filepath" >> "$OUTPUT_FILE"
echo "" >> "$OUTPUT_FILE"
echo "\\end{lstlisting}" >> "$OUTPUT_FILE"