禁用 apa6e 脚注中的连字符

禁用 apa6e 脚注中的连字符

我想禁用 apa6e 脚注中的连字符,以符合 APA 第 6 版指南。

apa6e使用 ragged2e,并且ragged2e 文档 (pdf)声称某些命令可能会使连字“几乎不可能”:

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

这些命令禁用正文中的连字符,但不禁用(尾注)脚注中的连字符。

我怎样才能 (1) 禁用 apa6e 中的 ragged2e 连字符,或者 (2) 编辑 apa6e.cls 以完全停止使用 ragged2e?

例子:

\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}

答案1

您可以修补格式化尾注的命令以将\RaggedRight其添加到其中。最简单的方法是使用etoolbox包,使用\appto宏,将代码附加到现有宏。

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

这是您的示例文档:

\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}

答案2

\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}

相关内容