ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Right-to-left pagecolumns and markings in ConTeXt
@ 2020-04-28 12:09 Joey McCollum
  2020-04-28 13:34 ` Hans Hagen
  2020-04-28 14:32 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Joey McCollum @ 2020-04-28 12:09 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2214 bytes --]

I am trying to typeset a two-column text in a right-to-left language using
ConTeXt. Because I want footnotes in this text to be set ragged-bottom, I
am using pagecolumns instead of standard columns. I also want to track the
first and last textual division markers on each page using markings.
Combining all of these ingredients seems to create a problem in ConTeXt:
when the pagecolumns are set in right-to-left order, the top and bottom
marks fetched are always the top and bottom marks in the left column, while
the true top mark should be the top mark of the right column. I've observed
this behavior using text in an actual right-to-left language, but the
following minimal (non-)working example with an English sample text
demonstrates the same behavior:

```
%Create a new markset to use:
\definemarking[TestMark]
%Setup header to reflect top and bottom marks:
\setupheadertexts[top: {\fetchmark[TestMark][top]}][bottom:
{\fetchmark[TestMark][bottom]}][top: {\fetchmark[TestMark][top]}][bottom:
{\fetchmark[TestMark][bottom]}] %even left, even right, odd left, odd right
%Setup the columns layout:
\definepagecolumns [example] [
    n=2, %number of columns
    direction=reverse, %does not work if ending comma is removed!
]
\starttext
\startpagecolumns[example]
    \marking[TestMark]{1}(1) \input knuth\par
    \marking[TestMark]{2}(2) \input knuth\par
    \marking[TestMark]{3}(3) \input knuth\par
    \marking[TestMark]{4}(4) \input knuth\par
    \marking[TestMark]{5}(5) \input knuth\par
    \marking[TestMark]{6}(6) \input knuth\par
    \marking[TestMark]{7}(7) \input knuth\par
    \marking[TestMark]{8}(8) \input knuth\par
\stoppagecolumns
\stoptext
```

I typeset this using ConTeXt version 2020.03.10, as released with TeXLive
2020. As my comment in the MWE points out, there also seems to be a bug in
the key-value parsing of \definepagecolumns that causes it not to parse the
direction=reverse input unless it is followed by a comma.

Is there some way I can improve my syntax to avoid this issue, or is it
just a bug that needs to be fixed? I've tried fetching other marks (e.g.,
first and last), but the only marks that ConTeXt seems to find are the ones
for the left column.

Thank you,

Joey

[-- Attachment #1.2: Type: text/html, Size: 2458 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Right-to-left pagecolumns and markings in ConTeXt
  2020-04-28 12:09 Right-to-left pagecolumns and markings in ConTeXt Joey McCollum
@ 2020-04-28 13:34 ` Hans Hagen
  2020-04-29 13:39   ` Joey McCollum
  2020-04-28 14:32 ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-04-28 13:34 UTC (permalink / raw)
  To: ntg-context@ntg.nl >> mailing list for ConTeXt users
	<ntg-context@ntg.nl

On 4/28/2020 2:09 PM, Joey McCollum wrote:
> I am trying to typeset a two-column text in a right-to-left language 
> using ConTeXt. Because I want footnotes in this text to be set 
> ragged-bottom, I am using pagecolumns instead of standard columns. I 
> also want to track the first and last textual division markers on each 
> page using markings. Combining all of these ingredients seems to create 
> a problem in ConTeXt: when the pagecolumns are set in right-to-left 
> order, the top and bottom marks fetched are always the top and bottom 
> marks in the left column, while the true top mark should be the top mark 
> of the right column. I've observed this behavior using text in an actual 
> right-to-left language, but the following minimal (non-)working example 
> with an English sample text demonstrates the same behavior:
> 
> ```
> %Create a new markset to use:
> \definemarking[TestMark]
> %Setup header to reflect top and bottom marks:
> \setupheadertexts[top: {\fetchmark[TestMark][top]}][bottom: 
> {\fetchmark[TestMark][bottom]}][top: 
> {\fetchmark[TestMark][top]}][bottom: {\fetchmark[TestMark][bottom]}] 
> %even left, even right, odd left, odd right
> %Setup the columns layout:
> \definepagecolumns [example] [
>      n=2, %number of columns
>      direction=reverse, %does not work if ending comma is removed!
> ]
> \starttext
> \startpagecolumns[example]
>      \marking[TestMark]{1}(1) \input knuth\par
>      \marking[TestMark]{2}(2) \input knuth\par
>      \marking[TestMark]{3}(3) \input knuth\par
>      \marking[TestMark]{4}(4) \input knuth\par
>      \marking[TestMark]{5}(5) \input knuth\par
>      \marking[TestMark]{6}(6) \input knuth\par
>      \marking[TestMark]{7}(7) \input knuth\par
>      \marking[TestMark]{8}(8) \input knuth\par
> \stoppagecolumns
> \stoptext
> ```
> 
> I typeset this using ConTeXt version 2020.03.10, as released with 
> TeXLive 2020. As my comment in the MWE points out, there also seems to 
> be a bug in the key-value parsing of \definepagecolumns that causes it 
> not to parse the direction=reverse input unless it is followed by a comma.
> 
> Is there some way I can improve my syntax to avoid this issue, or is it 
> just a bug that needs to be fixed? I've tried fetching other marks 
> (e.g., first and last), but the only marks that ConTeXt seems to find 
> are the ones for the left column.
what if you prefix with column:, like column:top and so

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Right-to-left pagecolumns and markings in ConTeXt
  2020-04-28 12:09 Right-to-left pagecolumns and markings in ConTeXt Joey McCollum
  2020-04-28 13:34 ` Hans Hagen
