IACR / latex

Latex classes for IACR publications. We will start with the new journal proposal.
9 stars 2 forks source link

TeX-to-HTML converter does not handle `\textsuperscript` properly for `\etalchar` #252

Open GeeLaw opened 3 months ago

GeeLaw commented 3 months ago

In my .bib files I add

@preamble { "\def\etalchar#1{\textsuperscript{#1}}" }
This ensures that the superscript "+" is properly italicized.

The issue with the default definition \newcommand{\etalchar}[1]{$^{#1}$} by BibTeX is that the + will not be italicized even if the citation is inside italicized text, e.g., in

\begin{lemma}
Hello~\cite{EC:BGGHNS14}.
\end{lemma}

The "Hello [BGG" and "14]." are italicized, but the superscript "+" in the middle is not. It's ugly and interferes with readability as italicized "G" will overlap with up-right "+".

Using \def\etalchar#1{\textsuperscript{#1}}, as commented in the BibTeX code, ensures that the "+" uses the proper style of the surrounding text (italicized, boldfaced).

However, upon submission to IACR CiC, the server renders HTML as BGG{\textsuperscript{+}}14, instead of BGG⁺14 (U+207A).

There is no good workaround at this moment --- fortunately I didn't actually have any italicized citations in my submission.

kmccurley commented 3 months ago

The generation of labels in the alpha style is ad-hoc, and is not really under control of the author in the iacrcc class. We only chose the alpha style [BGG97] instead of the numeric style [3] because many authors prefer to read them inline as a suggestion as to which paper is being cite (e.g., [RSA] is obvious which paper it is). Unfortunately the generation of labels is some ad-hoc choices that people may not like. For example, there are some references that may lack an author. Another example arises if there are more than 26 references by authors with names BBB, then the label generation will fail on the 27th one because it generates keys BBB22a, BBB22b, BBB22c, ... until it runs out of letters. There are other failure modes involving accents in names.

The general advice to get around these problems is to use biblatex instead of the old bibtex. That has its own problems, such as the fact that the alpha labels generated by biblatex are not the same as those generated by the alpha style of bibtex. As an alternative, perhaps we should allow authors to select a numeric style for references instead of the alpha style for labels. That could be done by adding a numericbib option to the cls file.

Our BibTeX-to-HTML converter does not handle lots of things - I'm pretty sure it does not handle @preamble in a bibtex file. It turns out that almost nobody uses these, so I don't expect it to be a serious problem. Our BibTeX-to-HTML converter is not intended to be a complete implementation of the TeX expansion algorithm, and this shows up in many implementations of TeX, because there is really only one proper implementation of TeX macro expansion, and that's in the original TeX engine itself. At this point it's pretty hopeless to fix all of the bad decisions that went into the design of the TeX macro language.

kmccurley commented 3 months ago

Dan Bernstein has also raised a completely different objection to the alpha labels. We chose these because several authors had requested them, but we don't need to insist that all authors use them. This raises the importance of adding a numericbib option to the iacrcc.cls file.

kmccurley commented 3 months ago

As it turns out, the alpha labels generated by biblatex are different from what is generated by bibtex. This means we already have some inconsistency in the alpha labels, and it makes sense to provide an alternative for authors. There are also sorting issues when an author's name contains accented characters.

I seem to remember that Springer has also allowed authors to override the style from numeric to alpha in llncs, but I cannot find the example. Someone had mentioned it on twitter.

There is another reason to sometimes avoid alpha labels. Sometimes it will generate a label [ASS04] or [BaD] which could be regarded as an insult. This is another argument for supporting [numericbib] as an option to iacrcc.

kmccurley commented 3 months ago

Note that acmart allows customization of the label style using \setcitestyle. We might adopt this option in the preamble instead of using an option to the cls.