ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \description - indenting lines, "alternative=top"
@ 2012-04-09 12:50 Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-09 20:31 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-09 12:50 UTC (permalink / raw)
  To: ConTeXt

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

Hello,

another case of description (following http://www.mail-archive.com/ntg-context@ntg.nl/msg62775.html), now with "alternative=top" - I'm trying to get:

XXXXXX

   blablabla bla
   bla blablabla
   blabla.

| |
|-| A constant of indenting - to be specified by the user.

|              |
|<------------>| Text width.


But my trials give just:

----
XXXXX  bla bla
   blablabl bla
   bla.

= "alternative=hanging" - unwanted

Or:

XXXXX

bla bla blabla
bl bla bla.

= Lines after head are not indented; unwanted.
----

Does \description support any options to get the required shape?

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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

\starttext
  \input tufte

  \definedescription[A][headstyle=bold,
                        alternative=hanging,
                        width=broad,
                        margin=\parindent,
                       ]

  \A{Aaaaaaa} \input knuth

  \definedescription[B][headstyle=bold,
                        %alternative=hanging,
                        alternative=top,
                        %alternative=serried,
                        width=broad,
                        %width=fit,
                        %hang=broad,
                        %hang=fit,
                        %width=1.5in,
                        margin=\parindent,
                        %indenting=next,
                        %indentnext=yes,
                        %distance=1in,
                       ]

  \B{Bbbbbbb} \input knuth

  \input ward
\stoptext

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

[-- Attachment #4: 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
___________________________________________________________________________________

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

* Re: \description - indenting lines, "alternative=top"
  2012-04-09 12:50 \description - indenting lines, "alternative=top" Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-04-09 20:31 ` Wolfgang Schuster
  2012-04-10  7:13   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2012-04-09 20:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 09.04.2012 um 14:50 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> another case of description (following http://www.mail-archive.com/ntg-context@ntg.nl/msg62775.html), now with "alternative=top" - I'm trying to get:
> 
> XXXXXX
> 
>  blablabla bla
>  bla blablabla
>  blabla.
> 
> | |
> |-| A constant of indenting - to be specified by the user.
> 
> |              |
> |<------------>| Text width.
> 
> 
> But my trials give just:
> 
> ----
> XXXXX  bla bla
>  blablabl bla
>  bla.
> 
> = "alternative=hanging" - unwanted
> 
> Or:
> 
> XXXXX
> 
> bla bla blabla
> bl bla bla.
> 
> = Lines after head are not indented; unwanted.
> ----
> 
> Does \description support any options to get the required shape?


You can indent the text with the margin parameter, the indenting of the head can be corrected with the \offset command.

\define[1]\TestHeadCommand
  {\offset[x=-1em]{#1}}

\definedescription
  [test]
  [alternative=top,
   margin=1em,
  %headcommand={\offset[x=-1em]},
   headcommand=\TestHeadCommand]

\starttext

\input knuth

\starttest{Knuth}
\input knuth
\stoptest

\input knuth

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


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

* Re: \description - indenting lines, "alternative=top"
  2012-04-09 20:31 ` Wolfgang Schuster
@ 2012-04-10  7:13   ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-10  9:27     ` Aditya Mahajan
  2012-04-10  9:49     ` Wolfgang Schuster
  0 siblings, 2 replies; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-10  7:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Wolfgang,

thanks for the solution.

Two more questions:

- How to specify indenting to be equal to the normal paragraph indenting?

Here's my trial:

----
\setupindenting[yes,first,medium]

\define[1]\TestHeadCommand{\offset[x=-\parindent]{#1}} % This doesn't work

\starttext
   \definedescription
     [test]
     [alternative=top,
      margin=\parindent,
      headcommand=\TestHeadCommand,
     ]

   \input knuth

   \starttest{Knuth}
     \input knuth
   \stoptest

   \input knuth
\stoptext
----

- Is it possible to reduce (or specify) the distance between the label and the next text?

XXXXXXX             _____
                         ^
                     ____V - this distance to be specified.
   blablabla blabla
   blabla blabla bl
   a bla.


Best regards,

Lukas


On Mon, 09 Apr 2012 22:31:11 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

> You can indent the text with the margin parameter, the indenting of the head can be corrected with the \offset command.
>
> \define[1]\TestHeadCommand
>   {\offset[x=-1em]{#1}}
>
> \definedescription
>   [test]
>   [alternative=top,
>    margin=1em,
>   %headcommand={\offset[x=-1em]},
>    headcommand=\TestHeadCommand]
>
> \starttext
>
> \input knuth
>
> \starttest{Knuth}
> \input knuth
> \stoptest
>
> \input knuth
>
> \stoptext
>
> Wolfgang


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 9+ messages in thread

* Re: \description - indenting lines, "alternative=top"
  2012-04-10  7:13   ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-04-10  9:27     ` Aditya Mahajan
  2012-04-10 13:36       ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-10  9:49     ` Wolfgang Schuster
  1 sibling, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2012-04-10  9:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 396 bytes --]

On Tue, 10 Apr 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

> - Is it possible to reduce (or specify) the distance between the label and 
> the next text?
>
> XXXXXXX             _____
>                       ^
>                   ____V - this distance to be specified.
> blablabla blabla
> blabla blabla bl
> a bla.

\setupdescription
    [inbetween={\blank[5cm]}]

Aditya

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

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

* Re: \description - indenting lines, "alternative=top"
  2012-04-10  7:13   ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-10  9:27     ` Aditya Mahajan
@ 2012-04-10  9:49     ` Wolfgang Schuster
  2012-04-10 13:42       ` Procházka Lukáš Ing. - Pontex s. r. o.
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2012-04-10  9:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 10.04.2012 um 09:13 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello Wolfgang,
> 
> thanks for the solution.
> 
> Two more questions:
> 
> - How to specify indenting to be equal to the normal paragraph indenting?
> 
> Here's my trial:
> 
> ----
> \setupindenting[yes,first,medium]
> 
> \define[1]\TestHeadCommand{\offset[x=-\parindent]{#1}} % This doesn't work
> 
> \starttext
>  \definedescription
>    [test]
>    [alternative=top,
>     margin=\parindent,
>     headcommand=\TestHeadCommand,
>    ]
> 
>  \input knuth
> 
>  \starttest{Knuth}
>    \input knuth
>  \stoptest
> 
>  \input knuth
> \stoptext
> ----


When you want a certain value in various places I would use \definemeasure to set it and \measure to access it.

\definemeasure[parindent][1em]

\define[1]\TestHeadCommand
  {\offset[x=-\measure{parindent}]{#1}}

\definedescription
  [test]
  [alternative=top,
   margin=\measure{parindent},
   headcommand=\TestHeadCommand]

\setupindenting[yes,\measure{parindent}]

\starttext

\input knuth

\starttest{Knuth}
\input knuth
\stoptest

\input knuth

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


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

* Re: \description - indenting lines, "alternative=top"
  2012-04-10  9:27     ` Aditya Mahajan
@ 2012-04-10 13:36       ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-10 13:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... Thank you, Aditya, that's it!

Lukas


On Tue, 10 Apr 2012 11:27:05 +0200, Aditya Mahajan <adityam@umich.edu> wrote:

> On Tue, 10 Apr 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>
>> XXXXXXX             _____
>>                       ^
>>                   ____V - this distance to be specified.
>> blablabla blabla
>> blabla blabla bl
>> a bla.
>
> \setupdescription
>     [inbetween={\blank[5cm]}]
>
> Aditya


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 9+ messages in thread

* Re: \description - indenting lines, "alternative=top"
  2012-04-10  9:49     ` Wolfgang Schuster
@ 2012-04-10 13:42       ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-10 15:42         ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-10 13:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 10 Apr 2012 11:49:56 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

> When you want a certain value in various places I would use \definemeasure to set it and \measure to access it.
>
> \definemeasure[parindent][1em]
>
> \define[1]\TestHeadCommand
>   {\offset[x=-\measure{parindent}]{#1}}
>
> \definedescription
>   [test]
>   [alternative=top,
>    margin=\measure{parindent},
>    headcommand=\TestHeadCommand]
>
> \setupindenting[yes,\measure{parindent}]
>
> \starttext
>
> \input knuth
>
> \starttest{Knuth}
> \input knuth
> \stoptest
>
> \input knuth
>
> \stoptext
>
> Wolfgang

Great, I didn't know about the \measure way.

Still - when I don't want to specify the indenting value directly, as I am satisfied with the value which is set by \setupindenting[medium] - is there a way how to get the indenting value in this case?

I mean - what value of indenting is set by \setupindenting[small], \setupindenting[medium], \setupindenting[big]?

Are these values accessible anyhow? Via Lua?

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 9+ messages in thread

* Re: \description - indenting lines, "alternative=top"
  2012-04-10 13:42       ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-04-10 15:42         ` Wolfgang Schuster
  2012-04-11  6:11           ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2012-04-10 15:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 10.04.2012 um 15:42 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> On Tue, 10 Apr 2012 11:49:56 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> 
>> When you want a certain value in various places I would use \definemeasure to set it and \measure to access it.
>> 
>> \definemeasure[parindent][1em]
>> 
>> \define[1]\TestHeadCommand
>>  {\offset[x=-\measure{parindent}]{#1}}
>> 
>> \definedescription
>>  [test]
>>  [alternative=top,
>>   margin=\measure{parindent},
>>   headcommand=\TestHeadCommand]
>> 
>> \setupindenting[yes,\measure{parindent}]
>> 
>> \starttext
>> 
>> \input knuth
>> 
>> \starttest{Knuth}
>> \input knuth
>> \stoptest
>> 
>> \input knuth
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Great, I didn't know about the \measure way.
> 
> Still - when I don't want to specify the indenting value directly, as I am satisfied with the value which is set by \setupindenting[medium] - is there a way how to get the indenting value in this case?
> 
> I mean - what value of indenting is set by \setupindenting[small], \setupindenting[medium], \setupindenting[big]?

small = 1em
medium = 1.5em
big = 2em

> Are these values accessible anyhow? Via Lua?

They are stored in \parindent but descriptions have the setting “indenting=never” which set parindent to 0pt. \setupindenting uses internal register to store the value before to assigns it to parindent but it’s not meant to be used by a user.

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
___________________________________________________________________________________

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

* Re: \description - indenting lines, "alternative=top"
  2012-04-10 15:42         ` Wolfgang Schuster
@ 2012-04-11  6:11           ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-11  6:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... OK, thanks for explanation.

Best regards,

Lukas

On Tue, 10 Apr 2012 17:42:46 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

>
> small = 1em
> medium = 1.5em
> big = 2em
>
>> Are these values accessible anyhow? Via Lua?
>
> They are stored in \parindent but descriptions have the setting “indenting=never” which set parindent to 0pt. \setupindenting uses internal register to store the value before to assigns it to parindent but it’s not meant to be used by a user.
>
> Wolfgang


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2012-04-11  6:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09 12:50 \description - indenting lines, "alternative=top" Procházka Lukáš Ing. - Pontex s. r. o.
2012-04-09 20:31 ` Wolfgang Schuster
2012-04-10  7:13   ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-04-10  9:27     ` Aditya Mahajan
2012-04-10 13:36       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-04-10  9:49     ` Wolfgang Schuster
2012-04-10 13:42       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-04-10 15:42         ` Wolfgang Schuster
2012-04-11  6:11           ` Procházka Lukáš Ing. - Pontex s. r. o.

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