@ 2020-04-28 14:32 ` Hans Hagen
  2020-04-28 17:05   ` Joey McCollum
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-04-28 14:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/28/2020 2:09 PM, Joey McCollum wrote:

> Is there some way I can improve my syntax to avoid this issue, or is it 
> just a bug that needs to be fixed? I've tried fetching other marks 
> (e.g., first and last), but the only marks that ConTeXt seems to find 
> are the ones for the left column.
column:top etc

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Right-to-left pagecolumns and markings in ConTeXt
  2020-04-28 14:32 ` Hans Hagen
@ 2020-04-28 17:05   ` Joey McCollum
  0 siblings, 0 replies; 5+ messages in thread
From: Joey McCollum @ 2020-04-28 17:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1657 bytes --]

Thanks! Replacing "top" and "bottom" with "column:top" and "column:bottom"
didn't make the MWE work, but once you pointed out that the locations of
the marks to be fetched had to be column-specific, I started looking
through the mailing list and found something that worked. I just had to
change the \fetchmark calls in my MWE to \getmarking[TestMark][1][top] and
\getmarking[TestMark][2][bottom].

On Tue, Apr 28, 2020 at 10:32 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 4/28/2020 2:09 PM, Joey McCollum wrote:
>
> > Is there some way I can improve my syntax to avoid this issue, or is it
> > just a bug that needs to be fixed? I've tried fetching other marks
> > (e.g., first and last), but the only marks that ConTeXt seems to find
> > are the ones for the left column.
> column:top etc
>
> -----------------------------------------------------------------
>                                            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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2716 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 5+ messages in thread

* Re: Right-to-left pagecolumns and markings in ConTeXt
  2020-04-28 13:34 ` Hans Hagen
@ 2020-04-29 13:39   ` Joey McCollum
  0 siblings, 0 replies; 5+ messages in thread
From: Joey McCollum @ 2020-04-29 13:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4881 bytes --]

If I change the line containing that in my MWE to


\setupheadertexts[top: {\getmarking[TestMark][column:top]}][bottom:
{\getmarking[TestMark][column:bottom]}][top:
{\getmarking[TestMark][column:top]}][bottom:
{\getmarking[TestMark][column:bottom]}]

or


