PierreSenellart / apxproof

LaTeX package for automatically putting proof environments in appendix
LaTeX Project Public License v1.3c
23 stars 8 forks source link

Compatibility with llncs #30

Closed proteusGIT closed 5 years ago

proteusGIT commented 5 years ago

I am using \ProvidesClass{llncs}[2018/03/10 v2.20 and there is a different theorem style used when using apxproof. I tried to use

    \makeatletter
    \AtBeginDocument{%
    \def\thmhead#1#2#3{%
    \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
    \thmnote{ {\normalfont (#3)}}}%
    }
    \makeatother

but that did not help. Here is the example (where brackets are removed by apxproof):

  \documentclass{llncs}

    \usepackage{apxproof}

    \begin{document}

    \begin{definition}[Some test title]
    Some other nonsense.
    \end{definition}

    \end{document}
proteusGIT commented 5 years ago

see also: https://tex.stackexchange.com/questions/483029/apxproof-and-formatting-titles/484001#484001

PierreSenellart commented 5 years ago

This document class has an annoyingly different behavior from regular document classes, as all theorem notes are surrounded with parentheses. This caused an issue in the formatting of repeated theorems, so I had initially “fixed” this issue by making this document class behave as standard ones. But I agree this is not a good solution, as apxproof should not impact the formatting in such a way.

The problem is not related to the redefinition of \thmhead, by the way, the document class makes no use of this macro.

Issue fixed in 12fc447 by adding code specific to this document class. Can you try and use the development version of apxproof.sty, at https://raw.githubusercontent.com/PierreSenellart/apxproof/develop/apxproof.sty and confirm this fixes the issue? If so, I will release v1.1.2 including this fix.

PierreSenellart commented 5 years ago

Hum, looking into it a bit more, I realize I am mistaken: it's quite standard for document classes to use a format where there are parentheses around theorem notes. This means I will need to apply a similar solution to the more general case (the fix proposed on StackExchange is not satisfactory as it will mess up the formatting of repeated theorem entries). I will look into this.

For now, for the special case of llncs.cls, you can use the development version of apxproof.sty.

PierreSenellart commented 5 years ago

The general issue of theorem notes (beyond the case of Springer document classes which was fixed in 12fc447) has been fixed in 68d154b. A new release will be done shortly, in the mean time the fixed code is available in the develop branch.