1
\begin{example} Trong một tam giác đều cạnh bằng $3$ cho $2012$ điểm phân biệt. Chứng minh rằng tồn tại một tam giác đều cạnh bằng $1$ chứa trong nó ít nhất $224$ điểm trong $2012$ điểm đã cho.
\begin{center}
\usetikzlibrary{arrows}
\definecolor{uququq}{rgb}{0,0,0}
\definecolor{qqqqff}{rgb}{0,0,0}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-7.14,0.5) rectangle (14.26,5.70);
\draw (-1.64,1.06)-- (3.26,1.08);
\draw (-1.64,1.06)-- (0.79,5.31);
\draw (3.26,1.08)-- (0.79,5.31);
\draw (-0.83,2.48)-- (-0.01,1.07);
\draw (-0.42,3.19)-- (-0.02,3.9);
\draw (1.63,1.07)-- (-0.02,3.9);
\draw (1.62,3.9)-- (-0.01,1.07);
\draw (2.44,2.49)-- (1.63,1.07);
\draw (-0.83,2.48)-- (2.44,2.49);
\draw (-0.02,3.9)-- (1.62,3.9);
\begin{scriptsize}
\fill [color=qqqqff] (-1.64,1.06) circle (2.5pt);
\fill [color=qqqqff] (3.26,1.08) circle (2.5pt);
\fill [color=uququq] (0.79,5.31) circle (2.5pt);
\fill [color=uququq] (0.8,2.48) circle (2.5pt);
\fill [color=uququq] (-0.02,3.9) circle (2.5pt);
\fill [color=uququq] (-0.83,2.48) circle (2.5pt);
\fill [color=uququq] (1.62,3.9) circle (2.5pt);
\fill [color=uququq] (2.44,2.49) circle (2.5pt);
\fill [color=uququq] (-0.01,1.07) circle (2.5pt);
\fill [color=uququq] (1.63,1.07) circle (2.5pt);
\end{scriptsize}
\end{tikzpicture}
\end{center}
\end{example}

enter image description here

2

1 Answer 1

3

When you compile, you see a warning such as

Overfull \hbox (270.6885pt too wide) in paragraph at lines 44--45

which is due to the instruction

\clip(-7.14,0.5) rectangle (14.26,5.70);

that GeoGebra mysteriously adds to its output. Remove it. What happens is that the picture is, to TeX's eyes, much wider than the line width, because of the big rectangle, so this big rectangle is placed flush with the left margin and the warning is issued.

You can also improve the code by removing useless parts. I also use \[...\] instead of center so there is no chance a page is broken just before the diagram.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[vietnam]{babel}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows}

\newtheorem{example}{Ví dụ}

\begin{document}

\begin{example}
Trong một tam giác đều cạnh bằng $3$ cho $2012$ điểm phân biệt. 
Chứng minh rằng tồn tại một tam giác đều cạnh bằng $1$ chứa trong
nó ít nhất $224$ điểm trong $2012$ điểm đã cho.
\[
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw (-1.64,1.06)-- (3.26,1.08);
\draw (-1.64,1.06)-- (0.79,5.31);
\draw (3.26,1.08)-- (0.79,5.31);
\draw (-0.83,2.48)-- (-0.01,1.07);
\draw (-0.42,3.19)-- (-0.02,3.9);
\draw (1.63,1.07)-- (-0.02,3.9);
\draw (1.62,3.9)-- (-0.01,1.07);
\draw (2.44,2.49)-- (1.63,1.07);
\draw (-0.83,2.48)-- (2.44,2.49);
\draw (-0.02,3.9)-- (1.62,3.9);
\fill (-1.64,1.06) circle (2.5pt);
\fill (3.26,1.08) circle (2.5pt);
\fill (0.79,5.31) circle (2.5pt);
\fill (0.8,2.48) circle (2.5pt);
\fill (-0.02,3.9) circle (2.5pt);
\fill (-0.83,2.48) circle (2.5pt);
\fill (1.62,3.9) circle (2.5pt);
\fill (2.44,2.49) circle (2.5pt);
\fill (-0.01,1.07) circle (2.5pt);
\fill (1.63,1.07) circle (2.5pt);
\end{tikzpicture}
\]
\end{example}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .