The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
1answer
32 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} ...
5
votes
1answer
53 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} ...
1
vote
1answer
103 views

Library with xkeyval, make my life easier?

Question is related to the topic that I opened last year regarding the Library with xkeyval, fp and newcommand where the library now grew quite big and adding new stuff in it has become tedious and ...
2
votes
1answer
95 views

Creating a heatmap using calculations and tabular environment

I know there exists pgf, and many people uses this to create heatmaps. I however am not allowed to use this package. I therefore want to create a command that enables me to color the different cells. ...
1
vote
0answers
26 views

Expansion to fpeval

This is a followup to Egregs answer in the question Deleting defined variables or assign within group, I am trying to expand the code, but got into trouble while attempting some calculations with ...
3
votes
2answers
56 views

overloading functions of the fp package

I have a document with several commands that store numeric variables inside an extra macro. This extra macro will highlight that text so I can track them in the printed document. Like so: ...
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 ...
1
vote
0answers
81 views

Calculations with siunitx and fp [closed]

I would like to use some variables for math-calculations, stored as SI-units, so that I don't have to retype their units every time I supply them into a equation. I am wondering if it is possible to ...
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 ...
0
votes
2answers
108 views

Numerical calculations inside table environment

I am doing a coursework in mechanics and would like to write both the theory and calculations in LaTeX. However, as design is iterative process, I would like to escape the tedious cycle of: Select ...
4
votes
2answers
178 views

Tikz: Math with coordinates

I need to extract the coordinates of a node into a variable. I've tried \pgfextractx \documentclass[11pt]{article} \usepackage{fp} \usepackage{tikz} \usetikzlibrary{calc} ...
3
votes
2answers
81 views

Show variable name, measurement unit and value in a single command invocation

I am using the fp package to write a coursework in mechanics and calculate the numerical values on the fly. Here is some example code: \documentclass{article} \usepackage[nomessages]{fp} % ...
3
votes
1answer
44 views

Calculating time difference within datatools foreach

I'm trying to build a table with some calculations from an external file. data.csv: From,To,Task 10:00,11:00,Task1 11:00,13:13,Task2 I'm using datatool to read the csv and it's foreach to output ...
4
votes
1answer
96 views

How to pass a command as \uncover argument

I can't pass a command to the argument of an uncover command in the beamer class. Why? How do I fix this? Here's my code: \documentclass{beamer} \usepackage{fp} ...
11
votes
4answers
712 views

Using LaTeX as calculator [duplicate]

I know that exist several packages, like fp that allow to make all kinds of computations. But I do not understand the correct way to use them. I need some simple examples of multiplication and ...
12
votes
3answers
435 views

Accuracy of calculations in TikZ with fixed point arithmetic

I want to build a tree which satisfies the following: It grows to the right. The first child grows at 0 degrees (subsequent children growing clockwise). All children nodes are in the same ...
1
vote
1answer
124 views

Using Texcount Templates

Anybody have a texcount template they would share? I noticed that the texcount documentation references an option -template="template". I presume this is to enable adding some custom text surrounding ...
3
votes
1answer
224 views

Select largest value from a list of variables in LaTeX

I am trying to adapt this example How to iterate over a comma separated list? as my base. Except, rather than display all values, I actually want to iterate through all the values and only return / ...
4
votes
1answer
67 views

fp alignment in tables

