From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101123 Path: news.gmane.org!.POSTED!not-for-mail From: Rik Newsgroups: gmane.comp.tex.context Subject: Custom tags, revisited Date: Tue, 26 Jun 2018 14:26:34 -0400 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8355830041392874156==" X-Trace: blaine.gmane.org 1530037506 24566 195.159.176.226 (26 Jun 2018 18:25:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 26 Jun 2018 18:25:06 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 26 20:25:01 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXseD-0006Fy-DJ for gctc-ntg-context-518@m.gmane.org; Tue, 26 Jun 2018 20:25:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8D9B53A995; Tue, 26 Jun 2018 20:26:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k9ndfid-MCTN; Tue, 26 Jun 2018 20:26:50 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id DB5313A99A; Tue, 26 Jun 2018 20:26:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A2A693A996 for ; Tue, 26 Jun 2018 20:26:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xMHy3OSwIUZU for ; Tue, 26 Jun 2018 20:26:48 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 53B113A995 for ; Tue, 26 Jun 2018 20:26:38 +0200 (CEST) Original-Received: from [192.168.201.199] (cpe-24-194-22-135.nycap.res.rr.com [24.194.22.135]) by mailbackend.panix.com (Postfix) with ESMTPSA id 21F0E3647B for ; Tue, 26 Jun 2018 14:26:36 -0400 (EDT) Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101123 Archived-At: This is a multi-part message in MIME format. --===============8355830041392874156== Content-Type: multipart/alternative; boundary="------------6FCED935225E191306A21D06" Content-Language: en-US This is a multi-part message in MIME format. --------------6FCED935225E191306A21D06 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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:                
Rendering can be suboptimal because there is no default/fallback css loaded.
 
       
    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 --------------6FCED935225E191306A21D06 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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

--------------6FCED935225E191306A21D06-- --===============8355830041392874156== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8355830041392874156==--