mirror of
				https://github.com/flynx/photobook.git
				synced 2025-11-03 21:00:18 +00:00 
			
		
		
		
	cleanup and notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									d4d7379cb1
								
							
						
					
					
						commit
						fb0597759d
					
				
							
								
								
									
										137
									
								
								photobook.cls
									
									
									
									
									
								
							
							
						
						
									
										137
									
								
								photobook.cls
									
									
									
									
									
								
							@ -10,7 +10,6 @@
 | 
				
			|||||||
% XXX see where we need to \ignorespaces...
 | 
					% XXX see where we need to \ignorespaces...
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
% XXX BUG: fix \OFFSETFIX
 | 
					% XXX BUG: fix \OFFSETFIX
 | 
				
			||||||
% XXX BUG: fix \CAPTIONWIDTHFIX
 | 
					 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
% XXX might be a good idea to add a spine calculator...
 | 
					% XXX might be a good idea to add a spine calculator...
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
@ -978,23 +977,13 @@
 | 
				
			|||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
% XXX HACKS...
 | 
					% XXX HACKS...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% XXX for some reason we are pushed away from the left edge...
 | 
					 | 
				
			||||||
\newlength{\OFFSETFIX}
 | 
					\newlength{\OFFSETFIX}
 | 
				
			||||||
\setlength{\OFFSETFIX}{-4mm}
 | 
					\setlength{\OFFSETFIX}{-4mm}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% This compensates for caption width being miscalcualted for right 
 | 
					 | 
				
			||||||
% alingned captions...
 | 
					 | 
				
			||||||
\newlength{\CAPTIONWIDTHFIX}
 | 
					 | 
				
			||||||
\setlength{\CAPTIONWIDTHFIX}{-5mm}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%----------------------------------------------------------------------
 | 
					%----------------------------------------------------------------------
 | 
				
			||||||
%%%% Environments and Cells
 | 
					%%%% Environments and Cells
 | 
				
			||||||
%
 | 
					 | 
				
			||||||
% XXX need a way to place images / templates into these...
 | 
					 | 
				
			||||||
% XXX should these only be visible in respective modes or for non-zero widths???
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Generic
 | 
					%%%%% Generic
 | 
				
			||||||
