Debian Codegraph @

texmf-dist/doc/latex/tikzscale/test-tikzscale.tex

raw
1 \documentclass[twocolumn]{article}
2
3 \usepackage{lua-visual-debug}
4 \usepackage{tikzscale}
5 \usepackage{tikz}
6 \usepackage{pgfplots}
7 \usepackage{tikz-3dplot}
8 \usepackage{currfile}
9 \usepackage{lmodern}
10 % Use the package ifpdf to share one test document between pdflatex and latex
11 \usepackage{ifpdf}
12 % Load the MWE package, although its functionality is not needed. The loading highlights, that some graphics used below are part of the MWE package.
13 \usepackage{mwe}
14
15 \usetikzlibrary{external}
16 \tikzexternalize
17 % \tikzexternalize[mode=list and make]
18 % \tikzexternaldisable % activate this line and test without "shell-escape" and without \tikzexternalenable below
19 \ifpdf
20 \else
21 \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}}
22 \fi
23
24 \begin{document}
25 \section*{Tests}
26 \begin{itemize}
27 \item Test that with externalization, no picture is generated multiple times.
28 \item Test that there are no warnings with and without using externalization.
29 \item Test with \texttt{pdflatex} and \texttt{latex} and do not forget to use \texttt{dvips}.
30 \item Normal input command\\%
31 \input{testRectangle.tikz}%
32 \item Use includegraphics with file ending\\%
33 \includegraphics{testRectangle.tikz}%
34 \item Use includegraphics without file ending\\%
35 \includegraphics{testRectangle}%
36 \item Use includegraphics with scaling to the column's width\\%
37 \includegraphics[width=\linewidth]{testRectangle}%
38 \item Use includegraphics with scaling to a dimension\\%
39 \includegraphics[width=5cm]{testRectangle}%
40 \item Use includegraphics with scaling while having column width already\\%
41 \includegraphics[width=\linewidth]{linewidth}%
42 \item Use \texttt{input} with pgfplots\\%
43 \input{pgfplots-test.tikz}%
44 \item Use pgfplots without optional parameter\\%
45 \includegraphics{pgfplots-test}%
46 \item Use pgfplots with given width and height\\%
47 \includegraphics[width=\linewidth,height=0.3\linewidth]{pgfplots-test}%
48 \item Use includegraphics with only a node\\%
49 \includegraphics{testNode.tikz}%
50 % \item Use includegraphics with scaling only a node results in an error\\%
51 % \includegraphics[width=\linewidth]{testNode.tikz}%
52 \ifpdf
53 \item Use includegraphics with jpg\\%
54 \includegraphics{example-grid-100x100bp.jpg}%
55 \item Use includegraphics with pdf\\%
56 \includegraphics{example-grid-100x100bp.pdf}%
57 \item Use includegraphics with png\\%
58 \includegraphics{example-grid-100x100bp.png}%
59 \item Use includegraphics with pdf and scaling\\%
60 \includegraphics[width=0.3\linewidth]{example-grid-100x100bp.pdf}%
61 \item Use includegraphics with column width\\%
62 \includegraphics[width=\linewidth]{example-grid-100x100bp.jpg}%
63 \item Input a 2D pgfplots\\
64 \input{testgraphic2D.tikz}%
65 \item Use includegraphics with a two dimensional plot\\%
66 \includegraphics{testgraphic2D.tikz}%
67 \item Use includegraphics with a scaled two dimensional plot with line width and an axis ratio of 1\\%
68 \includegraphics[width=\linewidth,axisratio=1]{testgraphic2D.tikz}%
69 \item Use includegraphics with a scaled two dimensional plot with given height and an axis ratio of 0.5\\%
70 \includegraphics[height=\linewidth,axisratio=0.5]{testgraphic2D.tikz}%
71 \item Use includegraphics with a scaled two dimensional plot with given height and an axis ratio of 0.5 and temporarily deactivated externalization\\%
72 \tikzexternaldisable
73 \includegraphics[height=\linewidth,axisratio=0.5]{testgraphic2D.tikz}%
74 \tikzexternalenable
75 \item Use includegraphics with a scaled two dimensional plot with given height and an axis ratio of 0.5 again\\%
76 \includegraphics[height=\linewidth,axisratio=0.5]{testgraphic2D.tikz}%
77 \item Use includegraphics with a scaled two dimensional plot with line width and a default axis ratio\\%
78 \includegraphics[width=\linewidth]{testgraphic2D.tikz}%
79 \item Input a two dimensional plot with a tight frame with width \newlength{\mylen}\settowidth{\mylen}{\frame{\input{testgraphic2D.tikz}}}\the\mylen\\%
80 \frame{\input{testgraphic2D.tikz}}
81 \item Use a two dimensional plot with a tight frame with width \settowidth{\mylen}{\frame{\includegraphics{testgraphic2D.tikz}}}\the\mylen\\%
82 \frame{\includegraphics{testgraphic2D.tikz}}
83 \else
84 \item Use includegraphics with eps (this is not found within dvi, even without tikzscale)\\%
85 \includegraphics{example-grid-100x100bp.eps}%
86 \item Use includegraphics with eps and full path (this is not shown, even without tikzscale)\\%
87 \includegraphics{/usr/share/texlive/texmf-dist/tex/latex/mwe/example-grid-100x100bp.eps}%
88 \fi
89 \item Use includegraphics with a histogram of a normal distribution\\%
90 \includegraphics[width=\linewidth,height=0.5\linewidth]{histogramNormal}%
91 \item {Use \texttt{\textbackslash graphicspath} with superfluous space\graphicspath{{somefolder} } (only defined locally for the current item)
92 \includegraphics{testRectangle.tikz}}%
93 \item Use a tikz-3Dplot, which is known to have a different size after externalization compared to the measurements without externalization and is thus rebuilt every time if the counter-measurements are not successful.\\%
94 \includegraphics[width=\linewidth]{3Dplot}
95 \end{itemize}
96 \end{document}