Tag Info

New answers tagged

4

I was inspired by Bruno's solution but I suggest to use only one full expandable pass. The main effect is reached by \expandafter\ifx\csname foo\endcsname\fi which expands to nothing but sets the \foo to \relax. This is only sole assignment done at expand processor level. All other assignments are done in main processor of TeX. ...


0

Your description sounds like the WriteLaTeX project to me. If so, you should have a look on ShareLaTeX. This is basically an open source clone of WriteLaTeX. You can also find it on git.


1

Ok, we could do it this way ("but"...) % arara: console: { command: cmd /c start FILE.pdf} This is for windows, I am sure, there is an analogon for Linux. This works, that means it opens the AdobeReader, "but" it gives: ! I can't write on file `FILE.pdf'. (Press Enter to retry, or Control-Z to exit; default file extension is `.pdf') Please type another ...


5

You can use the package totcount: \documentclass{article} \usepackage{totcount} \newtotcounter{compilation} \AtBeginDocument{% \setcounter{compilation}{\value{compilation@totc}}% % when the aux file doesn't yet exist the value is -1 % so we fix it \ifnum\value{compilation}=-1 \setcounter{compilation}{0}\fi \stepcounter{compilation}% } ...


8

\documentclass{minimal} \makeatletter \AtBeginDocument{% \ifx\mynum\@undefined\def\mynum{0}\fi \edef\mynum{\the\numexpr\mynum + 1\relax}% \immediate\write\@auxout{\gdef\string\mynum{\mynum}}} \makeatother \begin{document} [\mynum] \end{document}


4

You need to place the \random generation outside the comparison: \documentclass{article} \usepackage{xifthen} \usepackage[first=0, last=1, quiet]{lcg} \begin{document} rand sequence: \rand\arabic{rand}\rand\arabic{rand}% \rand\arabic{rand}\rand\arabic{rand}\rand\arabic{rand}% \rand\arabic{rand}\rand\arabic{rand}\rand\arabic{rand} ...


1

Here is a small example demonstrating how the accepted answer's \pagetotal etc behave -- note they only seem to change after a \par (click for high resolution image): Here is the code used for it: \documentclass{article} % http://www.tug.org/utilities/plain/cseq.html#pagedepth-rp \def\tpageitemsB{% \the\pagetotal;% \the\pagegoal;% \the\pagedepth;% ...


2

I am sorry, I searched for things, which was not really needed. It works as wished and I like it and I like arara - and I hope you too :() Note that very tiny changing. !config # GhostScript-ps2pdf password-security rule for arara # version: 0.2b # requires arara 3.0+ identifier: secure name: Secure command: <arara> @{program} ...



Top 50 recent answers are included