ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* changing alignment inside a paragraph
@ 2019-12-10 11:27 mf
  2019-12-10 17:07 ` Wolfgang Schuster
  2019-12-11 14:31 ` mf
  0 siblings, 2 replies; 6+ messages in thread
From: mf @ 2019-12-10 11:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello list, is there a way to achieve this?

\def\FlushRightFromNextLine{\relax}
\setupnarrower[left=0cm,right=11cm]
\setupalign[stretch]
\starttext
This is what I'd like to type in my source:\par
\blank
\type{This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.}\par
\blank
This is the normal result:\par
\blank
\startnarrower[right]
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.
\stopnarrower
\blank
This is the expected result:\par
\blank
\startnarrower[right]
\parfillskip=0pt This is the text of an index term, that is normally 
justified,
but I'd like the page numbers to be flushed to the right from
their second line 34, 57,\par
\penalty10000 % no page break in the middle of page numbers
\startalignment[flushright]
101-104, 276, 345, 401-403.\par
\stopalignment
\stopnarrower
\stoptext

The expected result is to be intended visually, because there might be 
no need to break the text into two paragraphs.

Thanks,
Massi
___________________________________________________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2019-12-12 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 11:27 changing alignment inside a paragraph mf
2019-12-10 17:07 ` Wolfgang Schuster
2019-12-11 14:31 ` mf
2019-12-11 20:25   ` Wolfgang Schuster
2019-12-12 14:56     ` mf
2019-12-12 20:43       ` Wolfgang Schuster

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