File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -220,21 +220,18 @@ $endif$
220220\usepackage{float}
221221\floatplacement{figure}{H}
222222
223- % Wrap includegaphics in figures with centering...
223+ % Centre images
224224\usepackage{etoolbox} % For toggle functionality
225225
226226\newtoggle{infigure} % Create toggle to track if we're inside a figure environment
227227\togglefalse{infigure} % Initialize as false
228228
229- % Set toggle when entering/exiting figure environments
230- \pretocmd{\figure}{\toggletrue{infigure}}{}{}
229+ \pretocmd{\figure}{\toggletrue{infigure}}{}{} % Set toggle when entering/exiting figure environments
231230\apptocmd{\endfigure}{\togglefalse{infigure}}{}{}
232231
233- % Save the original includegraphics command
234- \let\oldincludegraphics\includegraphics
232+ \let\oldincludegraphics\includegraphics % Save the original includegraphics command
235233
236- % Redefine includegraphics to check if it's already in a figure
237- \renewcommand{\includegraphics}[2][]{%
234+ \renewcommand{\includegraphics}[2][]{ % Redefine includegraphics to check if it's already in a figure
238235 \iftoggle{infigure}{%
239236 \oldincludegraphics[#1]{#2}%
240237 }{%
You can’t perform that action at this time.
0 commit comments