GeneralHow can I remove white space after this picture?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Tran Van Toan
Posts: 23
Joined: Sat Oct 28, 2017 1:18 am

How can I remove white space after this picture?

Post by Tran Van Toan »

I don't know how to remove white space after this picture. And this is my code.

Code: Select all

\documentclass[border=1mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tkz-euclide,amsmath}
\usetkzobj{all}
%\tikzset{hidden/.style = {thin, dotted}}
\tikzset{hidden/.style = {thick, dashed}}
\tkzSetUpPoint[size = 10,fill = black]
\begin{document}
\begin{tikzpicture}[scale=1]
\tkzDefPoints{0/0/A,
6/0/D,
-3/-3/B,
3/-3/C,
1/5/S,
1/-2/H}
\tkzDefLine[parallel=through H](A,D)
 \tkzGetPoint{d}
 \tkzDefLine[parallel=through H](A,B)
 \tkzGetPoint{l}
\tkzInterLL(d,H)(A,B) \tkzGetPoint{M}
\tkzInterLL(d,H)(C,D) \tkzGetPoint{N}
\tkzInterLL(l,H)(C,B) \tkzGetPoint{P}
\tkzInterLL(l,H)(A,D) \tkzGetPoint{Q}
\tkzLabelPoints[above](S, Q)
\tkzLabelPoints[right](N,D)
\tkzLabelPoints[left](A)
\tkzLabelPoints[below](B,C,H,M,P)
\tkzDrawPoints(S,A,B,C,D,H,M,N,P,Q)

\tkzDrawSegments[hidden](S,A A,B A,D S,H M,N P,Q A,H B,H C,H D,H)
\tkzDrawPolygon[line width = 1.2pt](S,B,C)
\tkzDrawPolygon[line width = 1.2pt](S,C,D)
\tkzLabelSegment[below=2pt](B,P){$x$}
\tkzLabelSegment[below=2pt](C,P){$y$}
\tkzLabelSegment[right=4pt](C,N){$z$}
\tkzLabelSegment[right=4pt](D,N){$t$}

\end{tikzpicture}
\end{document}
Attachments
ScreenHunter 114.png
ScreenHunter 114.png (25.73 KiB) Viewed 8655 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Tran Van Toan
Posts: 23
Joined: Sat Oct 28, 2017 1:18 am

How can I remove white space after this picture?

Post by Tran Van Toan »

I posted my question at here https://tex.stackexchange.com/questions ... 863_427552 and got the answer. just add the option /tikz/overlay to the two \tkzDefLine[parallel..]
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

How can I remove white space after this picture?

Post by Stefan Kottwitz »

Hi,

thank you for posting the solution here!

Yes, sometimes lines can cause the automatically calculated bounding box to become too big. With the overlay option, no actual space is reserved for that part, so it doesn't extend the image size.

Btw. I used tkz-euclide too, I posted two examples here: http://latex-cookbook.net/cookbook/exam ... /geometry/

Stefan
LaTeX.org admin
Post Reply