emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eshel Yaron <me@eshelyaron.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [SUMMARY] #3 [[bbb:OrgMeetup]] on Wed, Oct 11, 19:00 UTC+3
Date: Tue, 17 Oct 2023 15:01:23 +0200	[thread overview]
Message-ID: <m1edhts8rg.fsf@eshelyaron.com> (raw)
In-Reply-To: <87edhtfpal.fsf@localhost> (Ihor Radchenko's message of "Tue, 17 Oct 2023 11:42:42 +0000")

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	other threads:[~2023-10-17 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 12:19 #3 [[bbb:OrgMeetup]] on Wed, Oct 11, 19:00 UTC+3 Ihor Radchenko
2023-10-17 11:42 ` [SUMMARY] " Ihor Radchenko
2023-10-17 13:01   ` Eshel Yaron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1edhts8rg.fsf@eshelyaron.com \
    --to=me@eshelyaron.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).