mirror of
				https://github.com/flynx/photobook.git
				synced 2025-10-31 19:30:08 +00:00 
			
		
		
		
	docs + minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									f3555d67d9
								
							
						
					
					
						commit
						325e312e4a
					
				| @ -42,10 +42,8 @@ | |||||||
| 	\ImagePageFill{\PageInfo}{\TestImage} | 	\ImagePageFill{\PageInfo}{\TestImage} | ||||||
| \end{foldout} | \end{foldout} | ||||||
| 
 | 
 | ||||||
| \null | \emptypage | ||||||
| \newpage | \emptypage | ||||||
| \null |  | ||||||
| \newpage |  | ||||||
| 
 | 
 | ||||||
| \begin{foldout}[in out] | \begin{foldout}[in out] | ||||||
| 	auto-calculate | 	auto-calculate | ||||||
|  | |||||||
| @ -171,6 +171,7 @@ | |||||||
| %% \DescribeMacro{blockheight=<len>} | %% \DescribeMacro{blockheight=<len>} | ||||||
| %% \DescribeMacro{bindingoffset=<len>} | %% \DescribeMacro{bindingoffset=<len>} | ||||||
| %% \DescribeMacro{bleed=<len>} | %% \DescribeMacro{bleed=<len>} | ||||||
|  | %% \DescribeMacro{flatfold=<len>} | ||||||
| % | % | ||||||
| %% This is similar to what |geometry| does, but adds bleed support. | %% This is similar to what |geometry| does, but adds bleed support. | ||||||
| %% | %% | ||||||
| @ -203,7 +204,9 @@ | |||||||
| %% \end{verbatim} | %% \end{verbatim} | ||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| %% | %% | ||||||
| % | %% |flatfold| sets the clearance set aside for a flat fold, used for  | ||||||
|  | %% foldouts (see: \nameref{subsec:Foldout page cells} section). | ||||||
|  | %% | ||||||
| % NOTE: if blockwidth/blockheight are set they will force recalculations  | % NOTE: if blockwidth/blockheight are set they will force recalculations  | ||||||
| %		and overriding of the paperwidth/paperheight if they were changed | %		and overriding of the paperwidth/paperheight if they were changed | ||||||
| %		by the user code anywhere between \documentclass[..]{photobook} | %		by the user code anywhere between \documentclass[..]{photobook} | ||||||
| @ -212,6 +215,7 @@ | |||||||
| \DeclareStringOption{blockheight} | \DeclareStringOption{blockheight} | ||||||
| \DeclareStringOption[0pt]{bindingoffset}[10mm] | \DeclareStringOption[0pt]{bindingoffset}[10mm] | ||||||
| \DeclareStringOption[5mm]{bleed}[5mm] | \DeclareStringOption[5mm]{bleed}[5mm] | ||||||
|  | \DeclareStringOption[0pt]{flatfold}[0.5mm] | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %%%%% layout | %%%%% layout | ||||||
| @ -221,7 +225,9 @@ | |||||||
| %% \DescribeMacro{endpaper} | %% \DescribeMacro{endpaper} | ||||||
| %% \DescribeMacro{cover} | %% \DescribeMacro{cover} | ||||||
| %% \DescribeMacro{jacket} | %% \DescribeMacro{jacket} | ||||||
| %% | % | ||||||
|  | %% Sat page layout mode. | ||||||
|  | % | ||||||
| %%	>> layoutmode=<option> | %%	>> layoutmode=<option> | ||||||
| %% | %% | ||||||
| %% |block| (default) | %% |block| (default) | ||||||
| @ -250,6 +256,7 @@ | |||||||
| %% | %% | ||||||
| %%	Endpaper layout. | %%	Endpaper layout. | ||||||
| %% | %% | ||||||
|  | % XXX should this use \flatfold | ||||||
| %% \begin{minipage}{\textwidth} | %% \begin{minipage}{\textwidth} | ||||||
| %% \begin{verbatim} | %% \begin{verbatim} | ||||||
| %% | %% | ||||||
| @ -370,7 +377,6 @@ | |||||||
| \DeclareStringOption[0pt]{spinewidth}[0pt] | \DeclareStringOption[0pt]{spinewidth}[0pt] | ||||||
| \DeclareStringOption[0pt]{spinefold}[7mm] | \DeclareStringOption[0pt]{spinefold}[7mm] | ||||||
| \DeclareStringOption[0pt]{coverboardgrow}[3mm] | \DeclareStringOption[0pt]{coverboardgrow}[3mm] | ||||||
| % XXX defaults should depend on cover type... |  | ||||||
| \DeclareStringOption[0pt]{coverflap}[17mm] | \DeclareStringOption[0pt]{coverflap}[17mm] | ||||||
| \DeclareStringOption[0pt]{jacketwrap}[2mm] | \DeclareStringOption[0pt]{jacketwrap}[2mm] | ||||||
| \DeclareStringOption[0pt]{jacketflap}[50mm] | \DeclareStringOption[0pt]{jacketflap}[50mm] | ||||||
| @ -414,12 +420,15 @@ | |||||||
| %% \DescribeMacro{TwoPageLeft} | %% \DescribeMacro{TwoPageLeft} | ||||||
| %% \DescribeMacro{TwoPageRight} | %% \DescribeMacro{TwoPageRight} | ||||||
| % | % | ||||||
| % defaults: | %% Sets PDF page display mode. | ||||||
| %	- TwoColumnLeft (for layoutmode=block) | %% | ||||||
| %	- SinglePage | %% Defaults to |TwoColumnLeft| for |layoutmode=block| and |SinglePage| for | ||||||
| % | %% other modes. | ||||||
|  | %% | ||||||
| % XXX make this a proper link... | % XXX make this a proper link... | ||||||
| %% See: hyperref's pdfpagelayout for more options. | %% See:  | ||||||
|  | %% \href{https://ctan.altspu.ru/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf}{hyperref}'s  | ||||||
|  | %% |pdfpagelayout| for more options. | ||||||
| %% | %% | ||||||
| \DeclareStringOption{pdfpagelayout} | \DeclareStringOption{pdfpagelayout} | ||||||
| \@DeclareLiteralOptionTo{pdfpagelayout}{SinglePage} | \@DeclareLiteralOptionTo{pdfpagelayout}{SinglePage} | ||||||
| @ -627,6 +636,13 @@ | |||||||
| \newlength\bindingoffset | \newlength\bindingoffset | ||||||
| \setlength\bindingoffset{\photobook@bindingoffset} | \setlength\bindingoffset{\photobook@bindingoffset} | ||||||
| 
 | 
 | ||||||
|  | %% \DescribeMacro{\flatfold=<len>} | ||||||
|  | % | ||||||
|  | %% Sets the amount of paper to account for a flat fold. | ||||||
|  | %% | ||||||
|  | \newlength\flatfold | ||||||
|  | \setlength\flatfold{\photobook@flatfold} | ||||||
|  | 
 | ||||||
| %% \DescribeMacro{\clearimage=<len>} | %% \DescribeMacro{\clearimage=<len>} | ||||||
| % | % | ||||||
| %%	Image clearance | %%	Image clearance | ||||||
| @ -657,7 +673,8 @@ | |||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\imageblockoffsettop=<ratio>} | %% \DescribeMacro{\imageblockoffsettop=<ratio>} | ||||||
| % | % | ||||||
| %% | %% The ration by which the image is raised in |\ImagePage{..}| and  | ||||||
|  | %% derived templates. | ||||||
| %% | %% | ||||||
| \edef\imageblockoffsettop{\photobook@imageblockoffsettop} | \edef\imageblockoffsettop{\photobook@imageblockoffsettop} | ||||||
| 
 | 
 | ||||||
