Skip to content

Commit fe4ac52

Browse files
authored
update pdf template (#344)
1 parent 070b3a7 commit fe4ac52

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

docs/source/conf.py

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -135,40 +135,50 @@
135135
[
136136
] % after-code
137137
138-
\addtolength{\topmargin}{-23.80643pt}
139138
\setlength{\footskip}{36pt}
139+
\setlength{\headheight}{45pt} % Increase header height slightly more
140+
\setlength{\topmargin}{-20pt} % Adjust top margin to avoid content being cut off
141+
\setlength{\headsep}{10pt} % Increase space between header and body text
142+
140143
\makeatletter
141144
\fancypagestyle{normal}{
142-
\fancyhf{}
145+
\fancyhf{} % Clear header and footer
143146
\fancyfoot[LE]{{
144147
\vspace{-5mm}
145148
\includegraphics[scale=0.75]{Latex_Footer_FTC.png}
146149
}}
147-
\fancyfoot[RE]{
148-
\py@HeaderFamily \py@release \hspace{4mm} \today
149-
}
150-
\fancyfoot[LO]{\py@HeaderFamily \textbf{Gracious Professionalism®} - \textcolor[rgb]{.96, .49, .15}{“Doing your best work while treating others with respect and kindness - It’s what makes FIRST, first.”}}
151-
\fancyhead[R]{{\vspace{5mm} \py@HeaderFamily \@title, \thepage}}
152-
\fancyhead[L]{{\vspace{5mm} FTC Docs}}
153-
\fancyhead[C]{{\vspace{5mm} \begin{center}\py@HeaderFamily \thechapter \end{center}}}
150+
\fancyfoot[RE]{\py@HeaderFamily \py@release \hspace{4mm} \today}
151+
\fancyfoot[LO]{\py@HeaderFamily \textbf{Gracious Professionalism®} -
152+
\textcolor[rgb]{.96, .49, .15}{“Doing your best work while treating others with respect and kindness - It’s what makes FIRST, first.”}
153+
}
154+
155+
% Single-line header layout
156+
\fancyhead[C]{\makebox[\textwidth]{%
157+
\py@HeaderFamily FTC Docs % Left (document name)
158+
\hfill \@title, \thepage % Right (doc name & page number)
159+
}}
154160
155161
}
162+
156163
\fancypagestyle{plain}{
157164
\fancyhf{}
158165
\fancyfoot[LE]{{
159166
\vspace{-5mm}
160167
\includegraphics[scale=0.75]{Latex_Footer_FTC.png}
161168
}}
162-
\fancyfoot[RE]{
163-
\py@HeaderFamily \py@release \hspace{4mm} \today
164-
}
165-
\fancyfoot[LO]{\py@HeaderFamily \textbf{Gracious Professionalism®} - \textcolor[rgb]{.96, .49, .15}{“Doing your best work while treating others with respect and kindness - It’s what makes FIRST, first.”}}
166-
\fancyhead[R]{{\vspace{5mm} \py@HeaderFamily \@title, \thepage}}
167-
\fancyhead[L]{{\vspace{5mm} FTC Docs}}
168-
\fancyhead[C]{{\vspace{5mm} \begin{center}\py@HeaderFamily \thechapter \end{center}}}
169+
\fancyfoot[RE]{\py@HeaderFamily \py@release \hspace{4mm} \today}
170+
\fancyfoot[LO]{\py@HeaderFamily \textbf{Gracious Professionalism®} -
171+
\textcolor[rgb]{.96, .49, .15}{“Doing your best work while treating others with respect and kindness - It’s what makes FIRST, first.”}
172+
}
173+
174+
% Ensure same header format for plain pages
175+
\fancyhead[C]{\makebox[\textwidth]{%
176+
\py@HeaderFamily FTC Docs
177+
\hfill \@title, \thepage
178+
}}
169179
}
170-
171180
\makeatother
181+
172182
""",
173183
"maketitle": r"""
174184
\newgeometry{left=0.5in,
@@ -212,7 +222,6 @@
212222
'atendofbody': rf"""
213223
\newpage
214224
\chapter{{Version Information}}
215-
\section{{Document Information}}
216225
\large \textbf{{Author:}} \theauthor
217226
\\
218227
\large \textbf{{Version:}} {release}
@@ -221,16 +230,10 @@
221230
\\
222231
\large \textbf{{Generation Time:}} \DTMcurrenttime
223232
\\
224-
\section{{Git Information}}
225-
\large \textbf{{Git Hash: }} {gitInfo['commit']}
226-
\\
227-
\large \textbf{{Git Branch: }} {gitInfo['refs']}
228-
\\
229-
\large \textbf{{Git Commit Date: }} {gitInfo['author_date']}
230-
\\
231-
\large \textbf{{Git Commit Author:}} {gitInfo['author']}
232-
\section{{Document License}}
233233
\large \textbf{{License:}} {license}
234+
\\
235+
\large \textbf{{Git Hash: }} {gitInfo['commit']}
236+
234237
""",
235238
"printindex": r"\footnotesize\raggedright\printindex",
236239
}
@@ -310,7 +313,6 @@
310313
if(os.environ.get("BOOKLETS_BUILD") == "true"):
311314
print('Building booklets')
312315
latex_documents = [
313-
('ftc_ml/index', "ftc_ml.tex", "FTC Machine Learning", author, "manual"), # FTC ML
314316
('programming_resources/index', "prgrm_res.tex", "FTC Programming Resources", author, "manual"), # Programming Resources
315317
('programming_resources/android_studio_java/Android-Studio-Tutorial', 'android_studios.tex', 'Android Studio Guide', author, "manual"), # Android Studio
316318
('programming_resources/onbot_java/OnBot-Java-Tutorial', "onbot_java.tex", 'OnBot Java Guide', author, "manual"), # OnBot Java

0 commit comments

Comments
 (0)