ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* insert tags in export xml
@ 2017-11-08  9:57 Henning Hraban Ramm
  2017-11-12 13:18 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Henning Hraban Ramm @ 2017-11-08  9:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Ahoi,
I’m working on ePubs again and need a bit more information in the exported xml.

E.g. I defined my own small caps macro:
\def\SC#1{{\sc\lowercase{#1}}}
to be able to say \SC{ISO} instead of changing everything into lowercase like {\sc iso}.
(I also tried OpenType features, but those were too unreliable with my fonts. That’s not the problem here.)

But my small caps end as unmarked lowercase in the exported xml.
I didn’t manage to combine my above approach with \definehighlight, but after poking around in the source (core-sys.mkiv, strc-tag.mkiv)
I found this solution:

\def\SC#1{\dostarttagged{highlight}{scaps}{\sc\lowercase{#1}}\dostoptagged}

so that \SC{ISO} becomes
<highlight detail="scaps">iso</highlight>

Works for me. Better suggestions?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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: insert tags in export xml
  2017-11-08  9:57 insert tags in export xml Henning Hraban Ramm
@ 2017-11-12 13:18 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2017-11-12 13:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1150 bytes --]


> Henning Hraban Ramm <mailto:texml@fiee.net>
> 8. November 2017 um 10:57
> Ahoi,
> I’m working on ePubs again and need a bit more information in the 
> exported xml.
>
> E.g. I defined my own small caps macro:
> \def\SC#1{{\sc\lowercase{#1}}}
> to be able to say \SC{ISO} instead of changing everything into 
> lowercase like {\sc iso}.
> (I also tried OpenType features, but those were too unreliable with my 
> fonts. That’s not the problem here.)
>
> But my small caps end as unmarked lowercase in the exported xml.
> I didn’t manage to combine my above approach with \definehighlight, 
> but after poking around in the source (core-sys.mkiv, strc-tag.mkiv)
> I found this solution:
>
> \def\SC#1{\dostarttagged{highlight}{scaps}{\sc\lowercase{#1}}\dostoptagged}
>
> so that \SC{ISO} becomes
> <highlight detail="scaps">iso</highlight>
>
> Works for me. Better suggestions?

\definehighlight[SC][style=capital]

\starttext
so that \SC{ISO} becomes
\stoptext


or


\setupsynonyms[abbreviation][synonymstyle=capital]

\abbreviation{ISO}{International Organization for Standardization}

\starttext
so that \ISO\ becomes
\stoptext


Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2250 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

end of thread, other threads:[~2017-11-12 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  9:57 insert tags in export xml Henning Hraban Ramm
2017-11-12 13:18 ` Wolfgang Schuster

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).