mirror of
				https://github.com/flynx/photobook.git
				synced 2025-10-31 03:10:08 +00:00 
			
		
		
		
	docs + tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									b7d00fa7ec
								
							
						
					
					
						commit
						43f8cb7464
					
				
							
								
								
									
										105
									
								
								photobook.cls
									
									
									
									
									
								
							
							
						
						
									
										105
									
								
								photobook.cls
									
									
									
									
									
								
							| @ -411,6 +411,7 @@ | |||||||
| \RequirePackage{xargs} | \RequirePackage{xargs} | ||||||
| \RequirePackage{ifthen} | \RequirePackage{ifthen} | ||||||
| \RequirePackage{iftex} | \RequirePackage{iftex} | ||||||
|  | \RequirePackage{pgffor} | ||||||
| \RequirePackage{etoolbox} | \RequirePackage{etoolbox} | ||||||
| \RequirePackage{atbegshi} | \RequirePackage{atbegshi} | ||||||
| %\RequirePackage{afterpage} | %\RequirePackage{afterpage} | ||||||
| @ -436,7 +437,7 @@ | |||||||
| %---------------------------------------------------------------------- | %---------------------------------------------------------------------- | ||||||
| %%%% Globals | %%%% Globals | ||||||
| % | % | ||||||
| % NOTE: most of these are setup in \InitPage... | % NOTE: most of these are setup in \InitPages... | ||||||
| 
 | 
 | ||||||
| %%% \DescribeGlobal{layoutmode} | %%% \DescribeGlobal{layoutmode} | ||||||
| %% \DescribeMacro{\layoutmode=<mode>} | %% \DescribeMacro{\layoutmode=<mode>} | ||||||
| @ -505,7 +506,7 @@ | |||||||
| % | % | ||||||
| %%	Page block size | %%	Page block size | ||||||
| %% | %% | ||||||
| % NOTE: page and bleed block sizes are set via \InitPage | % NOTE: page and bleed block sizes are set via \InitPages | ||||||
| \newlength\blockwidth | \newlength\blockwidth | ||||||
| \newlength\blockheight | \newlength\blockheight | ||||||
| 
 | 
 | ||||||
| @ -575,11 +576,11 @@ | |||||||
| %---------------------------------------------------------------------- | %---------------------------------------------------------------------- | ||||||
| %%%% Initialization | %%%% Initialization | ||||||
| %% | %% | ||||||
| %% \DescribeMacro{\InitPage} | %% \DescribeMacro{\InitPages} | ||||||
| % | % | ||||||
| %%	Initialize page dimensions. | %%	Initialize page dimensions. | ||||||
| %% | %% | ||||||
| \newcommand\InitPage{ | \newcommand\InitPages{ | ||||||
| 	% layout bools/tests... | 	% layout bools/tests... | ||||||
| 	\coverlayoutfalse | 	\coverlayoutfalse | ||||||
| 	\hardcoverlayoutfalse | 	\hardcoverlayoutfalse | ||||||
| @ -721,16 +722,16 @@ | |||||||
| 	\nprounddigits{\photobook@roundprintedlengthsto} } | 	\nprounddigits{\photobook@roundprintedlengthsto} } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %% \DescribeMacro{\ResetPage} | %% \DescribeMacro{\ResetPages} | ||||||
| % | % | ||||||
| %%	Reset and re-initialize page dimentions. | %%	Reset and re-initialize page dimentions. | ||||||
| %% | %% | ||||||
| \newcommand\ResetPage{ | \newcommand\ResetPages{ | ||||||
| 	\setlength\blockwidth{0mm} | 	\setlength\blockwidth{0mm} | ||||||
| 	\setlength\blockheight{0mm} | 	\setlength\blockheight{0mm} | ||||||
| 	\edef\pdfpagelayout{} | 	\edef\pdfpagelayout{} | ||||||
| 	% | 	% | ||||||
| 	\InitPage} | 	\InitPages} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -740,7 +741,7 @@ | |||||||
| % Setup... | % Setup... | ||||||
| 
 | 
 | ||||||
| % init/update lengths... | % init/update lengths... | ||||||
| \InitPage | \InitPages | ||||||
| 
 | 
 | ||||||
