Skip to content

Commit 2afabd6

Browse files
authored
Merge pull request #40 from trustedsec/2025-Update
2025 update
2 parents 6ec381c + 2f6a5c2 commit 2afabd6

File tree

117 files changed

+10079
-1601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+10079
-1601
lines changed

Build/COVER_PAGE_FEATURE.md

Lines changed: 160 additions & 0 deletions

Build/Sysmon.md

Lines changed: 4770 additions & 966 deletions

Build/SysmonGuide.pdf

8.74 MB
Binary file not shown.

Build/chapter_break.tex

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
%% Adds pagebreak between chapters
2-
% from comments of accepted answer
3-
% https://superuser.com/questions/601469/getting-chapters-to-start-on-a-new-page-in-a-pandoc-generated-pdf
1+
%% Chapter/Section Styling
2+
%% Customize appearance of level 1 headings (sections in Pandoc = # in markdown)
3+
44
\usepackage{sectsty}
5-
\sectionfont{\clearpage}
65

7-
% accepted answer gave error
8-
%\usepackage{titlesec}
9-
%\newcommand{\sectionbreak}{\clearpage}
6+
% Level 1 headings: centered, larger, bold, with spacing but NO page break
7+
\sectionfont{\centering\LARGE\bfseries}
8+
9+
% Add some vertical space before and after level 1 headings
10+
\usepackage{titlesec}
11+
\titlespacing*{\section}
12+
{0pt} % left margin
13+
{3ex plus 1ex minus .2ex} % space before (vertical)
14+
{2ex plus .2ex} % space after (vertical)
1015

16+
% Optional: Keep subsections and subsubsections left-aligned
17+
\subsectionfont{\large\bfseries}
18+
\subsubsectionfont{\normalsize\bfseries}

Build/md2pdf.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ SCRIPT=$(readlink -f "$0")
2929
SCRIPTPATH=$(dirname "$SCRIPT")
3030
echo "Running Pandoc to generate the LaTeX file..."
3131
pandoc "$1" \
32-
-f gfm \
32+
-f markdown \
3333
--toc \
34+
--toc-depth=3 \
3435
--listings \
3536
--include-in-header ${SCRIPTPATH}/chapter_break.tex \
3637
--include-in-header ${SCRIPTPATH}/inline_code.tex \
3738
--include-in-header ${SCRIPTPATH}/bullet_style.tex \
3839
--include-in-header ${SCRIPTPATH}/pdf_properties.tex \
3940
--include-in-header ${SCRIPTPATH}/listings-setup.tex \
41+
--include-in-header ${SCRIPTPATH}/toc-styling.tex \
42+
--include-in-header ${SCRIPTPATH}/title_page.tex \
43+
--include-in-header ${SCRIPTPATH}/toc_pagebreak.tex \
4044
--highlight-style ${SCRIPTPATH}/pygments.theme \
41-
-V toc-title='Table of contents' \
45+
-V toc-title='Sysmon Guide Contents' \
4246
-V linkcolor:blue \
4347
-V geometry:a4paper \
4448
-V geometry:margin=2cm \
@@ -59,6 +63,24 @@ xelatex -interaction=nonstopmode ${fn}.tex > pdfgen.log 2>&1
5963
echo "Generating PDF (second pass for TOC)..."
6064
xelatex -interaction=nonstopmode ${fn}.tex >> pdfgen.log 2>&1
6165

66+
# Replace first page with custom cover if cover image exists
67+
COVER_IMAGE="${SCRIPTPATH}/../chapters/media/TS_SysmonCommunityGuide_Cover.png"
68+
if [ -f "$COVER_IMAGE" ]; then
69+
echo "Replacing first page with custom cover..."
70+
TEMP_PDF="${fn}_temp.pdf"
71+
mv "${fn}.pdf" "$TEMP_PDF"
72+
73+
if python3 "${SCRIPTPATH}/replace_cover.py" "$TEMP_PDF" "$COVER_IMAGE" "${fn}.pdf"; then
74+
echo "Cover page replaced successfully"
75+
rm "$TEMP_PDF"
76+
else
77+
echo "Warning: Failed to replace cover page, using original PDF"
78+
mv "$TEMP_PDF" "${fn}.pdf"
79+
fi
80+
else
81+
echo "Warning: Cover image not found at $COVER_IMAGE, skipping cover replacement"
82+
fi
83+
6284
echo "Cleaning temp files..."
6385
rm /tmp/temp.tex "$fn".{tex,toc,aux,log}
6486

2.89 MB

Build/media/image1.png

265 KB

Build/media/image10.png

246 KB

Build/media/image11.png

228 KB

Build/media/image12.png

185 KB

0 commit comments

Comments
 (0)