The tag has no usage guidance.

learn more… | top users | synonyms

11
votes
1answer
171 views

Make an index of historical time periods

I'm writing my thesis & I want to make an index with centuries, years, month, day, event & historical periods. So I try to build some commands, but unsatisfactory, I'm looking for your help. ...
9
votes
2answers
1k views

Format numbers as a fraction of pi with tikz \pgfmathprintnumber

I'd like to be able to output something like \frac{\pi}{2} for a input number like .5*pi automatically. I've played a bit with some of the number printing macros available with tikz (closely linked ...
3
votes
1answer
625 views

convert outcome of reference to regular number

Is it possible to transform the outcome of a reference (e.g., a line number) to a regular number that I can use in a calculation? I have this (and works fine): \FPeval{\result}{clip(5+6)} $\result$ ...
0
votes
1answer
127 views

Library with xkeyval, fp and newcommand

Been searching the net here and did not find any solution to this. I am having some problems with a defined library structure (xkeyval) with FPeval calculation and then passing this information/...
13
votes
2answers
391 views

Replacing dots with comma in `fp` result

I am using fp to add a few values in LaTeX. How can I replace the . in \erg with a comma (In Germany the comma is used as decimal mark). \documentclass{minimal} \usepackage{fp} \begin{document} \...
11
votes
1answer
261 views

What makes my line get shifted to the left when I invoke \LoadConstants?

In the beginning I use the following code. So far so good. \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage[nomessages]{fp} \def\LoadConstants{} \newcommand\const[3]...
6
votes
2answers
93 views

Error in pgfplot when big offset is subtracted

I have some data with a huge offset that I want to plot. Im using PGF plots, where it's possible to subtract the offset from a whole row in my data. This works when the offset isn't too big, and/or ...
5
votes
1answer
58 views

\widthof{} command in \FPeval

Could someone please tell me how I can use the \widthof{} command from the calc package within \FPeval from the fp package? \documentclass[10pt]{article} \usepackage{calc} \usepackage{fp} \begin{...
5
votes
2answers
564 views

Convert hours (as decimals) to fractions for billable-time invoice

I'm creating an invoice in LaTeX and I've entered the hours I've worked as decimals (for example, 1, 1.5, 0.75, 2.25), but I want to display those decimals as fractions (1, 1½, ¾, 2¼). (The reason I'...
5
votes
2answers
225 views

Odd results using FP package inside table environment

I'm trying to create a number of running totals using the FP package. I define a macro for adding numbers to a running total and then I define a macro to output the final value. The problem I'm ...
4
votes
1answer
286 views

global variables and/or array of variables

I'm looking for a way to obtain (in tex/latex - still difficult for me to determine the difference - I guess it should state latex) run-time defineable global variables to be used with the fp package. ...
3
votes
1answer
238 views

Issue with fp “missing number” macro

I write an fp macro that calculates the distance between frets on a guitar neck: \def\ScaleLength{25.5} \def\ScaleFactor{0.1} \def\FretDist#1{\FPmul\resulta{-1}{#1}% \FPdiv\resulta{\resulta}{12}% \...
3
votes
1answer
38 views

\FPeval not working in new command

\documentclass[10pt]{article} \usepackage{calc} \usepackage{fp} \newcommand{\test}[1]{ \makeatletter \setlength{\tempdimen}{\widthof{#1}} \FPeval\‌​resultaP(70-\strip@pt\tempdimen)/2} \makeatother} \...
1
vote
2answers
230 views

\num with parameters in siunitx table

I have a couple of different methods to solve a diven problem and I want to compare them in a table. My aim is it to automatically add the relative deviation. I got some problems using siunitx within ...