diff options
author | Karl Berry <karl@freefriends.org> | 2012-10-31 21:47:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-10-31 21:47:29 +0000 |
commit | c7b0de93190a3c0d8e3ee9d88e79da7d21a27e31 (patch) | |
tree | 9ecfe4a41a71b23f4b8c866054317d87f15c9fbf /Master/texmf-dist/doc/latex | |
parent | 528bd7b580ff2dfe64ef77df5963655a60aa32de (diff) |
new pgf/tikz package tikzscale (31oct12)
git-svn-id: svn://tug.org/texlive/trunk@28143 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/README | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/linewidth.tikz | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/pgfplots-test.tikz | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf | bin | 0 -> 122409 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/testNode.tikz | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/testRectangle.tikz | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/testgraphic2D.tikz | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf | bin | 0 -> 348686 bytes |
9 files changed, 106 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tikzscale/README b/Master/texmf-dist/doc/latex/tikzscale/README new file mode 100644 index 00000000000..4d67aff56fe --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/README @@ -0,0 +1,27 @@ +---------------------------------------------------------------- +tikzscale --- Absolute resizing of TikZ pictures and PGF plots without + scaling text +E-mail: pat_h@web.de Released under the LaTeX Project +Public License v1.3c or later See http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +The tikzscale package extends the includegraphics command to support +tikzpictures. It allows scaling of TikZ images and PGFPlots to a provided +width or height without changing the text size. + +Usage: \usepackage{tikzscale} + or \usepackage[loadFromCurrentDirectory]{tikzscale} + +As an example write +\includegraphics{myTikZFile.tikz} +instead of +\includegraphics{myJPEGFile.jpeg}, +with myTikZFile.tikz being the file name of a text file containing +everything from \begin{tikzpicture} to \end{tikzpicture}. To actually +do some scaling of the included TikZ file, give either an absolute width +or an absolute height in the optional argument, e.g. +\tikzscale@includetikz[width=0.5\linewidth]{myTikZFile.tikz}. +If the file contains a plot created with the PGFPlots package, set both +width and height via the optional argument, e.g. +\tikzscale@includetikz[width=\linewidth,height=0.4\linewidth]{myPGFPlot.tikz}. + diff --git a/Master/texmf-dist/doc/latex/tikzscale/linewidth.tikz b/Master/texmf-dist/doc/latex/tikzscale/linewidth.tikz new file mode 100644 index 00000000000..6984b8fb995 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/linewidth.tikz @@ -0,0 +1,3 @@ +\begin{tikzpicture} + \draw (0,0) -- node {center} (\linewidth,1); +\end{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/tikzscale/pgfplots-test.tikz b/Master/texmf-dist/doc/latex/tikzscale/pgfplots-test.tikz new file mode 100644 index 00000000000..c3186f5f5a0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/pgfplots-test.tikz @@ -0,0 +1,5 @@ +\begin{tikzpicture} + \begin{axis}[scale only axis] + \addplot {x^2 - x + 4}; + \end{axis} +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf Binary files differnew file mode 100644 index 00000000000..a8a19c62d33 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.pdf diff --git a/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex new file mode 100644 index 00000000000..9fa7f1ce83f --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/test-tikzscale.tex @@ -0,0 +1,58 @@ +\documentclass[twocolumn]{article} + +\usepackage{lua-visual-debug} +\usepackage{tikzscale} +\usepackage{tikz} +\usepackage{pgfplots} +\usepackage{currfile} +\usepackage{lmodern} + +% \usepgfplotslibrary{external} +% \tikzexternalize +% \tikzexternalize[mode=list and make] + +\begin{document} + \section*{Tests} + \begin{itemize} + \item Normal input command\\% + \input{testRectangle.tikz}% + \item Use includegraphics with file ending\\% + \includegraphics{testRectangle.tikz}% + \item Use includegraphics without file ending\\% + \includegraphics{testRectangle}% + \item Use includegraphics with scaling to the column's width\\% + \includegraphics[width=\linewidth]{testRectangle}% + \item Use includegraphics with scaling while having column width already\\% + \includegraphics[width=\linewidth]{linewidth}% + \item Use includegraphics with jpg\\% + \includegraphics{example-grid-100x100bp.jpg}% + \item Use includegraphics with pdf\\% + \includegraphics{example-grid-100x100bp.pdf}% + \item Use includegraphics with png\\% + \includegraphics{example-grid-100x100bp.png}% +% \item Use includegraphics with eps% +% \includegraphics{example-grid-100x100bp.eps}% + \item Use includegraphics with pdf and scaling\\% + \includegraphics[width=0.3\linewidth]{example-grid-100x100bp.pdf}% + \item Use includegraphics with column width\\% + \includegraphics[width=\linewidth]{example-grid-100x100bp.jpg}% + \item Use \texttt{input} with pgfplots\\% + \input{pgfplots-test.tikz}% + \item Use pgfplots without optional parameter\\% + \includegraphics{pgfplots-test}% + \item Use pgfplots with given width and height\\% + \includegraphics[width=\linewidth,height=0.3\linewidth]{pgfplots-test}% + \item Use includegraphics with only a node\\% + \includegraphics{testNode.tikz}% +% \item Use includegraphics with scaling only a node results in an error\\% +% \includegraphics[width=\linewidth]{testNode.tikz}% + \item Use includegraphics with a two dimensional plot\\% + \includegraphics{testgraphic2D.tikz}% + \item Use includegraphics with a scaled two dimensional plot with line width and an axis ratio of 1\\% + \includegraphics[width=\linewidth,axisratio=1]{testgraphic2D.tikz}% + \item Use includegraphics with a scaled two dimensional plot with given height and an axis ratio of 0.5\\% + \includegraphics[height=1\linewidth,axisratio=0.5]{testgraphic2D.tikz}% + \item Use includegraphics with a scaled two dimensional plot with line width and a default axis ratio\\% + \includegraphics[width=\linewidth]{testgraphic2D.tikz}% + \end{itemize} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/testNode.tikz b/Master/texmf-dist/doc/latex/tikzscale/testNode.tikz new file mode 100644 index 00000000000..92a327bd818 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/testNode.tikz @@ -0,0 +1,3 @@ +\begin{tikzpicture} + \node[draw] (0,0) {Node}; +\end{tikzpicture}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/testRectangle.tikz b/Master/texmf-dist/doc/latex/tikzscale/testRectangle.tikz new file mode 100644 index 00000000000..d5748e450ed --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/testRectangle.tikz @@ -0,0 +1,3 @@ +\begin{tikzpicture} +\draw (0,0) -- (1,1) (0,1) -- (1,0); +\end{tikzpicture}%
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/testgraphic2D.tikz b/Master/texmf-dist/doc/latex/tikzscale/testgraphic2D.tikz new file mode 100644 index 00000000000..1808a353fc8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/testgraphic2D.tikz @@ -0,0 +1,7 @@ +\begin{tikzpicture} + \begin{axis}[% + xmin=-25, xmax=25, + ymin=-2500, ymax=2500] + \addplot graphics [xmin=-25, xmax=25, ymin=-2500, ymax=2500] {example-grid-100x100bp.png}; + \end{axis} +\end{tikzpicture}%
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf Binary files differnew file mode 100644 index 00000000000..2613fd2555f --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikzscale/tikzscale.pdf |