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 would like to disable hyphenation in apa6e's footnotes, to match APA's 6th edition guidelines.

apa6e uses ragged2e, and the ragged2e documentation (pdf) claims that certain commands can make hyphenation "almost impossible":

\setlength{\RaggedLeftRightskip}{0pt plus 1fil}
\setlength{\RaggedRightRightskip}{0pt plus 1fil}

These commands disable hyphenation in the body, but not in the (endnotes) footnotes.

How can I either (1) disable ragged2e's hyphenation in apa6e, or (2) edit apa6e.cls to stop using ragged2e altogether?

Example:

\documentclass[endnotes]{apa6e}
\title{}
\author{}
\shorttitle{}
\authornote{}

\setlength{\RaggedLeftRightskip}{0pt plus 1fil}
\setlength{\RaggedRightRightskip}{0pt plus 1fil}

\begin{document}

The body does not have any hyphenation. Good. Even
reallyreallyreallyreallyreallyreallyreallyreallylongwords remain
unhyphenated.\ 
%
\footnote{However, the footnotes become hyphenated. The
reallyreallyreallyreallyreallyreallyreallyreallylongwords become
hyphenatated.}

\end{document}
share|improve this question
    
be careful -- if you have any really, Really, REALLY long words, they may be longer than your line. (probably not a real concern in english and a wide-ish text width, but if you get into german or some other agglutinative languages, or maybe organic chemistry, you could find yourself with some real problems.) –  barbara beeton Jul 10 '11 at 13:34

2 Answers 2

up vote 7 down vote accepted

You can patch the command that formats the endnote to add \RaggedRight to it. The easiest way to do this is with the etoolbox package, using the \appto macro, which appends code to an existing macro.

\usepackage{etoolbox}
\appto{\enoteformat}{\RaggedRight}

Here's your sample document:

\documentclass[endnotes]{apa6e}
\usepackage{etoolbox}
\title{}
\author{}
\shorttitle{}
\authornote{}
\setlength{\RaggedLeftRightskip}{0pt plus 1fil}
\setlength{\RaggedRightRightskip}{0pt plus 1fil}

% Add \RaggedRight to the \enoteformat command (from the endnotes package)
\apptocmd{\enoteformat}{\RaggedRight}{}{}
\begin{document}

The body does not have any hyphenation. Good. Even
reallyreallyreallyreallyreallyreallyreallyreallylongwords remain
unhyphenated.\ 
%
\footnote{However, the footnotes become hyphenated. The
reallyreallyreallyreallyreallyreallyreallyreallylongwords become
hyphenatated.}

\end{document}
share|improve this answer
    
Works great. Thanks! –  newresearcher Jul 10 '11 at 15:19
    
In this case, the simpler \appto command also works. I've update the answer to reflect this. (There's no real difference between the two in this case.) –  Alan Munn Jul 10 '11 at 17:37
    
The difference between \appto and \apptocmd is that the latter applies also to command with mandatory arguments. The extra work of \apptocmd is not needed when the command has no arguments. However \apptocmd doesn't work on commands with an optional argument. –  egreg Jul 10 '11 at 17:42
    
@egreg Thanks. That's clearer. –  Alan Munn Jul 10 '11 at 18:10
\PassOptionsToPackage{originalparameters}{ragged2e}% for the body
\documentclass[endnotes]{apa6e}
\makeatletter% for the footnotes
\renewcommand{\footnote}[1]{\def\apaSIXe@hasendnotes\relax{}\endnote{\raggedright#1}}
\makeatother
\title{}
\author{}
\shorttitle{}
\authornote{}
\begin{document}

The body does not have any hyphenation. Good. Even
reallyreallyreallyreallyreallyreallyreallyreallylongwords remain
unhyphenated.\ 
%
\footnote{However, the footnotes become hyphenated. The
reallyreallyreallyreallyreallyreallyreallyreallylongwords become
hyphenatated.}

\end{document}
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.