|
|
|
@@ -9,7 +9,7 @@
|
|
|
|
% I think this redefines how float environments evaluate the placement argument,
|
|
|
|
% I think this redefines how float environments evaluate the placement argument,
|
|
|
|
% allowing a command in the argument to be expanded before it is used. Otherwise
|
|
|
|
% allowing a command in the argument to be expanded before it is used. Otherwise
|
|
|
|
% it thinks we are trying to use the literal command name as the placement.
|
|
|
|
% it thinks we are trying to use the literal command name as the placement.
|
|
|
|
\def\ExpEnvOption#1#2[#3]{%
|
|
|
|
\def\ExpEnvOption#1#2[#3]{
|
|
|
|
\expandafter\@expenvopt\expandafter{#3}{#1}{#2}
|
|
|
|
\expandafter\@expenvopt\expandafter{#3}{#1}{#2}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\def\@expenvopt#1#2#3{#2{#3}[#1]}
|
|
|
|
\def\@expenvopt#1#2#3{#2{#3}[#1]}
|
|
|
|
@@ -38,39 +38,48 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\clist_const:Nn \c_Float_placement_clist {h,t,p,b}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\clist_new:N \l_Float_placement_clist
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% Create a set of keys that are common to all floating environments.
|
|
|
|
|
|
|
|
\keys_define:nn {Float} {
|
|
|
|
|
|
|
|
placement .multichoices:nn = {b,H,h,p,t}{
|
|
|
|
|
|
|
|
\clist_put_right:Ne \l_Float_placement_clist {\l_keys_choice_tl}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
% Maximum width adjustment to fit 2 16x9 screensots on one page.
|
|
|
|
% Maximum width adjustment to fit 2 16x9 screensots on one page.
|
|
|
|
\dim_const:Nn \c_BigFloat_overhang_dim {0.54in}
|
|
|
|
\dim_const:Nn \c_BigFloat_overhang_dim {0.54in}
|
|
|
|
\str_const:Nn \c_BigFloat_type_str {generic}
|
|
|
|
\str_const:Nn \c_BigFloat_type_str {generic}
|
|
|
|
\clist_const:Nn \c_BigFloat_placement_clist {h,t,p,b}
|
|
|
|
|
|
|
|
\fp_const:Nn \c_BigFloat_offset_fp {2.0}
|
|
|
|
\fp_const:Nn \c_BigFloat_offset_fp {2.0}
|
|
|
|
|
|
|
|
|
|
|
|
\ProvideLength{\BigFloatOverhang}[\dim_use:N \c_BigFloat_overhang_dim]
|
|
|
|
\ProvideLength{\BigFloatOverhang}[\dim_use:N \c_BigFloat_overhang_dim]
|
|
|
|
\NewDocumentCommand{\BigFloatOffset}{}{\fp_use:N \c_BigFloat_offset_fp}
|
|
|
|
\NewDocumentCommand{\BigFloatOffset}{}{\fp_use:N \c_BigFloat_offset_fp}
|
|
|
|
|
|
|
|
|
|
|
|
\clist_new:N \l_BigFloat_placement_clist
|
|
|
|
|
|
|
|
\dim_new:N \l_BigFloat_workoverhang_dim
|
|
|
|
\dim_new:N \l_BigFloat_workoverhang_dim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn {} {
|
|
|
|
|
|
|
|
BigFloat .inherit:n = {Float},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn{BigFloat}{
|
|
|
|
\keys_define:nn{BigFloat}{
|
|
|
|
type .choices:nn = {figure,generic,table}{
|
|
|
|
maxoverhang .dim_set:N = \l_BigFloat_maxoverhang_dim,
|
|
|
|
\str_set:Ne \l_BigFloat_type_str {\l_keys_choice_tl}
|
|
|
|
maxoverhang .initial:n = {1in},
|
|
|
|
},
|
|
|
|
|
|
|
|
type .default:e = {\c_BigFloat_type_str},
|
|
|
|
|
|
|
|
type .initial:e = {\c_BigFloat_type_str},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overhang .dim_set:N = \l_BigFloat_overhang_dim,
|
|
|
|
|
|
|
|
overhang .default:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
overhang .initial:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
placement .multichoices:nn = {b,H,h,p,t}{
|
|
|
|
|
|
|
|
\clist_put_right:Ne \l_BigFloat_placement_clist {\l_keys_choice_tl}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
offset .fp_set:N = \l_BigFloat_offset_fp,
|
|
|
|
offset .fp_set:N = \l_BigFloat_offset_fp,
|
|
|
|
offset .default:e = {\c_BigFloat_offset_fp},
|
|
|
|
offset .default:e = {\c_BigFloat_offset_fp},
|
|
|
|
offset .initial:e = {\c_BigFloat_offset_fp},
|
|
|
|
offset .initial:e = {\c_BigFloat_offset_fp},
|
|
|
|
|
|
|
|
|
|
|
|
maxoverhang .dim_set:N = \l_BigFloat_maxoverhang_dim,
|
|
|
|
overhang .dim_set:N = \l_BigFloat_overhang_dim,
|
|
|
|
maxoverhang .initial:n = {1in},
|
|
|
|
overhang .default:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
overhang .initial:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type .choices:nn = {figure,generic,table}{
|
|
|
|
|
|
|
|
\str_set:Ne \l_BigFloat_type_str {\l_keys_choice_tl}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
type .default:e = {\c_BigFloat_type_str},
|
|
|
|
|
|
|
|
type .initial:e = {\c_BigFloat_type_str},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentEnvironment{BigFloat}{
|
|
|
|
\NewDocumentEnvironment{BigFloat}{
|
|
|
|
@@ -78,47 +87,42 @@
|
|
|
|
O{}
|
|
|
|
O{}
|
|
|
|
% #2: Body: what appears in the BigFloat.
|
|
|
|
% #2: Body: what appears in the BigFloat.
|
|
|
|
+b
|
|
|
|
+b
|
|
|
|
}{%
|
|
|
|
}{ \group_begin:
|
|
|
|
\keys_set:nn{BigFloat}{#1}%
|
|
|
|
\keys_set:nn{BigFloat}{#1}
|
|
|
|
\clist_use_default:Nnnn \l_BigFloat_placement_str
|
|
|
|
\clist_use_default:Nnnn \l_BigFloat_placement_str
|
|
|
|
{\l_BigFloat_placement_clist}
|
|
|
|
{\l_Float_placement_clist}
|
|
|
|
{\c_BigFloat_placement_clist}
|
|
|
|
{\c_Float_placement_clist}
|
|
|
|
\dim_set:Nn \l_BigFloat_workoverhang_dim {
|
|
|
|
\dim_set:Nn \l_BigFloat_workoverhang_dim {
|
|
|
|
\dim_min:nn {\l_BigFloat_overhang_dim} {\l_BigFloat_maxoverhang_dim}
|
|
|
|
\dim_min:nn {\l_BigFloat_overhang_dim} {\l_BigFloat_maxoverhang_dim}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\ExpEnvOption%
|
|
|
|
\ExpEnvOption
|
|
|
|
\begin{\l_BigFloat_type_str}[\l_BigFloat_placement_str]% float environment
|
|
|
|
\begin{\l_BigFloat_type_str}[\l_BigFloat_placement_str]% float environment
|
|
|
|
\begin{SmartAdjustWidth}{%
|
|
|
|
\begin{SmartAdjustWidth}{
|
|
|
|
\fp_to_dim:n {
|
|
|
|
\fp_to_dim:n {
|
|
|
|
-\l_BigFloat_workoverhang_dim
|
|
|
|
-\l_BigFloat_workoverhang_dim
|
|
|
|
}%
|
|
|
|
}
|
|
|
|
}{%
|
|
|
|
}{
|
|
|
|
\fp_to_dim:n {%
|
|
|
|
\fp_to_dim:n {
|
|
|
|
-\l_BigFloat_workoverhang_dim
|
|
|
|
-\l_BigFloat_workoverhang_dim
|
|
|
|
* \l_BigFloat_offset_fp
|
|
|
|
* \l_BigFloat_offset_fp
|
|
|
|
}%
|
|
|
|
}
|
|
|
|
}%
|
|
|
|
}
|
|
|
|
\begin{minipage}{\linewidth}%
|
|
|
|
\begin{minipage}{\linewidth}
|
|
|
|
\ifthenelse{\boolean{isDraft}}{%
|
|
|
|
\ifthenelse{\boolean{isDraft}}{
|
|
|
|
{\color{layout}\rule{\textwidth}{1pt}\zws}%
|
|
|
|
{\color{layout}\rule{\textwidth}{1pt}\zws}
|
|
|
|
#2%
|
|
|
|
#2
|
|
|
|
}{%
|
|
|
|
}{
|
|
|
|
#2%
|
|
|
|
#2
|
|
|
|
}%
|
|
|
|
}
|
|
|
|
\end{minipage}%
|
|
|
|
\end{minipage}
|
|
|
|
\end{SmartAdjustWidth}%
|
|
|
|
\end{SmartAdjustWidth}
|
|
|
|
\end{\l_BigFloat_type_str}%
|
|
|
|
\end{\l_BigFloat_type_str}
|
|
|
|
\dim_set:Nn \l_BigFloat_overhang_dim {\c_BigFloat_overhang_dim}
|
|
|
|
\group_end: }{}
|
|
|
|
}{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\clist_const:Nn \c_CenterFig_placement_clist {h, t, p, b}
|
|
|
|
\clist_const:Nn \c_CenterFig_placement_clist {h, t, p, b}
|
|
|
|
|
|
|
|
|
|
|
|
\clist_new:N \l_CenterFig_placement_clist
|
|
|
|
\keys_define:nn {} {
|
|
|
|
|
|
|
|
CenterFig .inherit:n = {Float},
|
|
|
|
\keys_define:nn{CenterFig}{
|
|
|
|
|
|
|
|
placement .multichoices:nn= {b,H,h,p,t}{
|
|
|
|
|
|
|
|
\clist_put_right:Nn \l_CenterFig_placement_clist {\l_keys_choice_tl}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentCommand{\CenterFig}{
|
|
|
|
\NewDocumentCommand{\CenterFig}{
|
|
|
|
@@ -132,21 +136,19 @@
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
% Caption.
|
|
|
|
% Caption.
|
|
|
|
m
|
|
|
|
m
|
|
|
|
}{
|
|
|
|
}{ \group_begin:
|
|
|
|
\keys_set:nn{CenterFig}{#2}%
|
|
|
|
\keys_set:nn{CenterFig}{#2}
|
|
|
|
\clist_use_default:Nnnn \l_CenterFig_placement_str
|
|
|
|
\clist_use_default:Nnnn \l_CenterFig_placement_str
|
|
|
|
{\l_CenterFig_placement_clist}
|
|
|
|
{\l_Float_placement_clist}
|
|
|
|
{\c_CenterFig_placement_clist}
|
|
|
|
{\c_Float_placement_clist}
|
|
|
|
\ExpEnvOption
|
|
|
|
\ExpEnvOption
|
|
|
|
\begin{figure}[\l_CenterFig_placement_str]%
|
|
|
|
\begin{figure}[\l_CenterFig_placement_str]
|
|
|
|
\Centering%
|
|
|
|
\Centering
|
|
|
|
\includegraphics[keepaspectratio,#1]{#3}%
|
|
|
|
\includegraphics[keepaspectratio,#1]{#3}
|
|
|
|
\caption{#5}%
|
|
|
|
\caption{#5}
|
|
|
|
\label{fig:#4}%
|
|
|
|
\label{fig:#4}
|
|
|
|
\end{figure}%
|
|
|
|
\end{figure}
|
|
|
|
}
|
|
|
|
\group_end: }
|
|
|
|
|
|
|
|
|
|
|
|
%\fp_const:Nn \c_BigFig_graphicdpi_fp {72.0}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn{}{
|
|
|
|
\keys_define:nn{}{
|
|
|
|
BigFig .inherit:n = BigFloat,
|
|
|
|
BigFig .inherit:n = BigFloat,
|
|
|
|
@@ -155,14 +157,19 @@
|
|
|
|
\keys_define:nn{BigFig}{
|
|
|
|
\keys_define:nn{BigFig}{
|
|
|
|
hres .fp_set:N = \l_BigFig_hres_fp,
|
|
|
|
hres .fp_set:N = \l_BigFig_hres_fp,
|
|
|
|
hres .initial:n = {0},
|
|
|
|
hres .initial:n = {0},
|
|
|
|
|
|
|
|
hres .default:n = {0},
|
|
|
|
|
|
|
|
|
|
|
|
dpi .fp_set:N = \l_BigFig_dpi_fp,
|
|
|
|
dpi .fp_set:N = \l_BigFig_dpi_fp,
|
|
|
|
dpi .initial:n = {96},%{\c_BigFig_dpi_fp},
|
|
|
|
dpi .initial:n = {96},
|
|
|
|
|
|
|
|
dpi .default:n = {96},
|
|
|
|
|
|
|
|
|
|
|
|
scale .fp_set:N = \l_BigFig_scale_fp,
|
|
|
|
scale .fp_set:N = \l_BigFig_scale_fp,
|
|
|
|
scale .initial:n = {1},
|
|
|
|
scale .initial:n = {1},
|
|
|
|
|
|
|
|
scale .default:n = {1},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\dim_new:N \l_BigFig_overhang_dim
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentCommand{\BigFig}{
|
|
|
|
\NewDocumentCommand{\BigFig}{
|
|
|
|
% Key=value options.
|
|
|
|
% Key=value options.
|
|
|
|
O{}
|
|
|
|
O{}
|
|
|
|
@@ -172,10 +179,12 @@
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
% Caption.
|
|
|
|
% Caption.
|
|
|
|
m
|
|
|
|
m
|
|
|
|
}{%
|
|
|
|
}{ \group_begin:
|
|
|
|
\keys_set:nn{BigFig}{#1}
|
|
|
|
\keys_set:nn{BigFig}{#1}
|
|
|
|
\fp_compare:nNnF {\l_BigFig_hres_fp} = {0} {
|
|
|
|
\fp_compare:nNnTF {\l_BigFig_hres_fp} = {0} {
|
|
|
|
\dim_set:Nn \l_BigFloat_overhang_dim {
|
|
|
|
\dim_set:Nn \l_BigFig_overhang_dim {\l_BigFloat_overhang_dim}
|
|
|
|
|
|
|
|
}{
|
|
|
|
|
|
|
|
\dim_set:Nn \l_BigFig_overhang_dim {
|
|
|
|
\dim_eval:n{
|
|
|
|
\dim_eval:n{
|
|
|
|
(\fp_to_dim:n{
|
|
|
|
(\fp_to_dim:n{
|
|
|
|
\l_BigFig_scale_fp
|
|
|
|
\l_BigFig_scale_fp
|
|
|
|
@@ -186,30 +195,32 @@
|
|
|
|
- \linewidth)
|
|
|
|
- \linewidth)
|
|
|
|
/ 3}
|
|
|
|
/ 3}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%\dim_show:N \l_BigFloat_overhang_dim
|
|
|
|
|
|
|
|
}{}
|
|
|
|
}{}
|
|
|
|
\begin{BigFloat}[
|
|
|
|
\begin{BigFloat}[
|
|
|
|
type = figure,
|
|
|
|
type = figure,
|
|
|
|
overhang = \l_BigFloat_overhang_dim,
|
|
|
|
overhang = \l_BigFig_overhang_dim,
|
|
|
|
placement:e = {\clist_use:Nn \l_BigFloat_placement_clist {}},
|
|
|
|
placement:e = \l_Float_placement_clist,
|
|
|
|
offset = \l_BigFloat_offset_fp,
|
|
|
|
offset = \l_BigFloat_offset_fp,
|
|
|
|
]%
|
|
|
|
]
|
|
|
|
\captionsetup{type=figure}%
|
|
|
|
\captionsetup{type=figure}
|
|
|
|
\includegraphics[keepaspectratio,width=\linewidth]{#2}%
|
|
|
|
\includegraphics[keepaspectratio,width=\linewidth]{#2}
|
|
|
|
\Centering\captionof{figure}{#4}%\par
|
|
|
|
\Centering\captionof{figure}{#4}
|
|
|
|
\label{fig:#3}%
|
|
|
|
\label{fig:#3}
|
|
|
|
\end{BigFloat}%
|
|
|
|
\end{BigFloat}
|
|
|
|
|
|
|
|
\group_end: }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn{}{
|
|
|
|
|
|
|
|
DoubleBigFig .inherit:n = {BigFloat},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn{DoubleBigFig}{
|
|
|
|
\dim_const:Nn \c_DoubleBigFig_space_dim {6pt}
|
|
|
|
overhang .dim_set:N = \l_DoubleBigFig_overhang_dim,
|
|
|
|
|
|
|
|
overhang .initial:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
offset .fp_set:N = \l_DoubleBigFig_offset_fp,
|
|
|
|
\keys_define:nn {DoubleBigFig} {
|
|
|
|
offset .initial:e = {\c_BigFloat_offset_fp},
|
|
|
|
space .dim_set:N = \l_DoubleBigFig_space_dim,
|
|
|
|
|
|
|
|
space .initial:e = {\c_DoubleBigFig_space_dim},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentCommand{\DoubleBigFig}{%
|
|
|
|
\NewDocumentCommand{\DoubleBigFig}{
|
|
|
|
% Key=value options.
|
|
|
|
% Key=value options.
|
|
|
|
O{}
|
|
|
|
O{}
|
|
|
|
% First graphic filename.
|
|
|
|
% First graphic filename.
|
|
|
|
@@ -224,25 +235,50 @@
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
% Second Graphic caption.
|
|
|
|
% Second Graphic caption.
|
|
|
|
m
|
|
|
|
m
|
|
|
|
}{%
|
|
|
|
}{ \group_begin:
|
|
|
|
|
|
|
|
% The following is a hack to keep the figure counter from incrementing by 4
|
|
|
|
|
|
|
|
% instead of 2. Replace it with a proper solution if you find one.
|
|
|
|
|
|
|
|
\addtocounter{figure}{-2}
|
|
|
|
|
|
|
|
|
|
|
|
\keys_set:nn{DoubleBigFig}{#1}
|
|
|
|
\keys_set:nn{DoubleBigFig}{#1}
|
|
|
|
\begin{BigFloat}[
|
|
|
|
\begin{BigFloat}[
|
|
|
|
type = figure,
|
|
|
|
type = generic,
|
|
|
|
overhang = \l_DoubleBigFig_overhang_dim,
|
|
|
|
overhang = \l_BigFloat_overhang_dim,
|
|
|
|
placement = {p},
|
|
|
|
placement:e = \l_Float_placement_clist,
|
|
|
|
offset = \l_DoubleBigFig_offset_fp,
|
|
|
|
offset = \l_BigFloat_offset_fp,
|
|
|
|
]%
|
|
|
|
]
|
|
|
|
\captionsetup{type=figure}%
|
|
|
|
\begin{tblr}{
|
|
|
|
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
|
|
|
|
colspec = {Q[c,wd=\linewidth]},
|
|
|
|
\Centering\captionof{figure}{#4}%
|
|
|
|
cells = {font=\mdseries},
|
|
|
|
\label{fig:#3}
|
|
|
|
hlines = {0pt},
|
|
|
|
\bigskip
|
|
|
|
hborder{1,Z} = {
|
|
|
|
\captionsetup{type=figure}%
|
|
|
|
abovespace = 0pt,
|
|
|
|
\includegraphics[keepaspectratio,width=\textwidth]{#5}%
|
|
|
|
belowspace = 0pt,
|
|
|
|
\Centering\captionof{figure}{#7}%
|
|
|
|
},
|
|
|
|
\label{fig:#6}%
|
|
|
|
hborder{2} = {
|
|
|
|
\end{BigFloat}%
|
|
|
|
abovespace = \l_DoubleBigFig_space_dim,
|
|
|
|
}
|
|
|
|
belowspace = \l_DoubleBigFig_space_dim,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
vborder{1-Z} = {
|
|
|
|
|
|
|
|
leftspace = 0pt,
|
|
|
|
|
|
|
|
rightspace = 0pt,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
%\captionsetup{type=figure}
|
|
|
|
|
|
|
|
\includegraphics[keepaspectratio,width=\textwidth]{#2}
|
|
|
|
|
|
|
|
\par
|
|
|
|
|
|
|
|
\MyCaption{fig:#3}{#4}\\
|
|
|
|
|
|
|
|
% \Centering\captionof{figure}{#4}
|
|
|
|
|
|
|
|
% \label{fig:#3}\\
|
|
|
|
|
|
|
|
%\captionsetup{type=figure}
|
|
|
|
|
|
|
|
\includegraphics[keepaspectratio,width=\textwidth]{#5}
|
|
|
|
|
|
|
|
\par
|
|
|
|
|
|
|
|
\MyCaption{fig:#6}{#7}
|
|
|
|
|
|
|
|
% \Centering\captionof{figure}{#7}
|
|
|
|
|
|
|
|
% \label{fig:#6}
|
|
|
|
|
|
|
|
\end{tblr}
|
|
|
|
|
|
|
|
\end{BigFloat}
|
|
|
|
|
|
|
|
\group_end: }
|
|
|
|
|
|
|
|
|
|
|
|
\dim_const:Nn \c_TwinFig_space_dim {3pt}
|
|
|
|
\dim_const:Nn \c_TwinFig_space_dim {3pt}
|
|
|
|
\dim_const:Nn \c_TwinFig_width_dim {
|
|
|
|
\dim_const:Nn \c_TwinFig_width_dim {
|
|
|
|
@@ -251,35 +287,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
\ProvideLength{\TwinFigWidth}[\dim_use:N \c_TwinFig_width_dim]
|
|
|
|
\ProvideLength{\TwinFigWidth}[\dim_use:N \c_TwinFig_width_dim]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn {} {
|
|
|
|
|
|
|
|
TwinFig .inherit:n = {BigFloat},
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\keys_define:nn{TwinFig}{
|
|
|
|
\keys_define:nn{TwinFig}{
|
|
|
|
overhang .dim_set:N = \l_TwinFig_overhang_dim,
|
|
|
|
|
|
|
|
overhang .initial:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
% overhang .default:e = {\c_BigFloat_overhang_dim},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
placement .clist_set:N= \l_TwinFig_placement_clist,
|
|
|
|
|
|
|
|
placement .initial:e = {\c_BigFloat_placement_clist},
|
|
|
|
|
|
|
|
% placement .default:e = {\c_BigFloat_placement_clist},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
offset .fp_set:N = \l_TwinFig_offset_fp,
|
|
|
|
|
|
|
|
offset .initial:e = {\c_BigFloat_offset_fp},
|
|
|
|
|
|
|
|
% offset .default:e = {\c_BigFloat_offset_fp},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
valign .choices:nn = {b,f,h,m,t}{
|
|
|
|
valign .choices:nn = {b,f,h,m,t}{
|
|
|
|
\str_set:Ne \l_TwinFig_valign_str {\l_keys_choice_tl}
|
|
|
|
\str_set:Ne \l_TwinFig_valign_str {\l_keys_choice_tl}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
valign .initial:n = {m},
|
|
|
|
valign .initial:n = {m},
|
|
|
|
% valign .default:n = {m},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
width .dim_set:N = \l_TwinFig_width_dim,
|
|
|
|
width .dim_set:N = \l_TwinFig_width_dim,
|
|
|
|
width .initial:e = {\c_TwinFig_width_dim},
|
|
|
|
width .initial:e = {\c_TwinFig_width_dim},
|
|
|
|
% width .default:e = {\c_TwinFig_width_dim},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
space .dim_set:N = \l_TwinFig_space_dim,
|
|
|
|
space .dim_set:N = \l_TwinFig_space_dim,
|
|
|
|
space .initial:e = {\c_TwinFig_space_dim},
|
|
|
|
space .initial:e = {\c_TwinFig_space_dim},
|
|
|
|
% space .default:e = {\c_TwinFig_space_dim},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentCommand{\TwinFig}{%
|
|
|
|
\NewDocumentCommand{\TwinFig}{
|
|
|
|
% #1: Key=value options.
|
|
|
|
% #1: Key=value options.
|
|
|
|
O{}
|
|
|
|
O{}
|
|
|
|
% #2: First graphic file.
|
|
|
|
% #2: First graphic file.
|
|
|
|
@@ -294,51 +319,53 @@
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
% #7: Second caption.
|
|
|
|
% #7: Second caption.
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
>{\TrimSpaces}m
|
|
|
|
}{%
|
|
|
|
}{ \group_begin:
|
|
|
|
\keys_set:nn{TwinFig}{#1}%
|
|
|
|
% The following is a hack to keep the figure counter from incrementing by 4
|
|
|
|
|
|
|
|
% instead of 2. Replace it with a proper solution if you find one.
|
|
|
|
|
|
|
|
\addtocounter{figure}{-2}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\keys_set:nn{TwinFig}{#1}
|
|
|
|
\begin{BigFloat}[
|
|
|
|
\begin{BigFloat}[
|
|
|
|
type = {figure},
|
|
|
|
type = {generic},
|
|
|
|
overhang = \l_TwinFig_overhang_dim,
|
|
|
|
overhang = \l_BigFloat_overhang_dim,
|
|
|
|
placement:e = \l_TwinFig_placement_clist,
|
|
|
|
placement:e = \l_Float_placement_clist,
|
|
|
|
offset = \l_TwinFig_offset_fp,
|
|
|
|
offset = \l_BigFloat_offset_fp,
|
|
|
|
]%
|
|
|
|
]
|
|
|
|
%\typeout{TwinFig~valign:~"\l_TwinFig_valign_str"}
|
|
|
|
\begin{tblr}{
|
|
|
|
\begin{tblr}{%
|
|
|
|
colspec = {*{2}{Q[c,wd=\l_TwinFig_width_dim]}},
|
|
|
|
colspec = {*{2}{Q[c,wd=\l_TwinFig_width_dim]}},%
|
|
|
|
|
|
|
|
rows:e = {\l_TwinFig_valign_str},
|
|
|
|
rows:e = {\l_TwinFig_valign_str},
|
|
|
|
hlines = {0pt},
|
|
|
|
hlines = {0pt},
|
|
|
|
%vlines,% For debugging. Comment out when done.
|
|
|
|
hborder{1-Z} = {
|
|
|
|
hborder{1,Z} = {%
|
|
|
|
abovespace = 0pt,
|
|
|
|
abovespace = 0pt,%
|
|
|
|
belowspace = 0pt,
|
|
|
|
belowspace = 0pt,%
|
|
|
|
},
|
|
|
|
},%
|
|
|
|
vborder{1,Z} = {
|
|
|
|
vborder{1,Z} = {%
|
|
|
|
leftspace = 0pt,
|
|
|
|
leftspace = 0pt,%
|
|
|
|
rightspace = 0pt,
|
|
|
|
rightspace = 0pt,%
|
|
|
|
},
|
|
|
|
},%
|
|
|
|
vborder{2} = {
|
|
|
|
vborder{2} = {%
|
|
|
|
leftspace = \l_TwinFig_space_dim,
|
|
|
|
leftspace = \l_TwinFig_space_dim,%
|
|
|
|
rightspace = \l_TwinFig_space_dim,
|
|
|
|
rightspace = \l_TwinFig_space_dim,%
|
|
|
|
},
|
|
|
|
},%
|
|
|
|
}
|
|
|
|
}%
|
|
|
|
|
|
|
|
\vfill
|
|
|
|
\vfill
|
|
|
|
\captionsetup{type=figure}%
|
|
|
|
\captionsetup{type=figure}
|
|
|
|
\includegraphics[%
|
|
|
|
\includegraphics[
|
|
|
|
keepaspectratio,width=\l_TwinFig_width_dim%
|
|
|
|
keepaspectratio,width=\l_TwinFig_width_dim
|
|
|
|
]{#2}%
|
|
|
|
]{#2}
|
|
|
|
\captionof{figure}{#4}%
|
|
|
|
\captionof{figure}{#4}
|
|
|
|
\label{fig:#3}
|
|
|
|
\label{fig:#3}
|
|
|
|
\vfill%
|
|
|
|
\vfill
|
|
|
|
&%
|
|
|
|
&
|
|
|
|
\vfill
|
|
|
|
\vfill
|
|
|
|
\captionsetup{type=figure}%
|
|
|
|
\captionsetup{type=figure}
|
|
|
|
\includegraphics[%
|
|
|
|
\includegraphics[
|
|
|
|
keepaspectratio,width=\l_TwinFig_width_dim%
|
|
|
|
keepaspectratio,width=\l_TwinFig_width_dim
|
|
|
|
]{#5}%
|
|
|
|
]{#5}
|
|
|
|
\captionof{figure}{#7}%
|
|
|
|
\captionof{figure}{#7}
|
|
|
|
\label{fig:#6}
|
|
|
|
\label{fig:#6}
|
|
|
|
\vfill%
|
|
|
|
\vfill
|
|
|
|
\\%
|
|
|
|
\\
|
|
|
|
\end{tblr}%
|
|
|
|
\end{tblr}
|
|
|
|
\end{BigFloat}%
|
|
|
|
\end{BigFloat}
|
|
|
|
}
|
|
|
|
\group_end: }
|