IACR / latex

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

consider disabling \title, \@maketitle, \maketitle and abstract environment. #261

Open kmccurley opened 2 years ago

kmccurley commented 2 years ago

Some packages reach in and modify \maketitle, \@maketitle, or \renewenvironment{abstract} by redefining \abstract. Some have a legitimate reason to (e.g., a style for a journal). Others like ctex redefines the word "Abstract" in Chinese, but this package may be useful for authors in some cases. Others like windycity have no business redefining it (they just like theirs better). Others just apply styling on titles (e.g., gmdoc and section.sty). Some are giant packages with other things (like koma-script).

It's like playing whack-a-mole to stamp all of these out, and I can think of three approaches to solve this problem:

  1. make sure that no package can modify \maketitle, \@maketitle, and the abstract environment.
  2. disable \maketitle, \@maketitle, and \title, using instead \settitle or \addtitle and our own internal macro to mark up the title.
  3. check that \maketitle and \@maketitle still have the same definition atenddocument. Someone can defeat this to get around it.

IACR/latex-submit#2 is probably the safest approach.

kmccurley commented 2 months ago

We have checks for changes to \title and others, and we can add checks for things we depend upon like \maketitle and \section to make sure that section headings have not been changed. These are supposed to be set by the cls file but evidently some other packages interfere with them (e.g., sectsty).

kmccurley commented 2 months ago

I have noticed some authors fiddle with the section headings to make them smaller and thereby compress their paper to meet page limits. This reminds me that we may also want to check \baselinestretch as well. It's unfortunate that page limits have caused authors to perform such things, but now authors have acquired bad habits from llncs and policies on page limits.

jwbos commented 2 months ago

I can take this up and some experiments. I do fear that we check too much that authors might get too many warnings / errors due to interference of other packages...

kmccurley commented 2 months ago

Another alternative is to explicitly disallow packages that modify the \section command like sectsty, titlesec, and fncychap. These really have no good purpose other than to modify the style of the journal. We can accomplish this in the docker image, but we can also check if the package is loaded \AtEndPreamble. This would be less invasive than checking the definition of \section at the end of the document. Note how we check for natbib to issue an error saying it is not supported. We could do the same thing with other packages that we know are problematic. I checked and there are not very many in texlive that modify section headings (I listed them here).

Remember that most authors just cut and paste from what they see others do. These packages could sneak in for no good reason.

jwbos commented 1 month ago

Currently we check using \AtEndDocument if \title, \familydefault or \paperwidth have been modified. I currently have a branch where we can detect if the abstract environment has been changed or if \section has been modified (for example when using the sectsty package) with an additional test. Anything else we would like to check / detect?

jwbos commented 1 month ago

See branch protectsection

kmccurley commented 1 month ago

That branch is not visible to me. Let's keep the changes as small as possible.