From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: dealing with footnotes and ol in XML
Date: Fri, 09 Jan 2015 13:24:25 +0100 [thread overview]
Message-ID: <54AFC879.1060402@gmx.es> (raw)
In-Reply-To: <54AFBBA9.2050801@wxs.nl>
On 01/09/2015 12:29 PM, Hans Hagen wrote:
> [...]
> I'll add this:
>
> \startluacode
> local gsub = string.gsub
> function xml.expressions.idstring(str)
> return type(str) == "string" and gsub(str,"^#","") or ""
> end
> \stopluacode
>
> \startxmlsetups xml:footnote:ref
>
> \xmlfilter{main}{div[@class='footnotes']/ol/li[@id=idstring('\xmlatt{#1}{href}')]/command(xml:footnote:set)}
> \stopxmlsetups
>
> As this id stuff happens more often.
Many thanks for your reply and the code, Hans.
I have an issue with multiparagraph footnotes. Here is the sample in
ConTeXt code:
\setuppapersize[A7]
\setupbodyfont[15pt]
\starttext
\dorecurse{2}{A footnote\footnote
{\dorecurse{2}{Footnote paragraph.\par}}}
\dorecurse{3}{B footnote\footnote
{Footnote paragraph.\par Footnote paragraph.}}
\stoptext
Footnotes that end with \par have wrong space with next footnote.
I don’t know whether this is intended. How could I avoid that in XML?
Many thanks for your help again,
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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-01-09 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 10:41 Pablo Rodriguez
2015-01-09 11:18 ` Hans Hagen
2015-01-09 11:29 ` Hans Hagen
2015-01-09 12:24 ` Pablo Rodriguez [this message]
2015-01-10 13:01 ` Hans Hagen
2015-01-11 21:01 ` Pablo Rodriguez
2015-01-11 21:58 ` Hans Hagen
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=54AFC879.1060402@gmx.es \
--to=oinos@gmx.es \
--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).