* ConTeXt logo in XML
@ 2015-01-26 13:21 Pablo Rodriguez
2015-01-26 13:40 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2015-01-26 13:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
I have the following sample:
\startbuffer[demo]
<doc>
<p>This context is not ConTeXt.</p>
</doc>
\stopbuffer
\starttext
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{p|doc}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:doc
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups
\xmlprocessbuffer{main}{demo}{}
\stoptext
Is there any way that I get "ConTeXt" (and not "context") typeset as
\ConTeXt?
Many thanks for your help,
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt logo in XML
2015-01-26 13:21 ConTeXt logo in XML Pablo Rodriguez
@ 2015-01-26 13:40 ` Wolfgang Schuster
2015-01-26 15:19 ` Pablo Rodriguez
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2015-01-26 13:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 26.01.2015 um 14:21 schrieb Pablo Rodriguez <oinos@gmx.es>:
>
> Dear list,
>
> I have the following sample:
>
> \startbuffer[demo]
> <doc>
> <p>This context is not ConTeXt.</p>
> </doc>
> \stopbuffer
>
> \starttext
>
> \startxmlsetups xml:initialize
> \xmlsetsetup{#1}{p|doc}{xml:*}
> \stopxmlsetups
>
> \xmlregistersetup{xml:initialize}
>
> \startxmlsetups xml:doc
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:p
> \xmlflush{#1}\par
> \stopxmlsetups
>
> \xmlprocessbuffer{main}{demo}{}
>
> \stoptext
>
> Is there any way that I get "ConTeXt" (and not "context") typeset as
> \ConTeXt?
>
> Many thanks for your help,
Hans uses for the documentation of the Lua code <logo label="context"/> to print the ConTeXt logo, to do so the following setup is used (copied from x-ldx.mkiv):
\startxmlsetups ldx:logo
\uppercasestring\xmlatt{#1}{label}\xmlatt{#1}{name}\to\ascii
\ifx\ascii\empty\else\getvalue{\ascii}\fi
\stopxmlsetups
Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt logo in XML
2015-01-26 13:40 ` Wolfgang Schuster
@ 2015-01-26 15:19 ` Pablo Rodriguez
2015-01-26 15:33 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2015-01-26 15:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 01/26/2015 02:40 PM, Wolfgang Schuster wrote:
> [...]
> Hans uses for the documentation of the Lua code <logo label="context"/>
> to print the ConTeXt logo, to do so the following setup is used (copied
> from x-ldx.mkiv):
>
> \startxmlsetups ldx:logo
> \uppercasestring\xmlatt{#1}{label}\xmlatt{#1}{name}\to\ascii
> \ifx\ascii\empty\else\getvalue{\ascii}\fi
> \stopxmlsetups
Many thanks for your reply, Wolfgang.
I thought it was possible only changing the environment (and not the XML
code).
But this really does what I intend.
Many thanks for your help,
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt logo in XML
2015-01-26 15:19 ` Pablo Rodriguez
@ 2015-01-26 15:33 ` Wolfgang Schuster
2015-01-26 16:36 ` Pablo Rodriguez
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2015-01-26 15:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 26.01.2015 um 16:19 schrieb Pablo Rodriguez <oinos@gmx.es>:
>
> On 01/26/2015 02:40 PM, Wolfgang Schuster wrote:
>> [...]
>> Hans uses for the documentation of the Lua code <logo label="context"/>
>> to print the ConTeXt logo, to do so the following setup is used (copied
>> from x-ldx.mkiv):
>>
>> \startxmlsetups ldx:logo
>> \uppercasestring\xmlatt{#1}{label}\xmlatt{#1}{name}\to\ascii
>> \ifx\ascii\empty\else\getvalue{\ascii}\fi
>> \stopxmlsetups
>
> Many thanks for your reply, Wolfgang.
>
> I thought it was possible only changing the environment (and not the XML
> code).
>
> But this really does what I intend.
To replace text in your input you can try to use the translate module.
\usemodule[translate]
\translateinput[ConTeXt][\CONTEXT]
\starttext
This document was produced with ConTeXt.
\enableinputtranslation
This document was produced with ConTeXt.
\stoptext
Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-26 16:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 13:21 ConTeXt logo in XML Pablo Rodriguez
2015-01-26 13:40 ` Wolfgang Schuster
2015-01-26 15:19 ` Pablo Rodriguez
2015-01-26 15:33 ` Wolfgang Schuster
2015-01-26 16:36 ` Pablo Rodriguez
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).