ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>,
	"kauśika cittūr" <citturs@gmail.com>
Cc: Hans Hagen <j.hagen@xs4all.nl>,
	Benjamin Buchmuller <benjamin.buchmuller@gmail.com>
Subject: Re: Line breaks, \wordright and hyphenation
Date: Sun, 24 Oct 2021 14:01:32 +0200	[thread overview]
Message-ID: <6030c934-e131-b13e-9be9-ce5d3bd186f3@xs4all.nl> (raw)
In-Reply-To: <8BE00BF6-54C8-49BA-8948-B6AB31902380@gmail.com>

On 10/24/2021 1:08 PM, Benjamin Buchmuller via ntg-context wrote:
> Maybe
> 
> \hfill author

It's anyway nicer to use

% \definenarrower
%   [amnata]
%   [left=\measure{amnatamargin},
%    right=\measure{amnatamargin},
%    default={left,right}]

\definenarrower
   [amnata]
   [middle=\measure{amnatamargin}]

but then them, the fact that we get something hyphenated interferes .. 
tricky

>> On 24. Oct 2021, at 04:12, kauśika cittūr <citturs@gmail.com> wrote:
>>
>> Dear list,
>>
>> In short, my question is: why does \wordright cause a line-break when the line
>> preceding it breaks with hyphenation and does not otherwise? How to avoid it
>> (if at all possible)?
>>
>> I have this delimitedtext instance called 'amnata' defined as below:
>>
>> \definemeasure[amnatamargin][3cm]
>> \definedelimitedtext
>>   [amnata]
>> \setupdelimitedtext
>>   [amnata]
>>   [
>>     left=,
>>     right=,
>>     leftmargin={\measure{amnatamargin}},
>>     rightmargin={\measure{amnatamargin}},
>>   ]
>>
>> I am using this to quote paragraph(s) of other authors.
>> Since, I also want to indicate where the quote is from, I use this as follows:
>>
>> \startamnata
>>   ⋮
>> \wordright{author}
>> \stopamnata
>>
>> so that the author's name appears at the right-edge of the block.
>>
>> When the penultimate line inside the block breaks without hyphenation, then
>> argument of \wordright is typeset as expected (i.e. in the same line).
>>
>> On the other hand, when the penultimate line inside this block breaks with
>> hyphenation, the argument of \wordright is pushed to the next line even when
>> there is enough space for it on the same line.
>>
>> Here is a sample illustrating this:
>>
>> \startamnata
>> A quote from another author : Suppose that thereisalongwordhere.
>> \wordright{– author}
>> \stopamnata
>>
>> \startamnata
>> A quote from another author : Here, the text does not cause
>> hyphenation in the first line.
>> \wordright{– author}
>> \stopamnata
>>
>> [I have attached the output here as an image]
>>
>> How do I ensure that this does not happen, if that is possible at all? I
>> suppose this is expected behaviour but I am not able to understand why.
>>
>> Thanks,
>> kauśika
>> <sample-output.png>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

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

  reply	other threads:[~2021-10-24 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24 11:08 Benjamin Buchmuller via ntg-context
2021-10-24 12:01 ` Hans Hagen via ntg-context [this message]
2021-10-24 12:41   ` kauśika cittūr via ntg-context
  -- strict thread matches above, loose matches on Subject: below --
2021-10-24  2:12 kauśika cittūr via ntg-context
2021-10-24  7:24 ` kauśika cittūr via ntg-context
2021-10-25  2:04 ` kauśika cittūr via ntg-context

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=6030c934-e131-b13e-9be9-ce5d3bd186f3@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=benjamin.buchmuller@gmail.com \
    --cc=citturs@gmail.com \
    --cc=j.hagen@xs4all.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).