Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authblk line breaks when font has been customized #2363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DominikPeters
Copy link

@DominikPeters DominikPeters commented May 2, 2024

Author lines typeset using the authblk package can have an unexpected behavior when the \Authfont has been set to a custom font size and a line break \authorcr is used to separate authors.

Example document:

\documentclass{article}
\usepackage{authblk}
\renewcommand\Authfont{\Large}
\title{Use of authblk}
\author[1]{Alice}
\author[1]{Bob}
\author[1]{\authorcr Charlie} % \authorcr = line break
\author[1]{Dominik}
\affil[1]{Example University}
\begin{document}
	\maketitle
\end{document}
PDF LaTeXML LaTeXML with this pull request
image image image
<br class="ltx_break"><span class="ltx_text" style="font-size:144%;">Charlie</span> <br class="ltx_break">Charlie

The reason for the difference is that the authblk binding does not actually apply the \Authfont to the author name text in its current version, except after \authorcr.

DefMacro('\authorcr', '\\\\\Authfont');

This pull request removes this:
DefMacro('\authorcr', '\\\\');

Example to make it clear that normally \Authfont is ignored: let's set

\renewcommand\Authfont{\bfseries}

Then LaTeXML outputs the following:
image

LaTeXML with this pull request gives the same output as in the above table, right-most cell.

@brucemiller
Copy link
Owner

Would it be "better" to use \Authfont consistently, versus using it not-at-all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants