mirror of
https://github.com/flynx/photobook.git
synced 2025-11-01 20:00:13 +00:00
lots of tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
243efb1850
commit
80373806ed
6
Makefile
6
Makefile
@ -33,9 +33,9 @@ texToDoc = \
|
|||||||
cat $1 \
|
cat $1 \
|
||||||
| egrep '(^%$3|^\\\\edef\\\\$*@[A-Z][A-Z]+)' \
|
| egrep '(^%$3|^\\\\edef\\\\$*@[A-Z][A-Z]+)' \
|
||||||
| sed 's/^\(\\\\edef\\\\\)$*@/%$3\\1/'\
|
| sed 's/^\(\\\\edef\\\\\)$*@/%$3\\1/'\
|
||||||
| sed 's/%$3%%%% \(.*\)/%$3\\\\subsubsection{\1}/' \
|
| sed 's/%$3%%%% \(.*\)/%$3\\\\subsubsection{\1}\\\\label{subsubsec:\1}/' \
|
||||||
| sed 's/%$3%%% \(.*\)/%$3\\\\subsection{\1}/' \
|
| sed 's/%$3%%% \(.*\)/%$3\\\\subsection{\1}\\\\label{subsec:\1}/' \
|
||||||
| sed 's/%$3%% \(.*\)/%$3\\\\section{\1}/' \
|
| sed 's/%$3%% \(.*\)/%$3\\\\section{\1}\\\\label{sec:\1}/' \
|
||||||
| sed 's/%$3\s\+>>\s\+\(.*\)/%$3\\\\begin{verbatim} \1 \\\\end{verbatim}/' \
|
| sed 's/%$3\s\+>>\s\+\(.*\)/%$3\\\\begin{verbatim} \1 \\\\end{verbatim}/' \
|
||||||
| cut -c 3- - > $2
|
| cut -c 3- - > $2
|
||||||
|
|
||||||
|
|||||||
151
photobook.cls
151
photobook.cls
@ -111,10 +111,6 @@
|
|||||||
%%
|
%%
|
||||||
%% \maketitle
|
%% \maketitle
|
||||||
%%
|
%%
|
||||||
%% \begin{center}
|
|
||||||
%% \fbox{This class is still unstable}
|
|
||||||
%% \end{center}
|
|
||||||
%%
|
|
||||||
%% \begin{abstract}
|
%% \begin{abstract}
|
||||||
%% The |photobook| \LaTeX\space document class extends the |book| class
|
%% The |photobook| \LaTeX\space document class extends the |book| class
|
||||||
%% defining a set of parameters, meta-macros, macros and environments
|
%% defining a set of parameters, meta-macros, macros and environments
|
||||||
@ -676,10 +672,46 @@
|
|||||||
|
|
||||||
%% \DescribeMacro{\captionclearpage=<len>}
|
%% \DescribeMacro{\captionclearpage=<len>}
|
||||||
%
|
%
|
||||||
|
%% The distance between a caption block on a template page and page
|
||||||
|
%% borders (defaults to: |\clearimage|).
|
||||||
|
%%
|
||||||
|
%% This is relevant only in page/spread templates.
|
||||||
%%
|
%%
|
||||||
\def\captionclearpage{\clearimage}
|
\def\captionclearpage{\clearimage}
|
||||||
|
|
||||||
|
|
||||||
|
%% \DescribeMacro{\cellparentwidth=<len>}
|
||||||
|
%% \DescribeMacro{\cellparentheight=<len>}
|
||||||
|
%% \DescribeMacro{\cellwidth=<len>}
|
||||||
|
%% \DescribeMacro{\cellheight=<len>}
|
||||||
|
%% \DescribeMacro{\celloffsetleft=<len>}
|
||||||
|
%% \DescribeMacro{\celloffsettop=<len>}
|
||||||
|
%% \DescribeMacro{\clearance=<len>}
|
||||||
|
%
|
||||||
|
%% Cell geometry.
|
||||||
|
%% For more details see the \nameref{subsec:Cells} section.
|
||||||
|
%%
|
||||||
|
%% These are set automatically by cells, thus it is not recommended to
|
||||||
|
%% edit them manually.
|
||||||
|
%%
|
||||||
|
%% For more details see the \nameref{subsec:Cells} section.
|
||||||
|
%%
|
||||||
|
\newlength\cellparentwidth
|
||||||
|
\setlength\cellparentwidth{\paperwidth}
|
||||||
|
\newlength\cellparentheight
|
||||||
|
\setlength\cellparentheight{\paperheight}
|
||||||
|
\newlength\cellwidth
|
||||||
|
\setlength\cellwidth{\cellparentwidth}
|
||||||
|
\newlength\cellheight
|
||||||
|
\setlength\cellheight{\cellparentheight}
|
||||||
|
\newlength\celloffsetleft
|
||||||
|
\setlength\celloffsetleft{0pt}
|
||||||
|
\newlength\celloffsettop
|
||||||
|
\setlength\celloffsettop{0pt}
|
||||||
|
\newlength\clearance
|
||||||
|
\setlength\clearance{0pt}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%----------------------------------------------------------------------
|
%----------------------------------------------------------------------
|
||||||
%%%% Initialization
|
%%%% Initialization
|
||||||
@ -822,6 +854,11 @@
|
|||||||
\setlength\bleedblockheight{\dimexpr
|
\setlength\bleedblockheight{\dimexpr
|
||||||
2\bleed
|
2\bleed
|
||||||
+ \blockheight \relax}
|
+ \blockheight \relax}
|
||||||
|
% cells...
|
||||||
|
\global\setlength\cellparentwidth{\blockwidth}
|
||||||
|
\global\setlength\cellparentheight{\blockheight}
|
||||||
|
\global\setlength\cellwidth{\cellparentwidth}
|
||||||
|
\global\setlength\cellheight{\cellparentheight}
|
||||||
% misc...
|
% misc...
|
||||||
\nprounddigits{\photobook@roundprintedlengthsto}}
|
\nprounddigits{\photobook@roundprintedlengthsto}}
|
||||||
|
|
||||||
@ -860,9 +897,7 @@
|
|||||||
|
|
||||||
\AtEndPreamble{
|
\AtEndPreamble{
|
||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% Metadata...
|
||||||
% Metadata...
|
|
||||||
|
|
||||||
\hypersetup{
|
\hypersetup{
|
||||||
pdfinfo={
|
pdfinfo={
|
||||||
Title={\@title},
|
Title={\@title},
|
||||||
@ -873,12 +908,8 @@
|
|||||||
pdfpagelayout=\pdfpagelayout,
|
pdfpagelayout=\pdfpagelayout,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% Geometry...
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
% Geometry...
|
|
||||||
|
|
||||||
\InitPages
|
\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
|
||||||
\geometry{
|
\geometry{
|
||||||
@ -895,19 +926,13 @@
|
|||||||
twoside, includeall, nomarginpar,
|
twoside, includeall, nomarginpar,
|
||||||
ignorehead=false, ignorefoot=false, ignoremp=false,
|
ignorehead=false, ignorefoot=false, ignoremp=false,
|
||||||
% center printed area on page
|
% center printed area on page
|
||||||
vcentering, hcentering}
|
vcentering, hcentering}\fi
|
||||||
\fi
|
|
||||||
|
|
||||||
\setlength\pagetextwidth{\textwidth}
|
\setlength\pagetextwidth{\textwidth}
|
||||||
\setlength\pagetextheight{\textheight}
|
\setlength\pagetextheight{\textheight}
|
||||||
|
|
||||||
|
% PDF boxes...
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}}
|
||||||
% pdf boxes...
|
|
||||||
|
|
||||||
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}
|
|
||||||
|
|
||||||
} % \AtEndPreamble{..}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1048,12 +1073,22 @@
|
|||||||
\newcommand\resizedpage[4][\bleed]{
|
\newcommand\resizedpage[4][\bleed]{
|
||||||
\begingroup%
|
\begingroup%
|
||||||
% setup page...
|
% setup page...
|
||||||
|
\setlength\paperwidth{#2}
|
||||||
|
\setlength\paperheight{#3}
|
||||||
% XXX this does not work correctly yet...
|
% XXX this does not work correctly yet...
|
||||||
\setlength\bleed{#1}%
|
\setlength\bleed{#1}%
|
||||||
\setlength\blockwidth{#2}%
|
\setlength\blockwidth{#2}%
|
||||||
\setlength\blockheight{#3}%
|
\setlength\blockheight{#3}%
|
||||||
\edef\pdfpagelayout{}%
|
\edef\pdfpagelayout{}%
|
||||||
\InitPages%
|
\InitPages%
|
||||||
|
%
|
||||||
|
\setlength\cellparentwidth{\bleedblockwidth}%
|
||||||
|
\setlength\cellparentheight{\bleedblockheight}%
|
||||||
|
\setlength\cellwidth{\cellparentwidth}%
|
||||||
|
\setlength\cellheight{\cellparentheight}%
|
||||||
|
%\setlength\celloffsetleft{0pt}%
|
||||||
|
%\setlength\celloffsettop{0pt}%
|
||||||
|
%
|
||||||
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}%
|
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}%
|
||||||
%
|
%
|
||||||
#4
|
#4
|
||||||
@ -1238,28 +1273,6 @@
|
|||||||
%% Changing these is not recommended, it likely will not affect the
|
%% Changing these is not recommended, it likely will not affect the
|
||||||
%% current cell but can mess up nested cells.
|
%% current cell but can mess up nested cells.
|
||||||
%%
|
%%
|
||||||
\newlength\cellparentwidth
|
|
||||||
\setlength\cellparentwidth{\paperwidth}
|
|
||||||
|
|
||||||
\newlength\cellparentheight
|
|
||||||
\setlength\cellparentheight{\paperheight}
|
|
||||||
|
|
||||||
\newlength\cellwidth
|
|
||||||
\setlength\cellwidth{\cellparentwidth}
|
|
||||||
|
|
||||||
\newlength\cellheight
|
|
||||||
\setlength\cellheight{\cellparentheight}
|
|
||||||
|
|
||||||
\newlength\celloffsetleft
|
|
||||||
\setlength\celloffsetleft{0pt}
|
|
||||||
|
|
||||||
\newlength\celloffsettop
|
|
||||||
\setlength\celloffsettop{0pt}
|
|
||||||
|
|
||||||
\newlength\clearance
|
|
||||||
\setlength\clearance{0pt}
|
|
||||||
|
|
||||||
|
|
||||||
%% \DescribeEnv{inlinecell}
|
%% \DescribeEnv{inlinecell}
|
||||||
%% \DescribeEnv{inlinecell*}
|
%% \DescribeEnv{inlinecell*}
|
||||||
%
|
%
|
||||||
@ -1729,7 +1742,9 @@
|
|||||||
%% |captionclearparent|.
|
%% |captionclearparent|.
|
||||||
%%
|
%%
|
||||||
%% This will write image path, page and size to |\jobname|.image-list,
|
%% This will write image path, page and size to |\jobname|.image-list,
|
||||||
%% this is useful for final image pre-press. To disable this use:
|
%% this is useful for final image pre-press.
|
||||||
|
%%
|
||||||
|
%% To disable image list set:
|
||||||
%
|
%
|
||||||
%% >> \writeimagelistfalse
|
%% >> \writeimagelistfalse
|
||||||
%%
|
%%
|
||||||
@ -2939,7 +2954,9 @@
|
|||||||
|
|
||||||
%% \DescribeMacro{\captionsize\{..\}}
|
%% \DescribeMacro{\captionsize\{..\}}
|
||||||
%
|
%
|
||||||
%% Defines the caption font setup macro
|
%% Defines the caption font.
|
||||||
|
%%
|
||||||
|
%% Can be redefined to control caption font/style.
|
||||||
%%
|
%%
|
||||||
\ResettableMacro{captionsize}{%
|
\ResettableMacro{captionsize}{%
|
||||||
\fontsize{6.5pt}{8pt}\selectfont}
|
\fontsize{6.5pt}{8pt}\selectfont}
|
||||||
@ -2947,11 +2964,16 @@
|
|||||||
|
|
||||||
%% \DescribeMacro{\captionformat\{..\}}
|
%% \DescribeMacro{\captionformat\{..\}}
|
||||||
%
|
%
|
||||||
|
%% General caption format.
|
||||||
|
%
|
||||||
|
%% >> \captionformat{<code>}
|
||||||
|
%
|
||||||
|
%% This can be redefined to control the image caption.
|
||||||
%%
|
%%
|
||||||
%%
|
|
||||||
% XXX move to a better location... (???)
|
|
||||||
\ResettableMacro{captionformat}[1]{%
|
\ResettableMacro{captionformat}[1]{%
|
||||||
\adjustbox{margin=0.1em 0.2em}{%
|
\adjustbox{
|
||||||
|
margin=0.1em 0.2em,
|
||||||
|
varwidth=\cellwidth}{%
|
||||||
\captionsize #1}}
|
\captionsize #1}}
|
||||||
|
|
||||||
|
|
||||||
@ -3938,16 +3960,14 @@
|
|||||||
%----------------------------------------------------------------------
|
%----------------------------------------------------------------------
|
||||||
%%%% Miscellaneous
|
%%%% Miscellaneous
|
||||||
|
|
||||||
% XXX should digits/rounding be configurable???
|
%% \DescribeMacro{\PageInfo}
|
||||||
\newcommand\photobook@TemplateCell[2][mm]{
|
\newcommand\PageInfo{%
|
||||||
\begin{center}
|
Layout: \layoutmode
|
||||||
\vfill%
|
\par
|
||||||
#2 \\
|
paper: \lenprint[mm]{\paperwidth} x \lenprint[mm]{\paperheight} (w. bleeds) \\
|
||||||
(\lenprint[#1]{\cellwidth} \space x \lenprint[#1]{\cellheight})
|
block: \lenprint[mm]{\blockwidth} x \lenprint[mm]{\blockheight} \\
|
||||||
\vfill%
|
cell: \lenprint[mm]{\cellparentwidth} x \lenprint[mm]{\cellparentheight} \\
|
||||||
\vspace{0pt}%
|
bleed: \lenprint[mm]{\bleed}}
|
||||||
\end{center}%
|
|
||||||
\ignorespaces}
|
|
||||||
|
|
||||||
|
|
||||||
%% \DescribeMacro{\GenerateTemplate\{..\}}
|
%% \DescribeMacro{\GenerateTemplate\{..\}}
|
||||||
@ -3966,6 +3986,17 @@
|
|||||||
%%
|
%%
|
||||||
%% This is a no-op for |layoutmode=block|.
|
%% This is a no-op for |layoutmode=block|.
|
||||||
%%
|
%%
|
||||||
|
% XXX should digits/rounding be configurable???
|
||||||
|
\newcommand\photobook@TemplateCell[2][mm]{
|
||||||
|
\begin{center}
|
||||||
|
\vfill%
|
||||||
|
#2 \\
|
||||||
|
(\lenprint[#1]{\cellwidth} \space x \lenprint[#1]{\cellheight})
|
||||||
|
\vfill%
|
||||||
|
\vspace{0pt}%
|
||||||
|
\end{center}%
|
||||||
|
\ignorespaces}
|
||||||
|
|
||||||
\newcommand\GenerateTemplate[1][mm]{
|
\newcommand\GenerateTemplate[1][mm]{
|
||||||
\TPoptions{showboxes=true}%
|
\TPoptions{showboxes=true}%
|
||||||
\begin{page}
|
\begin{page}
|
||||||
@ -4030,9 +4061,9 @@
|
|||||||
\expandafter\pdfpageattr\expandafter{\photobook@pdfboxstore@stored}}
|
\expandafter\pdfpageattr\expandafter{\photobook@pdfboxstore@stored}}
|
||||||
|
|
||||||
|
|
||||||
%% \DescribeMacro{\pdfboxesset\{..}\}
|
%% \DescribeMacro{\pdfboxesset\{..\}}
|
||||||
%
|
%
|
||||||
%% >> \SetPDFBoxes[<bleed>]{<bleedblockwidth>}{<bleedblockheight>}
|
%% >> \pdfboxesset[<bleed>]{<bleedblockwidth>}{<bleedblockheight>}
|
||||||
%%
|
%%
|
||||||
\newcommand\pdfboxesset[3][\bleed]{%
|
\newcommand\pdfboxesset[3][\bleed]{%
|
||||||
% calculate pdf box dimensions in pt...
|
% calculate pdf box dimensions in pt...
|
||||||
|
|||||||
@ -22,6 +22,8 @@
|
|||||||
\edef\TestImage{DSC00403-2}
|
\edef\TestImage{DSC00403-2}
|
||||||
\edef\TestImageV{DSC00403-2vert}
|
\edef\TestImageV{DSC00403-2vert}
|
||||||
|
|
||||||
|
\writeimagelistfalse
|
||||||
|
|
||||||
|
|
||||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
@ -33,10 +35,12 @@
|
|||||||
|
|
||||||
\ImagePageFill{Caption text}{\TestImage}
|
\ImagePageFill{Caption text}{\TestImage}
|
||||||
|
|
||||||
\resizedpage{3\bleedblockwidth}{\bleedblockheight}{
|
\resizedpage{2\blockwidth}{\blockheight}{
|
||||||
\ImagePageFill{Caption text}{\TestImage}}
|
% XXX for some reason this doesn't fill the page...
|
||||||
|
\ImagePageFill{\PageInfo}{\TestImage}}
|
||||||
|
|
||||||
\pdfboxesset{2\bleedblockwidth}{\bleedblockheight}
|
\pdfboxesset{1.5\bleedblockwidth}{\bleedblockheight}
|
||||||
|
% XXX for some reason this doesn't fill the page...
|
||||||
\ImagePage{Caption text}{\TestImage}
|
\ImagePage{Caption text}{\TestImage}
|
||||||
|
|
||||||
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}
|
\pdfboxesset[\bleed]{\bleedblockwidth}{\bleedblockheight}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user