| @ -702,8 +719,6 @@ | |||||||
| % | % | ||||||
| %% Cell geometry.  | %% Cell geometry.  | ||||||
| %% | %% | ||||||
| %% For more details see the \nameref{subsec:Cells} section. |  | ||||||
| %% |  | ||||||
| %% These are set automatically by cells, thus it is not recommended to  | %% These are set automatically by cells, thus it is not recommended to  | ||||||
| %% edit them manually. | %% edit them manually. | ||||||
| %% | %% | ||||||
| @ -724,7 +739,7 @@ | |||||||
| \newlength\clearance | \newlength\clearance | ||||||
| \setlength\clearance{0pt} | \setlength\clearance{0pt} | ||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\paperfoldwidth=<len>} | 
 | ||||||
| %% \DescribeMacro{\clearfoldoutbinding=<len>} | %% \DescribeMacro{\clearfoldoutbinding=<len>} | ||||||
| %% \DescribeMacro{\clearfoldoutedge=<len>} | %% \DescribeMacro{\clearfoldoutedge=<len>} | ||||||
| %% \DescribeMacro{\clearfoldoutfold=<len>} | %% \DescribeMacro{\clearfoldoutfold=<len>} | ||||||
| @ -2751,7 +2766,7 @@ | |||||||
| %% \begin{minipage}{\textwidth} | %% \begin{minipage}{\textwidth} | ||||||
| %% \begin{verbatim} | %% \begin{verbatim} | ||||||
| %% | %% | ||||||
| %%                            v \paperfoldwidth v | %%                            v    \flatfold    v | ||||||
| %%           | %%           | ||||||
| %%       - --=----------------++---------------++--------------+ | %%       - --=----------------++---------------++--------------+ | ||||||
| %%           =                ..               ..              | | %%           =                ..               ..              | | ||||||
| @ -2779,7 +2794,7 @@ | |||||||
| %%  |          (1) ..           (2) ..            (3) = | %%  |          (1) ..           (2) ..            (3) = | ||||||
| %%  +--------------++---------------++----------------=-- - | %%  +--------------++---------------++----------------=-- - | ||||||
| %% | %% | ||||||
| %%                 ^ \paperfoldwidth ^ | %%                 ^    \flatfold    ^ | ||||||
| %% | %% | ||||||
| %% \end{verbatim} | %% \end{verbatim} | ||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| @ -2817,7 +2832,6 @@ | |||||||
| %% \end{minipage} | %% \end{minipage} | ||||||
| %% | %% | ||||||
| %% | %% | ||||||
| %% \DescribeMacro{\paperfoldwidth=<len>} |  | ||||||
| %% \DescribeMacro{\clearfoldoutbinding=<len>} | %% \DescribeMacro{\clearfoldoutbinding=<len>} | ||||||
| %% \DescribeMacro{\clearfoldoutedge=<len>} | %% \DescribeMacro{\clearfoldoutedge=<len>} | ||||||
| %% \DescribeMacro{\clearfoldoutfold=<len>} | %% \DescribeMacro{\clearfoldoutfold=<len>} | ||||||
| @ -2863,13 +2877,10 @@ | |||||||
| %% | %% | ||||||
| %% |in out| is drawn, |out it| is the same but reflected. | %% |in out| is drawn, |out it| is the same but reflected. | ||||||
| %% | %% | ||||||
| %% The size of the paper fold is set by |\paperfoldwidth|. | %% The size of the paper fold is set by |\flatfold|. | ||||||
| %% | %% | ||||||
| % XXX move to globals... | % XXX move to globals... | ||||||
| % XXX revise defaults... | % XXX revise defaults... | ||||||
| \newlength\paperfoldwidth |  | ||||||
| \setlength\paperfoldwidth{0.5mm} |  | ||||||
| 
 |  | ||||||
