mirror of
				https://github.com/flynx/photobook.git
				synced 2025-10-31 11:20:10 +00:00 
			
		
		
		
	tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									bf818002ff
								
							
						
					
					
						commit
						a679d8d9d0
					
				| @ -33,45 +33,54 @@ | |||||||
| 
 | 
 | ||||||
| \begin{document} | \begin{document} | ||||||
| 
 | 
 | ||||||
|  | \begin{foldoutA}[10cm 10cm] | ||||||
|  | 	explicit widths\\ | ||||||
|  | \end{foldoutA} | ||||||
| 
 | 
 | ||||||
| \ImagePageFill{\PageInfo}{\TestImage} | --- | ||||||
| 
 | 
 | ||||||
| \begin{foldout}[3] | \begin{foldoutA}[in in] | ||||||
| 	\ImagePageFill{\PageInfo}{\TestImageV}% | 	auto-calculate\\ | ||||||
| 	\ImagePageFill{\PageInfo}{\TestImage} | \end{foldoutA} | ||||||
| \end{foldout} |  | ||||||
| 
 | 
 | ||||||
| \ImagePage{Caption text}{\TestImage} | %\ImagePageFill{\PageInfo}{\TestImage} | ||||||
| \ImagePage{Caption text}{\TestImageV} | % | ||||||
| 
 | %\begin{foldout}[3] | ||||||
| \begin{foldout}[3] | %	\ImagePageFill{\PageInfo}{\TestImageV}% | ||||||
| 	\ImagePageFill{\PageInfo}{\TestImage} | %	\ImagePageFill{\PageInfo}{\TestImage} | ||||||
| \end{foldout} | %\end{foldout} | ||||||
| 
 | % | ||||||
| \begin{foldout}[3] | %\ImagePage{Caption text}{\TestImage} | ||||||
| 	\begin{foldoutcell}[2] | %\ImagePage{Caption text}{\TestImageV} | ||||||
| 		\lipsum | % | ||||||
| 		\lipsum | %\begin{foldout}[3] | ||||||
| 		\lipsum | %	\ImagePageFill{\PageInfo}{\TestImage} | ||||||
| 	\end{foldoutcell} | %\end{foldout} | ||||||
| 	\begin{foldoutcell}[3] | % | ||||||
| 		\lipsum | %\begin{foldout}[3] | ||||||
| 		\lipsum | %	\begin{foldoutcell}[2] | ||||||
| 		\lipsum | %		\lipsum | ||||||
| 	\end{foldoutcell} | %		\lipsum | ||||||
| 	\newpage | %		\lipsum | ||||||
| 	\begin{foldoutcell}[2-3] | %	\end{foldoutcell} | ||||||
| 	\begin{bottomup} | %	\begin{foldoutcell}[3] | ||||||
| 	\begin{cliptocell} | %		\lipsum | ||||||
| 		\lipsum | %		\lipsum | ||||||
| 		\lipsum | %		\lipsum | ||||||
| 		\lipsum | %	\end{foldoutcell} | ||||||
| 		\lipsum | %	\newpage | ||||||
| 		\lipsum | %	\begin{foldoutcell}[2-3] | ||||||
| 	\end{cliptocell} | %	\begin{bottomup} | ||||||
| 	\end{bottomup} | %	\begin{cliptocell} | ||||||
| 	\end{foldoutcell} | %		\lipsum | ||||||
| \end{foldout} | %		\lipsum | ||||||
|  | %		\lipsum | ||||||
|  | %		\lipsum | ||||||
|  | %		\lipsum | ||||||
|  | %	\end{cliptocell} | ||||||
|  | %	\end{bottomup} | ||||||
|  | %	\end{foldoutcell} | ||||||
|  | %\end{foldout} | ||||||
| 
 | 
 | ||||||
| \end{document} | \end{document} | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2831,6 +2831,7 @@ | |||||||
| %		- cells for panels... | %		- cells for panels... | ||||||
| %		- outer panel must be smaller than the inner panel by \clearfoldout -- DONE | %		- outer panel must be smaller than the inner panel by \clearfoldout -- DONE | ||||||
| % XXX move to globals... | % XXX move to globals... | ||||||
|  | % XXX revise defaults... | ||||||
| \newlength\foldoutwidth | \newlength\foldoutwidth | ||||||
| \setlength\foldoutwidth{\blockwidth} | \setlength\foldoutwidth{\blockwidth} | ||||||
| 
 | 
 | ||||||