\setupheadertexts[top: {\fetchmark[TestMark][column:top]}][bottom:
{\fetchmark[TestMark][column:bottom]}][top:
{\fetchmark[TestMark][column:top]}][bottom:
{\fetchmark[TestMark][column:bottom]}]


then the problem is not fixed. Is this what you had in mind, or were you
suggesting to use it in conjunction with the column number as a second
argument? In that case, the line would look like


\setupheadertexts[top: {\getmarking[TestMark][1][column:top]}][bottom:
{\getmarking[TestMark][2][column:bottom]}][top:
{\getmarking[TestMark][1][column:top]}][bottom:
{\getmarking[TestMark][2][column:bottom]}]


If I use that line, then I do get markings from the first column (i.e., the
right column in this case), but they don't seem to be correct; marking 1
isn't referenced in the header of the first page, and the first new mark on
the second page is treated as the top mark for that page, rather than the
current mark at the time the second page begins (which may be correct, but
still does not seem consistent with the behavior on the first page). If
this is the correct behavior, then is there something I should change in my
syntax to make marking "1" appear as the top mark for that page?

On Wed, Apr 29, 2020 at 7:22 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 4/28/2020 2:09 PM, Joey McCollum wrote:
> > I am trying to typeset a two-column text in a right-to-left language
> > using ConTeXt. Because I want footnotes in this text to be set
> > ragged-bottom, I am using pagecolumns instead of standard columns. I
> > also want to track the first and last textual division markers on each
> > page using markings. Combining all of these ingredients seems to create
> > a problem in ConTeXt: when the pagecolumns are set in right-to-left
> > order, the top and bottom marks fetched are always the top and bottom
> > marks in the left column, while the true top mark should be the top mark
> > of the right column. I've observed this behavior using text in an actual
> > right-to-left language, but the following minimal (non-)working example
> > with an English sample text demonstrates the same behavior:
> >
> > ```
> > %Create a new markset to use:
> > \definemarking[TestMark]
> > %Setup header to reflect top and bottom marks:
> > \setupheadertexts[top: {\fetchmark[TestMark][top]}][bottom:
> > {\fetchmark[TestMark][bottom]}][top:
> > {\fetchmark[TestMark][top]}][bottom: {\fetchmark[TestMark][bottom]}]
> > %even left, even right, odd left, odd right
> > %Setup the columns layout:
> > \definepagecolumns [example] [
> >      n=2, %number of columns
> >      direction=reverse, %does not work if ending comma is removed!
> > ]
> > \starttext
> > \startpagecolumns[example]
> >      \marking[TestMark]{1}(1) \input knuth\par
> >      \marking[TestMark]{2}(2) \input knuth\par
> >      \marking[TestMark]{3}(3) \input knuth\par
> >      \marking[TestMark]{4}(4) \input knuth\par
> >      \marking[TestMark]{5}(5) \input knuth\par
> >      \marking[TestMark]{6}(6) \input knuth\par
> >      \marking[TestMark]{7}(7) \input knuth\par
> >      \marking[TestMark]{8}(8) \input knuth\par
> > \stoppagecolumns
> > \stoptext
> > ```
> >
> > I typeset this using ConTeXt version 2020.03.10, as released with
> > TeXLive 2020. As my comment in the MWE points out, there also seems to
> > be a bug in the key-value parsing of \definepagecolumns that causes it
> > not to parse the direction=reverse input unless it is followed by a
> comma.
> >
> > Is there some way I can improve my syntax to avoid this issue, or is it
> > just a bug that needs to be fixed? I've tried fetching other marks
> > (e.g., first and last), but the only marks that ConTeXt seems to find
> > are the ones for the left column.
> what if you prefix with column:, like column:top and so
>
> -----------------------------------------------------------------
>                                            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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 6780 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2020-04-29 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 12:09 Right-to-left pagecolumns and markings in ConTeXt Joey McCollum
2020-04-28 13:34 ` Hans Hagen
2020-04-29 13:39   ` Joey McCollum
2020-04-28 14:32 ` Hans Hagen
2020-04-28 17:05   ` Joey McCollum

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