foldout is now an env...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-09-17 18:34:12 +03:00
parent 4ff6a7327a
commit 8adf442ac7
2 changed files with 18 additions and 12 deletions

View File

@ -1073,7 +1073,7 @@
% XXX EXPERIMENTAL
% >> \resizedpage[<bleed>]{<width>}{<height>}{<code>}
\newcommand\resizedpage[4][\bleed]{
\newenvironment{resizedpages}[3][\bleed]{
\begingroup%
% setup page...
\setlength\bleed{#1}%
@ -1090,13 +1090,14 @@
%
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}%
%
#4
}{%
\endgroup%
% reset...
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}}
%----------------------------------------------------------------------
%%%% Environments and Cells
@ -2669,14 +2670,14 @@
% XXX EXPERIMENTAL
%% \DescribeMacro{\foldoutpages\{..\}}
%% \DescribeEnv{foldout}
%%% \DescribeMacro{\foldoutpagecell\{..\}}
%
%% \EXPERIMENTAL[(in progress)]
%% \EXPERIMENTAL
%%
%% Create 2 or more pages in foldout mode.
%
%% >> \foldoutpages[<foldout-width>]{<code>}
%% >> \begin{foldout}[<count>] ... \end{foldout}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
@ -2798,7 +2799,7 @@
% XXX add fold type support -- in-in / in-out...
% XXX add manual mode -- list of lengths...
% XXX add fold marks in bleeds...
\newcommand\foldoutpages[2][2]{%
\newenvironment{foldout}[1][2]{%
\begingroup%
% calculate fold geometry...
\setlength\foldoutwidth{0pt}%
@ -2825,12 +2826,15 @@
\ignoreemptyitems%
\readlist\foldoutcellwidths{\foldoutcellwidths}%
%
% show the pages...
% pages...
% NOTE: we'll keep the start of the foldout set at the right page
% and end it on the left page.
\cleardoublepage%
\resizedpage{\foldoutwidth}{\blockheight}{%
\begin{resizedpages}{\foldoutwidth}{\blockheight}%
\ignorespaces%
#2%
\cleardoublepage}%
}{%
\cleardoublepage%
\end{resizedpages}%
\endgroup}

View File

@ -102,9 +102,11 @@ Special case: image that fits vertically will be offset by \verb+\bindingoffset+
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\Section{foldoutpages}
\foldoutpages[2]{
%\foldoutpages[2]{
\begin{foldout}[2]
\ImagePageFill{\PageInfo}{\TestImageV}%
\ImagePageFill{\PageInfo}{\TestImage}}
\ImagePageFill{\PageInfo}{\TestImage}%}
\end{foldout}