TeX - LaTeX Asked on January 12, 2021
I am using geogebra for the first time and am having an error when I put the PGF/TikZ code into overleaf. The exact error is
Float too large for page by 455.39223pt on input line 306.
main.tex, line 304 Overfull hbox (1140.459pt too wide) in paragraph
at lines 304–305
Here is the code (note that the last line shown, ‘end{figure}’ corresponds to line 306 as in the errors above:
definecolor{qqqqff}{rgb}{0,0,1}
definecolor{ffcctt}{rgb}{1,0.8,0.2}
definecolor{ffqqqq}{rgb}{1,0,0}
definecolor{yqyqyq}{rgb}{0.5019607843137255,0.5019607843137255,0.5019607843137255}
definecolor{uququq}{rgb}{0.25098039215686274,0.25098039215686274,0.25098039215686274}
begin{figure}[!ht]
begin{center}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
clip(-29.15527732052291,-20.111903557751653) rectangle (27.437297647521294,18.136500246696393);
draw [line width=2pt,color=yqyqyq] (0,0) circle (6cm);
draw [line width=2pt,color=ffqqqq] (0,6)-- (-4.336291901416994,-4.146875033770055);
draw [line width=2pt,color=ffcctt] (0,6)-- (-2.2142787553979884,-5.576465690147581);
draw [line width=2pt,color=ffcctt] (0,6)-- (2.190703198420197,-5.585769373723867);
draw [line width=2pt,color=qqqqff] (0,6)-- (4.206985190994306,-4.277999018554656);
draw (-0.10585670954964947,7.431250799319233) node[anchor=north west] {v};
draw (-5.055017258085835,-3.9195413283017766) node[anchor=north west] {x};
draw (-2.580436983817742,-5.533398028911399) node[anchor=north west] {y};
draw (2.5301092347794056,-5.210626688789474) node[anchor=north west] {w};
draw (4.628122945571919,-3.8657461049481223) node[anchor=north west] {z};
draw [shift={(0,0)},line width=2pt,color=ffqqqq] plot[domain=3.904665970656774:4.334406131420695,variable=t]({1*6*cos(t r)+0*6*sin(t r)},{0*6*cos(t r)+1*6*sin(t r)});
draw [shift={(0,0)},line width=2pt,color=qqqqff] plot[domain=5.08614767141132:5.4894179862449555,variable=t]({1*6*cos(t r)+0*6*sin(t r)},{0*6*cos(t r)+1*6*sin(t r)});
draw [color=ffqqqq](-3.3335701107689006,1.3523905603563229) node[anchor=north west] {$c_1$};
draw [color=ffqqqq](-3.8715223443054425,-4.726469678606588) node[anchor=north west] {$c_1$};
draw [color=ffcctt](-1.0741707299154248,-0.1000804701923371) node[anchor=north west] {$c_3$};
draw [color=ffcctt](0.48589074734054655,-0.1000804701923371) node[anchor=north west] {$c_3$};
draw [color=qqqqff](2.5301092347794056,1.2985953370026688) node[anchor=north west] {$c_2$};
draw [color=qqqqff](3.4446280317915265,-4.726469678606588) node[anchor=north west] {$c_2$};
begin{scriptsize}
draw [fill=uququq] (0,6) circle (2.5pt);
draw [fill=uququq] (-4.336291901416994,-4.146875033770055) circle (2.5pt);
draw [fill=uququq] (-2.2142787553979884,-5.576465690147581) circle (2.5pt);
draw [fill=uququq] (2.190703198420197,-5.585769373723867) circle (2.5pt);
draw [fill=uququq] (4.206985190994306,-4.277999018554656) circle (2.5pt);
end{scriptsize}
end{tikzpicture}
end{center}
end{figure}
There have been a couple of other posts about the size of images when importing from geogebra, however the answers seemed to give a corrected code without explaining how to deal with these errors in general, or how it arises, so I am not sure how to deal with my example.
I think in you case the TeX-output is rather helpful. In fact, the tikzpicture you want to render is of the size 5m wide and 3,8m high, which might not be want you want ("too large"). I suggest simply removing the line
clip(-29.15527732052291,-20.111903557751653) rectangle (27.437297647521294,18.136500246696393);
This command adjusts the size of the tikz-picture to the rectangle specified (which adds up to the size I indicated above). Since there is nothing in your image that needs to be cut, removing it leads to a smaller size that fits into your document (in fact, it is roughly 12 x 13.5 cm). (The clip-command is most often used when you don't exactly know how large certain elements are and you just want to keep the picture to a reasonable size without computing end points of lines etc. explicitly.)
If you need to adjust it further, simply add (for example)
begin{tikzpicture}[scale = .5, <other options>]
Correct answer by user1327 on January 12, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP