From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: type and typing comments for TeX and Lua
Date: Wed, 27 Dec 2017 17:32:02 -0500 (EST) [thread overview]
Message-ID: <alpine.OSX.2.03.1712271652370.1197@zptvyy.pn> (raw)
In-Reply-To: <013964c7-2cbc-69a9-246a-e0f1866df94c@gmx.es>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1692 bytes --]
On Tue, 26 Dec 2017, Pablo Rodriguez wrote:
> 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"><p></span>a<span class="kw"></p></span>
> <span class="co"><!--comment--></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.
It isn't too difficult to support this. See attached file.
This will clutter your PWD with temp files. To avoid that, create a
subdirectory called "output" and set
\setupvimtyping[directory=output]
Then all the temp files will be stored in the directory "output".
[-- Attachment #2: Type: APPLICATION/x-tex, Size: 1294 bytes --]
[-- Attachment #3: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-12-27 22:32 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
2017-12-27 22:32 ` Aditya Mahajan [this message]
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=alpine.OSX.2.03.1712271652370.1197@zptvyy.pn \
--to=adityam@umich.edu \
--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).