mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
Add printer test page
This commit is contained in:
parent
9c7b53fab4
commit
96ab485a69
4 changed files with 76 additions and 0 deletions
34
documents/printer-testpage/Makefile
Normal file
34
documents/printer-testpage/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
SOURCE=printer-testpage
|
||||
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
|
||||
|
||||
gif:
|
||||
pdfcrop $(SOURCE).pdf
|
||||
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
|
||||
make clean
|
||||
|
||||
png:
|
||||
make
|
||||
make svg
|
||||
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
|
||||
|
||||
transparentGif:
|
||||
convert $(SOURCE).pdf -transparent white result.gif
|
||||
make clean
|
||||
|
||||
svg:
|
||||
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
|
||||
pdf2svg $(SOURCE).pdf $(SOURCE).svg
|
||||
# Necessary, as pdf2svg does not always create valid svgs:
|
||||
inkscape $(SOURCE).svg --export-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg
|
||||
rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg
|
||||
rm $(SOURCE)1.svg
|
3
documents/printer-testpage/README.md
Normal file
3
documents/printer-testpage/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
documents/printer-testpage/printer-testpage.png
Normal file
BIN
documents/printer-testpage/printer-testpage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
39
documents/printer-testpage/printer-testpage.tex
Normal file
39
documents/printer-testpage/printer-testpage.tex
Normal file
|
@ -0,0 +1,39 @@
|
|||
\documentclass[a4paper]{scrartcl}
|
||||
\usepackage[a4paper,margin=0cm,left=-0.65cm]{geometry}
|
||||
\usepackage{amssymb,amsmath}
|
||||
|
||||
\usepackage[rgb]{xcolor}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shadings}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
\begin{scope}[yshift=3cm]
|
||||
\draw[shading=color wheel] (0,0) rectangle (20.998,10);
|
||||
\end{scope}
|
||||
\begin{scope}[yshift=3cm]
|
||||
\draw[rectangle,fill=cyan] (0,13) rectangle (20.998,14) node[pos=.5,text=white] {\Huge \textbf{Cyan}};
|
||||
\draw[rectangle,fill=magenta] (0,12) rectangle (20.998,13) node[pos=.5,text=white] {\Huge \textbf{Magenta}};
|
||||
\draw[rectangle,fill=yellow] (0,11) rectangle (20.998,12) node[pos=.5,text=white] {\Huge \textbf{Yellow}};
|
||||
\draw[rectangle,fill=black] (0,10) rectangle (20.998,11) node[pos=.5,text=white] {\Huge \textbf{Black}};
|
||||
\end{scope}
|
||||
\begin{scope}[yshift=17.5cm]
|
||||
\foreach \x in {1,2,...,21}
|
||||
\draw [color=red, line width=1mm](\x cm,0cm) -- (\x cm,1.5cm)
|
||||
node[color=red, rotate=90, anchor=west] {\pgfmathprint{int(\x)}};
|
||||
|
||||
\foreach \x in {0,1,...,210}
|
||||
\draw [color=red, line width=0.1mm](\x mm,0cm) -- (\x mm,1.0cm)
|
||||
node[color=red, rotate=90, anchor=west] {};
|
||||
|
||||
\draw[line width=5mm](0cm, 0cm) -- (100,0cm);
|
||||
\draw[line width=0.1mm](0cm, 0.5cm) -- (100,0.5cm);
|
||||
\end{scope}
|
||||
|
||||
\draw [color=red, line width=1mm](2cm,0 cm) -- (3.5cm,0 cm)
|
||||
node[color=red, anchor=west] {};
|
||||
\foreach \y in {1,2,...,29}
|
||||
\draw [color=red, line width=1mm](2cm,\y cm) -- (3.5cm,\y cm)
|
||||
node[color=red, anchor=west] {\pgfmathprint{int(\y)}};
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue