mirror of
				https://github.com/flynx/photobook.git
				synced 2025-10-31 19:30:08 +00:00 
			
		
		
		
	cleaned out legacy templates + reworking page and spread temlates...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									af5e65b793
								
							
						
					
					
						commit
						5dad703caa
					
				
							
								
								
									
										545
									
								
								photobook.cls
									
									
									
									
									
								
							
							
						
						
									
										545
									
								
								photobook.cls
									
									
									
									
									
								
							| @ -14,7 +14,6 @@ | |||||||
| %		- templates --  \ImagePage{..} | %		- templates --  \ImagePage{..} | ||||||
| % XXX see where we need to \ignorespaces... | % XXX see where we need to \ignorespaces... | ||||||
| % XXX might be a good idea to add a spine calculator... | % XXX might be a good idea to add a spine calculator... | ||||||
| % XXX LEGACY BUG: fix \OFFSETFIX |  | ||||||
| % | % | ||||||
| % | % | ||||||
| %---------------------------------------------------------------------- | %---------------------------------------------------------------------- | ||||||
| @ -44,10 +43,10 @@ | |||||||
| %% | %% | ||||||
| %% \usepackage{imakeidx} | %% \usepackage{imakeidx} | ||||||
| %% \makeindex[ | %% \makeindex[ | ||||||
| %%		columns=3,  | %%		columns=1,  | ||||||
| %%		title=Alphabetical Index,  | %%		title=Alphabetical Index,  | ||||||
| %%		intoc, | %%		intoc, | ||||||
| %%		options= -s photobook.ist] | %%		options= -s photobook.ist ] | ||||||
| %% | %% | ||||||
| %%% \newcommand\DescribeGlobal[1]{% | %%% \newcommand\DescribeGlobal[1]{% | ||||||
| %%%	\DescribeMacro{#1}} | %%%	\DescribeMacro{#1}} | ||||||
| @ -971,21 +970,6 @@ | |||||||
| 				\hbox{}\newpage \fi\fi\fi } | 				\hbox{}\newpage \fi\fi\fi } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| % XXX LEGACY? |  | ||||||
| % XXX workaround a problem with xelatex vs. lualatex... |  | ||||||
| \ifxetex |  | ||||||
| 	\newcommand\ShipoutPicture[1]{% |  | ||||||
| 		\AddToShipoutPicture*{#1}} |  | ||||||
| 
 |  | ||||||
| \else |  | ||||||
| 	% XXX for some reason in pdflatex and lualatex \pagecolor{..} and  |  | ||||||
| 	%		\AddToShipoutPicture*{..} start fighting over space... |  | ||||||
| 	% XXX this draws over page numbers... |  | ||||||
| 	\newcommand\ShipoutPicture[1]{% |  | ||||||
| 		\AddToShipoutPictureFG*{#1}} |  | ||||||
| \fi |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| %M \DescribeMacro{\ResettableMacro\{..\}} | %M \DescribeMacro{\ResettableMacro\{..\}} | ||||||
| % | % | ||||||
| %M Create a resettable command. | %M Create a resettable command. | ||||||
| @ -1034,13 +1018,6 @@ | |||||||
| 	\csname reset#1\endcsname} | 	\csname reset#1\endcsname} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |  | ||||||
| % XXX HACKS... |  | ||||||
| 
 |  | ||||||
| \newlength{\OFFSETFIX} |  | ||||||
| \setlength{\OFFSETFIX}{-4mm} |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| %---------------------------------------------------------------------- | %---------------------------------------------------------------------- | ||||||
| %%%% Environments and Cells | %%%% Environments and Cells | ||||||
| @ -2895,6 +2872,7 @@ | |||||||
| %% to configure the template defaults separately. | %% to configure the template defaults separately. | ||||||
| %% | %% | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| %%%%% No bleed | %%%%% No bleed | ||||||
| 
 | 
 | ||||||
| @ -2955,6 +2933,132 @@ | |||||||
| 	\end{page}} | 	\end{page}} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | %% \DescribeMacro{\ImagePageClear\{..\}} | ||||||
|  | %% \DescribeMacro{\ImagePageClearCaption\{..\}} | ||||||
|  | %% \DescribeMacro{\resetImagePageClearCaption} | ||||||
|  | %% \DescribeMacro{\ImagePageClear*\{..\}} | ||||||
|  | % | ||||||
|  | %%	>> \ImagePageClear[<options>]{<caption>}{<image>} | ||||||
|  | %% | ||||||
|  | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%    \clearimage      \clearimage | ||||||
|  | %%    v                v | ||||||
|  | %%   +-----------------+      +-----------------+  < \clearimage | ||||||
|  | %%   |                 |      |  +-----------+  |    | ||||||
|  | %%   |+---------------+|      |  | .       . |  | | ||||||
|  | %%   || .           . ||      |  |  .     .  |  | | ||||||
|  | %%   ||    .     .    ||      |  |   .   .   |  | | ||||||
|  | %%   ||     image     ||      |  |   image   |  | | ||||||
|  | %%   ||    .     .    ||      |  |   .   .   |  | | ||||||
|  | %%   || .           . ||      |  |  .     .  |  | | ||||||
|  | %%   |+---------------+|      |  | .       . |  | | ||||||
|  | %%   |               c |      |  +-----------+  | | ||||||
|  | %%   +-----------------+      +-----------------+  < \clearimage | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
|  | %% Default image clearance (|clearimage| option value in |\imagecell{..}|)  | ||||||
|  | %% is set by |\clearimage| global length. | ||||||
|  | %% | ||||||
|  | % XXX make captions adaptive???  | ||||||
|  | \ResettableMacro{ImagePageClearCaption}[1]{% | ||||||
|  | 	\captioncell[under, align=flushright]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | 
 | ||||||
|  | \ImagePageTemplate{ImagePageClear}{% | ||||||
|  | 	\begin{page}% | ||||||
|  | 	\begin{pagecell}% | ||||||
|  | 		\imagecell[% | ||||||
|  | 			center,  | ||||||
|  | 			clearance=\clearimage,  | ||||||
|  | 			scale=\imagescale, | ||||||
|  | 			offsettop=\imageoffsettop, | ||||||
|  | 			offsetleft=\imageoffsetleft, | ||||||
|  | 			#1]{#2}{#3}% | ||||||
|  | 	\end{pagecell}% | ||||||
|  | 	\end{page}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %% \DescribeMacro{\ImagePageClear<D>\{..\}} | ||||||
|  | %% \DescribeMacro{\ImagePageClear<D>Caption\{..\}} | ||||||
|  | %% \DescribeMacro{\resetImagePageClear<D>Caption} | ||||||
|  | %% \DescribeMacro{\ImagePageClear<D>*\{..\}} | ||||||
|  | % | ||||||
|  | %% |<D>| can be one of T, B, L or R, for top, bottom, left and right  | ||||||
|  | %% respectively. | ||||||
|  | %% | ||||||
|  | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%   +-----------------+    +-----------------+  | ||||||
|  | %%   |+---------------+|    |                 |    | ||||||
|  | %%   || .           . ||    | c               |  | ||||||
|  | %%   ||    .     .    ||    |+---------------+|  | ||||||
|  | %%   ||     image     ||    || .           . ||  | ||||||
|  | %%   ||    . (T) .    ||    ||    .     .    ||  | ||||||
|  | %%   || .           . ||    ||     image     ||  | ||||||
|  | %%   |+---------------+|    ||    . (B) .    ||  | ||||||
|  | %%   |               c |    || .           . ||  | ||||||
|  | %%   |                 |    |+---------------+|  | ||||||
|  | %%   +-----------------+    +-----------------+  | ||||||
|  | %% | ||||||
|  | %%   +-----------------+    +-----------------+  | ||||||
|  | %%   |+-----------+    |    |    +-----------+|  | ||||||
|  | %%   || .       . |    |    |    | .       . ||  | ||||||
|  | %%   ||  .     .  |    |    |    |  .     .  ||  | ||||||
|  | %%   ||   .   .   |    |    |    |   .   .   ||  | ||||||
|  | %%   ||   image   |    |    |    |   image   ||  | ||||||
|  | %%   ||   .(L).   |    |    |    |   .(R).   ||  | ||||||
|  | %%   ||  .     .  |    |    |    |  .     .  ||  | ||||||
|  | %%   || .       . |    |    |    | .       . ||  | ||||||
|  | %%   |+-----------+ c  |    |  c +-----------+|  | ||||||
|  | %%   +-----------------+    +-----------------+  | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
|  | % TEST... | ||||||
|  | \ResettableMacro{ImagePageClearTCaption}[1]{% | ||||||
|  | 	\captioncell[under, align=flushright]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImagePageClearT}{% | ||||||
|  | 	\ImagePageClear*[% | ||||||
|  | 		top, | ||||||
|  | 		clearance=-\clearimage,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImagePageClearBCaption}[1]{% | ||||||
|  | 	\captioncell[over, align=flushright]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImagePageClearB}{% | ||||||
|  | 	\ImagePageClear*[% | ||||||
|  | 		bottom, | ||||||
|  | 		clearance=-\clearimage,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImagePageClearLCaption}[1]{% | ||||||
|  | 	\captionblockcell[right]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImagePageClearL}{% | ||||||
|  | 	\ImagePageClear*[% | ||||||
|  | 		left, | ||||||
|  | 		clearance=-\clearimage,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImagePageClearRCaption}[1]{% | ||||||
|  | 	\captionblockcell[left]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImagePageClearR}{% | ||||||
|  | 	\ImagePageClear*[% | ||||||
|  | 		right, | ||||||
|  | 		clearance=-\clearimage,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| %%%%% Partial bleed | %%%%% Partial bleed | ||||||
| 
 | 
 | ||||||
| @ -2987,7 +3091,7 @@ | |||||||
| %% \end{verbatim} | %% \end{verbatim} | ||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| %% | %% | ||||||
| %% Default image clearence (|clearimage| option value in |\imagecell{..}|)  | %% Default image clearance (|clearimage| option value in |\imagecell{..}|)  | ||||||
| %% is set by |\clearimage| global length. | %% is set by |\clearimage| global length. | ||||||
| %% | %% | ||||||
| % XXX make captions adaptive???  | % XXX make captions adaptive???  | ||||||
| @ -2996,104 +3100,89 @@ | |||||||
| 		\captionformat{#1}}} | 		\captionformat{#1}}} | ||||||
| 
 | 
 | ||||||
| \ImagePageTemplate{ImagePageFit}{% | \ImagePageTemplate{ImagePageFit}{% | ||||||
| 	\begin{page}% | 	\ImagePageClear*[% | ||||||
| 	\begin{pagecell}% | 		clearance=-\bleed,  | ||||||
| 		\imagecell[center,  | 		#1]{#2}{#3}} | ||||||
| 			clearance=\clearimage,  |  | ||||||
| 			scale=\imagescale, |  | ||||||
| 			offsettop=\imageoffsettop, |  | ||||||
| 			offsetleft=\imageoffsetleft, |  | ||||||
| 			#1]{#2}{#3}% |  | ||||||
| 	\end{pagecell}% |  | ||||||
| 	\end{page}} |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| % XXX | % XXX add top/bottom versions... | ||||||
| % XXX \OFFSETFIX | %		....and combine docs... | ||||||
| %% \DescribeMacro{\portraitimagepageleft\{..\}} | 
 | ||||||
| % | 
 | ||||||
| %% \LEGACY | %% \DescribeMacro{\ImagePageFit<D>\{..\}} | ||||||
| % | %% \DescribeMacro{\ImagePageFit<D>Caption\{..\}} | ||||||
| %%  >> portraitimagepageleft[<clearence>]{<caption>}{<image>} | %% \DescribeMacro{\resetImagePageFit<D>Caption} | ||||||
|  | %% \DescribeMacro{\ImagePageFit<D>*\{..\}} | ||||||
| % | % | ||||||
|  | %% |<D>| can be one of T, B, L or R, for top, bottom, left and right  | ||||||
|  | %% respectively. | ||||||
|  | %% | ||||||
| %% \begin{minipage}{\textwidth} | %% \begin{minipage}{\textwidth} | ||||||
| %% \begin{verbatim} | %% \begin{verbatim} | ||||||
| %% | %% | ||||||
| %%   . . . . . . . . | %%   . . . . . . . . . . . .   | ||||||
| %%   . +-----------------+ | %%   . +-----------------+ .    +-----------------+ | ||||||
| %%   . |.         .|     | | %%   . |  .           .  | .    |                 | | ||||||
| %%   . | .       . |     | | %%   . |     .     .     | .    |                 | | ||||||
| %%   . |  .     .  |     | | %%   . |      image      | .    |                 | | ||||||
| %%   . |   .   .   |     | | %%   . |     . (T) .     | .  . |-----------------| . | ||||||
| %%   . |   image   |     | | %%   . |  .           .  | .  . |  .           .  | . | ||||||
| %%   . |   .   .   |     | | %%   . |-----------------| .  . |     .     .     | . | ||||||
| %%   . |  .     .  |     | | %%     |                 |    . |      image      | . | ||||||
| %%   . | .       . |     | | %%     |                 |    . |     . (B) .     | . | ||||||
| %%   . |.         .| c   | | %%     |                 |    . |  .           .  | . | ||||||
| %%   . +-----------------+ | %%     +-----------------+    . +-----------------+ . | ||||||
| %%   . . . . . . . . | %%                            . . . . . . . . . . . . | ||||||
|  | %%    | ||||||
|  | %%   . . . . . . . .                  . . . . . . . . | ||||||
|  | %%   . +-----------------+      +-----------------+ . | ||||||
|  | %%   . |.         .|     |      |     |.         .| . | ||||||
|  | %%   . | .       . |     |      |     | .       . | . | ||||||
|  | %%   . |  .     .  |     |      |     |  .     .  | . | ||||||
|  | %%   . |   .   .   |     |      |     |   .   .   | . | ||||||
|  | %%   . |   image   |     |      |     |   image   | . | ||||||
|  | %%   . |   .(L).   |     |      |     |   .(R).   | . | ||||||
|  | %%   . |  .     .  |     |      |     |  .     .  | . | ||||||
|  | %%   . | .       . |     |      |     | .       . | . | ||||||
|  | %%   . |.         .| c   |      |   c |.         .| . | ||||||
|  | %%   . +-----------------+      +-----------------+ . | ||||||
|  | %%   . . . . . . . .                  . . . . . . . . | ||||||
| %% | %% | ||||||
| %% \end{verbatim} | %% \end{verbatim} | ||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| %% | %% | ||||||
| \newcommand\portraitimagepageleft[3][\clearimage]{ | % XXX TEST... | ||||||
| 	\sbox{\photobook@imagebox}{ | \ResettableMacro{ImagePageFitTCaption}[1]{% | ||||||
| 		\includegraphics[ | 	\captionblockcell[under]{% | ||||||
| 			keepaspectratio,  | 		\captionformat{#1}}} | ||||||
| 			height=\dimexpr \blockheight - ((#1) * 2) \relax,]{#3} } | \ImagePageTemplate{ImagePageFitT}{% | ||||||
| 	\clearpage | 	\ImagePageFit*[% | ||||||
| 	%\captionboxright[-#1]{\photobook@imagebox}{#2} | 		top,  | ||||||
| 	\ShipoutPicture{ | 		#1]{#2}{#3}} | ||||||
| 		\AtPageLowerLeft{ |  | ||||||
| 			\hspace*{\dimexpr \OFFSETFIX + #1 \relax}{ |  | ||||||
| 			\raisebox{\dimexpr #1 + \bleed \relax}{ |  | ||||||
| 				\usebox\photobook@imagebox}}}} |  | ||||||
| 	\newpage} |  | ||||||
| 
 | 
 | ||||||
|  | \ResettableMacro{ImagePageFitBCaption}[1]{% | ||||||
|  | 	\captioncell[over]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImagePageFitB}{% | ||||||
|  | 	\ImagePageFit*[% | ||||||
|  | 		bottom,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
| 
 | 
 | ||||||
| % XXX | \ResettableMacro{ImagePageFitLCaption}[1]{% | ||||||
| %% \DescribeMacro{\portraitimagepageright\{..\}} | 	\captionblockcell[right]{% | ||||||
| % | 		\captionformat{#1}}} | ||||||
| %% \LEGACY | \ImagePageTemplate{ImagePageFitL}{% | ||||||
| % | 	\ImagePageFit*[% | ||||||
| %%	>> portraitimagepageright{<caption>}{<image>} | 		left,  | ||||||
| % | 		#1]{#2}{#3}} | ||||||
| %% \begin{minipage}{\textwidth} | 
 | ||||||
| %% \begin{verbatim} | \ResettableMacro{ImagePageFitRCaption}[1]{% | ||||||
| %% | 	\captionblockcell[left]{% | ||||||
| %%         . . . . . . . . | 		\captionformat{#1}}} | ||||||
| %%   +-----------------+ . | \ImagePageTemplate{ImagePageFitR}{% | ||||||
| %%   |     |.         .| . | 	\ImagePageFit*[% | ||||||
| %%   |     | .       . | . | 		right,  | ||||||
| %%   |     |  .     .  | . | 		#1]{#2}{#3}} | ||||||
| %%   |     |   .   .   | . |  | ||||||
| %%   |     |   image   | . |  | ||||||
| %%   |     |   .   .   | . |  | ||||||
| %%   |     |  .     .  | . |  | ||||||
| %%   |     | .       . | . |  | ||||||
| %%   |   c |.         .| . |  | ||||||
| %%   +-----------------+ . |  | ||||||
| %%         . . . . . . . . |  | ||||||
| %% |  | ||||||
| %% \end{verbatim} |  | ||||||
| %% \end{minipage} |  | ||||||
| %% |  | ||||||
| \newcommand\portraitimagepageright[3][\clearimage]{ |  | ||||||
| 	\sbox{\photobook@imagebox}{ |  | ||||||
| 		\includegraphics[ |  | ||||||
| 			keepaspectratio,  |  | ||||||
| 			height=\dimexpr \blockheight - ((#1) * 2) \relax,]{#3} } |  | ||||||
| 	\clearpage |  | ||||||
| 	%\captionboxleft[-#1]{\photobook@imagebox}{#2} |  | ||||||
| 	\ShipoutPicture{ |  | ||||||
| 		\AtPageLowerLeft{ |  | ||||||
| 			\hspace*{\dimexpr  |  | ||||||
| 				-#1  |  | ||||||
| 				+\blockwidth  |  | ||||||
| 				-\wd\photobook@imagebox \relax}{ |  | ||||||
| 			\raisebox{\dimexpr #1 + \bleed \relax}{ |  | ||||||
| 				\usebox\photobook@imagebox } } } } |  | ||||||
| 	\newpage } |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| @ -3128,7 +3217,7 @@ | |||||||
| %% \end{verbatim} | %% \end{verbatim} | ||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| %% | %% | ||||||
| %% Default image clearence (|clearimage| option value in |\imagecell{..}|)  | %% Default image clearance (|clearimage| option value in |\imagecell{..}|)  | ||||||
| %% is set by |\clearimage| global length. | %% is set by |\clearimage| global length. | ||||||
| %% | %% | ||||||
| \ResettableMacro{ImagePageFillCaption}[1]{% | \ResettableMacro{ImagePageFillCaption}[1]{% | ||||||
| @ -3136,7 +3225,9 @@ | |||||||
| 		\captionformat{#1}}} | 		\captionformat{#1}}} | ||||||
| 
 | 
 | ||||||
| \ImagePageTemplate{ImagePageFill}{% | \ImagePageTemplate{ImagePageFill}{% | ||||||
| 	\ImagePageFit*[fill, #1]{#2}{#3}} | 	\ImagePageFit*[% | ||||||
|  | 		fill,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\ImageHalfPageL\{..\}} | %% \DescribeMacro{\ImageHalfPageL\{..\}} | ||||||
| @ -3176,8 +3267,9 @@ | |||||||
| 
 | 
 | ||||||
| \ImagePageTemplate{ImageHalfPageL}{% | \ImagePageTemplate{ImageHalfPageL}{% | ||||||
| 	\begin{spreadtopages*}[2]{photobook@ImageHalfPageL@cell}% | 	\begin{spreadtopages*}[2]{photobook@ImageHalfPageL@cell}% | ||||||
| 		\imagecell[fill,  | 		\imagecell[% | ||||||
| 			clearance=\clearimage,  | 			fill,  | ||||||
|  | 			clearance=-\bleed, | ||||||
| 			scale=\imagescale, | 			scale=\imagescale, | ||||||
| 			offsettop=\imageoffsettop, | 			offsettop=\imageoffsettop, | ||||||
| 			offsetleft=\imageoffsetleft, | 			offsetleft=\imageoffsetleft, | ||||||
| @ -3226,8 +3318,9 @@ | |||||||
| 
 | 
 | ||||||
| \ImagePageTemplate{ImageHalfPageR}{% | \ImagePageTemplate{ImageHalfPageR}{% | ||||||
| 	\begin{spreadtopages*}[2]{photobook@ImageHalfPageR@cell}% | 	\begin{spreadtopages*}[2]{photobook@ImageHalfPageR@cell}% | ||||||
| 		\imagecell[fill,  | 		\imagecell[% | ||||||
| 			clearance=\clearimage,  | 			fill,  | ||||||
|  | 			clearance=-\bleed,  | ||||||
| 			scale=\imagescale, | 			scale=\imagescale, | ||||||
| 			offsettop=\imageoffsettop, | 			offsettop=\imageoffsettop, | ||||||
| 			offsetleft=\imageoffsetleft, | 			offsetleft=\imageoffsetleft, | ||||||
| @ -3243,87 +3336,132 @@ | |||||||
| %%%% Spread Templates | %%%% Spread Templates | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
|  | %%%%% No bleed | ||||||
|  | 
 | ||||||
|  | % XXX TEST!! | ||||||
|  | % XXX doc... | ||||||
|  | % XXX Should we make this just like with pages, i.e. \imagePage{..} and  | ||||||
|  | %		\ImagePageFit{..}, the first places relative to text and raises  | ||||||
|  | %		slightly while the second simply centers... | ||||||
|  | %% \DescribeMacro{\ImageSpread\{..\}} | ||||||
|  | %% \DescribeMacro{\ImageSpreadCaption\{..\}} | ||||||
|  | %% \DescribeMacro{\resetImageSpreadCaption} | ||||||
|  | %% \DescribeMacro{\ImageSpread*\{..\}} | ||||||
|  | % | ||||||
|  | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%    +---------------+---------------+  | ||||||
|  | %%    | +-------------+-------------+ |  | ||||||
|  | %%    | |  .          .          .  | |  | ||||||
|  | %%    | |      .      .      .      | |  | ||||||
|  | %%    | |          .  .  .          | |  | ||||||
|  | %%    | |           image           | |  | ||||||
|  | %%    | |          .  .  .          | |  | ||||||
|  | %%    | |      .      .      .      | |  | ||||||
|  | %%    | |  .          .          .  | |  | ||||||
|  | %%    | +-------------+-------------+ |  | ||||||
|  | %%    +---------------+---------------+  | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
|  | % XXX do a better default... | ||||||
|  | %		...adaptive??? | ||||||
|  | \ResettableMacro{ImageSpreadCaption}[1]{% | ||||||
|  | 	\captioncell[under, align=flushleft]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | 
 | ||||||
|  | \ImagePageTemplate{ImageSpread}{% | ||||||
|  | 	\cleartoleftpage% | ||||||
|  | 	\begin{spreadtopages}[2]% | ||||||
|  | 		\imagecell[% | ||||||
|  | 			fit,  | ||||||
|  | 			clearance=-\bleed,  | ||||||
|  | 			scale=\imagescale, | ||||||
|  | 			offsettop=\imageoffsettop, | ||||||
|  | 			offsetleft=\imageoffsetleft, | ||||||
|  | 			#1]{#2}{#3}% | ||||||
|  | 	\end{spreadtopages}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %% \DescribeMacro{\ImageSpread<D>\{..\}} | ||||||
|  | %% \DescribeMacro{\ImageSpread<D>Caption\{..\}} | ||||||
|  | %% \DescribeMacro{\resetImageSpread<D>Caption} | ||||||
|  | %% \DescribeMacro{\ImageSpread<D>*\{..\}} | ||||||
|  | % | ||||||
|  | %% |<D>| can be one of T, B, L or R, for top, bottom, left and right  | ||||||
|  | %% respectively. | ||||||
|  | %% | ||||||
|  | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%    +---------------+---------------+  +---------------+---------------+    | ||||||
|  | %%    | +-------------+-------------+ |  |               .               |    | ||||||
|  | %%    | |  .          .          .  | |  |  c            .               |    | ||||||
|  | %%    | |       .     .     .       | |  | +-------------+-------------+ |    | ||||||
|  | %%    | |           image           | |  | |  .          .          .  | |    | ||||||
|  | %%    | |       .    (T)    .       | |  | |       .     .     .       | |    | ||||||
|  | %%    | |  .          .          .  | |  | |           image           | |    | ||||||
|  | %%    | +-------------+-------------+ |  | |       .    (B)    .       | |    | ||||||
|  | %%    |               .            c  |  | |  .          .          .  | |    | ||||||
|  | %%    |               .               |  | +-------------+-------------+ |    | ||||||
|  | %%    +---------------+---------------+  +---------------+---------------+    | ||||||
|  | %% | ||||||
|  | %%    +---------------+---------------+  +---------------+---------------+  | ||||||
|  | %%    | +-------------+---------+     |  |     +---------+-------------+ |  | ||||||
|  | %%    | |  .          .      .  |     |  |     |  .      .          .  | |  | ||||||
|  | %%    | |     .       .   .     |     |  |     |     .   .       .     | |  | ||||||
|  | %%    | |        .    ..        |     |  |     |        ..    .        | |  | ||||||
|  | %%    | |         image         |     |  |     |         image         | |  | ||||||
|  | %%    | |        . (L)..        |     |  |     |        ..(R) .        | |  | ||||||
|  | %%    | |     .       .   .     |     |  |     |     .   .       .     | |  | ||||||
|  | %%    | |  .          .      .  |     |  |     |  .      .          .  | |  | ||||||
|  | %%    | +-------------+---------+ c   |  |   c +---------+-------------+ |  | ||||||
|  | %%    +---------------+---------------+  +---------------+---------------+  | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
|  | \ResettableMacro{ImageSpreadTCaption}[1]{% | ||||||
|  | 	\captionblockcell[under]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImageSpreadT}{% | ||||||
|  | 	\ImageSpread*[% | ||||||
|  | 		top,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImageSpreadBCaption}[1]{% | ||||||
|  | 	\captioncell[over]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImageSpreadB}{% | ||||||
|  | 	\ImageSpread*[% | ||||||
|  | 		bottom,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImageSpreadLCaption}[1]{% | ||||||
|  | 	\captionblockcell[right]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImageSpreadL}{% | ||||||
|  | 	\ImageSpread*[% | ||||||
|  | 		left,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | \ResettableMacro{ImageSpreadRCaption}[1]{% | ||||||
|  | 	\captionblockcell[left]{% | ||||||
|  | 		\captionformat{#1}}} | ||||||
|  | \ImagePageTemplate{ImageSpreadR}{% | ||||||
|  | 	\ImageSpread*[% | ||||||
|  | 		right,  | ||||||
|  | 		#1]{#2}{#3}} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| %%%%% Partial bleed | %%%%% Partial bleed | ||||||
| 
 | 
 | ||||||
| % XXX |  | ||||||
| %% \DescribeMacro{\portraitspreadbleedleft\{..\}} |  | ||||||
| % |  | ||||||
| %% \LEGACY |  | ||||||
| %% |  | ||||||
| %%	>> \portraitspreadbleedleft[<clearence>]{<caption>}{<image>} |  | ||||||
| % |  | ||||||
| %% \begin{minipage}{\textwidth} |  | ||||||
| %% \begin{verbatim} |  | ||||||
| %% |  | ||||||
| %%       . . . . . . . . |  | ||||||
| %%   +---------------+---------------+ |  | ||||||
| %%   |   |.         .|               | |  | ||||||
| %%   |   | .       . |               | |  | ||||||
| %%   |   |  .     .  |               | |  | ||||||
| %%   |   |   .   .   |               | |  | ||||||
| %%   |   |   image   |               | |  | ||||||
| %%   |   |   .   .   |               | |  | ||||||
| %%   |   |  .     .  |               | |  | ||||||
| %%   |   | .       . |               | |  | ||||||
| %%   |   |.         .| c             | |  | ||||||
| %%   +---------------+---------------+ |  | ||||||
| %%       . . . . . . . . |  | ||||||
| %% |  | ||||||
| %% \end{verbatim} |  | ||||||
| %% \end{minipage} |  | ||||||
| %% |  | ||||||
| \newcommand\portraitspreadbleedleft[3][\clearimage]{ |  | ||||||
| 	\cleartoleftpage |  | ||||||
| 	% style the caption... |  | ||||||
| 	\null |  | ||||||
| 	\vfill |  | ||||||
| 	\begin{flushright} |  | ||||||
| 		#2% |  | ||||||
| 	\end{flushright} |  | ||||||
| 	\newpage |  | ||||||
| 	% XXX add \bleed |  | ||||||
| 	\portraitimagepageleft[#1]{}{#3} } |  | ||||||
| 
 | 
 | ||||||
| 
 | % XXX make these T/B/L/R and combine docs... | ||||||
| % XXX |  | ||||||
| %% \DescribeMacro{\portraitspreadbleedright\{..\}} |  | ||||||
| % |  | ||||||
| %% \LEGACY |  | ||||||
| %% |  | ||||||
| %%	>> \portraitspreadbleedright[<clearence>]{<caption>}{<image>} |  | ||||||
| % |  | ||||||
| %% \begin{minipage}{\textwidth} |  | ||||||
| %% \begin{verbatim} |  | ||||||
| %% |  | ||||||
| %%                 . . . . . . . . |  | ||||||
| %%   +---------------+---------------+ |  | ||||||
| %%   |               |.         .|   | |  | ||||||
| %%   |               | .       . |   | |  | ||||||
| %%   |               |  .     .  |   | |  | ||||||
| %%   |               |   .   .   |   | |  | ||||||
| %%   |               |   image   |   | |  | ||||||
| %%   |               |   .   .   |   | |  | ||||||
| %%   |               |  .     .  |   | |  | ||||||
| %%   |               | .       . |   | |  | ||||||
| %%   |             c |.         .|   | |  | ||||||
| %%   +---------------+---------------+ |  | ||||||
| %%                 . . . . . . . . |  | ||||||
| %% |  | ||||||
| %% \end{verbatim} |  | ||||||
| %% \end{minipage} |  | ||||||
| %% |  | ||||||
| \newcommand\portraitspreadbleedright[3][\clearimage]{ |  | ||||||
| 	\cleartoleftpage |  | ||||||
| 	% style the caption... |  | ||||||
| 	% XXX add \bleed |  | ||||||
| 	\portraitimagepageright[#1]{}{#3}  |  | ||||||
| 	\null |  | ||||||
| 	\vfill |  | ||||||
| 	\begin{flushleft} |  | ||||||
| 		#2% |  | ||||||
| 	\end{flushleft} |  | ||||||
| 	\newpage } |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\ImageSpreadLeft\{..\}} | %% \DescribeMacro{\ImageSpreadLeft\{..\}} | ||||||
| @ -3364,9 +3502,10 @@ | |||||||
| \ImagePageTemplate{ImageSpreadLeft}{% | \ImagePageTemplate{ImageSpreadLeft}{% | ||||||
| 	\cleartoleftpage% | 	\cleartoleftpage% | ||||||
| 	\begin{spreadtopages}[2]% | 	\begin{spreadtopages}[2]% | ||||||
| 		\imagecell[fit,  | 		\imagecell[% | ||||||
|  | 			fit,  | ||||||
| 			left,  | 			left,  | ||||||
| 			clearance=\clearimage,  | 			clearance=-\bleed,  | ||||||
| 			scale=\imagescale, | 			scale=\imagescale, | ||||||
| 			offsettop=\imageoffsettop, | 			offsettop=\imageoffsettop, | ||||||
| 			offsetleft=\imageoffsetleft, | 			offsetleft=\imageoffsetleft, | ||||||
| @ -3413,9 +3552,10 @@ | |||||||
| \ImagePageTemplate{ImageSpreadRight}{% | \ImagePageTemplate{ImageSpreadRight}{% | ||||||
| 	\cleartoleftpage% | 	\cleartoleftpage% | ||||||
| 	\begin{spreadtopages}[2]% | 	\begin{spreadtopages}[2]% | ||||||
| 		\imagecell[fit,  | 		\imagecell[% | ||||||
|  | 			fit,  | ||||||
| 			right,  | 			right,  | ||||||
| 			clearance=\clearimage,  | 			clearance=-\bleed,  | ||||||
| 			scale=\imagescale, | 			scale=\imagescale, | ||||||
| 			offsettop=\imageoffsettop, | 			offsettop=\imageoffsettop, | ||||||
| 			offsetleft=\imageoffsetleft, | 			offsetleft=\imageoffsetleft, | ||||||
| @ -3464,8 +3604,9 @@ | |||||||
| \ImagePageTemplate{ImageSpreadFill}{% | \ImagePageTemplate{ImageSpreadFill}{% | ||||||
| 	\cleartoleftpage% | 	\cleartoleftpage% | ||||||
| 	\begin{spreadtopages}[2]% | 	\begin{spreadtopages}[2]% | ||||||
| 		\imagecell[fill,  | 		\imagecell[% | ||||||
| 			clearance=\clearimage,  | 			fill,  | ||||||
|  | 			clearance=-\bleed,  | ||||||
| 			scale=\imagescale, | 			scale=\imagescale, | ||||||
| 			offsettop=\imageoffsettop, | 			offsettop=\imageoffsettop, | ||||||
| 			offsetleft=\imageoffsetleft, | 			offsetleft=\imageoffsetleft, | ||||||
| @ -3592,6 +3733,8 @@ | |||||||
| % Index... | % Index... | ||||||
| % | % | ||||||
| % XXX this prints trash at this point... | % XXX this prints trash at this point... | ||||||
|  | %		...I do not want to build the index manually but it seems that | ||||||
|  | %		we are slowly moving in that direction... | ||||||
| %%% \printindex | %%% \printindex | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user