| % minimal geometry setup... | % minimal geometry setup... | ||||||
| \RequirePackage[ | \RequirePackage[ | ||||||
| @ -772,7 +773,7 @@ | |||||||
| % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| % Geometry... | % Geometry... | ||||||
| 
 | 
 | ||||||
| 	\InitPage | 	\InitPages | ||||||
| 
 | 
 | ||||||
| 	% no-defaults -- the user is expected to set things up... | 	% no-defaults -- the user is expected to set things up... | ||||||
| 	\ifphotobook@geometrynodefaults | 	\ifphotobook@geometrynodefaults | ||||||
| @ -984,7 +985,7 @@ | |||||||
| % | % | ||||||
| %% Page environment. | %% Page environment. | ||||||
| %% | %% | ||||||
| %% This is mainly designed to wrap other cell environments described later. | %% This is mainly designed to wrap other cell environment described later. | ||||||
| % | % | ||||||
| % XXX this may span more than one page if there is enoug stuff packed  | % XXX this may span more than one page if there is enoug stuff packed  | ||||||
| %		into it... | %		into it... | ||||||
| @ -1007,25 +1008,46 @@ | |||||||
| \newlength\cellwidth | \newlength\cellwidth | ||||||
| \newlength\cellheight | \newlength\cellheight | ||||||
| 
 | 
 | ||||||
|  | % XXX should we treat the page as a cell??? | ||||||
|  | \setlength\cellwidth{\textwidth} | ||||||
|  | \setlength\cellheight{\textheight} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | %% \DescribeEnv{inlinecell} | ||||||
|  | % | ||||||
|  | %% Create a basic inline cell. | ||||||
|  | % | ||||||
|  | %%	>> \begin{inline}<width>}{<height>} ... \end{inlinecell} | ||||||
|  | % | ||||||
|  | %% This is just like |minipage| but provides cell mechanics. | ||||||
|  | %% | ||||||
|  | % XXX | ||||||
|  | \newenvironment{inlinecell}[2]{% | ||||||
|  | 	\begingroup% | ||||||
|  | 		\setlength\cellwidth{\dimexpr #1 \relax}% | ||||||
|  | 		\setlength\cellheight{\dimexpr #2 \relax}% | ||||||
|  | 		% | ||||||
|  | 		\begin{minipage}[t][\cellheight][t]{\cellwidth}%  | ||||||
|  | }{% | ||||||
|  | 		\end{minipage}% | ||||||
|  | 	\endgroup} | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| %% \DescribeEnv{cell} | %% \DescribeEnv{cell} | ||||||
| % | % | ||||||
| %% Create a basic cell. | %% Create a basic absolutely positioned cell. | ||||||
| % | % | ||||||
| %%	>> \begin{cell}{<top>, <left>}{<width>}{<height>} ... | %%	>> \begin{cell}{<top>, <left>}{<width>}{<height>} ... \end{cell} | ||||||
| % | % | ||||||
| % XXX cells can not be nested -- they will mess up the \cellwidth and  | % XXX cells can not be nested -- they will mess up the \cellwidth and  | ||||||
| %		\cellheight for parents... | %		\cellheight for parents... | ||||||
| % XXX SYNTAX: place the second arg in braces... | % XXX SYNTAX: place the second arg in braces... | ||||||
| %		\begin{cell}(<top>, <left>){<width>}{<height>} | %		\begin{cell}(<top>, <left>){<width>}{<height>} | ||||||
| \newenvironment{cell}[3]{% | \newenvironment{cell}[3]{% | ||||||
| 	\setlength\cellwidth{\dimexpr #2 \relax}% | 	\begin{textblock*}{#2}(#1)% | ||||||
| 	\setlength\cellheight{\dimexpr #3 \relax}% | 	\begin{inlinecell}{#2}{#3}% | ||||||
| 	% |  | ||||||
| 	\begin{textblock*}{\cellwidth}(#1)% |  | ||||||
| 	\begin{minipage}[t][\cellheight][t]{\cellwidth}%  |  | ||||||
| }{% | }{% | ||||||
| 	\end{minipage}% | 	\end{inlinecell}% | ||||||
| 	\end{textblock*}} | 	\end{textblock*}} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -1033,7 +1055,7 @@ | |||||||
| % | % | ||||||
| %% Create a clipped cell. | %% Create a clipped cell. | ||||||
| % | % | ||||||
| %%	>> \begin{clipcell}{<top>, <left>}{<width>}{<height>} ... | %%	>> \begin{clipcell}{<top>, <left>}{<width>}{<height>} ... \end{clipcell} | ||||||
| % | % | ||||||
| %% This is like the |cell| environment but will clip everything not in the  | %% This is like the |cell| environment but will clip everything not in the  | ||||||
| %% the cell. | %% the cell. | ||||||
| @ -1136,9 +1158,28 @@ | |||||||
| %% Fit an image to cell (centered). | %% Fit an image to cell (centered). | ||||||
| % | % | ||||||
| %%	>> \imagetocellfit[<clearence>]{<caption>}{<image>} | %%	>> \imagetocellfit[<clearence>]{<caption>}{<image>} | ||||||
| % | %% | ||||||
|  | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%   +-----------------+ | ||||||
|  | %%   |                 | | ||||||
|  | %%   +-----------------+  | ||||||
|  | %%   | .             . |  | ||||||
|  | %%   |    .       .    |  | ||||||
|  | %%   |      image      |  | ||||||
|  | %%   |    .       .    |  | ||||||
|  | %%   | .             . |  | ||||||
|  | %%   +-----------------+  | ||||||
|  | %%   |               c | | ||||||
|  | %%   +-----------------+  | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
| %% Image position can be tweaked via |\vspace{..}| or |\hspace{..}| | %% Image position can be tweaked via |\vspace{..}| or |\hspace{..}| | ||||||
| %% | %% | ||||||
|  | % XXX revise caption for vertical images... | ||||||
| % XXX this should trim the image to the cell... (option??) | % XXX this should trim the image to the cell... (option??) | ||||||
| % XXX test interaction between \bleed and \clearimage... | % XXX test interaction between \bleed and \clearimage... | ||||||
| \newcommand\imagetocellfit[3][0mm]{% | \newcommand\imagetocellfit[3][0mm]{% | ||||||
| @ -1171,8 +1212,28 @@ | |||||||
| %% Fill cell with image (centered). | %% Fill cell with image (centered). | ||||||
| % | % | ||||||
| %%	>> \imagetocellfill[<clearence>]{<caption>}{<image>} | %%	>> \imagetocellfill[<clearence>]{<caption>}{<image>} | ||||||
| % | %% | ||||||
| %% Image position can be tweaked via |\vspace{..}| or |\hspace{..}| | %% \begin{minipage}{\textwidth} | ||||||
|  | %% \begin{verbatim} | ||||||
|  | %% | ||||||
|  | %%   . . . +---------------+ . . . | ||||||
|  | %%   .   . |             c | .   . | ||||||
|  | %%   .     |.             .|     . | ||||||
|  | %%   .     |   .       .   |     . | ||||||
|  | %%   .     |     image     |     . | ||||||
|  | %%   .     |   .       .   |     . | ||||||
|  | %%   .     |.             .|     . | ||||||
|  | %%   .   . |               | .   . | ||||||
|  | %%   . . . +---------------+ . . . | ||||||
|  | %% | ||||||
|  | %% \end{verbatim} | ||||||
|  | %% \end{minipage} | ||||||
|  | %% | ||||||
|  | %% Image position can be tweaked via |\vspace{..}| or |\hspace{..}|. | ||||||
|  | %% | ||||||
|  | %% Note that this will not clip an image by default, to clip everything  | ||||||
|  | %% outside the cell use a |cliptocell| environment inside a cell or  | ||||||
|  | %% a |clipcell| cell environment. | ||||||
| %% | %% | ||||||
| % XXX add left/right/top/bottom align... | % XXX add left/right/top/bottom align... | ||||||
| % XXX this should trim the image to the cell... (option??) | % XXX this should trim the image to the cell... (option??) | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ | |||||||
| \def\layoutmode{cover} | \def\layoutmode{cover} | ||||||
| \setlength\spinewidth{7.1mm} | \setlength\spinewidth{7.1mm} | ||||||
| 
 | 
 | ||||||
| \ResetPageLengths | \ResetPages | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user