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 8856 times

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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: 10358
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