| \newlength\clearfoldoutbinding | \newlength\clearfoldoutbinding | ||||||
| \setlength\clearfoldoutbinding{8mm} | \setlength\clearfoldoutbinding{8mm} | ||||||
| \newlength\clearfoldoutfold | \newlength\clearfoldoutfold | ||||||
| @ -2982,19 +2993,19 @@ | |||||||
| 		\ifnum \thephotobook@foldoutpanel < 3% | 		\ifnum \thephotobook@foldoutpanel < 3% | ||||||
| 			\setlength\photobook@foldout@panelwidth{% | 			\setlength\photobook@foldout@panelwidth{% | ||||||
| 				\photobook@foldout@maxpanelwidth | 				\photobook@foldout@maxpanelwidth | ||||||
| 				+ \paperfoldwidth}% | 				+ \flatfold}% | ||||||
| 		\else% | 		\else% | ||||||
| 			% double fold twice in same direction... | 			% double fold twice in same direction... | ||||||
| 			\ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{% | 			\ifthenelse{\equal{#2}{\photobook@foldout@prevfold}}{% | ||||||
| 				\setlength\photobook@foldout@panelwidth{% | 				\setlength\photobook@foldout@panelwidth{% | ||||||
| 					\photobook@foldout@maxpanelwidth  | 					\photobook@foldout@maxpanelwidth  | ||||||
| 					+ \paperfoldwidth | 					+ \flatfold | ||||||
| 					- \clearfoldoutfold}% | 					- \clearfoldoutfold}% | ||||||
| 			% different fold directions -- no resizing needed here... | 			% different fold directions -- no resizing needed here... | ||||||
| 			}{% | 			}{% | ||||||
| 				\setlength\photobook@foldout@panelwidth{% | 				\setlength\photobook@foldout@panelwidth{% | ||||||
| 					\photobook@foldout@maxpanelwidth | 					\photobook@foldout@maxpanelwidth | ||||||
| 					+ \paperfoldwidth}}\fi% | 					+ \flatfold}}\fi% | ||||||
| 		\setlength\photobook@foldout@maxpanelwidth{% | 		\setlength\photobook@foldout@maxpanelwidth{% | ||||||
| 			\photobook@foldout@panelwidth}% | 			\photobook@foldout@panelwidth}% | ||||||
| 	% explicit width... | 	% explicit width... | ||||||
| @ -3550,7 +3561,6 @@ | |||||||
| % XXX need to be able to configure/pass/override: | % XXX need to be able to configure/pass/override: | ||||||
| %		- size / \captionsize... | %		- size / \captionsize... | ||||||
| %		- color... | %		- color... | ||||||
| % XXX captions seem not to account for \imageblockoffsettop... |  | ||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\captionsize\{..\}} | %% \DescribeMacro{\captionsize\{..\}} | ||||||
| % | % | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user