Re: ANN: Pygments support for LilyPond

2021-11-27 Thread Jean Abou Samra
Le 27/11/2021 à 17:36, Jean Abou Samra a écrit : I tried this solution, and I am experiencing a few problems. For one thing, Firefox doesn't render the bold typewriter fonts as bold (this is not happening in your pygments.pdf, but, for reasons I don't understand, it happens with the doc build)

Re: ANN: Pygments support for LilyPond

2021-11-27 Thread Jean Abou Samra
Le 27/11/2021 à 23:02, Jean Abou Samra a écrit : [Sorry for Werner who will receive this email twice, I initially sent it from an address that is not subscribed to the list.] Le 27/11/2021 à 17:36, Jean Abou Samra a écrit : Excerpt from an email that became private more or less by accident

Re: ANN: Pygments support for LilyPond

2021-11-27 Thread Jean Abou Samra
[Sorry for Werner who will receive this email twice, I initially sent it from an address that is not subscribed to the list.] Le 27/11/2021 à 17:36, Jean Abou Samra a écrit : Excerpt from an email that became private more or less by accident (I've asked Werner): Anyway, as far as I know the

Re: ANN: Pygments support for LilyPond

2021-11-26 Thread Xavier Scheuer
On Fri, 26 Nov 2021 at 10:31, Werner LEMBERG wrote: > > Alas, after some investigation I found out it would be very cumbersome > to set up both bold and bold italic typewriter fonts that have the > same metrics as CM typewriter, and which works with pdfTeX, luatex, > and XeTeX. For this reason, I

Re: ANN: Pygments support for LilyPond

2021-11-26 Thread Werner LEMBERG
>> Here's the thing: The CM family doesn't contain a font for >> monospace bold. Since `texinfo.tex` essentially only uses this >> font family, there is no support for it. > > Ah! OK, of course. Given your help offer below, I suppose you have > another font in mind. What would that be? Alas,

Re: ANN: Pygments support for LilyPond

2021-11-25 Thread Jean Abou Samra
Le 26/11/2021 à 07:09, Werner LEMBERG a écrit : According to Gavin, Texinfo has no way to print text monospace text in bold. Here's the thing: The CM family doesn't contain a font for monospace bold. Since `texinfo.tex` essentially only uses this font family, there is no support for it. Ah!

Re: ANN: Pygments support for LilyPond

2021-11-25 Thread Werner LEMBERG
> According to Gavin, Texinfo has no way to print text monospace text > in bold. Here's the thing: The CM family doesn't contain a font for monospace bold. Since `texinfo.tex` essentially only uses this font family, there is no support for it. > [...] Doing > > \input{texinfo} > > @tex > \tex

Re: ANN: Pygments support for LilyPond

2021-11-25 Thread Jean Abou Samra
Le 24/11/2021 à 14:52, Jean Abou Samra a écrit : Le 24/11/2021 à 14:36, Werner LEMBERG a écrit : This doesn't print any color, with or without your patch:  [...] Interesting, for me it works, see attached file. D'oh, yesterday I used the wrong incantation, sorry.  I can reproduce the problem;

Re: ANN: Pygments support for LilyPond

2021-11-24 Thread Jean Abou Samra
Le 24/11/2021 à 14:36, Werner LEMBERG a écrit : This doesn't print any color, with or without your patch: [...] Interesting, for me it works, see attached file. D'oh, yesterday I used the wrong incantation, sorry. I can reproduce the problem; attached is a new patch that also takes care of xe

Re: ANN: Pygments support for LilyPond

2021-11-24 Thread Werner LEMBERG
>>> This doesn't print any color, with or without your patch: [...] >> Interesting, for me it works, see attached file. D'oh, yesterday I used the wrong incantation, sorry. I can reproduce the problem; attached is a new patch that also takes care of xetex. Werner ==

Re: ANN: Pygments support for LilyPond

2021-11-24 Thread Jean Abou Samra
Le 24/11/2021 à 10:45, Werner LEMBERG a écrit : It works with my small tests, so please send an example that fails. This doesn't print any color, with or without your patch: [...] Interesting, for me it works, see attached file. $ xetex --version XeTeX 3.14159265-2.6-0.92 (TeX Live 2020/

Re: ANN: Pygments support for LilyPond

2021-11-24 Thread Werner LEMBERG
>> It works with my small tests, so please send an example that fails. > > This doesn't print any color, with or without your patch: [...] Interesting, for me it works, see attached file. > $ xetex --version > XeTeX 3.14159265-2.6-0.92 (TeX Live 2020/Debian) I use XeTeX 3.141592653-2.6

Re: ANN: Pygments support for LilyPond

2021-11-24 Thread Jean Abou Samra
Le 24/11/2021 à 05:47, Werner LEMBERG a écrit : Thanks. Please apply the attached patch to `texinfo.tex` to make `@setcolor` work in `@example` environments; it is necessary to temporarily make a space character behave normally. If my solution is sufficient I will submit it to texinfo upstre

Re: ANN: Pygments support for LilyPond

2021-11-23 Thread Werner LEMBERG
>> Thanks. Please apply the attached patch to `texinfo.tex` to make >> `@setcolor` work in `@example` environments; it is necessary to >> temporarily make a space character behave normally. >> >> If my solution is sufficient I will submit it to texinfo upstream. > > It looks like the patch works

Re: ANN: Pygments support for LilyPond

2021-11-23 Thread Jean Abou Samra
Proof-of-concept: https://gitlab.com/lilypond/lilypond/-/merge_requests/1019 There remains a consequential TODO list. Jean

Re: ANN: Pygments support for LilyPond

2021-11-23 Thread Jean Abou Samra
Hi Werner, Le 22/11/2021 à 17:00, Werner LEMBERG a écrit : Thanks. Please apply the attached patch to `texinfo.tex` to make `@setcolor` work in `@example` environments; it is necessary to temporarily make a space character behave normally. If my solution is sufficient I will submit it to texin

Re: ANN: Pygments support for LilyPond

2021-11-23 Thread Jean Abou Samra
> Le 23 nov. 2021 à 10:22, Phil Holmes a écrit : > >> On 22/11/2021 19:07, Jean Abou Samra wrote: >>> Le 22/11/2021 à 20:05, Jean Abou Samra a écrit : >>> Note that I don't intend to make it a public >>> lilypond-book option for users, simply because it >>> would require adding Pygments in the

Re: ANN: Pygments support for LilyPond

2021-11-23 Thread Phil Holmes
On 22/11/2021 19:07, Jean Abou Samra wrote: Le 22/11/2021 à 20:05, Jean Abou Samra a écrit : Note that I don't intend to make it a public lilypond-book option for users, simply because it would require adding Pygments in the build process, which may be complicated (I don't know) and is in my opi

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Werner LEMBERG
>> Thanks. Please apply the attached patch to `texinfo.tex` to make >> `@setcolor` work in `@example` environments; it is necessary to >> temporarily make a space character behave normally. > > Thanks a lot! I'll test it as soon as possible. Note that the actual command to be used by 'pygments

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jean Abou Samra
Le 22/11/2021 à 20:05, Jean Abou Samra a écrit : Note that I don't intend to make it a public lilypond-book option for users, simply because it would require adding Pygments in the build process, which may be complicated (I don't know) and is in my opinion unnecessary. Sorry, the meaning of thi

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jean Abou Samra
Le 22/11/2021 à 19:52, James a écrit : Apart from the obvious 'how to use this option' in the documentation for the lilypond-book command itself, I fear slightly though (from personal experience) that this may encourage over zealous use in our core documentation. Although I am intrigued to see

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread James
Hello On 22/11/2021 18:42, Jean Abou Samra wrote: ... No, I'm trying to implement it in lilypond-book as an internal option. That's much simpler because all the infrastructure to run Python code is already there, and we can just 'import pygments' to access the API. It's also quite necessary to

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jean Abou Samra
[Werner] Thanks. Please apply the attached patch to `texinfo.tex` to make `@setcolor` work in `@example` environments; it is necessary to temporarily make a space character behave normally. If my solution is sufficient I will submit it to texinfo upstream. Thanks a lot! I'll test it as soon

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jonas Hahnfeld via Discussions on LilyPond development
Am Montag, dem 22.11.2021 um 04:12 +0100 schrieb Jean Abou Samra: > So the next step now would be adding syntax highlighting to > the documentation. I've managed a prototype for HTML fairly > easily, and Info doesn't know about colors, so that's easy. > What about PDF, however? Texinfo itself doesn

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Werner LEMBERG
>> `@example` is a verbatim environment, too. Ah, I was misled. Indeed, macros are expanded within `@example`, which is good, since it simplifies colour support – you only have to convince 'pygments' to insert proper `@setcolor` commands before and after the coloured tokens. > As far as I under

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread David Kastrup
Werner LEMBERG writes: >>> However, it would be necessary to define a special version of the >>> `@verbatim` environment (similar to LaTeX's `minted` environment) >>> that recognizes color changes. This is certainly doable and >>> probably not too difficult, but I currently have other things to

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jean Abou Samra
Le 22/11/2021 à 15:22, Werner LEMBERG a écrit : However, it would be necessary to define a special version of the `@verbatim` environment (similar to LaTeX's `minted` environment) that recognizes color changes. This is certainly doable and probably not too difficult, but I currently have other

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Werner LEMBERG
>> However, it would be necessary to define a special version of the >> `@verbatim` environment (similar to LaTeX's `minted` environment) >> that recognizes color changes. This is certainly doable and >> probably not too difficult, but I currently have other things to >> do. Maybe it's best to

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Jean Abou Samra
Le 22/11/2021 à 09:35, Werner LEMBERG a écrit : So the next step now would be adding syntax highlighting to the documentation. I've managed a prototype for HTML fairly easily, and Info doesn't know about colors, so that's easy. Good. I'm all for colours :-) What about PDF, however? Texinfo

Re: ANN: Pygments support for LilyPond

2021-11-22 Thread Werner LEMBERG
> So the next step now would be adding syntax highlighting to the > documentation. I've managed a prototype for HTML fairly easily, and > Info doesn't know about colors, so that's easy. Good. I'm all for colours :-) > What about PDF, however? Texinfo itself doesn't seem to have > commands fo

Re: ANN: Pygments support for LilyPond

2021-11-21 Thread Jean Abou Samra
So the next step now would be adding syntax highlighting to the documentation. I've managed a prototype for HTML fairly easily, and Info doesn't know about colors, so that's easy. What about PDF, however? Texinfo itself doesn't seem to have commands for changing colors. The packages that I could f

ANN: Pygments support for LilyPond

2021-11-21 Thread Jean Abou Samra
Pygments, a syntax highlighter written in Python, just received support for LilyPond. This means that, using the latest version of Pygments, you can get highlighted LilyPond source in LaTeX documents, Sphinx documentation, Wordpress sites, the output of various other tools, and any format you like