From 59196d54e6a15c5b2c97646b05979d4c0900f966 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 13 Mar 2023 02:09:11 +0300 Subject: [PATCH] added \ChangeLayout{} macro/shorthand. Signed-off-by: Alex A. Naanou --- examples/block2cover.tex | 5 +---- photobook.cls | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/block2cover.tex b/examples/block2cover.tex index 5694f8f..1c902a9 100644 --- a/examples/block2cover.tex +++ b/examples/block2cover.tex @@ -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} % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/photobook.cls b/photobook.cls index 8f9da6c..14c8879 100644 --- a/photobook.cls +++ b/photobook.cls @@ -76,7 +76,7 @@ %%% NOTE: \def\@[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{} +% +%% This is a shorthand for |\def\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} %----------------------------------------------------------------------