Can anyone explain why the output from these two entries is different? Does anyone know how to make the second one match the first? \documentclass{article} \include{fp} \newcommand\entryOne[1]{ ...
6
votes
2answers
245 views

TeX/LaTeX: Macro for getting a length as number

I would like to write a macro getlengthin to get a length or dimen as floating point number in a specified unit. Here is what I have created so far: \documentclass{article} ...
2
votes
1answer
273 views

Component Library and automatic calculations with FPeval

I have come upon a problem I'd like to solve but unable to by myself. My intention is to create a library of components with different parameters and do calculations with FPeval. Here is the code: ...
3
votes
0answers
95 views

Why does the samples option conflict with fp?

Minimal working example: \documentclass{amsart} \usepackage{fp} \usepackage{tikz} \usetikzlibrary{fixedpointarithmetic} \begin{document} \begin{tikzpicture}[scale=2, fixed point arithmetic] ...
5
votes
3answers
550 views

logarithm, sine, cosine etc evaluated in tabular

I know that I can use spreadtab to make automatic calculations in a tabular. However, I only managed to do simple operations like +-*/, but I have no idea how to make more complex ones like log, ln, ...
4
votes
1answer
266 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. ...
1
vote
1answer
122 views

FP commands inside math mode

I face a strange problem running fp macros inside tabenum (tablists package) environment. I use fp to generate some values that are presented with a personal list environment based on tabenum. The ...
1
vote
2answers
225 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 ...
2
votes
1answer
147 views

Using a fp variable in a longtabu header

So, I am using the tabu package (which I need to use over tabular others for several reasons) to make a long table spanning several pages. This table contains currency amounts in a column, and I'd ...
5
votes
1answer
202 views

TikZ's fixed point arithmetic not happy with arrows.meta

When I try to combine using the features of arrows.meta in a context where I'm also using fixed point arithmetic, I'm getting an error message. MWE: \documentclass[border=8pt]{standalone} ...
5
votes
2answers
560 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 ...
14
votes
3answers
338 views

fixed point arithmetic is all wacky now [closed]

Prior to Tikz 3.0, the use of \usepackage{fp}\usetikzlibrary{fixedpointarithmetic} would increase the accuracy of calculations. I haven't used these packages since the update. However, I tried them ...
2
votes
0answers
162 views

Lattice or Per Gelosia multiplication - how to avoid the use of the fp package [closed]

Is there a simple way to improve the harmony of the nodes in particular of the upper row and the right column distance ? Edit Thanks to egreg the node are more in harmony. Still : Is it possible to ...
3
votes
0answers
137 views

TeX capacity exceeded with a 13 columns 18 rows spreadtab

Originally I had a spreadsheet with 13 columns and 18 rows. Applying pdflatex or xelatex to this sheet I got: ... cell K15 ! TeX capacity exceeded, sorry [save size=80000]. Then I reduced the ...
11
votes
1answer
168 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. ...
3
votes
1answer
3k views

fp calculation variable

I want to do some calculations in a LaTeX document; the result of the first is used in the next calculation. I figured out that the fp package should do the job. Here is an example: ...
8
votes
1answer
634 views

Multiplication to macro argument

Since the baselineskip parameter for fontsize should better be 1.2 times of the font size, I'd like to define a macro which accepts only one argument and deduces the baselineskip from the font size. ...
13
votes
2answers
379 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} ...
10
votes
2answers
718 views

Fixed Point Arithmetic: Why does the fp work sometimes but others it errors?

Why does fixed point arithmetic like to error on parts of the code that aren't doing any math? I am using the package to improve the calculation of some angles I have it printing out, but it is ...
3
votes
1answer
1k views

fp package documentation

Where can I find more information on the fp package? I have been to ctan and the author even has better documentation as a todo. http://www.ctan.org/tex-archive/macros/latex/contrib/fp/ The reason ...
5
votes
1answer
210 views

How to seed \FPseed with a value that is unique for every compilation?

How to seed \FPseed with a value that is unique for every compilation? Is there a LaTeX macro to get the CPU tick so I can use it to seed? \documentclass{article} \usepackage{fp} \begin{document} ...
0
votes
1answer
411 views

Error using tkz-euclide and \tkzIntersectionCC[R]

The tkz-euclide and \tkzIntersectionCC[R] produces: FP error #1: "Logarithm of negative value!" The code: \begin{tikzpicture} \tkzDefPoint(0,14.5){centerClip} ...
8
votes
3answers
466 views

\def function with arithmetic macro

I have been writing multiple equations to use for exam writing. I have made some new macros that display a positive sign in front of an expression for positive numbers and display no sign for ...
2
votes
0answers
52 views

How to throw an error and abort the compilation for the following scenario? [duplicate]

Objectives: I want to throw exceptions (or error messages) when the following illegal code is invoked. \const[c,any]{temp}{\f[\i]} \const[others]{temp}{\f[\i]} Minimal Working Example: I cannot ...
7
votes
2answers
228 views

How to parse optional arguments without keyval?

The current implementation only supports rounding with the specified digits in the optional arguments. \documentclass{beamer} \usepackage{multido} \usepackage{pstricks} \usepackage[nomessages]{fp} % ...
1
vote
1answer
156 views

What causes this error? [closed]

After seeing Herbert's answer, apparently this problem should not occur if I realized the first row of the following code should be \documentclass{beamer}. Problems often come from not knowing what I ...
4
votes
2answers
750 views

Is there a smart way to get a consistent accuracy with fp package?

Is there a smart way to get a consistent accuracy with fp package? I don't want to use round for sure! \documentclass[preview,border=12pt]{standalone} \usepackage[nomessages]{fp} ...
4
votes
1answer
145 views

How to implement a constant declarating macro to behave differently in preamble and pspicture?

The example below is extremely trivial just to illustrate the problem in the simplest way. \documentclass{beamer} \usepackage[nomessages]{fp} % constants declarator \def\LoadConstants{}% to load ...
3
votes
1answer
263 views

passing random variable to fp function

I am trying to create a command that will display a "+" sign for positive numbers and no sign for numbers within the esami package. I believe that the issue is the format of the random variable that ...
11
votes
1answer
260 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{} ...
10
votes
5answers
691 views

How to create a “delay expansion” environment?

I don't want to use the following \begingroup \edef\next{\endgroup \noexpand\const{Xp}{\X(tp)} \noexpand\const{Yp}{\Y(tp)} \noexpand\const{Xf}{\X(tf)} \noexpand\const{Yf}{\Y(tf)} ...
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 ...