2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

added interstection examples

This commit is contained in:
Martin Thoma 2013-01-18 09:45:44 +01:00
parent 6fd07ad49d
commit 9134d13eac
20 changed files with 748 additions and 0 deletions

View file

@ -0,0 +1,31 @@
SOURCE = intersecting-lines-2
DELAY = 80
DENSITY = 300
WIDTH = 500
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-plain-svg=$(SOURCE).svg

View file

@ -0,0 +1,40 @@
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{0mm}
\usepackage{tkz-fct}
\usetikzlibrary{arrows, decorations.pathreplacing}
\usetikzlibrary{shapes.misc}
\tikzset{
line/.style={
very thick,
black,
to path={% works only with "to" and not "--"
-- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes
}
},
point/.style={
ultra thick,
draw=gray,
cross out,
inner sep=0pt,
minimum width=4pt,
minimum height=4pt,
},
}
\begin{document}
\begin{preview}
\begin{tikzpicture}
\draw[white,fill=white] (-0.5,-0.5) rectangle (5.2,5.2); % background
\tkzInit [xmin=0,xmax=4.5,ymin=0,ymax=4.5]
\begin{scriptsize}
\tkzGrid[color = gray!30!white]
\tkzAxeXY
\end{scriptsize}
\draw[line,red] (1,1) to (4,4);
\draw[line,blue] (2,2) to (3,3);
\end{tikzpicture}
\end{preview}
\end{document}