Re: [NTG-context] environment flushright

2016-06-13 Thread Hans Hagen

On 6/11/2016 10:48 AM, Wolfgang Schuster wrote:

Hans Hagen 
10. Juni 2016 um 19:06


as usual the question is then ... what keywords etc (maybe wolfgang
has a suggestion)

When you don’t want a new variable you can use "end".


next beta

\starttext

\showframe \showboxes

\setupalign[end]

\dostepwiserecurse{5}{8}{1}{
\hsize #1cm
What does happen with a short paragraph?\par
}

\stoptext


The alignment doesn’t work well with short paragraphs.


lua magic needed

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] environment flushright

2016-06-11 Thread Wolfgang Schuster

Hans Hagen 
10. Juni 2016 um 19:06


as usual the question is then ... what keywords etc (maybe wolfgang 
has a suggestion)

When you don’t want a new variable you can use "end".


The alignment doesn’t work well with short paragraphs.

%% begin example
\starttext

\showframe

\leftskip\zeropoint plus  \plustwo\bodyfontsize
\rightskip   \zeropoint plus  1fill
\parfillskip \zeropoint plus -1fill
\spaceskip   \interwordspace
\xspaceskip  .5\emwidth

What does happen with a short paragraph?

Make it even shorter!

\stoptext
%% end example

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
___

Re: [NTG-context] environment flushright

2016-06-11 Thread Wolfgang Schuster

Aditya Mahajan 
10. Juni 2016 um 17:56
On Fri, 10 Jun 2016, Hans Hagen wrote:


Would it be useful to add this (and middle align last line) as two new 
alignment options?

You can center the last line in a paragraph with the "last" keyword.

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
___

Re: [NTG-context] environment flushright

2016-06-10 Thread Aditya Mahajan

On Fri, 10 Jun 2016, Hans Hagen wrote:


On 6/10/2016 5:56 PM, Aditya Mahajan wrote:

On Fri, 10 Jun 2016, Hans Hagen wrote:


\leftskip\zeropoint plus  \plustwo\bodyfontsize
\rightskip   \zeropoint plus  1fill
\parfillskip \zeropoint plus -1fill
\spaceskip   \interwordspace
\xspaceskip  .5\emwidth


Would it be useful to add this (and middle align last line) as two new
alignment options?


as usual the question is then ... what keywords etc (maybe wolfgang has 
a suggestion)


My suggestion will be 'lastmiddle' and 'lastright'. Would it be possible 
to define these in such a way that


\startalignment[flushleft,lastright]
 and
\startalignment[normal,lastright]

both "do the right thing". If only lastright (or lastmiddle) is used, that 
should be equal to "normal,lastright".


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

Re: [NTG-context] environment flushright

2016-06-10 Thread Hans Hagen

On 6/10/2016 5:56 PM, Aditya Mahajan wrote:

On Fri, 10 Jun 2016, Hans Hagen wrote:


\leftskip\zeropoint plus  \plustwo\bodyfontsize
\rightskip   \zeropoint plus  1fill
\parfillskip \zeropoint plus -1fill
\spaceskip   \interwordspace
\xspaceskip  .5\emwidth


Would it be useful to add this (and middle align last line) as two new
alignment options?


as usual the question is then ... what keywords etc (maybe wolfgang has 
a suggestion)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] environment flushright

2016-06-10 Thread Aditya Mahajan

On Fri, 10 Jun 2016, Hans Hagen wrote:


\leftskip\zeropoint plus  \plustwo\bodyfontsize
\rightskip   \zeropoint plus  1fill
\parfillskip \zeropoint plus -1fill
\spaceskip   \interwordspace
\xspaceskip  .5\emwidth


Would it be useful to add this (and middle align last line) as two new 
alignment options?


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

Re: [NTG-context] environment flushright

2016-06-10 Thread Hans Hagen

On 6/10/2016 2:42 PM, Thomas A. Schmitz wrote:



On 10 Jun 2016, at 13:22, Wolfgang Schuster  wrote:

Is indenting a solution for you?

\definenarrower
  [thomas]
  [left=4cm,
   default=left,
   before={\setupindenting[yes,-4cm]}]


Hi Wolfgang,

thanks for your suggestion. That’s what I have right now, but this won’t make 
the lines flushright, and that’s what the publisher wants. I have every line of 
translation wrapped into an environment, and there is never more that one line 
break, so my question boils down to: how can I inject a \hfill after this line 
break? Or any low level trickery with \rlap etc.?


\starttext

\showframe

\setuplayout[width=4cm]

% \raggedright

\leftskip\zeropoint plus  \plustwo\bodyfontsize
\rightskip   \zeropoint plus  1fill
\parfillskip \zeropoint plus -1fill
\spaceskip   \interwordspace
\xspaceskip  .5\emwidth

but just a test for a very long line

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] environment flushright

2016-06-10 Thread Thomas A. Schmitz

> On 10 Jun 2016, at 13:22, Wolfgang Schuster  
> wrote:
> 
> Is indenting a solution for you?
> 
> \definenarrower
>   [thomas]
>   [left=4cm,
>default=left,
>before={\setupindenting[yes,-4cm]}]

Hi Wolfgang, 

thanks for your suggestion. That’s what I have right now, but this won’t make 
the lines flushright, and that’s what the publisher wants. I have every line of 
translation wrapped into an environment, and there is never more that one line 
break, so my question boils down to: how can I inject a \hfill after this line 
break? Or any low level trickery with \rlap etc.?

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

Re: [NTG-context] environment flushright

2016-06-10 Thread Wolfgang Schuster

Thomas A. Schmitz 
8. Juni 2016 um 12:11
Hi all,

for a translation of poetry, I would like to have an environment which 
will typeset a split line in a way that the second part will be 
flushright - is this possible? So instead of


bla bla bla bla
bla

I get

bla bla bla bla
bla

if (and only if) there’s a line break.

Thanks, and all best

Is indenting a solution for you?

\definenarrower
  [thomas]
  [left=4cm,
   default=left,
   before={\setupindenting[yes,-4cm]}]

\starttext

\startnarrow[thomas]
\input knuth
\stopnarrow

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