emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SUMMARY] #3 [[bbb:OrgMeetup]] on Wed, Oct 11, 19:00 UTC+3


From: Eshel Yaron
Subject: Re: [SUMMARY] #3 [[bbb:OrgMeetup]] on Wed, Oct 11, 19:00 UTC+3
Date: Tue, 17 Oct 2023 15:01:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hello Ihor,

Ihor Radchenko <yantar92@posteo.net> writes:

> - There was a demo demonstrating how to export texinfo manual to HTML
>   with source code examples fontified as in Org mode
>
>   - The motivation is limited Org support for manual authoring
>     - ELPA, when generating manuals from Org sources, does not use the
>       latest Org version, with some features lacking.
>     - While Org supports org to texi export, only a limited subset of
>       texinfo markup is supported, as Org is not specialized for
>       manuals and does not have a notion of specialized markup like
>       <environment variable>, <function>, <customization>, etc
>     - Also, Org does not yet support glossaries and indexes as well as
>       Texinfo does. Though see
>       https://github.com/tecosaur/org-glossary, which is an
>       experimental implementation by one of the Org contributors.
>
>   - One downside of texinfo is that code snippets are not colored
>     - To solve this problem, https://github.com/hniksic/emacs-htmlize
>       and Org publishing are utilized
>       - The manual source is written in texi and then exported to html
>         during publishing
>       - The generated HTML is further processed (via
>         ~org-publish-after-publishing-hook~), taking the code in HTML,
>         passing it through ~htmlize~ (just like what Org does in
>         ~org-html-fontify-code~), and replacing the HTML code elements
>         with property fontified versions.
>
>     - Unfortunately, the code was only showed on screen and no link was
>       dropped to the chat. So, I am just leaving what I remember from
>       how the code works (above).

I presented that, sorry for not sharing a link.  You can find the code I
use for adding highlighting to Texinfo examples here:

http://git.eshelyaron.com/gitweb/?p=esy-publish.git;a=blob;f=esy-publish.el;h=cb103b78b7dd2f8d0f5260883b61bf651d0650f5;hb=HEAD#l394

Namely, the function `esy-publish-fontify-examples` takes the name of an
HTML-formatted Texinfo manual, and uses `htmlize` to markup the contents
of "example" blocks in that HTML file.

The result is very similar to the markup of source blocks in Org
documents.  For instance you can see some highlighted "examples" here:

https://eshelyaron.com/man/sweep/Numbered-Variables.html


Thank you for organizing this nice meetup!


Best,

Eshel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]