added \ChangeLayout{<layoutmode>} macro/shorthand.

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-03-13 02:09:11 +03:00
parent 60f6fe4a72
commit 59196d54e6
2 changed files with 15 additions and 5 deletions

View File

@ -23,10 +23,7 @@
%
% This can be usefull when having a single setup file for multiple book
% elemnts like page blocks, covers, endpapers and dust jackets...
\def\layoutmode{cover}
\ReInitPages
\ChangeLayout{cover}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -76,7 +76,7 @@
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
\edef\photobook@FILEVERSION{v0.1.10}
\edef\photobook@FILEVERSION{v0.1.11}
\edef\photobook@FILEDATE{2023-03-11}
@ -1156,6 +1156,19 @@
\InitPages%
\ResetFoldMarks}
%% \DescribeMacro{\ChangeLayout}
%
%% Change document layout.
%
%% >> \ChangeLayout{<layoutmode>}
%
%% This is a shorthand for |\def\layoutmode{<layoutmode>}| and then
%% |\ReInitPages|, and as this is changing any other parameters that may
%% affect the layout, this should be done last.
%%
\newcommand\ChangeLayout[1]{%
\def\layoutmode{#1}%
\ReInitPages}
%----------------------------------------------------------------------