P.S. Though you could probably use \pgfmathtruncatemacro{\macro}{<PGF math code>} which evaluates <PGF math code> and saves it to \macro without decimals. I'm pretty sure this exists in PGF 2.0, search the manual.
Thanks! That did the trick.
I'll also look into getting an up to date TeXlive. So ...
Search found 2 matches
- Tue Nov 08, 2011 9:54 pm
- Forum: Math & Science
- Topic: Simple calculations package
- Replies: 13
- Views: 38292
- Tue Nov 08, 2011 4:32 pm
- Forum: Math & Science
- Topic: Simple calculations package
- Replies: 13
- Views: 38292
Simple calculations package
Hi!
I'm trying to use PGF's calculation facility to generate labels and want them to be integers. Unfortunately the code from the first post doesn't work for me.
\documentclass{article}
\usepackage{pgf}
\begin{document}
87 divided by 17 is approximately \pgfmathparse{int(round(87/17 ...
I'm trying to use PGF's calculation facility to generate labels and want them to be integers. Unfortunately the code from the first post doesn't work for me.
\documentclass{article}
\usepackage{pgf}
\begin{document}
87 divided by 17 is approximately \pgfmathparse{int(round(87/17 ...