--- http://sdaaubckp.svn.sourceforge.net/viewvc/sdaaubckp/single-scripts/atextest.sh?revision=306 2012-05-19 16:50:03.708204707 +0200 +++ atextestb.sh 2012-05-19 17:52:47.493192058 +0200 @@ -22,72 +22,60 @@ mkdir ${MYFN} mkdir ${MYFNIMG} -cat > ${MYFNTEX} < ${MYFNTEX} <<"EOF" \documentclass[10pt,a4paper]{article} \providecommand{\myparam}{0.0pt}% fallback definition \tracingonline=0 % suppress stdout (still dumps start) - -% tex.se: 47576 -\usepackage{ifxetex,ifluatex} -\newif\ifxetexorluatex -\ifxetex - \xetexorluatextrue -\else - \ifluatex - \xetexorluatextrue - \else - \xetexorluatexfalse - \fi -\fi - -\ifluatex - \usepackage{lua-visual-debug} % tlmgr install lua-visual-debug -\fi -\ifxetexorluatex - %\usepackage{fontspec} - %\defaultfontfeatures{Ligatures=TeX} - %\setmainfont[Scale=1.0]{Junicode} - %\newfontfamily\myfontfam[Scale=1.0]{Junicode} -\fi - -\usepackage[a4paper]{geometry} -\geometry{twoside,inner=2.5cm,outer=3.5cm,top=2.5cm,bottom=2.5cm} - -\makeatletter -\renewcommand{\section}{\@startsection -{section}% % the name -{1}% % the level -{\z@}% % the indent / 0mm -{-\baselineskip}% % the before skip / -3.5ex \@plus -1ex \@minus -.2ex -{2pt}% % the after skip / 2.3ex \@plus .2ex -{\centering\fontsize{11}{12}\selectfont\bfseries}} % the style -\makeatother - -\usepackage{lipsum} - - \newlength{\mylen} \setlength{\mylen}{0pt} \setlength{\mylen}{\myparam} +%\documentclass[10pt,twoside]{article} +\usepackage{fancyhdr,lipsum} +\makeatletter + \newsavebox{\@linebox} + \savebox{\@linebox}[3em][t]{\parbox[t]{3em}{% + \@tempcnta\@ne\relax + \loop{\underline{\the\@tempcnta}}\\ + \advance\@tempcnta by \@ne\ifnum\@tempcnta<48\repeat}} + \pagestyle{fancy} + \fancyhead{} + \fancyfoot{} + \fancyhead[CO]{\scriptsize How to Count Lines} + \fancyhead[RO,LE]{\footnotesize\thepage} +%% insert this block within a conditional + \fancyhead[LE]{\footnotesize\thepage\begin{picture}(0,0)% + \put(-26,-25){\usebox{\@linebox}}% + \end{picture}} + \fancyhead[LO]{% + \begin{picture}(0,0)% + \put(-18,-25){\usebox{\@linebox}}% + \end{picture}} +\fancyfoot[C]{\scriptsize Draft copy} +%% end conditional +\makeatother \begin{document} +%\rule{10pt}{18pt}Latey +\section*{Introduction} +\vspace*{\mylen} +\makebox[2cm][r]{\the\mylen}, \lipsum[1] + +$$f_{nk}=\sum\,{\frac{n!}{ +1!^{k_1}\,k_1!\,2!^{k_2}\,k_2!\,3!^{k_3}\,k_3!\,\ldots}}\; +f_1^{k_1}f_2^{k_2}f_3^{k_3}\ldots\;,$$ +summed over all $k_1,k_2,k_3,\ldots\geq 0$ + +\lipsum[3] + +$$f_{nk}=\sum\,{\frac{n!}{ +1!^{k_1}\,k_1!\,2!^{k_2}\,k_2!\,3!^{k_3}\,k_3!\,\ldots}}\; +f_1^{k_1}f_2^{k_2}f_3^{k_3}\ldots\;,$$ +summed over all $k_1,k_2,k_3,\ldots\geq 0$ -\ifxetexorluatex - %\myfontfam -\fi - \fontsize{10}{12.3}\selectfont - -\title{Testing Title} -\date{October 31, 1000} -\author{John Doe\\\\ Somewhereland} - -\maketitle - -\clearpage - -\input{${MYFNINTEX}} -\clearpage - +\lipsum[5-12] \end{document} EOF @@ -130,25 +118,27 @@ # #~ CROPPARAMS=320x240+100+400 # [[magick-users] Convert with multiple crop/appends](http://studio.imagemagick.org/pipermail/magick-users/2009-August/022809.html) -CROPPARAMS=400x400+150+100 # top left -CROPPARAMSB=200x400+115+1315 # bottom left +#~ CROPPARAMS=400x400+150+100 # top left +#~ CROPPARAMSB=200x400+115+1315 # bottom left +CROPPARAMS=400x400+195+155 # top left +CROPPARAMSB=200x400+195+1117 # bottom left #~ BRDR="" BRDR="-bordercolor LimeGreen -border 1" -#~ CMDNAME="pdflatex" +CMDNAME="pdflatex" #~ CMDNAME="xelatex" -CMDNAME="lualatex" +#~ CMDNAME="lualatex" for ix in $(seq 0 1 100); do - iy=$(wcalc -EE -q \($ix-50\)/50*30); + iy=$(wcalc -EE -q \($ix-50\)/50*20); INDEX=$(printf "%03d" $ix) ; JOBNAME="${MYFN}${INDEX}" ; MYPARAM="${iy}pt" echo " $CMDNAME - $JOBNAME - $MYPARAM" ; (${CMDNAME} -output-directory="${MYFN}" -jobname="${JOBNAME}" "\def\myparam{${MYPARAM}}\tracingonline=0\input{${MYFNTEX}}" 2>&1 1>/dev/null); - + #~ exit; # this with two crops can be performed in one command line: #~ convert -density 150 ${BRDR} -crop ${CROPPARAMS} +repage ${MYFN}/${JOBNAME}.pdf[1] ${MYFNIMG}/${JOBNAME}_A.png ; #~ convert -density 150 ${BRDR} -crop ${CROPPARAMSB} +repage ${MYFN}/${JOBNAME}.pdf[1] ${MYFNIMG}/${JOBNAME}_B.png ; @@ -156,8 +146,8 @@ # or as single (src no work, src-over yes; '-border 1' need to be individual - -bordercolor LimeGreen can stand after '-compose src-over'): # see also convert -density 150 -compose src-over \ - \( ${MYFN}/${JOBNAME}.pdf[1] -crop ${CROPPARAMS} ${BRDR} +repage +append \) \ - \( ${MYFN}/${JOBNAME}.pdf[1] -crop ${CROPPARAMSB} ${BRDR} +repage +append \) \ + \( ${MYFN}/${JOBNAME}.pdf[0] -crop ${CROPPARAMS} ${BRDR} +repage +append \) \ + \( ${MYFN}/${JOBNAME}.pdf[0] -crop ${CROPPARAMSB} ${BRDR} +repage +append \) \ +append +repage ${MYFNIMG}/${JOBNAME}.png ; done