Advertisement
kkoudas

ThomaeAndNormal

Jul 19th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. \documentclass{book}
  2. \usepackage{tikz}
  3.  
  4. \makeatletter
  5. \pgfmathdeclarefunction*{gcd}{2}{%
  6. \begingroup
  7. \pgfmathcontinuelooptrue
  8. \pgfmath@xa=#1pt\relax % <-
  9. \pgfmath@xb=#2pt\relax % <-
  10. \ifdim\pgfmath@xa=0pt\relax
  11. \pgfmathcontinueloopfalse
  12. \pgfmath@xa=\pgfmath@xb
  13. \fi
  14. \ifdim\pgfmath@xb=0pt\relax
  15. \pgfmathcontinueloopfalse
  16. \pgfmath@xb=\pgfmath@xa
  17. \fi
  18. \ifdim\pgfmath@xa<0pt\relax
  19. \pgfmath@xa=-\pgfmath@xa
  20. \fi
  21. \ifdim\pgfmath@xb<0pt\relax
  22. \pgfmath@xb=-\pgfmath@xb
  23. \fi
  24. \loop
  25. \ifpgfmathcontinueloop
  26. \ifdim\pgfmath@xa=\pgfmath@xb
  27. \pgfmathcontinueloopfalse
  28. \else
  29. \ifdim\pgfmath@xa>\pgfmath@xb
  30. \advance\pgfmath@xa by-\pgfmath@xb\relax
  31. \else
  32. \advance\pgfmath@xb by-\pgfmath@xa\relax
  33. \fi
  34. \fi
  35. \repeat
  36. \pgfmathparse{int(\pgfmath@xa)}%
  37. \pgfmath@smuggleone\pgfmathresult
  38. \endgroup}
  39. \makeatother
  40.  
  41. \includeonly{chapterNormal,chapterThomae} % LOOK HERE!!!!!!!!!!!!!!!!
  42. \begin{document}
  43. \include{chapterNormal} % A normal chapter with some tikz images
  44. \include{chapterThomae} % The chapter with Thomae's function
  45. \include{chapterLight} % A chapter with no images
  46. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement