ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: type and typing comments for TeX and Lua
Date: Tue, 26 Dec 2017 19:36:00 +0100	[thread overview]
Message-ID: <013964c7-2cbc-69a9-246a-e0f1866df94c@gmx.es> (raw)
In-Reply-To: <alpine.LNX.2.20.1712211651590.8977@ybpnyubfg.ybpnyqbznva>

On 12/21/2017 10:53 PM, Aditya Mahajan wrote:
> [...]
> Can you post a minimal working example. I don't use XML so it is difficult 
> for me to understand how these commands are used in practice.

Aditya,

many thanks for your reply and your help.

A minimal sample would be:

  \startbuffer[demo]
  <doc>
  <p>b</p>
  <code><a class="sourceLine" id="cb1-1" data-line-number="1">
  <span class="kw">&lt;p&gt;</span>a<span class="kw">&lt;/p&gt;</span>
  <span class="co">&lt;!--comment--&gt;</span></a></code>
  </doc>
  \stopbuffer

  \startxmlsetups xml:initialize
     \xmlsetsetup{#1}{doc|p|code}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:doc
     \xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:p
     \startpar\xmlflush{#1}\stoppar
  \stopxmlsetups

  \startxmlsetups xml:code
    \xmlprettyprinttext{#1}{xml}
  \stopxmlsetups

  \starttext
     \xmlprocessbuffer{main}{demo}{}
  \stoptext

But if this is too tricky to you, maybe it isn’t a good idea to extend
the module to XML usage.

There are (at least) two reasons for that:

- I’m the only user who asked for this (too much trouble for a single user).

- Easier alternatives would be to improve the ConTeXt core or the
context-highlight module.

Many thanks for your help again,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2017-12-26 18:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 22:50 Pablo Rodriguez
2017-12-19 19:26 ` Aditya Mahajan
2017-12-19 21:29   ` Pablo Rodriguez
2017-12-19 23:20     ` Aditya Mahajan
2017-12-21 18:54       ` Pablo Rodriguez
2017-12-21 19:05         ` Aditya Mahajan
2017-12-21 20:49           ` Pablo Rodriguez
2017-12-21 21:53             ` Aditya Mahajan
2017-12-26 18:36               ` Pablo Rodriguez [this message]
2017-12-27 22:32                 ` Aditya Mahajan
2017-12-20 11:53 ` Hans Hagen
2017-12-20 19:45   ` Pablo Rodriguez
2017-12-20 21:18     ` Hans Hagen
2017-12-21 19:53       ` Pablo Rodriguez
2017-12-21 16:04 Christoph Reller
2017-12-21 20:16 ` Pablo Rodriguez
2017-12-27  1:14   ` SteamedFish
2017-12-27 18:44     ` Pablo Rodriguez
2017-12-21 21:16 Christoph Reller
2017-12-26 18:07 ` Pablo Rodriguez
2017-12-27 18:53 ` Pablo Rodriguez
2017-12-28  7:38 Christoph Reller

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

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

  git send-email \
    --in-reply-to=013964c7-2cbc-69a9-246a-e0f1866df94c@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /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.
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 NNTP newsgroup(s).