Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{book}
- \usepackage{tikz}
- \makeatletter
- \pgfmathdeclarefunction*{gcd}{2}{%
- \begingroup
- \pgfmathcontinuelooptrue
- \pgfmath@xa=#1pt\relax % <-
- \pgfmath@xb=#2pt\relax % <-
- \ifdim\pgfmath@xa=0pt\relax
- \pgfmathcontinueloopfalse
- \pgfmath@xa=\pgfmath@xb
- \fi
- \ifdim\pgfmath@xb=0pt\relax
- \pgfmathcontinueloopfalse
- \pgfmath@xb=\pgfmath@xa
- \fi
- \ifdim\pgfmath@xa<0pt\relax
- \pgfmath@xa=-\pgfmath@xa
- \fi
- \ifdim\pgfmath@xb<0pt\relax
- \pgfmath@xb=-\pgfmath@xb
- \fi
- \loop
- \ifpgfmathcontinueloop
- \ifdim\pgfmath@xa=\pgfmath@xb
- \pgfmathcontinueloopfalse
- \else
- \ifdim\pgfmath@xa>\pgfmath@xb
- \advance\pgfmath@xa by-\pgfmath@xb\relax
- \else
- \advance\pgfmath@xb by-\pgfmath@xa\relax
- \fi
- \fi
- \repeat
- \pgfmathparse{int(\pgfmath@xa)}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup}
- \makeatother
- \includeonly{chapterThomae} % LOOK HERE!!!!!!!!!!!!!!!!
- \begin{document}
- \include{chapterNormal} % A normal chapter with some tikz images
- \include{chapterThomae} % The chapter with Thomae's function
- \include{chapterLight} % A chapter with no images
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement