lots of tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-09-08 18:52:23 +03:00
parent 91819739e0
commit aee3ffe30d
2 changed files with 48 additions and 22 deletions

View File

@ -1327,10 +1327,6 @@
\end{minipagecell*}}
% XXX add a direct \adjboxcell{..} -- directly passing args to \adjustbox{..}...
% XXX
% XXX EXPERIMENTAL
%% \DescribeEnv{zinlinecell}
%% \DescribeEnv{zinlinecell*}
@ -1398,6 +1394,31 @@
\ignorespaces}
% XXX EXPERIMENTAL
%% \DescribeEnv{adjustcell}
%% \DescribeEnv{adjustcell*}
%
%% \EXPERIMENTAL
%%
\newenvironment{adjustcell*}[4][t]{%
\begin{adjustbox}{#2}%
\vspace{0pt}%
\begin{minipagecell*}[#1]{#3}{#4}%
}{%
\end{minipagecell*}%
\end{adjustbox}}
\newenvironment{adjustcell}[4][t]{%
\begin{adjustbox}{#2}%
\vspace{0pt}%
\begin{minipagecell}[#1]{#3}{#4}%
}{%
\end{minipagecell}%
\end{adjustbox}}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%%%%% Save cells
@ -3143,19 +3164,23 @@
\ignoreemptyitems%
\readlist*\photobook@ImagePageFit@args{moo, #1}%
\foreachitem\photobook@ImagePageFit@opt\in\photobook@ImagePageFit@args{%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{inner}}{%
\photobook@ImagePageFit@centeredtrue}{}%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{outer}}{%
\photobook@ImagePageFit@centeredtrue}{}%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{top}}{%
\photobook@ImagePageFit@centeredtrue}{}
\photobook@ImagePageFit@centeredtrue}{}%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{left}}{%
\photobook@ImagePageFit@centeredtrue}{}
\photobook@ImagePageFit@centeredtrue}{}%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{bottom}}{%
\photobook@ImagePageFit@centeredtrue}{}
\photobook@ImagePageFit@centeredtrue}{}%
\ifthenelse{\equal{\photobook@ImagePageFit@opt}{right}}{%
\photobook@ImagePageFit@centeredtrue}{}}
\photobook@ImagePageFit@centeredtrue}{}}%
% align center -> check if image fits vertically...
\ifphotobook@ImagePageFit@centered\else%
\sbox{\photobook@imagebox}{\includegraphics{#3}}%
\setlength\photobook@ImagePageFit@imgratio{1pt
* \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
\setlength\photobook@ImagePageFit@imgratio{%
1pt * \ratio{\wd\photobook@imagebox}{\ht\photobook@imagebox}}%
% NOTE: subtracting \bindingoffset from \cellwidth here makes sure that
% we avoid offsetting images close enough in ratio to the page and
% messing up bleeds...
@ -3769,11 +3794,11 @@
%% \DescribeMacro{\pdfmargincomment\{..\}}
%
%% Add pdf comment as overlay.
%% Add pdf comment as margin overlay.
%%
%% >> \pdfmargincomment{<comment>}
%%
\newcommand{\pdfmargincomment}[1]{%
\newcommand\pdfcommentcell[1]{%
\begin{cell*}{
\ifnumodd{\thepage}{%
\cellwidth - \marginparwidth - 2\bleed - 1cm

View File

@ -242,7 +242,8 @@ anotatePath(){
# NOTE: did not figure out how to make a verbatim comment in latex
# so here we are, doing it in shell...
path=${path//_/\\_}
echo "\\pdfmargincomment{Image: $path}%"
#echo "\\pdfmargincomment{Image: $path}%"
echo "\\pdfcommentcell{Image: $path}%"
}