5

I am trying to remove hyphenated words from my list of figures and tables and I've no real idea how to do it. I just don't like the look of the same words broken at different points. For example Temper-ature and Temp-erature

Is there a quick and east way to do this?

Cheers

5
  • Which version of English features a hyphenation point for temperature after temp?
    – Mico
    Jun 24, 2014 at 21:04
  • I don't understand your question. Jun 24, 2014 at 21:08
  • You state that in at least one case in your document the word "temperature" gets hyphenated after "temp". I was just curious which dialect of English (British? Australian?) would allow hyphenation point after "temp"...
    – Mico
    Jun 24, 2014 at 21:13
  • I don't think I state which dialect of English I am using. Just \usepackage[english]{babel} Jun 24, 2014 at 21:16
  • 1
    You probably get tem-perature. If you have long captions, you should consider using the optional argument: \caption[<short>]{<long>}; the <short> text will be typeset in the list of figures or tables. A very detailed caption doesn't make much sense if the table or figure is not available to look at.
    – egreg
    Jun 24, 2014 at 21:17

2 Answers 2

6

you can bury the list of figures or tables in a group, and turn off hyphenation entirely within the group:

\begingroup
\hyphenpenalty10000
\listoffigures
\listoftables
\endgroup

there might be some overly-stretched lines or overfull boxes as a result, but it's really hard to say for sure without knowing what document class you're using.

the tocloft manual does give this hint (p.5):

To have the (sectional) titles in the ToC, etc., typeset ragged right with no hyphenation

\renewcommand{\@tocrmarg}{2.55em plus1fil}

where the value 2.55em can be changed for whatever margin space you want.

You need to wrap it in \makeatletter and \makeatother like this:

\makeatletter
\renewcommand{\@tocrmarg}{2.55em plus1fil}
\makeatother
6
  • I'm using the scrreprt document class. Overly-stretched lines aren't going to look good are they? Jun 24, 2014 at 21:14
  • 1
    personal opinion -- overly stretched lines never look good. the ragged right approach suggested in the manual appears to address this. Jun 24, 2014 at 21:16
  • how do I change this command (\renewcommand{\@tocrmarg}{2.55em plus1fil}) for the LoF? I've just put it in as "\renewcommand{\@lofrmarg}{2.55em plus1fil}" Jun 24, 2014 at 21:22
  • 1
    if a command name has an @ in it, you need to put \makeatletter before it, and \makeatletter after it. that allows the @ sign to be treated temporarily as a letter, so it can be part of a command name. Jun 24, 2014 at 21:25
  • Hi Barbara - I tried this \makeatletter \renewcommand{\@lofrmarg}{2.55em plus1fil} \makeatother But it didn't work. Latex error \@lofrmarg undefined Jun 25, 2014 at 7:06
0

Use the \mbox command like this \mbox{supercalifragilisticexpialidocious}

3
  • Is there not a global method. I have a thesis full of figures. Would I have to put \mbox around all my figure captions for example, or how do I use this? Jun 24, 2014 at 21:09
  • You can add in the preamble all the words you don't want to be hyphenated, with the command \hyphenation{word}
    – pablos
    Jun 24, 2014 at 21:13
  • @pablos -- putting a hyphenation list in the preamble affects the whole document, not just the prelims, and that may not be desirable. Jun 25, 2014 at 13:13

You must log in to answer this question.

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