fixed file metadata to doc sharing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-08-10 06:14:42 +03:00
parent cab5eddea5
commit 1326badd81
2 changed files with 135 additions and 130 deletions

View File

@ -14,7 +14,8 @@ TEX := lualatex
# Generate docs from latex package/class... # Generate docs from latex package/class...
# #
# - keep only lines starting with '%%' # - keep lines starting with \def\<module-name>@FILE
# - keep lines starting with '%%'
# - %%%%% Text -> \subsection(Text) # - %%%%% Text -> \subsection(Text)
# - %%%% Text -> \section(Text) # - %%%% Text -> \section(Text)
# - %% >> code -> \begin{verbatim}code\end{verbatim} # - %% >> code -> \begin{verbatim}code\end{verbatim}
@ -31,7 +32,8 @@ TEX := lualatex
#%.tex: %.sty #%.tex: %.sty
%.tex: %.cls %.tex: %.cls
cat $< \ cat $< \
| egrep "^%%" \ | egrep '(^%%|^\\\\def\\\\$*@FILE)' \
| sed 's/^\(\\\\def\\\\\)$*@/%%\\1/'\
| sed 's/%%%%%% \(.*\)/%%\\\\subsubsection{\1}/' \ | sed 's/%%%%%% \(.*\)/%%\\\\subsubsection{\1}/' \
| sed 's/%%%%% \(.*\)/%%\\\\subsection{\1}/' \ | sed 's/%%%%% \(.*\)/%%\\\\subsection{\1}/' \
| sed 's/%%%% \(.*\)/%%\\\\section{\1}/' \ | sed 's/%%%% \(.*\)/%%\\\\section{\1}/' \

View File

@ -14,7 +14,11 @@
% XXX might be a good idea to add a spine calculator... % XXX might be a good idea to add a spine calculator...
% %
%---------------------------------------------------------------------- %----------------------------------------------------------------------
%
\def\photobook@FILEVERSION{v0.1}
\def\photobook@FILEDATE{2021-07-28}
%% \documentclass{ltxdoc} %% \documentclass{ltxdoc}
%% %%
%% \usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} %% \usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
@ -24,14 +28,13 @@
%% %%
%% \begin{document} %% \begin{document}
%% %%
%% \GetFileInfo{\jobname.cls} %% \title{\textsf{photobook} --- Document class for building photo-books
%% %% \thanks{This file describes version \FILEVERSION,
%% \title{\textsf{photobook} --- A new LaTeX class\thanks{This file %% last revised \FILEDATE.}}
%% describes version \fileversion, last revised \filedate.}}
%% %%
%% \author{Alex A. Naanou\thanks{E-mail: alex.nanou@gmail.com}} %% \author{Alex A. Naanou\thanks{E-mail: alex.nanou@gmail.com}}
%% %%
%% \date{Released \filedate} %% \date{Released \FILEDATE}
%% %%
%% \maketitle %% \maketitle
%% %%
@ -46,8 +49,8 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
% XXX set release date... \ProvidesClass{photobook}
\ProvidesClass{photobook}[2021/07/28 v0.1 Photo book document class] [\photobook@FILEDATE \space \photobook@FILEVERSION Photo book document class]
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -243,7 +246,6 @@
%% \end{verbatim} %% \end{verbatim}
%% \end{minipage} %% \end{minipage}
% %
% XXX document layout bools here...
% XXX in cover layout setup pdf boxes in a way to use \bleed as foldover... % XXX in cover layout setup pdf boxes in a way to use \bleed as foldover...
% ...see hyperref docs to set pdf view/print area (???) % ...see hyperref docs to set pdf view/print area (???)
% .....should also set \bleed default to something like 17mm % .....should also set \bleed default to something like 17mm
@ -252,6 +254,7 @@
% - setup pine % - setup pine
% - setup back-cover % - setup back-cover
% ...envs?? % ...envs??
% XXX do we need to implement cover fold over???
% XXX not yet sure how to go about this -- should we update \blockwidth % XXX not yet sure how to go about this -- should we update \blockwidth
% or should we define a new length and let some templates % or should we define a new length and let some templates
% use one and some use the other??? % use one and some use the other???
@ -406,9 +409,9 @@
%---------------------------------------------------------------------- %----------------------------------------------------------------------
%%%% Globals %%%% Globals
%% %
%% Most of these are setup in |\InitPage|. % NOTE: most of these are setup in \InitPage...
%%
%% \DescribeMacro{\layoutmode} %% \DescribeMacro{\layoutmode}
% %
%% Layout mode %% Layout mode
@ -849,7 +852,7 @@
% %
%% Get pdf page count %% Get pdf page count
%% %%
%% >> \pdfpagecount{<file-pdf>} %% >> \pdfpagecount{<file.pdf>}
%% %%
\newcommand\pdfpagecount[1]{ \newcommand\pdfpagecount[1]{
\ifpdftex \ifpdftex
@ -1650,6 +1653,121 @@
\newpage } \newpage }
% XXX
% XXX \OFFSETFIX
%% \DescribeMacro{\imageleftspreadfullbleed}
%
%% Image left page spread with full bleed.
%
%% >> \imageleftspreadfullbleed[<vertical-offset>]{<caption>}{<image>}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% +---------------+
%% | . .
%% | . .
%% | . .
%% | . .
%% | ima
%% | . .
%% | . .
%% | . .
%% | . c .
%% +---------------+
%%
%% \end{verbatim}
%% \end{minipage}
%
\newcommand\imageleftspreadfullbleed[3][0mm]{
\sbox{\photobook@imagebox}{
\includegraphics[
keepaspectratio,
width=\dimexpr
2\blockwidth - 2\clearimage + \vgrowimageby \relax]{#3} }
\clearpage
\null
\vfill
\begin{flushright}
#2
\end{flushright}
\ShipoutPicture{
\AtPageCenter{
\hspace{\dimexpr
\OFFSETFIX
-(\nudgeimageby)
+\clearimage
-0.5\blockwidth \relax}{
\raisebox{\dimexpr
(#1)
+\clearimage
-(0.5\blockheight
+(0.5\ht\photobook@imagebox - 0.5\blockheight))
- 0.5\vgrowimageby - \vnudgeimageby \relax}{
\usebox\photobook@imagebox } } } }
\newpage
\resetnudgeimage }
% XXX
% XXX \OFFSETFIX
%% \DescribeMacro{\imagerightspreadfullbleed}
%
%% Image spread right page with full bleed.
%
%% >> \imagerightspreadfullbleed[<vertical-offset>]{<caption>}{<image>}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% +---------------+
%% . . |
%% . . |
%% . . |
%% . . |
%% age |
%% . . |
%% . . |
%% . . |
%% . . c |
%% +---------------+
%%
%% \end{verbatim}
%% \end{minipage}
%
\newcommand\imagerightspreadfullbleed[3][0mm]{
\sbox{\photobook@imagebox}{
\includegraphics[
keepaspectratio,
width=\dimexpr
2\blockwidth - 2\clearimage + \vgrowimageby \relax]{#3} }
\clearpage
\null
\vfill
% XXX for some reason the last line here is a bit off...
% XXX do we need to restrict caption width here??? ...0.5\textwidth??
% XXX make caption sizing a bit more flexible...
\begin{flushright}
\captionsize #2
\end{flushright}
\ShipoutPicture{
\AtPageCenter{
\hspace{\dimexpr
\OFFSETFIX
-(\nudgeimageby)
+\clearimage
-1.5\blockwidth \relax}{
\raisebox{\dimexpr
(#1)
+\clearimage
-(0.5\blockheight
+(0.5\ht\photobook@imagebox - 0.5\blockheight))
- 0.5\vgrowimageby - \vnudgeimageby \relax}{
\usebox\photobook@imagebox } } } }
\newpage
\resetnudgeimage }
%---------------------------------------------------------------------- %----------------------------------------------------------------------
%%%% Spread Templates %%%% Spread Templates
@ -1939,121 +2057,6 @@
\resetnudgeimage } \resetnudgeimage }
% XXX
% XXX \OFFSETFIX
%% \DescribeMacro{\imageleftspreadfullbleed}
%
%% Image left page spread with full bleed.
%
%% >> \imageleftspreadfullbleed[<vertical-offset>]{<caption>}{<image>}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% +---------------+
%% | . .
%% | . .
%% | . .
%% | . .
%% | ima
%% | . .
%% | . .
%% | . .
%% | . c .
%% +---------------+
%%
%% \end{verbatim}
%% \end{minipage}
%
\newcommand\imageleftspreadfullbleed[3][0mm]{
\sbox{\photobook@imagebox}{
\includegraphics[
keepaspectratio,
width=\dimexpr
2\blockwidth - 2\clearimage + \vgrowimageby \relax]{#3} }
\clearpage
\null
\vfill
\begin{flushright}
#2
\end{flushright}
\ShipoutPicture{
\AtPageCenter{
\hspace{\dimexpr
\OFFSETFIX
-(\nudgeimageby)
+\clearimage
-0.5\blockwidth \relax}{
\raisebox{\dimexpr
(#1)
+\clearimage
-(0.5\blockheight
+(0.5\ht\photobook@imagebox - 0.5\blockheight))
- 0.5\vgrowimageby - \vnudgeimageby \relax}{
\usebox\photobook@imagebox } } } }
\newpage
\resetnudgeimage }
% XXX
% XXX \OFFSETFIX
%% \DescribeMacro{\imagerightspreadfullbleed}
%
%% Image spread right page with full bleed.
%
%% >> \imagerightspreadfullbleed[<vertical-offset>]{<caption>}{<image>}
%
%% \begin{minipage}{\textwidth}
%% \begin{verbatim}
%%
%% +---------------+
%% . . |
%% . . |
%% . . |
%% . . |
%% age |
%% . . |
%% . . |
%% . . |
%% . . c |
%% +---------------+
%%
%% \end{verbatim}
%% \end{minipage}
%
\newcommand\imagerightspreadfullbleed[3][0mm]{
\sbox{\photobook@imagebox}{
\includegraphics[
keepaspectratio,
width=\dimexpr
2\blockwidth - 2\clearimage + \vgrowimageby \relax]{#3} }
\clearpage
\null
\vfill
% XXX for some reason the last line here is a bit off...
% XXX do we need to restrict caption width here??? ...0.5\textwidth??
% XXX make caption sizing a bit more flexible...
\begin{flushright}
\captionsize #2
\end{flushright}
\ShipoutPicture{
\AtPageCenter{
\hspace{\dimexpr
\OFFSETFIX
-(\nudgeimageby)
+\clearimage
-1.5\blockwidth \relax}{
\raisebox{\dimexpr
(#1)
+\clearimage
-(0.5\blockheight
+(0.5\ht\photobook@imagebox - 0.5\blockheight))
- 0.5\vgrowimageby - \vnudgeimageby \relax}{
\usebox\photobook@imagebox } } } }
\newpage
\resetnudgeimage }
% XXX BUG?: this is not centered vertically... % XXX BUG?: this is not centered vertically...
% XXX % XXX
%% \DescribeMacro{\imagespreadfullbleed} %% \DescribeMacro{\imagespreadfullbleed}