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

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

Open
GeeLaw opened this issue Jun 10, 2024 · 4 comments

Comments

@GeeLaw
Copy link

GeeLaw commented Jun 10, 2024

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.

GeeLaw added a commit to GeeLaw/ahbtr that referenced this issue Jun 10, 2024
@kmccurley
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.

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

No branches or pull requests

2 participants