| @ -2866,34 +2867,39 @@ | |||||||
| %		in|out ...		-- fold direction | %		in|out ...		-- fold direction | ||||||
| %		<dim> in|out <dim> ...		 | %		<dim> in|out <dim> ...		 | ||||||
| %						-- fold direction with panel widths | %						-- fold direction with panel widths | ||||||
| \edef\photobook@foldout@prevfold{}% | \newlength\foldoutpanelwidth | ||||||
|  | \setlength\foldoutpanelwidth{0pt} | ||||||
|  | \edef\photobook@foldout@prevfold{in}% | ||||||
| \edef\foldoutspec{2} | \edef\foldoutspec{2} | ||||||
| \newcommand\photobook@foldout@foldcompensation[1]{ |  | ||||||
| 	% XXX of cur and last fold are the same add \clearfoldoutblock |  | ||||||
| 	\ifthenelse{\equal{#1}{\photobook@foldout@prevfold}}{% |  | ||||||
| 		% XXX |  | ||||||
| 	}{% |  | ||||||
| 		% XXX |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| % XXX revise numbers... | % XXX revise numbers... | ||||||
| \newlength\foldoutmaxpanelwidth | \newlength\foldoutmaxpanelwidth | ||||||
| \newcommand\photobook@foldout@pushpanel[2]{% | \newcommand\photobook@foldout@pushpanel[2]{% | ||||||
|  | 	% use default width.... | ||||||
|  | 	% XXX might need to make this a bit more elaborate... | ||||||
| 	\ifdim #1 = 0pt% | 	\ifdim #1 = 0pt% | ||||||
| 		\setlength\foldoutcellwidth{% | 		% double fold twice in same direction... | ||||||
| 			\foldoutmaxpanelwidth  |  | ||||||
| 			+ \photobook@foldout@foldcompensation{#2}}\fi% |  | ||||||
| 	\else% |  | ||||||
| 		\setlength\foldoutcellwidth{% |  | ||||||
| 			#1 + \photobook@foldout@foldcompensation{#2}}\fi% |  | ||||||
| 	% XXX if cur and last folds are the same set max panel length to \foldoutcellwidth... |  | ||||||
| 		\ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{% | 		\ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{% | ||||||
| 		\setlength\foldoutmaxpanelwidth{\foldoutcellwidth}}{} | 			\setlength\foldoutpanelwidth{% | ||||||
|  | 				\foldoutmaxpanelwidth  | ||||||
|  | 				% XXX | ||||||
|  | 				+ 0pt}% | ||||||
|  | 		% different fold directions... | ||||||
|  | 		}{% | ||||||
|  | 			\setlength\foldoutpanelwidth{% | ||||||
|  | 				\foldoutmaxpanelwidth  | ||||||
|  | 				% XXX | ||||||
|  | 				+ 0pt}}% | ||||||
|  | 		\setlength\foldoutmaxpanelwidth{\foldoutpanelwidth}% | ||||||
|  | 	% explicit width... | ||||||
|  | 	\else% | ||||||
|  | 		\setlength\foldoutpanelwidth{#1}\fi% | ||||||
|  | 	% accumulate width... | ||||||
| 	\setlength\foldoutwidth{ | 	\setlength\foldoutwidth{ | ||||||
| 		\foldoutwidth | 		\foldoutwidth | ||||||
| 		+ \foldoutcellwidth}% | 		+ \foldoutpanelwidth}% | ||||||
|  | 	% panel widths list... | ||||||
| 	\edef\foldoutcellwidths{% | 	\edef\foldoutcellwidths{% | ||||||
| 		\foldoutcellwidths, \the\foldoutcellwidth}} | 		\foldoutcellwidths, \the\foldoutpanelwidth}} | ||||||
| 	 | 	 | ||||||
| \newenvironment{foldoutA}[1][\foldoutspec]{% | \newenvironment{foldoutA}[1][\foldoutspec]{% | ||||||
| 	\begingroup% | 	\begingroup% | ||||||
| @ -2901,47 +2907,51 @@ | |||||||
| 		\readlist*\photobook@foldout@args{#1}% | 		\readlist*\photobook@foldout@args{#1}% | ||||||
| 		% panel count... | 		% panel count... | ||||||
| 		% XXX also check that the arg is not in|out... | 		% XXX also check that the arg is not in|out... | ||||||
|  | 		\setlength\foldoutwidth{0pt}% | ||||||
| 		\ifnum \photobook@foldout@argslen = 1% | 		\ifnum \photobook@foldout@argslen = 1% | ||||||
| 			% XXX | 			% XXX | ||||||
| 		% fold spec... | 		% fold spec... | ||||||
| 		\else% | 		\else% | ||||||
| 			\setlength\foldoutmaxpanelwidth{% | 			\setlength\foldoutmaxpanelwidth{% | ||||||
| 				\blockwidth} | 				\blockwidth} | ||||||
| 			\edef\photobook@foldout@prevfold{}% | 			% XXX make the default a global... | ||||||
|  | 			\edef\photobook@foldout@prevfold{in}% | ||||||
|  | 			%\xintFor* ##1 in {\xintSeq{1}{\photobook@foldout@argslen}} \do {% | ||||||
| 			\foreachitem \photobook@foldout@opt \in \photobook@foldout@args{% | 			\foreachitem \photobook@foldout@opt \in \photobook@foldout@args{% | ||||||
| 				% in fold... | 				% in fold... | ||||||
| 				\ifthenelse{\equal{\photobook@foldout@opt}{in}}{% | 				\ifthenelse{\equal{\photobook@foldout@opt}{in}}{% | ||||||
| 					\photobook@foldout@pushpanel{% | 					\photobook@foldout@pushpanel{% | ||||||
| 						\foldoutcellwidth}{\photobook@foldout@opt} | 						\foldoutpanelwidth}{\photobook@foldout@opt} | ||||||
| 					% prep for next panel... | 					% prep for next panel... | ||||||
| 					\edef\photobook@foldout@prevfold{% | 					\edef\photobook@foldout@prevfold{% | ||||||
| 						\photobook@foldout@opt}% | 						\photobook@foldout@opt}% | ||||||
| 					\setlength\foldoutcellwidth{0pt}% | 					\setlength\foldoutpanelwidth{0pt}% | ||||||
| 				% out fold... | 				% out fold... | ||||||
| 				}{\ifthenelse{\equal{\photobook@foldout@opt}{out}}{% | 				}{\ifthenelse{\equal{\photobook@foldout@opt}{out}}{% | ||||||
| 					\photobook@foldout@pushpanel{% | 					\photobook@foldout@pushpanel{% | ||||||
| 						\foldoutcellwidth}{\photobook@foldout@opt} | 						\foldoutpanelwidth}{\photobook@foldout@opt} | ||||||
| 					% prep for next panel... | 					% prep for next panel... | ||||||
| 					\edef\photobook@foldout@prevfold{% | 					\edef\photobook@foldout@prevfold{% | ||||||
| 						\photobook@foldout@opt}% | 						\photobook@foldout@opt}% | ||||||
| 					\setlength\foldoutcellwidth{0pt}% | 					\setlength\foldoutpanelwidth{0pt}% | ||||||
| 				% explicit size... | 				% explicit size... | ||||||
| 				}{% | 				}{% | ||||||
| 					% finalize prev panel... | 					% finalize prev panel... | ||||||
| 					\ifdim \foldoutcellwidth > 0pt% | 					\ifdim \foldoutpanelwidth > 0pt% | ||||||
| 						\photobook@foldout@pushpanel{% | 						\photobook@foldout@pushpanel{% | ||||||
| 							\foldoutcellwidth}{\photobook@foldout@prevfold}\fi | 							\foldoutpanelwidth}{\photobook@foldout@prevfold}\fi | ||||||
| 					% | 					% | ||||||
| 					\setlength\foldoutcellwidth{\photobook@foldout@opt}}}}% | 					% XXX need to disable clearences here... | ||||||
|  | 					\setlength\foldoutpanelwidth{\photobook@foldout@opt}}}}% | ||||||
| 			% we ended by a fold -> add trailing panel...  | 			% we ended by a fold -> add trailing panel...  | ||||||
| 			\ifdim \foldoutcellwidth = 0pt% |  | ||||||
| 			\photobook@foldout@pushpanel{% | 			\photobook@foldout@pushpanel{% | ||||||
| 					0pt}{\photobook@foldout@prevfold} | 				\foldoutpanelwidth}{\photobook@foldout@prevfold}% | ||||||
| 			\else% |  | ||||||
| 				\photobook@foldout@pushpanel{% |  | ||||||
| 					\foldoutcellwidth}{\photobook@foldout@prevfold}\fi% |  | ||||||
| 		\fi% | 		\fi% | ||||||
|  | 		% | ||||||
| }{% | }{% | ||||||
|  | 		args: \showitems\photobook@foldout@args\\ | ||||||
|  | 		%w: \lenprint[mm]\foldoutpanelwidth\\ | ||||||
|  | 		W: \lenprint[mm]\foldoutwidth\\ | ||||||
| 	\endgroup} | 	\endgroup} | ||||||
| % XXX revise starting dimensions... | % XXX revise starting dimensions... | ||||||
| % XXX add fold marks in bleeds... | % XXX add fold marks in bleeds... | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user