New version 2.3 has major issue inherited from the soul package

Issue #4 on hold
aghsmith created an issue

Hi, I have only just got round to checking out your new version 2.3 implemented using elements from the soul package. In fact it was problems with the soul package (which I formally used for doing highlighting) that lead me to use pdfcomment in the first place.

If you have a macro that takes an argument inside a soul \hl{} macro and since v2.3, inside one of \pdfmarkupcomment{}{} macros, then compilation breaks. The issue is to do with the way that soul breaks down the text inside of it's macros. There are a few exceptions, like it can take macros for bold and italic fonts etc. I believe that this is because acceptance of these macros has been specifically implemented within soul. Other macros including user defined ones or for instance siunitx macros will cause a compile error if they occur inside a \pdfmarkupcomment macro now.

here is a small example: {{{ \documentclass{report} \usepackage{pdfcomment}

\newcommand{\wib}[1]{#1} \begin{document} \pdfmarkupcomment{\wib{and}}{} \end{document} }}}

I had kind of hoped that someone might come along and cannibalise soul for it's good stuff and fix the issues that I have mentioned. Perhaps you will manage this.

Comments (9)

  1. Josef Kleber repo owner

    Hi,

    did you report the problem to the developer of soul.sty? The problem has to be attacked at the source.

  2. Josef Kleber repo owner

    Hi,

    ah okay i see. pdfcomment.sty is loading soulpos.sty -> soulutf8.sty -> soul.sty! Going one layer up, it might be a good idea to contact the developer of soulutf8.sty which already expands the functionality of soul.sty. As Heiko being one of the TeX master gurus there might be a solution in reach. Looking at code of soul.sty i found a token list, which defines commands like \textbf to be accepted. Maybe Heiko can define a command in soulutf8.sty to expand this list of commands.

    Josef

  3. aghsmith reporter

    Perhaps but to be generally compatible and to not break existing documents using your package, it needs to expand any macro, not just a list of \textbf \emph \textit etc.

  4. Josef Kleber repo owner

    Well in a perfect world ...

    In the end, adding the commands you need to the list will suffice. To have a workaround will be better than having no solution. Will you contact Heiko? He has the skills to maybe even find a general solution. I don't! ;-)

    Josef

  5. aghsmith reporter

    Okay I can do this. However, I think you should consider the following: the changes you have introduced with the soul implementation will cause some pre-existing LaTeX docs that use your package to now fail in compilation. Though I can see that it resolves the highlighting over a page boundary issue (actually in my thesis (completed a couple of weeks ago), I would use soul over page boundaries to overcome the problem).

    I'll admit that I'm not a package developer, but one of the principles of making updates (is or probably should be) that changes shouldn't cause already existing work to come out differently (or to fail in compilation). Perhaps the soul implementation should be a package option rather than the default (until the issues with soul are resolved)

    I'll try and find the contact details for that guy and email him tonight, have some other stuff to sort now though... will see.

  6. aghsmith reporter

    I've not yet heard anything from regarding this issue. I suspect that it will not be dealt with

  7. Log in to comment