ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: insert tags in export xml
Date: Sun, 12 Nov 2017 14:18:04 +0100	[thread overview]
Message-ID: <5A084A0C.2010407@gmail.com> (raw)
In-Reply-To: <4F169CEA-AB64-42D5-AFD0-16F55776BA0C@fiee.net>


[-- 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
___________________________________________________________________________________

      reply	other threads:[~2017-11-12 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  9:57 Henning Hraban Ramm
2017-11-12 13:18 ` Wolfgang Schuster [this message]

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=5A084A0C.2010407@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --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).