ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Forming paragraphs
@ 2011-01-23 12:38 Procházka Lukáš
  2011-01-23 13:35 ` Stefan Müller
  0 siblings, 1 reply; 3+ messages in thread
From: Procházka Lukáš @ 2011-01-23 12:38 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

Hello,

I would need to form paragraphs to such a shape:

Abc defhi jklm nop qrst uvw
   xyz. ABCDE FGHIJKL MNOPQR
   STUW XYZ.

Abc defhi jklm nop qrst uvw
   xyz. ABCDE FGHIJKL MNOPQR
   STUW XYZ.

Abc defhi jklm nop qrst uvw
   xyz. ABCDE FGHIJKL MNOPQR
   STUW XYZ.

<-- \textwidth ---------->|

I.e. paragraphs whose first lines are always \textwidth in width and whose next lines are always somehow indented.

I achieved the desired shape by the following combination of \setupnarrower and \setupindenting:

---
\starttext
   \setupnarrower[left=2em]
   \startnarrower[1*left,0*right]
     \setupindenting[yes,-2em]
     \input knuth
   \stopnarrower
\stoptext
---

But I would like to ask whether this way is "clean" enough and/or there is a better way, especially via a kind of \setup<something> command, e.g. something like:

\setupparagraph[MySpecialParagraph][first=0pt,next=2em]
...
\startparagraph[MySpecialParagraph]
   Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopparagraph

% or:

\startMySpecialParagraph
   Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopMySpecialParagraph

Kind regards,

Lukas

[-- Attachment #2: t-Para.mkiv --]
[-- Type: application/octet-stream, Size: 151 bytes --]

\starttext
  \setupnarrower[left=2em]
  \startnarrower[1*left,0*right]
    \setupindenting[yes,-2em]
    \input knuth
  \stopnarrower
\stoptext

[-- Attachment #3: t-Para.pdf --]
[-- Type: application/pdf, Size: 9406 bytes --]

[-- Attachment #4: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Forming paragraphs
  2011-01-23 12:38 Forming paragraphs Procházka Lukáš
@ 2011-01-23 13:35 ` Stefan Müller
  2011-01-23 15:06   ` Procházka Lukáš
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Müller @ 2011-01-23 13:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

did you already take a look at this?
http://wiki.contextgarden.net/Shaped_paragraphs

HTH,
Stefan.

On 23.01.2011 13:38, Procházka Lukáš wrote:
> Hello,
>
> I would need to form paragraphs to such a shape:
>
> Abc defhi jklm nop qrst uvw
> xyz. ABCDE FGHIJKL MNOPQR
> STUW XYZ.
>
> Abc defhi jklm nop qrst uvw
> xyz. ABCDE FGHIJKL MNOPQR
> STUW XYZ.
>
> Abc defhi jklm nop qrst uvw
> xyz. ABCDE FGHIJKL MNOPQR
> STUW XYZ.
>
> <-- \textwidth ---------->|
>
> I.e. paragraphs whose first lines are always \textwidth in width and
> whose next lines are always somehow indented.
>
> I achieved the desired shape by the following combination of
> \setupnarrower and \setupindenting:
>
> ---
> \starttext
> \setupnarrower[left=2em]
> \startnarrower[1*left,0*right]
> \setupindenting[yes,-2em]
> \input knuth
> \stopnarrower
> \stoptext
> ---
>
> But I would like to ask whether this way is "clean" enough and/or there
> is a better way, especially via a kind of \setup<something> command,
> e.g. something like:
>
> \setupparagraph[MySpecialParagraph][first=0pt,next=2em]
> ...
> \startparagraph[MySpecialParagraph]
> Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
> \stopparagraph
>
> % or:
>
> \startMySpecialParagraph
> Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
> \stopMySpecialParagraph
>
> Kind regards,
>
> Lukas
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Forming paragraphs
  2011-01-23 13:35 ` Stefan Müller
@ 2011-01-23 15:06   ` Procházka Lukáš
  0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš @ 2011-01-23 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

thanks for the link, this seems to do the job.

Lukas


On Sun, 23 Jan 2011 14:35:24 +0100, Stefan Müller <warrence.stm@gmx.de> wrote:

> Hi,
>
> did you already take a look at this?
> http://wiki.contextgarden.net/Shaped_paragraphs
>
> HTH,
> Stefan.
>
> On 23.01.2011 13:38, Procházka Lukáš wrote:
>> Hello,
>>
>> I would need to form paragraphs to such a shape:
>>
>> Abc defhi jklm nop qrst uvw
>> xyz. ABCDE FGHIJKL MNOPQR
>> STUW XYZ.
>>
>> Abc defhi jklm nop qrst uvw
>> xyz. ABCDE FGHIJKL MNOPQR
>> STUW XYZ.
>>
>> Abc defhi jklm nop qrst uvw
>> xyz. ABCDE FGHIJKL MNOPQR
>> STUW XYZ.
>>
>> <-- \textwidth ---------->|
>>
>> I.e. paragraphs whose first lines are always \textwidth in width and
>> whose next lines are always somehow indented.
>>
>> I achieved the desired shape by the following combination of
>> \setupnarrower and \setupindenting:
>>
>> ---
>> \starttext
>> \setupnarrower[left=2em]
>> \startnarrower[1*left,0*right]
>> \setupindenting[yes,-2em]
>> \input knuth
>> \stopnarrower
>> \stoptext
>> ---
>>
>> But I would like to ask whether this way is "clean" enough and/or there
>> is a better way, especially via a kind of \setup<something> command,
>> e.g. something like:
>>
>> \setupparagraph[MySpecialParagraph][first=0pt,next=2em]
>> ...
>> \startparagraph[MySpecialParagraph]
>> Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
>> \stopparagraph
>>
>> % or:
>>
>> \startMySpecialParagraph
>> Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
>> \stopMySpecialParagraph
>>
>> Kind regards,
>>
>> Lukas


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


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

end of thread, other threads:[~2011-01-23 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-23 12:38 Forming paragraphs Procházka Lukáš
2011-01-23 13:35 ` Stefan Müller
2011-01-23 15:06   ` Procházka Lukáš

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