File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed
Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 114114 \renewcommand {\tablename }{Tab.}
115115}
116116
117- % Hook to apply blue color to table content
118- \AtBeginEnvironment {solutiontable}{ %
119- \AtBeginEnvironment {tabular}{ %
120- \ifsolution
121- \color {blue} %
122- \fi
123- }
124- }
117+ % Color hook for solutiontable
118+ \newif\ifinsolutiontable
119+ \insolutiontablefalse
120+ \AtBeginEnvironment {solutiontable}{ \insolutiontabletrue }
121+ \AtEndEnvironment {solutiontable}{ \insolutiontablefalse }
122+ % Color only the tabular content within solutiontable; tabular forms a group, so color is local
123+ \AtBeginEnvironment {tabular}{ \ifsolution\ifinsolutiontable\color {blue} \fi\fi }
124+ \AtBeginEnvironment {tabular*}{ \ifsolution\ifinsolutiontable\color {blue} \fi\fi }
125125
126126
127127
Original file line number Diff line number Diff line change 3636\RequirePackage {titling}
3737\RequirePackage {mathtools}
3838\RequirePackage {placeins}
39+ \RequirePackage {etoolbox} % for environment hooks
3940
4041% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4142% % Graphic path %%
7475 \renewcommand {\tablename }{Tab.}
7576}
7677
77- % Hook to apply blue color to table content
78- \AtBeginEnvironment {solutiontable}{%
79- \AtBeginEnvironment {tabular}{%
80- \ifsolution
81- \color {blue}%
82- \fi
83- }
84- }
78+ % Color hook for solutiontable
79+ \newif\ifinsolutiontable
80+ \insolutiontablefalse
81+ \AtBeginEnvironment {solutiontable}{\insolutiontabletrue }
82+ \AtEndEnvironment {solutiontable}{\insolutiontablefalse }
83+ % Color only the tabular content within solutiontable; tabular forms a group, so color is local
84+ \AtBeginEnvironment {tabular}{\ifsolution\ifinsolutiontable\color {blue}\fi\fi }
85+ \AtBeginEnvironment {tabular*}{\ifsolution\ifinsolutiontable\color {blue}\fi\fi }
86+
8587
8688
8789% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
You can’t perform that action at this time.
0 commit comments