Linked Questions

4
votes
1answer
691 views

How to sum two non-integer numbers in LaTeX? [duplicate]

Here is the sample format of non-integers number 12.5+13.8=26.3
1
vote
1answer
516 views

adding a constant to a foreach counter? [duplicate]

Is there any way to define a new value that is a counter + a constant? e.g. \foreach\k in {0,1,...,7} { \def\m % ???? I want to make m=k+4 \draw[->] (box\k) -- (box\m); }
0
votes
0answers
43 views

Evaluate combinations of page dimensions [duplicate]

For any given class and its specified page layout, I'd like to be able to combine (sum or subtract) a subset of the page dimensions, to obtain a length to work with, without specifying absolute values....
102
votes
5answers
99k views

Define a variable in TikZ

I guess this is a very simple question, but I couldn't find the answer... How can I define a variable in TikZ? I want to have something like, for example: \draw[->] (x1,y1)--(x2,y2); Such that x1,...
10
votes
6answers
2k views

Parse simple arithmetics and return the result

I want a command \ca which takes a simple arithmetic calculation as an argument and returns the result with proper decimal places. Additionally I want an boolean argument which decides if only the ...
16
votes
1answer
1k views

Is it possible to load pgfmath without loading the full pgf package?

Update Oct 30th 2011 This has now been fixed in the CVS repository of PGF due to my bug report. With this version \usepackage{pgfmath} should work. I would like to use pgfmath in one of my ...
2
votes
1answer
4k views

Increment/display the content of a (variable)/(section number) under latex?

To have something equivalent to echo of the shell. For instance in .tex file we have: \def \var{2} The content of var is $var How to edit the tex file in such a way we have as output: The ...
3
votes
1answer
891 views

Can the coding style of the algorithm environment be modified?

I'm using the packages \usepackage{algpseudocode} \usepackage{algorithm} to produce a pseudocode of the following algorithm: \begin{algorithm} \centering \caption{Octree based search ...
3
votes
1answer
423 views

adding two lengths in tikz

I'd like to add two tikz dimensions, like so \usepackage{tikz} \begin{document} \begin{tikzpicture} \newdimen\heya \newdimen\xtra \xtra=0.3cm \heya=4cm+\xtra \draw (0,0) -- (\heya,...
0
votes
1answer
188 views

Filling the latex table dynamically

I have generated an exercise problem for a function table as \documentclass{article} \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} \usepackage{fancyhdr} \usepackage{multicol} \...
2
votes
0answers
236 views

Generating pdf files that are “viewing-time” or current system-time dependent [closed]

The \FpEval{}{} function which can be used to do computations, and store the result in a variable, in latex. For details, kindly see How can I sum two values and store the result in other variable? . ...
2
votes
2answers
49 views

Is it possible to output a relative line number in flagderiv?

I am trying to output a number relative to the current step of my proof instead of being hard coded. I'll try and explain what I mean with this proof: \documentclass[11pt]{article} \usepackage[...
1
vote
1answer
88 views

Division in Latex -I'm getting incorrect values-How to perform division correctly

I'm trying to perform a division and sometimes it works and other times I get and unexpected value. \documentclass[fleqn]{article} \usepackage{amsmath} \usepackage{enumerate} \usepackage{cancel} \...
2
votes
1answer
117 views

Dimension drawing macro for TikZ pictures

Preamble I use a lot of environments provided by tikz-timing and pgfplots packages. Often i specify dimensions for some elements in tikz picture. For example, time delay between rises of two pulses ...