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

Improve article 2104.09864 #460

Open
dginev opened this issue Apr 16, 2024 · 0 comments
Open

Improve article 2104.09864 #460

dginev opened this issue Apr 16, 2024 · 0 comments
Labels
bug Something isn't working fidelity misc mistakes and bugs in the produced HTML frontmatter Title page metadata and related content

Comments

@dginev
Copy link
Owner

dginev commented Apr 16, 2024

Exact location of issue

Frontmatter author block is not separated out correctly.

Problem details

Studying the source, the issue is the custom use of \And via an attached arxiv.sty dependency. In the pdflatex flow, the definition of \And is localized in arxiv.sty as part of the custom \@maketitle internals. The \@maketitle redefinition is currently unused/ignored by latexml.

Instead, what currently happens during latexml conversion, is that the visible \And definition comes from amsmath.sty.ltxml, which deposits the & character. As all author frontmatter is actually deposited in a single long \author{} macro call, no further chunking is performed.

Here is a sample anonymized document that reproduces that exactly:

\documentclass{article}
\usepackage{amsmath}
\makeatletter
% rules for title box at top of first page
\newcommand{\@toptitlebar}{
  \hrule height 2\p@
  \vskip 0.25in
  \vskip -\parskip%
}
\newcommand{\@bottomtitlebar}{
  \vskip 0.29in
  \vskip -\parskip
  \hrule height 2\p@
  \vskip 0.09in%
}
\newcommand{\undertitle}{A Preprint}
% create title (includes both anonymized and non-anonymized versions)
\providecommand{\@maketitle}{}
\renewcommand{\@maketitle}{%
  \vbox{%
    \hsize\textwidth
    \linewidth\hsize
    \vskip 0.1in
    \@toptitlebar
    \centering
    {\LARGE\sc \@title\par}
    \@bottomtitlebar
    \textsc{\undertitle}\\
    \vskip 0.1in
    \def\And{%
      \end{tabular}\hfil\linebreak[0]\hfil%
      \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces%
    }
    \def\AND{%
      \end{tabular}\hfil\linebreak[4]\hfil%
      \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\ignorespaces%
    }
    \begin{tabular}[t]{c}\bf\rule{\z@}{24\p@}\@author\end{tabular}%
  \vskip 0.4in \@minus 0.1in \center{\@date}   \vskip 0.2in
  }
}
\makeatother


\title{Unchunked frontmatter example}
\author{
	First Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
	%% examples of more authors
	\And
	Second Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
	\And
	Third Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
	\And
	Fourth Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
	\And
	Sixth Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
	\And
	Seventh Name \\
	Affiliation Name\\
	Location \\
	\texttt{email@example.com} \\
}

\begin{document}
\maketitle
\end{document}

I suspect we'd need much more faithful emulation of \@maketitle internals to get nicely structured HTML here. But naturally not full emulation, as we don't want to reproduce the {tabular} layout.

@dginev dginev added bug Something isn't working frontmatter Title page metadata and related content fidelity misc mistakes and bugs in the produced HTML labels Apr 16, 2024
@dginev dginev added this to the Fidelity sprint 3 milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fidelity misc mistakes and bugs in the produced HTML frontmatter Title page metadata and related content
Projects
None yet
Development

No branches or pull requests

1 participant