diff --git a/photobook.cls b/photobook.cls index 1ecdc12..d5016dd 100644 --- a/photobook.cls +++ b/photobook.cls @@ -1427,32 +1427,22 @@ %% \end{verbatim} %% \end{minipage} %% -% XXX add support for boolkeys: -% - left/right/top/bottom -% - inside/outside -% - up/down (vertical text) -% or -% - over/under/before/after -% - top/bottom/left/right -% - align=left/right + % XXX revise keywords... -\define@boolkey{captioncell@args}{left}[true]{} -\define@boolkey{captioncell@args}{right}[true]{} +\define@boolkey{captioncell@args}{above}[true]{} \define@boolkey{captioncell@args}{top}[true]{} \define@boolkey{captioncell@args}{bottom}[true]{} +\define@boolkey{captioncell@args}{below}[true]{} -\define@boolkey{captioncell@args}{inside}[true]{% - \KV@captioncell@args@outsidefalse} -\define@boolkey{captioncell@args}{outside}[true]{% - \KV@captioncell@args@insidefalse} +% XXX add fields: before/left/right/after... (vertical???) +% XXX add vertical fields direction: up/down + +% XXX expand choices... +\define@choicekey{captioncell@args}{align}{flushleft,center,flushright}{} -\define@boolkey{captioncell@args}{up}[true]{% - \KV@captioncell@args@downfalse} -\define@boolkey{captioncell@args}{down}[true]{% - \KV@captioncell@args@upfalse} \newcommand\captioncell[2][]{% - \setkeys{captioncell@args}{top,left,inside,#1}% + \setkeys{captioncell@args}{top, align=flushleft,#1}% % XXX } diff --git a/workflow/test.tex b/workflow/test.tex index 7b4346c..ce6e7ca 100644 --- a/workflow/test.tex +++ b/workflow/test.tex @@ -14,12 +14,20 @@ ]{photobook} +\newlength\spacewidth +\newsavebox\spacebox +\newcommand\calcspacewidth{% + \sbox{\spacebox}{ }% + \setlength\spacewidth{\wd\spacebox}} + % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \begin{document} %\TPoptions{showboxes=true} +\calcspacewidth +Space width: \the\spacewidth \null \newpage