ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: MF <massifr@fastwebnet.it>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: CSS selector for elements strictly preceded by other elements
Date: Thu, 02 Aug 2018 10:20:58 +0200	[thread overview]
Message-ID: <24e1c9860cc0043b1d4d6a8f069c4f26f1b43650.camel@fastwebnet.it> (raw)

Hello list,
please consider these XML snippets:

<e/>some text<f/>

<e/>some text<h>blah blah</h>some other text<f/>

<e/><f/>

now apply these CSS selectors to them:

e ~ f matches all

e + f matches the first and the third

There's no CSS selector to match ONLY the third.

But i have a use case for that: sometimes i have endnote markers that
immediately follow footnote markers.
Since -- in my layout -- footnotes have letter markers and endnotes
numbers, it results in something like "c30" in superscript.
It would be nice putting a comma between them ("c,30") or a thin space,
but the "e + f" selector does not discriminate between:

blah blah<footnote-ref idref="c"/><endnote-ref idref="30"/>

and

blah blah<footnote-ref idref="d"/> some other text <endnote-ref
idref="31"/>

it would match both, but it's only the first one that i want to catch.

I'd suggest a non-standard "e ++ f" operator.
Would you prefer a lpath expression (which one)?

Greetings,
Massi
___________________________________________________________________________________
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:[~2018-08-02  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  8:20 MF [this message]
2018-08-02 17:52 ` Hans Hagen
2018-08-03 14:31   ` MF
2018-08-04 10:10     ` 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=24e1c9860cc0043b1d4d6a8f069c4f26f1b43650.camel@fastwebnet.it \
    --to=massifr@fastwebnet.it \
    --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).