New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgfparse of deg function in a TikZ picture #1002

Closed
teepeemm opened this Issue May 31, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@teepeemm
Contributor

teepeemm commented May 31, 2018

TikZ and PGF provide the deg function, which converts radians into degrees. It is equivalent to having a suffix of r. It appears that we have defined deg in an axis environment, but not just within a TikZ picture.

\documentclass{article}

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}

\begin{document}

\begin{tikzpicture}
\draw(0,1)--(5,5r/60); % works
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[xmax=6,ymax=6]
\addplot(0,1)--(5,{deg(5/60)}); % works
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\draw(0,1)--(5,{deg(5/60)}); % doesn't work
\end{tikzpicture}

\end{document}

This causes Error:pgfparse:pgfparse Parse of 'deg(5/60)' failed

@dginev dginev added this to the LaTeXML-0.8.4 milestone May 31, 2018

@teepeemm

This comment has been minimized.

Contributor

teepeemm commented May 31, 2018

I've also uncovered a possibly similar issue with exponents:

\draw(4,0)--(5,{(1)^2});

@dginev

This comment has been minimized.

Collaborator

dginev commented May 31, 2018

Just a quick note that I can reproduce - thanks for the reports!

@brucemiller

This comment has been minimized.

Owner

brucemiller commented Jun 16, 2018

Yes, some more syntax that got overlooked. Should work now. Thanks for the report!

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 Jun 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment