On Thu, Mar 14, 2019 at 02:32:57PM +0100, Juergen Spitzmueller wrote:
> commit 3272c5a3f49d84cfc966fe79fbcd4d0739c26a33
> Author: Juergen Spitzmueller <[email protected]>
> Date:   Thu Mar 14 14:38:08 2019 +0100
> 
>     Protect label in moving argument
>     
>     Fixes: #9404
> ---
>  src/insets/InsetLabel.cpp |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp
> index 9d6a031..6d5c0b6 100644
> --- a/src/insets/InsetLabel.cpp
> +++ b/src/insets/InsetLabel.cpp
> @@ -303,8 +303,11 @@ void InsetLabel::latex(otexstream & os, OutputParams 
> const & runparams_in) const
>       // we store the label and output it after the macro (#2154)
>       if (runparams_in.postpone_fragile_stuff)
>               runparams_in.post_macro += command;
> -     else
> +     else {
> +             if (runparams.moving_arg)
> +                     os << "\\protect";
>               os << command;
> +     }
>  }

I did not bisect, but I'm guessing this is the commit that broke the
following test:

  DEFAULTOUTPUT_export/doc/EmbeddedObjects_pdf2

Here is the error:

  ! Undefined control sequence.
  \lst@@caption ->\protectExample 
                                  Listing float
  l.6261 ...l={lst:Example-Listing},language=Python]

Here is the referenced code:

  \begin{lstlisting}%
  [caption={\protectExample Listing 
float},label={lst:Example-Listing},language=Python]
  # Example listing float
  def func(param):
      'this is a python function'
      pass
  \end{lstlisting}

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to