@ -1013,7 +1002,6 @@
 | 
				
			|||||||
	\clearpage }
 | 
						\clearpage }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Cells
 | 
					%%%%% Cells
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
@ -1142,10 +1130,8 @@
 | 
				
			|||||||
	\end{cell}}
 | 
						\end{cell}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Saved cells
 | 
					%%%%% Save cells
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
%% \DescribeMacro{\savecell\{..\}}
 | 
					%% \DescribeMacro{\savecell\{..\}}
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
@ -1219,7 +1205,6 @@
 | 
				
			|||||||
	\end{inlinecell}}
 | 
						\end{inlinecell}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Cell macros
 | 
					%%%%% Cell macros
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
@ -1719,63 +1704,6 @@
 | 
				
			|||||||
		\adjustbox{margin=\photobook@captioncell@margin}{#2}}}
 | 
							\adjustbox{margin=\photobook@captioncell@margin}{#2}}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%% \DescribeMacro{spreadtopages}
 | 
					 | 
				
			||||||
%
 | 
					 | 
				
			||||||
%%
 | 
					 | 
				
			||||||
%%	>> \begin{spreadtopages} .. \end{spreadtopages}
 | 
					 | 
				
			||||||
%%	>> \begin{spreadtopages}[<pagecount>] .. \end{spreadtopages}
 | 
					 | 
				
			||||||
%%
 | 
					 | 
				
			||||||
%
 | 
					 | 
				
			||||||
%% \begin{minipage}{\textwidth}
 | 
					 | 
				
			||||||
%% \begin{verbatim}
 | 
					 | 
				
			||||||
%%
 | 
					 | 
				
			||||||
%%   +----------------------------------- -                 
 | 
					 | 
				
			||||||
%%   |                                                      <-- input cell
 | 
					 | 
				
			||||||
%%   |          .          .          .                     
 | 
					 | 
				
			||||||
%%   |     Oversized content cell...                        
 | 
					 | 
				
			||||||
%%   |          .          .          .                     
 | 
					 | 
				
			||||||
%%   |                                                      
 | 
					 | 
				
			||||||
%%   +----------.----------.----------.-- -                 
 | 
					 | 
				
			||||||
%%   .          . .         . .         .  .
 | 
					 | 
				
			||||||
%%   .          .   .         .   .         .    .         
 | 
					 | 
				
			||||||
%%   +----------+    +----------+    +----------+    +-- -  
 | 
					 | 
				
			||||||
%%   |          |    |          |    |          |    |      <-- output pages
 | 
					 | 
				
			||||||
%%   |          |    |          |    |          |    |      
 | 
					 | 
				
			||||||
%%   |     Overs|    |ized conte|    |nt cell...|    |      
 | 
					 | 
				
			||||||
%%   |          |    |          |    |          |    |      
 | 
					 | 
				
			||||||
%%   |          |    |          |    |          |    |    
 | 
					 | 
				
			||||||
%%   +----------+    +----------+    +----------+    +-- -
 | 
					 | 
				
			||||||
%%
 | 
					 | 
				
			||||||
%% \end{verbatim}
 | 
					 | 
				
			||||||
%% \end{minipage}
 | 
					 | 
				
			||||||
%%
 | 
					 | 
				
			||||||
% XXX add a manual version of this...
 | 
					 | 
				
			||||||
%		...i.e. name + use...
 | 
					 | 
				
			||||||
% XXX add nudge/grow support...
 | 
					 | 
				
			||||||
% XXX revise name...
 | 
					 | 
				
			||||||
\NewEnviron{spreadtopages}[1][2]{%
 | 
					 | 
				
			||||||
	\begingroup%
 | 
					 | 
				
			||||||
		% create the actual cell...
 | 
					 | 
				
			||||||
		\setlength\cellparentwidth{\cellwidth}%
 | 
					 | 
				
			||||||
		\setlength\cellparentheight{\cellheight}%
 | 
					 | 
				
			||||||
		\setlength\cellwidth{#1\pageblockwidth}%
 | 
					 | 
				
			||||||
		\setlength\cellheight{\pageblockheight}%
 | 
					 | 
				
			||||||
		%
 | 
					 | 
				
			||||||
		\savecell{photobook@spreadtopages}{\cellwidth}{\cellheight}{\BODY}%
 | 
					 | 
				
			||||||
		%
 | 
					 | 
				
			||||||
		% generate pages...
 | 
					 | 
				
			||||||
		\foreach \photobook@spreadtopages@page in {0, ...,\numexpr #1 - 1 \relax}{%
 | 
					 | 
				
			||||||
			\null
 | 
					 | 
				
			||||||
			\begin{pagecell}%
 | 
					 | 
				
			||||||
				% NOTE: \cellwidth and \cellheight here are for a single page...
 | 
					 | 
				
			||||||
				\usecell*{photobook@spreadtopages}%
 | 
					 | 
				
			||||||
					(0pt, \photobook@spreadtopages@page\cellwidth)%
 | 
					 | 
				
			||||||
					{\cellwidth}{\cellheight}%
 | 
					 | 
				
			||||||
			\end{pagecell}%
 | 
					 | 
				
			||||||
			\clearpage}%
 | 
					 | 
				
			||||||
	\endgroup}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Paper cells
 | 
					%%%%% Paper cells
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1911,6 +1839,63 @@
 | 
				
			|||||||
	\end{inlinecell}}
 | 
						\end{inlinecell}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%% \DescribeMacro{spreadtopages}
 | 
				
			||||||
 | 
					%
 | 
				
			||||||
 | 
					%% Spread cell into pages.
 | 
				
			||||||
 | 
					%%
 | 
				
			||||||
 | 
					%%	>> \begin{spreadtopages} .. \end{spreadtopages}
 | 
				
			||||||
 | 
					%%	>> \begin{spreadtopages}[<pagecount>] .. \end{spreadtopages}
 | 
				
			||||||
 | 
					%
 | 
				
			||||||
 | 
					%% \begin{minipage}{\textwidth}
 | 
				
			||||||
 | 
					%% \begin{verbatim}
 | 
				
			||||||
 | 
					%%
 | 
				
			||||||
 | 
					%%   +----------------------------------- -                 
 | 
				
			||||||
 | 
					%%   |                                                      <-- input cell
 | 
				
			||||||
 | 
					%%   |          .          .          .                     
 | 
				
			||||||
 | 
					%%   |     Oversized content cell...                        
 | 
				
			||||||
 | 
					%%   |          .          .          .                     
 | 
				
			||||||
 | 
					%%   |                                                      
 | 
				
			||||||
 | 
					%%   +----------.----------.----------.-- -                 
 | 
				
			||||||
 | 
					%%   .          . .         . .         .  .
 | 
				
			||||||
 | 
					%%   .          .   .         .   .         .    .         
 | 
				
			||||||
 | 
					%%   +----------+    +----------+    +----------+    +-- -  
 | 
				
			||||||
 | 
					%%   |          |    |          |    |          |    |      <-- output pages
 | 
				
			||||||
 | 
					%%   |          |    |          |    |          |    |      
 | 
				
			||||||
 | 
					%%   |     Overs|    |ized conte|    |nt cell...|    |      
 | 
				
			||||||
 | 
					%%   |          |    |          |    |          |    |      
 | 
				
			||||||
 | 
					%%   |          |    |          |    |          |    |    
 | 
				
			||||||
 | 
					%%   +----------+    +----------+    +----------+    +-- -
 | 
				
			||||||
 | 
					%%
 | 
				
			||||||
 | 
					%% \end{verbatim}
 | 
				
			||||||
 | 
					%% \end{minipage}
 | 
				
			||||||
 | 
					%%
 | 
				
			||||||
 | 
					% XXX add a manual version of this...
 | 
				
			||||||
 | 
					%		...i.e. name + use...
 | 
				
			||||||
 | 
					% XXX add nudge/grow support...
 | 
				
			||||||
 | 
					% XXX revise name...
 | 
				
			||||||
 | 
					\NewEnviron{spreadtopages}[1][2]{%
 | 
				
			||||||
 | 
						\begingroup%
 | 
				
			||||||
 | 
							% create the actual cell...
 | 
				
			||||||
 | 
							\setlength\cellparentwidth{\cellwidth}%
 | 
				
			||||||
 | 
							\setlength\cellparentheight{\cellheight}%
 | 
				
			||||||
 | 
							\setlength\cellwidth{#1\pageblockwidth}%
 | 
				
			||||||
 | 
							\setlength\cellheight{\pageblockheight}%
 | 
				
			||||||
 | 
							%
 | 
				
			||||||
 | 
							\savecell{photobook@spreadtopages}{\cellwidth}{\cellheight}{\BODY}%
 | 
				
			||||||
 | 
							%
 | 
				
			||||||
 | 
							% generate pages...
 | 
				
			||||||
 | 
							\foreach \photobook@spreadtopages@page in {0, ...,\numexpr #1 - 1 \relax}{%
 | 
				
			||||||
 | 
								\null
 | 
				
			||||||
 | 
								\begin{pagecell}%
 | 
				
			||||||
 | 
									% NOTE: \cellwidth and \cellheight here are for a single page...
 | 
				
			||||||
 | 
									\usecell*{photobook@spreadtopages}%
 | 
				
			||||||
 | 
										(0pt, \photobook@spreadtopages@page\cellwidth)%
 | 
				
			||||||
 | 
										{\cellwidth}{\cellheight}%
 | 
				
			||||||
 | 
								\end{pagecell}%
 | 
				
			||||||
 | 
								\clearpage}%
 | 
				
			||||||
 | 
						\endgroup}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
%%%%% Endpaper cells
 | 
					%%%%% Endpaper cells
 | 
				
			||||||
%
 | 
					%
 | 
				
			||||||
@ -2087,12 +2072,6 @@
 | 
				
			|||||||
		\end{cell} \fi }
 | 
							\end{cell} \fi }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					 | 
				
			||||||
% pages...
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% XXX
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
%----------------------------------------------------------------------
 | 
					%----------------------------------------------------------------------
 | 
				
			||||||
%%%% Caption Templates
 | 
					%%%% Caption Templates
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user