Re: [NTG-context] Line numbering in two column layout conflicts with marking

2020-01-07 Thread Oliver von Criegern

Using \definepagecolumns[xyz][n=2] instead of \setupcolumns[n=2]
and \startpagecolumns[xyz] etc. instead of \startcolumns etc.
seems to do what I want, except that the columns of the last page
aren't balanced any more.

Anyway, pagecolumns seems to be experimental.
The manual says "Don't use page columns in production".


Am 23.12.19 um 12:02 schrieb Wolfgang Schuster:

Oliver von Criegern schrieb am 18.12.2019 um 17:39:

So there seems to be no solution for this?


Not a solution but pagecolumns show the correct marks even with line 
numbering.


Wolfgang


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-18 Thread Oliver von Criegern

So there seems to be no solution for this?

Am 09.12.19 um 15:18 schrieb Oliver von Criegern:

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-09 Thread Oliver von Criegern

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


[NTG-context] Line numbering in two column layout conflicts with marking

2019-12-02 Thread Oliver von Criegern

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second page.


Without linenumbering, the header of the first page reads "ONE -- TWO", 
as is to be expected.


Best regards,
Oliver


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


Re: [NTG-context] Cross references to column numbers

2019-11-15 Thread Oliver von Criegern

Could someone please take a look at this?

Am 12.11.19 um 13:02 schrieb Oliver von Criegern:

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

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:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


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:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column 
\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},

line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

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 as follows:


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.


Best regards,
Oliver




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,
Oliver.


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:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



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

-
  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@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
___________ 




--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Gop

Re: [NTG-context] Cross references to column numbers

2019-11-12 Thread Oliver von Criegern

Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

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:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans


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:


\setupcolumns[
    n=2,
]
\setuplinenumbering[
    step=5,
    method=page,
]

