* Custom tags, revisited
@ 2018-06-26 18:26 Rik
2018-06-26 22:59 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Rik @ 2018-06-26 18:26 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 952 bytes --]
In September 2015 thread "Custom XML Export," Hans instructed us on how
to create custom tags. The example he presented is:
\setupbackend[export=yes]
\definehighlight[this]
\starttext
\startelement[what]
\this{that} \input ward
\stopelement
\stoptext
When that example is run with the current (2018-06-25) beta or TL18,
there is no html body:
</head>
<body>
<div class="document" xmlns="http://www.pragma-ade.com/context/export">
<div class="warning">Rendering can be suboptimal because there is no default/fallback css loaded.</div>
<div>
<div class="metadata">
</div>
</div>
</div>
</body>
</html>
Further experimentation suggests that \startelement is gobbling the
output. (Adding \setupstructure does not change the result.)
What is the proper way to add custom tags?
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 1374 bytes --]
[-- Attachment #2: 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Custom tags, revisited
2018-06-26 18:26 Custom tags, revisited Rik
@ 2018-06-26 22:59 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2018-06-26 22:59 UTC (permalink / raw)
To: mailing list for ConTeXt users, Rik
On 6/26/2018 8:26 PM, Rik wrote:
> In September 2015 thread "Custom XML Export," Hans instructed us on how
> to create custom tags. The example he presented is:
>
> \setupbackend[export=yes]
>
> \definehighlight[this]
>
> \starttext
> \startelement[what]
> \this{that} \input ward
> \stopelement
> \stoptext
>
> When that example is run with the current (2018-06-25) beta or TL18,
> there is no html body:
>
> </head>
> <body>
> <div class="document" xmlns="http://www.pragma-ade.com/context/export">
>
> <div class="warning">Rendering can be suboptimal because there is no default/fallback css loaded.</div>
>
> <div>
> <div class="metadata">
> </div>
> </div>
>
> </div>
> </body>
> </html>
>
> Further experimentation suggests that \startelement is gobbling the
> output. (Adding \setupstructure does not change the result.)
>
> What is the proper way to add custom tags?
\setelementbackendtag[what]
\setelementnature[what][inline]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-26 22:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 18:26 Custom tags, revisited Rik
2018-06-26 22:59 ` Hans Hagen
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).