2
votes
0answers
105 views

Error with TIkz function and polar coordinates in Texlive/MacTex [duplicate]

I am encountering a rather odd typesetting error with Tikz when running the following code: \documentclass[]{amsart} \usepackage{tikz,pgfplots} \usetikzlibrary{patterns,calc,fadings,decorations} \...
0
votes
0answers
79 views

TikZ coordinate calculation: Package tikz Error: + or - expected [duplicate]

TikZ calculates correctly the projection of a point and also draws it correctly, however after compiling LaTeX displays 2 error messages which I can not fix. Could you help finding what am I doing ...
21
votes
3answers
2k views

Why does TeX remove braces around delimited arguments?

On pp. 203–204 of the TeXbook, Knuth describes how TeX absorbs macros' arguments: delimited go until the first appearance of the delimiter, and undelimited go until the next token, in both cases ...
26
votes
2answers
11k views

Problems with TikZ calculations

When can I use functions and do calculations in TikZ? How do I make this work: \draw (0,0) arc(0:90:sqrt(15)); %not ok why is this working: \draw (0,0) arc(0:asin(1):5); %ok with \usetikzlibrary{...
6
votes
4answers
267 views

Incomprehensible behaviour of calc library with a “foreach variable”

If I compile the following code : \documentclass[12pt]{article} \usepackage[french]{babel} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \foreach \i in {(0,0),(0,2....
6
votes
2answers
563 views

Tikz thinks I'm dividing by 0 when plotting Planck's Law

I'm trying to plot Planck's law using tikz. This works fine for the most part, but tikz thinks I'm dividing by 0 if I try to plot certain areas of the law. Here's a minimally working example of what I'...
7
votes
2answers
321 views

How can I smooth out the corners of a pgfplots plot

How do I smooth out the corners in the following graph? \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[ every axis/.append style={...
4
votes
2answers
1k views

Can I use trig functions in TikZ within polar coordinates

I am trying to use simple mathematical functions such as sin, cos, and sqrt within the declaration of a TikZ coordinate. I am finding that this works for cartesian coordinates, but breaks for polar ...
5
votes
1answer
610 views

Syntax error using PGF math function in coordinate

I would like to avoid setting too many of the values for the following picture too rigidly. For example, I would like to be able to set the position of point A and forever after that be able to ...
5
votes
1answer
266 views

Error caused by TikZ/PGF trigonometric functions

I'm a bit confused about a failure I'm seeing with an inline \cos call. In the code below there I perform contortions with \let, \pgfmathparse, and \pgfmathresult However, the commented line should, ...
1
vote
1answer
390 views

tikz code doesn't compile when opened after a while

I finished my phd a couple of months ago, compiled it then completely just fine. I opened it today to make changes and during compilation I get error messages about "missing number treated as zero". I ...
1
vote
1answer
144 views

Error when compiling using tikzmath

I am trying to learn how to use Tikz and its library Tikzmath to make graphics. I am trying to practice by drawing a series of circles along a line. My code is as follows: \documentclass[tikz]{...
3
votes
1answer
53 views

Positioning the label for a point using the calc package

I have the display that I want ... but I do not know how the code gives it! The following display has a square sharing an edge with an equilateral triangle. I position point A with the command \...