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
TikZ DECORATE incorrectly fails with "Dimension too large." using MiKTeX and TeX Live 2022 #1297
Comments
A couple of quick points;
Here are first hits from Google https://tex.stackexchange.com/questions/195030/tikz-decorated-paths-and-fixedpointarithmetic-library https://tex.stackexchange.com/questions/170595/tikz-decorations-markings-cause-dimension-too-large |
Please follow the bug report template https://github.com/pgf-tikz/pgf/issues/new?assignees=&labels=&projects=&template=bug_report.yml which here, as at stackexchange, requires a minimal example demonstrating the issue. |
Remove |
Henri, your feedback is highly appreciated and coming from you I believe this will work in all cases. Many, many thanks for your assistance. As Till Tantau writes on the second page of the TikZ & PGF Manual: "Für meinen Vater, damit er noch viele schöne TEX-Graphiken erschaffen kann", I too am creating beautiful charts with TikZ and am humbly grateful that such a masterpiece was created for creative programmers. THANK YOU. |
Brief outline of the bug
I posted an issue on TEX Stack Exchange with the same title but was unable to upload the four
.tex
files so that someone can reproduce the problem and verify that it is data-related and thus needs investigation:https://tex.stackexchange.com/questions/703322/tikz-decorate-incorrectly-fails-with-dimension-too-large-using-miktex-and-tex
Please excuse me for adding them here. As already stated, the TikZ decorate function on line 1022 for latitude 62.0°N fails with MiKTeX 23.10.12 on Windows and TeX Live 2022 on Ubuntu on the same hardware and also on an older Windows laptop:
test case 62°N.zip
The test case with very similar data for 61.9°N works perfectly:
test case 61.9°N.zip
Also the test case for 62.1°N works perfectly:
test case 62.1°N.zip
And the test case for 62°N works when four decimal places are used for the coordinates instead of three:
test case 62°N with 4 decimal places.zip
I maintain that this proves that the "Dimension too large" error is incorrect and that the error is data-related, which it obviously shouldn't be.
The MWE that fails (a Minimum non-Working Example) is below. Workaround: Comment out the DeclareUnicodeCharacter line and it runs successfully ..... though I do not see this as a solution to the problem for various reasons. Apologies for the external link as I originally intended to post the whole topic in TEX StackExchange and only come here if it is seen as an issue.
Minimal working example (MWE)
\pdfminorversion=4
\documentclass[10pt, a4paper,landscape]{report}
\usepackage[utf8]{inputenc}
\usepackage[top=5mm, bottom=5mm, left=2mm, right=2mm]{geometry}
\usepackage{tikz} % for \draw (load after 'graphicx')
\usetikzlibrary{decorations.text} % to print text on a curve
\DeclareUnicodeCharacter{00B0}{\ensuremath{{}^\circ}}
\begin{document}
\newcommand*{\PMstyle}{\sffamily\normalsize\color{blue}}
\begin{tikzpicture}
% decorate PM dusk with text aligned left
\path [decorate,decoration={text along path,raise=-2.4ex,text align={left indent=1.112cm},text={|\PMstyle|D U S K~~~at latitude 62.0{°}N~~~(Sun 6{°} below horizon)}}]
plot[smooth,tension=0.5] coordinates{
(0.000, 10.982) (0.347, 11.067) (0.695, 11.170) (1.042, 11.287) (1.390, 11.417)
(1.738, 11.555) (2.085, 11.699) (2.433, 11.848) (2.780, 11.999) (3.127, 12.152)
(3.475, 12.306) (3.822, 12.461) (4.170, 12.616) (4.518, 12.771) (4.865, 12.927)
(5.212, 13.085) (5.560, 13.244) (5.907, 13.406) (6.255, 13.572) (6.602, 13.741)
(6.950, 13.915) (7.297, 14.096) (7.645, 14.283) (7.992, 14.478) (8.340, 14.683)
(8.688, 14.898) (9.035, 15.126) (9.382, 15.371) (9.730, 15.641) (10.077, 15.958)
(10.425, 16.477) };
\end{tikzpicture}
\end{document}
The text was updated successfully, but these errors were encountered: