Re: Backslashes in @warning
Le 22/10/2022 à 16:45, Jean Abou Samra a écrit : I'm going to create an issue for that. https://gitlab.com/lilypond/lilypond/-/issues/6443
Re: Backslashes in @warning
>> We could define a macro `@bscode`, to be used in `@warning` only. Add >> the following to `common-macros.itely` >> >> ``` >> @macro bscode{TEXT} >> @code{\\\TEXT\} >> @end macro >> ``` > > Honestly, if there isn't a way to fix @warning globally, I think it > is simpler just not to use it here. > > I'll do a patch for that. IIRC, there are more `@warning` boxes that contain backslashes in `@code`. If you are going to work on that, I suggest to handle them all. Werner
Re: Backslashes in @warning
Le 22/10/2022 à 16:42, Werner LEMBERG a écrit : We could define a macro `@bscode`, to be used in `@warning` only. Add the following to `common-macros.itely` ``` @macro bscode{TEXT} @code{\\\TEXT\} @end macro ``` Honestly, if there isn't a way to fix @warning globally, I think it is simpler just not to use it here. I'll do a patch for that. IIRC, there are more `@warning` boxes that contain backslashes in `@code`. If you are going to work on that, I suggest to handle them all. Oh dear. While investigating that, I found this instance: https://lilypond.org/doc/v2.23/Documentation/notation/the-midi-block.html which was fine in 2.22: https://lilypond.org/doc/v2.22/Documentation/notation/the-midi-block.html So we have a doc build regression. We need to figure out when this started getting wrong… I'm going to create an issue for that.
Re: Backslashes in @warning
Le 22/10/2022 à 14:21, Werner LEMBERG a écrit : You just have to "escape" it, like in texidocs: @code{\\textMark} et @code{\\textEndMark} I'll prepare a MR later today for text.itely. If I do that, the backslash does appear in HTML, but there are two backslashes in the PDF. We could define a macro `@bscode`, to be used in `@warning` only. Add the following to `common-macros.itely` ``` @macro bscode{TEXT} @code{\\\TEXT\} @end macro ``` and use it as follows. ``` @warning{This is a warning with the @bscode{foo} command.} ``` Honestly, if there isn't a way to fix @warning globally, I think it is simpler just not to use it here. I'll do a patch for that.
Re: Backslashes in @warning
>> You just have to "escape" it, like in texidocs: >> >> @code{\\textMark} et @code{\\textEndMark} >> >> >> I'll prepare a MR later today for text.itely. > > If I do that, the backslash does appear in HTML, but there are two > backslashes in the PDF. We could define a macro `@bscode`, to be used in `@warning` only. Add the following to `common-macros.itely` ``` @macro bscode{TEXT} @code{\\\TEXT\} @end macro ``` and use it as follows. ``` @warning{This is a warning with the @bscode{foo} command.} ``` Werner
Re: Backslashes in @warning
Le 22/10/2022 à 12:02, Jean-Charles Malahieude a écrit : You just have to "escape" it, like in texidocs: @code{\\textMark} et @code{\\textEndMark} I'll prepare a MR later today for text.itely. If I do that, the backslash does appear in HTML, but there are two backslashes in the PDF.
Re: Backslashes in @warning
Le 19/10/2022 à 17:38, Werner LEMBERG a écrit : The page https://lilypond.org/doc/v2.23/Documentation/notation/writing-text.html#text-marks is missing some backslashes in the box [...] I don't immediately see what this discrepancy could be caused by, apart from a bug or limitation of texi2html 1.82. Can this be worked around somehow? I can confirm this problem with a local build; it seems indeed to be a bug in the old texi2html version, which swallows backslashes in `@warning{...@code{...}...}`. Alas, I don't know how to fix it. You just have to "escape" it, like in texidocs: @code{\\textMark} et @code{\\textEndMark} I'll prepare a MR later today for text.itely. Cheers, -- Jean-Charles
Re: Backslashes in @warning
> The page > > https://lilypond.org/doc/v2.23/Documentation/notation/writing-text.html#text-marks > > is missing some backslashes in the box [...] > > I don't immediately see what this discrepancy could be caused by, > apart from a bug or limitation of texi2html 1.82. > > Can this be worked around somehow? I can confirm this problem with a local build; it seems indeed to be a bug in the old texi2html version, which swallows backslashes in `@warning{...@code{...}...}`. Alas, I don't know how to fix it. Werner
Backslashes in @warning
The page https://lilypond.org/doc/v2.23/Documentation/notation/writing-text.html#text-marks is missing some backslashes in the box "Note: Older LilyPond used the [\]mark command ...". On the other hand, the corresponding PDF https://lilypond.org/doc/v2.23/Documentation/notation.pdf is fine. The corresponding Texinfo source is @warning{Older LilyPond versions used the @code{\mark} command for text marks, even though it is primarily intended for rehearsal marks (@pxref{Rehearsal marks}). The @code{\textMark} and [...] and the definition of @warning in macros.texi is @ifhtml @macro warning{TEXT} @html @end html @strong{Note:} \TEXT\ @c keep the space for proper nesting of @html @end html @end macro @end ifhtml @ifnothtml @macro warning{TEXT} @quotation @quotation @cartouche @b{Note:} \TEXT\ @end cartouche @end quotation @end quotation @end macro @end ifnothtml I don't immediately see what this discrepancy could be caused by, apart from a bug or limitation of texi2html 1.82. Can this be worked around somehow? Thanks, Jean