[NTG-context] Cross references to column numbers
Oliver von Criegern
oliver.v.criegern at badw-muenchen.de
Tue Nov 12 13:02:35 CET 2019
Am 10.09.19 um 13:16 schrieb Hans Hagen:
> On 9/9/2019 10:05 PM, Henri Menke wrote:
>> On 9/3/19 4:46 AM, Oliver von Criegern wrote:
>>> Dear list members,
>>> is there any way to get a cross reference to a column in a two
>>> column layout?
> yes and no:
> no : there is not something buil tin
> yes: one can write some hack in a few lines
> but instead of posting such a hack (which then will a live of its own)
> i'll add a feature:
> in the next beta,
Thanks for implementing this, but I am afraid it does not work properly,
at least not if there are several targets following one after another.
Consider this example:
As you will see, targets A, B and C are all in the first column, and
targets D, E and F are all in the second column. But the references read
A: page 1, column 1, line 29.
B: page 1, column 1, line 29.
C: page 1, column 2, line 29.
D: page 1, column 2, line 14.
E: page 1, column 3, line 14.
F: page 1, column 3, line 14.
>>> At least, I would need to get some value that tells me whether the
>>> target is in the left or in the right column. How to achieve this?
>>> This is the more simplified version of the my previous question
>>> cited below.
>>> Best regards,
>>> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>>>> Dear list members,
>>>> how can I create cross references to column numbers?
>>>> I have a two column layout with column numbers in the header
>>>> instead of page numbers (actually, these column numbers are
>>>> calculated from the page numbers). Now I want to create a cross
>>>> reference that returns the column number of the target. How can I
>>>> achieve this?
>>>> Of course, I can get the page number with \pagereference (for the
>>>> target) and \at (for the reference), but for calculating the column
>>>> number (according to what I did in the header), I would also need
>>>> to know whether the target is in the left or in the right column,
>>>> and I can't see how I can get this information.
>>>> For an example, see the question posted by me at stackexchange:
>>>> Besides, I am wondering, regarding the generally very regular and
>>>> consistent naming of commands in ConTeXt, why this is not so in the
>>>> case of references. For example, to refer to a page, I need
>>>> \pagereference (for the target) and \at (for the reference); to
>>>> refer to a line, I need \someline (for the target) and \inline (for
>>>> the reference), but only if I want it to automatically add the word
>>>> "line" or something else before the number, otherwise I have to use
>>>> \inlinerange. It took me some time to find that out. Wouldn't it be
>>>> easier to have just one command for the target and another one for
>>>> the reference, and everything else, as counters and headers to be
>>>> returned, text to be added etc. to be configured by options?
> Because all these \in \at \about ... give back different things (a
> title, a number, a range, a ...) and packaging all that in one macro
> doens't make it cleaner so soon users will then wrap complex calls in
> a macro of their own (which then can clash with some existing name).
> Also, the ref mechanism evolved over decades and we're not going to
> drop compatibility.
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> maillist : ntg-context at ntg.nl /
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
More information about the ntg-context