ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "talazem@fastmail.fm" <talazem@fastmail.fm>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: r2l alignment and linenumbering conflict?
Date: Sun, 2 Aug 2015 10:24:12 +0100	[thread overview]
Message-ID: <744B7EEA-9D1D-416E-AA76-7237786EBC8C@fastmail.fm> (raw)
In-Reply-To: <55BD1438.4020504@gmail.com>


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

Thanks for that, Wolfgang. I can only hope that, as the culprit is known, it can be apprehended!

Idris: here is the document that I had sent (and many thanks to you and to Pablo for the more general advice):

>  \unexpanded\def\doVariant#1#2#3%
>       {\startlinenote[#1]{#2] #3}#2\stoplinenote[#1]}
> 
>    \newcounter\countvariants
>    \unexpanded\def\variant
>       {\doglobal\increment\countvariants
>        \normalexpanded{\doVariant{Varia:\countvariants}}}
> 
> \setupalign[r2l]
> 
> \showframe \starttext 
> 
> \section{Correct}
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. Morbi id justo vitae quam rhoncus tincidunt ut adipiscing nisi.
> 
> \section{Incorrect}
> \startlinenumbering
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. Morbi id justo vitae quam rhoncus tincidunt ut adipiscing nisi.
> \stoplinenumbering
> 
> \stoptext

All the best,
Talal

> On 1 Aug 2015, at 19:47, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> 
>> talazem@fastmail.fm <mailto:talazem@fastmail.fm>	1. August 2015 17:37
>> Sorry to pester, but this problem is barring me from moving my book project into ConTeXt this weekend.
>> 
>> The use of linenumbers seems to throw off the R2L mechanism. Example of the problem attached. 
>> 
> 
> The culprit is the function "boxed.stage_two" in page.lua which output each text line in the line numbering
> environment in left to right mode. When you have justified lines everything is fine but when you have a ragged
> line (e.g. the last line in a paragraph) ConTeXt aligns the context with the left margin.
> 
> \starttext \showframe
> 
> \startalignment[righttoleft,flushleft]
> 
>     \input ward
> 
>     \blank
> 
>     \startlinenumbering
>     \input ward
>     \stoplinenumbering
> 
> \stopalignment
> 
> \stoptext
> 
> Wolfgang
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-08-02  9:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 15:30 talazem
2015-08-01 15:37 ` talazem
2015-08-01 18:04   ` Pablo Rodriguez
2015-08-01 18:35   ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-01 18:47   ` Wolfgang Schuster
2015-08-02  9:24     ` talazem [this message]
2015-08-02 11:51       ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-02 13:31         ` talazem
2015-08-02 17:15           ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-02 20:46             ` talazem
2015-08-03 13:54             ` talazem
2015-08-03 14:56               ` Hans Hagen
2015-08-03 15:13                 ` Hans Hagen
2015-08-03 15:42                   ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-03 15:56                     ` Hans Hagen
2015-08-03 16:17                       ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-03 16:06                     ` Idris Samawi Hamid ادريس سماوي حامد
2015-08-03 19:25                 ` Otared Kavian
2015-08-03 23:30                   ` Hans Hagen
2015-08-04 16:25                     ` Otared Kavian
2015-08-03 15:19               ` Hans Hagen
2015-08-03 16:29                 ` talazem
2015-08-03 16:52                   ` talazem
2015-08-04  3:46                     ` talazem
2015-08-04 21:06                       ` 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=744B7EEA-9D1D-416E-AA76-7237786EBC8C@fastmail.fm \
    --to=talazem@fastmail.fm \
    --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).