Title hyphenation

368 views
Skip to first unread message

Chris Lewis

unread,
May 22, 2012, 12:13:20 AM5/22/12
to tufte...@googlegroups.com
Hi all,
I'm new to Tufte-Latex, and I wouldn't call myself much of a LaTeX guru.

My book title is a bit too long, and so it hyphenates on the title page. I managed to fix this by adding a line break in the title:

\title{Retention\\ Engineering}

This seems to work OK, even the header of pages of the book are printed without the break. However, I'm worried this might result in unintended consequences, such as PDF Titles or programs that parse the LaTeX source (such as Pandoc for HTML generation).

I tried \mbox{}, but that just caused the line to go outside the page boundary.

Is there something better I could be doing?

Thanks!
Chris

Kevin Godby

unread,
May 22, 2012, 3:09:30 AM5/22/12
to tufte...@googlegroups.com
Hello, Chris.
Using \\ to insert line breaks in the title should work okay. (If it
doesn't, let me know.)

When you write \title{My long\\book title}, the following happens:

a. The \thanklesstitle macro is set to the same contents as what you
put in \title except any \thanks, \sidenote, and \footnote macros have
been stripped away.
b. The \plaintitle macro is set to the same contents as \thankless
title if you don't provide an optional argument to title. If you do
provide an optional argument (e.g., \title[My shorter title]{My longer
title}), then it will be set to optional argument.

Finally, when we create the running heads, we replace \\ and \newline
with \space.

As for problems with Pandoc parsing titles with \\ or optional
arguments, I could see where that may be troublesome. Unfortunately, I
don't know how to get around that. (Such is the difficulty with
parsing LaTeX code – you really do need to parse *everything* to know
what's going on.)

If you encounter any trouble in the future or if you have any further
questions, please feel free to contact us.

—Kevin Godby

Chris Lewis

unread,
May 22, 2012, 12:34:49 PM5/22/12
to tufte...@googlegroups.com
Pandoc will need cleaning up anyway, as it doesn't know what to do
with anything you do with a \newcommand (I use them much in the same
way as HTML classes, so I can change styles later), so I'm not too
worried about that.

As long as tufte-latex knows what to do, that works for me.

Thanks Kevin!

--
Chris Lewis
> --
> You received this message because you are subscribed to the Google Groups "tufte-latex" group.
> To post to this group, send email to tufte...@googlegroups.com.
> To unsubscribe from this group, send email to tufte-latex...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tufte-latex?hl=en.
>
Reply all
Reply to author
Forward
0 new messages