ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* different prefixsegments for \in
@ 2021-06-04 17:56 Pablo Rodriguez
  0 siblings, 0 replies; only message in thread
From: Pablo Rodriguez @ 2021-06-04 17:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

  \setupreferencestructureprefix
    [default]
    [prefixsegments=*:*]
  \starttext
  \section{One Section}
  \subsection[sec0]{Subsection}
  As told in \in[sec0] and \in[sec1]…
  \section{Another Section}
  \subsection[sec1]{Subsection}
  …
  \stoptext

The output reads:

  As told in 1.1 and 2.1…

I would like to be able to supress the section number in the reference,
if the current section is the same as the referenced one.

I mean, I would like that the output reads:

  As told in 1 and 2.1…

Which would be the way to do it automatically?

BTW, in my real--world document, I need to remove part and chapter
numbers from the reference when in the same part and chapter (when
compiling XML sources).

Many thanks for your help,

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-04 17:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 17:56 different prefixsegments for \in Pablo Rodriguez

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