Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making a graph in using gnuplot and have converted the eps to pdf, so I have .tex file and pdf file. Usual they are great except this time the title in the title runs off the page, the title is a line of the .tex file.

  \put(3940,4709){\makebox(0,0){\strut{}REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE}}%

I've tried using "\n" but pdflatex compiler doesn't like this argument.

  \put(3940,4709){\makebox(0,0){\strut{}REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE,\n REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE}}%

Does anyone have any ideas?

share|improve this question
5  
\parbox{desired width}{REALLY LONG TITLE …} instead of the \makebox? –  Qrrbrbirlbel Aug 29 '12 at 1:18
    
I will try that when I get home from work. and if it doesn't work I'll try an upload an example. –  Joshua Siret Aug 29 '12 at 6:45
    
! Illegal unit of measure (pt inserted). <to be read again> \relax l.115 \gplbacktext I've started to get this error –  Joshua Siret Aug 29 '12 at 18:59
    
How do I make code in comments? –  Joshua Siret Aug 29 '12 at 19:03
    
@JoshuaSiret: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code. –  Werner Aug 29 '12 at 20:36

1 Answer 1

up vote 0 down vote accepted
\put(3940,5009){\makebox(0,0){\strut{}REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE,}}%
\put(3940,4709){\makebox(0,0){\strut{}REALLY LONG TITLE, REALLY LONG TITLE, REALLY LONG TITLE!}}%

I ended up making another box "300" units higher and inserting half the title there. It looks really good, everything is still centered which didn't happen with parbox{}{} and was easier to implement.

Though thanks to Qrrbrbirlbel for their help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.