mirror of
				https://github.com/flynx/photobook.git
				synced 2025-10-31 03:10:08 +00:00 
			
		
		
		
	several bugfixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									df7895c495
								
							
						
					
					
						commit
						934eb849b2
					
				| @ -485,6 +485,7 @@ | ||||
| % XXX flow text frames... | ||||
| % XXX this messes with geometry.... | ||||
| %\RequirePackage{flowfram} | ||||
| \RequirePackage{fancyhdr} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -986,6 +987,22 @@ | ||||
| 		\dimexpr #2 \relax\fi} | ||||
| 
 | ||||
| 
 | ||||
| %% \DescribeMacro{\emptypage\{..\}} | ||||
| % | ||||
| %% Create an empty page. | ||||
| % | ||||
| %%	>> \emptypage | ||||
| %%	>> \emptypage[<style>] | ||||
| %  | ||||
| %% |<style>| is the with |fancyhdr| style name, |empty| is the default. | ||||
| %%  | ||||
| \newcommand\emptypage[1][empty]{% | ||||
| 	\begin{page}% | ||||
| 		\ifthenelse{\equal{#1}{}}{}{% | ||||
| 			\thispagestyle{#1}}% | ||||
| 	\end{page}} | ||||
| 
 | ||||
| 
 | ||||
| %% \DescribeMacro{\cleartoleftpage} | ||||
| % | ||||
| %%	Forces content to left page | ||||
| @ -1442,7 +1459,6 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| %%%%% Save cells | ||||
| 
 | ||||
| @ -1791,15 +1807,20 @@ | ||||
| 	\def\photobook@imagecell@captiontop{% | ||||
| 		-\dimexpr  | ||||
| 			+\cellheight  | ||||
| 			-\photobook@imagecell@clearance | ||||
| 			% XXX revise... | ||||
| 			%-\photobook@imagecell@clearance | ||||
| 			-\ht\photobook@imagebox \relax}}% | ||||
| \define@boolkey{imagecell@args}{bottom}[true]{% | ||||
| 	\def\photobook@imagecell@top{\dimexpr  | ||||
| 		+\cellheight  | ||||
| 		-\photobook@imagecell@clearance | ||||
| 		-\ht\photobook@imagebox \relax}% | ||||
| 	\def\photobook@imagecell@top{% | ||||
| 		\dimexpr  | ||||
| 			+\cellheight  | ||||
| 			-\photobook@imagecell@clearance | ||||
| 			-\ht\photobook@imagebox \relax}% | ||||
| 	\def\photobook@imagecell@captiontop{% | ||||
| 		\photobook@imagecell@top}}% | ||||
| 		\dimexpr | ||||
| 			\photobook@imagecell@top  | ||||
| 			% XXX revise... | ||||
| 			+\photobook@imagecell@clearance \relax}}% | ||||
| % clearance=<len>... | ||||
| \define@key{imagecell@args}{clearance}{% | ||||
| 	\setlength\photobook@imagecell@clearance{#1}}% | ||||
| @ -1839,7 +1860,6 @@ | ||||
| 			#1}% | ||||
| 		% preload image... | ||||
| 		% fit... | ||||
| 		% XXX make this respect \bindingoffset when \clearance > 0... | ||||
| 		\ifKV@imagecell@args@fit% | ||||
| 			\sbox{\photobook@imagebox}{% | ||||
| 				\includegraphics[% | ||||
| @ -1876,11 +1896,12 @@ | ||||
| 						height=\photobook@imagecell@scale\dimexpr  | ||||
| 							+ \cellheight  | ||||
| 							- ((\photobook@imagecell@clearance) * 2) \relax]{#3}}% | ||||
| 			\fi\fi\fi% | ||||
| 		\fi\fi\fi% | ||||
| 		% place image box... | ||||
| 		% XXX for some odd reason without this the alignment completely breaks... | ||||
| 		\vspace{0pt}% | ||||
| 		\adjustbox{% | ||||
| 				%fbox=0.1pt 0pt 0pt,  | ||||
| 				margin= | ||||
| 					{\dimexpr  | ||||
| 						\photobook@imagecell@offsetleft  | ||||
| @ -1921,17 +1942,18 @@ | ||||
| 							+ 0.5\dimexpr  | ||||
| 								+\cellheight  | ||||
| 								-\ht\photobook@imagebox  | ||||
| 							-\photobook@imagecell@captiontop \relax}}% | ||||
| 								-\photobook@imagecell@captiontop \relax}}% | ||||
| 				% | ||||
| 				% place the caption cell... | ||||
| 				\hspace{-\celloffsetleft}{% | ||||
| 					\setlength\fboxsep{0pt}% | ||||
| 					% adjust top if image is taller than cell... | ||||
| 					\raisebox{-\celloffsettop}{% | ||||
| 						\begin{minipage}[b][\cellheight][\photobook@imagecell@captionalign]{\cellwidth}% | ||||
| 							\ignorespaces% | ||||
| 							#2% | ||||
| 						\end{minipage}}} | ||||
| 				\smash{\makebox[0pt][l]{% | ||||
| 					\hspace{-\celloffsetleft}{% | ||||
| 						\setlength\fboxsep{0pt}% | ||||
| 						% adjust top if image is taller than cell... | ||||
| 						\raisebox{-\celloffsettop}{% | ||||
| 							\begin{minipage}[b][\cellheight][\photobook@imagecell@captionalign]{\cellwidth}% | ||||
| 								\ignorespaces% | ||||
| 								#2% | ||||
| 							\end{minipage}}}}}% | ||||
| 			\endgroup}% | ||||
| 	\endgroup} | ||||
| 
 | ||||
| @ -2805,21 +2827,6 @@ | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| %%%%% Generic | ||||
| 
 | ||||
| %% \DescribeMacro{\emptypage\{..\}} | ||||
| % | ||||
| %% Create an empty page. | ||||
| % | ||||
| %%	>> \emptypage | ||||
| %%	>> \emptypage[<style>] | ||||
| %%  | ||||
| \newcommand\emptypage[1][empty]{ | ||||
| 	\begin{page}% | ||||
| 		\ifthenelse{\equal{#1}{}}{}{ | ||||
| 			\thispagestyle{#1}} | ||||
| 	\end{page}} | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| %%%%% Tweaking | ||||
| % | ||||
| %% Most page/spread templates provide an ability to externally "tweak"  | ||||
| @ -3064,6 +3071,7 @@ | ||||
| \ImagePageTemplate{ImagePageClear}{% | ||||
| 	\clearpage% | ||||
| 	\begin{page}% | ||||
| 	% NOTE: this accounts for \bindingoffset... | ||||
| 	\begin{pagecell*}% | ||||
| 		\imagecell[% | ||||
| 			center,  | ||||
| @ -3234,6 +3242,7 @@ | ||||
| 		\ifphotobook@ImagePageFit@centered% | ||||
| 			\clearpage% | ||||
| 			\begin{page}% | ||||
| 			% NOTE: this does not account for \bindingoffset... | ||||
| 			\begin{pagecell}% | ||||
| 				\imagecell[% | ||||
| 					center,  | ||||
|  | ||||
| @ -17,8 +17,16 @@ | ||||
| \usepackage{ragged2e} | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| 
 | ||||
| % remove section numbering... | ||||
| \setcounter{secnumdepth}{0} | ||||
| 
 | ||||
| \setlength\parindent{0pt} | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| 
 | ||||
| \edef\TestImage{DSC00403-2} | ||||
| \edef\TestImageV{DSC00403-2vert} | ||||
| 
 | ||||
| @ -30,16 +38,11 @@ | ||||
| 
 | ||||
| \newcommand\Section[1]{ | ||||
| 	\cleartoleftpage% | ||||
| 	\emptypage% | ||||
| 	\section{#1}} | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| 
 | ||||
| %---------------------------------------------------------------------- | ||||
| \begin{document} | ||||
| 
 | ||||
| \Chapter{Page templates} | ||||
| @ -55,9 +58,7 @@ | ||||
| 
 | ||||
| \ImagePageClear{ImagePageClear}{\TestImage} | ||||
| 
 | ||||
| % XXX this is a bit off... | ||||
| \ImagePageClearT{ImagePageClearT}{\TestImage} | ||||
| % XXX caption/image a bit off vertically... | ||||
| \ImagePageClearB{ImagePageClearB}{\TestImage} | ||||
| \ImagePageClearL{ImagePageClearL}{\TestImageV} | ||||
| \ImagePageClearR{ImagePageClearR}{\TestImageV} | ||||
| @ -73,7 +74,6 @@ Special case: image that fits vertically will be offset by \verb+\bindingoffset+ | ||||
| \ImagePageFit{ImagePageFit}{\TestImageV} | ||||
| 
 | ||||
| \ImagePageFitT{ImagePageFitT}{\TestImage} | ||||
| % XXX this is a bit too low... | ||||
| \ImagePageFitB{ImagePageFitB}{\TestImage} | ||||
| \ImagePageFitL{ImagePageFitL}{\TestImageV} | ||||
| \ImagePageFitR{ImagePageFitR}{\TestImageV} | ||||
| @ -105,8 +105,7 @@ Special case: image that fits vertically will be offset by \verb+\bindingoffset+ | ||||
| \Section{ImageSpread} | ||||
| \ImageSpread{ImageSpread}{\TestImage} | ||||
| 
 | ||||
| % XXX top/bottom have problems... | ||||
| \ImageSpreadT{ImageSpreadR}{\TestImage} | ||||
| \ImageSpreadT{ImageSpreadT}{\TestImage} | ||||
| \ImageSpreadB{ImageSpreadB}{\TestImage} | ||||
| \ImageSpreadL{ImageSpreadL}{\TestImage} | ||||
| \ImageSpreadR{ImageSpreadR}{\TestImage} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user