2
votes
0answers
100 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
77 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
4answers
1k 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 ...
25
votes
2answers
9k 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 ...
6
votes
4answers
240 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 ...
6
votes
2answers
449 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 ...
7
votes
2answers
255 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 ...
4
votes
2answers
925 views

Can I use trig functions 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
582 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
257 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
387 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
99 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: ...
3
votes
1answer
49 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 ...