2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

Quality improvement of dashed lines

This commit is contained in:
Martin Thoma 2016-06-17 14:30:55 +02:00
parent 558bdc8ec5
commit b4c1bb3c42
3 changed files with 11 additions and 7 deletions

View file

@ -1,7 +1,7 @@
SOURCE = triangle-angles SOURCE = triangle-angles
DELAY = 80 DELAY = 80
DENSITY = 300 DENSITY = 300
WIDTH = 500 WIDTH = 512
make: make:
pdflatex $(SOURCE).tex -output-format=pdf pdflatex $(SOURCE).tex -output-format=pdf
@ -25,11 +25,9 @@ transparentGif:
make clean make clean
svg: svg:
make
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs: # Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg inkscape $(SOURCE).svg --export-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg
rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg
inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg rm $(SOURCE)1.svg
rm $(SOURCE)2.svg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

@ -2,6 +2,7 @@
\usepackage[pdftex,active,tightpage]{preview} \usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm} \setlength\PreviewBorder{2mm}
\usepackage{tikz} \usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tkz-euclide} \usepackage{tkz-euclide}
\usetikzlibrary{shapes, calc, shapes, decorations} \usetikzlibrary{shapes, calc, shapes, decorations}
\usepackage{amsmath,amssymb} \usepackage{amsmath,amssymb}
@ -76,7 +77,12 @@
-- (\XC, 0) coordinate (Z) -- (\XC, 0) coordinate (Z)
-- (0, 0); -- (0, 0);
\tkzDrawLine[thick,dashed](A,C) \node at ( $ (A)!-0.2!(C) $ ) (helper11) {};
\node at ( $ (A)!0.1!(C) $ ) (helper12) {};
\node at ( $ (A)!0.6!(C) $ ) (helper2) {};
\node at ( $ (C)!-0.2!(A) $ ) (helper3) {};
\tkzDrawLine[thick,dashed](helper12,helper11)
\tkzDrawLine[thick,dashed](helper2, helper3)
\end{tikzpicture} \end{tikzpicture}
\end{preview} \end{preview}
\end{document} \end{document}