\def\Lab#1{%
\pagereference[#1]%
\pagereference[column:#1]%
\someline[#1]%
}

\def\Ref#1{
page \at[#1],
column \doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{},
line \inlinerange[#1].
}

\starttext
\startcolumns
\startlinenumbering

REFERENCES:\par
A: \Ref{A}\par
B: \Ref{B}\par
C: \Ref{C}\par
D: \Ref{D}\par
E: \Ref{E}\par
F: \Ref{F}\par
\input lorem
TARGETS:
\Lab{A} A,
\Lab{B} B,
\Lab{C} C.
\input lorem
TARGETS:
\Lab{D} D,
\Lab{E} E,
\Lab{F} F.
\input lorem

\stoplinenumbering
\stopcolumns
\stoptext

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 
as follows:


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.


Best regards,
Oliver




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,
Oliver.


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:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



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

-
  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@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
_______ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___

Re: [NTG-context] Cross references to column numbers

2019-09-10 Thread Oliver von Criegern


Am 10.09.19 um 13:16 schrieb Hans Hagen:

On 9/9/2019 10:05 PM, Henri Menke wrote:

Bump

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:


\pagereference[column:#1]

\doifelsereferencefound{column:#1}{\number\referencecolumnnumber}{}

in the next beta,

Hans



This would be great, thanks!

Best regards,
Oliver




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,
Oliver.


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:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



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

-
  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@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
_______ 



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


Re: [NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-06 Thread Oliver von Criegern
Many thanks for your response, but unfortunately it does not solve my 
problem. In your solution, var in TestVarB is the identifier of the 
reference, which is "1", but I need the value of the reference, that is, 
the number of the line where the \someline command is being called, 
which is "31" or so. I want to access the value in Lua to do some 
calculations on it before returning the result to TeX.


Best regards,
Oliver

Am 05.09.19 um 14:41 schrieb Hans Hagen:

On 9/4/2019 7:37 PM, Oliver von Criegern wrote:

So how can I pass the value of my reference to Lua?


\setupreferencing[state=start]

\definenumber[test]
\setnumber[test][5]

\startluacode
function TestVarA(var)
    print('VARIABLE A: ',var)
    context(var)
end

function TestVarB(var)
    print('VARIABLE B: ',var)
    context.inlinerange { var }
end
\stopluacode

\def\TestLuaA#1{\ctxlua{TestVarA(#1)}}
\def\TestLuaB#1{\ctxlua{TestVarB(#1)}}

\startbuffer[testtext]
    \dorecurse{100}{Words, words, words. }
\stopbuffer

\starttext

\startlinenumbering

Counter: \TestLuaA{\rawcountervalue[test]}\par
Lineref: \TestLuaB{1} \par

\getbuffer[testtext]

\someline[1]LABEL 1

\stoplinenumbering


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-------------


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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
___


[NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-04 Thread Oliver von Criegern

Dear list members,

I want to process cross-references in ConTeXt/LuaTeX, that is, to do 
some calculations in Lua with the page and line numbers returned by the 
\at and \inlinerange commands.


But this does not work, as these commands are obviously not being 
expanded before they are passed to Lua.


Here is a minimal example:


|\setupreferencing[state=start]||\definenumber[test]\setnumber[test][5]\startluacodefunction 
TestVar(var)print('VARIABLE: ')print(var)tex.print(var)end 
\stopluacode\def\TestLua#1{\ctxlua{TestVar([==[#1]==])}}% Cf. 
https://www.contextgarden.net/Programming_in_LuaTeX\startbuffer[testtext]\dorecurse{100}{Words, 
words, words. }\stopbuffer\starttext\startlinenumberingCounter: 
\TestLua{\rawcountervalue[test]}\par% The counter is expanded before 
being passed to Lua.Lineref: \TestLua{\inlinerange[1]}\par% The line 
reference is not expanded before being passed to 
Lua.\getbuffer[testtext]\someline[1]LABEL 1 \stoplinenumbering\stoptext|||



\TestLua just passes the argument to the Lua command TestVar, which 
prints it to stdout and returns it to TeX. The pdf result looks good at 
first glance, showing the correct values as expected, but in stdout we read:


|VARIABLE: 5 VARIABLE: \inlinerange[1] |||

The line reference obviously has not been expanded before but only after 
having been passed to the Lua command. Accordingly, when trying to 
perform mathematical calculations on it in Lua, there will be an error.


So how can I pass the value of my reference to Lua?

Best regards,
Oliver


||

___
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
___


Re: [NTG-context] Cross references to column numbers

2019-09-02 Thread Oliver von Criegern

Dear list members,

is there any way to get a cross reference to a column in a two column 
layout?


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,
Oliver.


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:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers 



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?


Best regards,
Oliver.



___
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
___


[NTG-context] Cross references to column numbers

2019-08-12 Thread 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:
https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers

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?


Best regards,
Oliver.


___
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
___


Re: [NTG-context] Nested Column Layout

2019-08-06 Thread Oliver von Criegern

Hello Walter,

seems to me something which could be done using columnsets. (But I 
didn't use them yet.)


See here:
https://wiki.contextgarden.net/Columns#Column_Sets

And in the manual
http://www.pragma-ade.com/general/manuals/columns.pdf
see especially the examples on pages 11 and 13-14.

Best regards, Oliver.


Am 06.08.19 um 00:41 schrieb Walter Mays:

Hello all,

I am trying to lay out a page that has a 2/3 column split, and then
nest another set of 3 columns inside the larger of the two outer
columns. In case that's not clear, I've attached a PNG that shows
approximately what I would like to achieve.

Here's what I've tried:

```
\defineparagraphs[TwoThirds][n=2]
\setupparagraphs[TwoThirds][1][width=0.33\textwidth]

\starttext

\startTwoThirds

\input tufte

\nextTwoThirds

\input tufte

\startcolumns[n=3]
\input tufte
\stopcolumns

\stopTwoThirds

\stoptext
```

Instead of doing what I described, it made the contents of that inner
column very narrow, but does not split it across columns. The \column
command seems to have no effect.

Thank you for your help,

Walter

___
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
___
___
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
___


[NTG-context] In a two column layout, activate line numbering for one column only

2019-07-30 Thread Oliver von Criegern

Dear list members,

I am trying to recreate a layout for some dictionary with ConTeXt. It is 
a two column layout with line numbering between the columns, that is, 
there is only one numbering for both columns. How can I do this with 
ConTeXt?


I would need either an option to activate line numbering only for one 
column, which, as far as I can see, does not exist; or I could use the 
"command" option for "\setuplinenumbering" to make the line numbers 
dissappear for one column, but then I would need some way to decide 
whether a line number belongs to the first or to the second column, some 
command that returns to me the number of the actual column, which I 
can't find, too.


For illustration, I give a minimal example:


||\setuppapersize[A4][A4]\setupbodyfont[9pt]||
|||\setupcolumns[n=2, distance=1cm, ]\setuplinenumbering[step=5, 
method=page, location=right, align=flushright, 
width=.25cm]\starttext\startcolumns\startlinenumbering\dorecurse{10}{\inputlorem}\par\stoplinenumbering\stopcolumns\stoptext|||



In the result, there are (as is to be expected) line numbers between 
both columns and also to the right of the second column. How can I get 
rid of the latter ones?


(For the pdf result see also: 
https://tex.stackexchange.com/questions/501269/context-how-to-have-line-numbering-in-a-two-column-layout-for-one-column-only). 



Best regards,
Oliver.


||

___
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
___