Re: [NTG-context] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Am Montag, 6. März 2023, 14:34:28 CET schrieb Aditya Mahajan via ntg-context:
> On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:
> 
> > Hi,
> > 
> > I'm trying to use a description environment in conjunction with an
> > itemize with the latest luametatex. Is this supposed to work?
> > 
> > Here is an MWE:
> > ```
> > \definedescription[desc][headstyle=bold]
> > 
> > \starttext
> > Foo
> > 
> > \desc{Some title} Some text
> > \startitemize
> > \item Some item
> > \stopitemize
> > 
> > \stoptext
> 
> Use \startdesc ... \stopdesc
> 
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \startdesc[title={Some title}]
>   Some text
> \startitemize
> \item Some item
> \stopitemize
> \stopdesc
> 
> \stoptext

That worked. Thank you!


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Description together with itemize, luametatex

2023-03-06 Thread Aditya Mahajan via ntg-context
On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:

> Hi,
> 
> I'm trying to use a description environment in conjunction with an
> itemize with the latest luametatex. Is this supposed to work?
> 
> Here is an MWE:
> ```
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \desc{Some title} Some text
>   \startitemize
>   \item Some item
>   \stopitemize
> 
> \stoptext

Use \startdesc ... \stopdesc

\definedescription[desc][headstyle=bold]

\starttext
Foo

\startdesc[title={Some title}]
  Some text
\startitemize
\item Some item
\stopitemize
\stopdesc

\stoptext

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] description renders unintended results (LUATEX BUG?)

2017-03-07 Thread Floris van Manen

> On 8 Mar 2017, at 01:04, Alan Braslau  wrote:
> 
>  The two systems are very different, MKII being
> "frozen" and MKIV having evolved in some ways significantly. It is not
> a question of TeX engines, but rather of entire systems.
> 

ok, that makes sense.


> But it sounds like you want to be using an itemize or enumeration
> rather than a description.

well i do need the description as the items are not numbered or annotated in a 
sequential way.

i could use a \sym{tag} but then the available space is constant, and not 
variable as is when using description.

Or is there a better (simpler) way?

.F


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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
___

Re: [NTG-context] description renders unintended results (LUATEX BUG?)

2017-03-07 Thread Alan Braslau
You can see from your log that
context --pdftext
is running the MKII macros and
context
is running MKIV macros. The two systems are very different, MKII being
"frozen" and MKIV having evolved in some ways significantly. It is not
a question of TeX engines, but rather of entire systems.

But it sounds like you want to be using an itemize or enumeration
rather than a description.

\startitemize [n]
  \startitem one
 \startitemize [a]
 \startitem two \stopitem
 \startitem three \stopitem
 \stopitemize
  \stopitem
  \startitem four
 \startitemize [a,continue]
 \startitem five \stopitem
 \startitem six
 \startitemize
 \startitem seven \stopitem
 \startitem eight \stopitem
 \startitem nine \stopitem
 \stopitemize
 \stopitem
 \stopitemize
  \stopitem
  \startitem ten \stopitem
\stopitemize

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

Re: [NTG-context] description renders unintended results (LUATEX BUG?)

2017-03-07 Thread Alan Braslau
On Tue, 7 Mar 2017 18:04:34 +0100
Floris van Manen  wrote:

> The incorrect nesting seems to be connected to the luatex engine.
> If i have the same source compiled by pdftex, it works as intended.
> 
> So is the different rendering an intended feature of luatex, or a
> simple bug?

mkii or mkiv?

(pdftex is mkii, luatex is usually mkiv)

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

Re: [NTG-context] description renders unintended results (LUATEX BUG?)

2017-03-07 Thread Floris van Manen
The incorrect nesting seems to be connected to the luatex engine.
If i have the same source compiled by pdftex, it works as intended.

So is the different rendering an intended feature of luatex, or a simple bug?

.F



> On 6 Mar 2017, at 00:34, Floris van Manen  wrote:
> 
> Is there anyone out there who has a clue as how to fix this?
> 
> Thanks
> .F
> 
> 
>> On 4 Mar 2017, at 11:58, Floris van Manen  wrote:
>> 
>> 
>>> On 4 Mar 2017, at 11:25, Otared Kavian  wrote:
>>> 
>>> Since you specify
>>> align=left
>>> in the setup of your description, I don’t see why the output would be 
>>> unexpected. With the following version of your example code I get the 
>>> attached PDF output.
>> 
>> I got the left/right discrepancy between the sample code and the rendering.
>> However the unexpected is the fact that it does not indent properly:
>> 
>> The intended is this:
>> 
>> 1one
>>  a   two
>>  b   three
>> 2four
>>  c   five
>>  d   six
>>  x   seven
>>  y   eight
>>  z   nine
>> 3ten
>> 
>> The unintended result (also in your rendering) is this:
>> 
>> 1one
>> atwo
>> bthree
>> 2four
>> cfive
>> dsix
>> xseven
>> yeight
>> znine
>> 3ten
>> 
>> 
>> 
>> ___
>> 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
>> ___
> 
> ___
> 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
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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
___

Re: [NTG-context] description renders unintended results

2017-03-05 Thread Floris van Manen
Is there anyone out there who has a clue as how to fix this?

Thanks
.F


> On 4 Mar 2017, at 11:58, Floris van Manen  wrote:
> 
> 
>> On 4 Mar 2017, at 11:25, Otared Kavian  wrote:
>> 
>> Since you specify
>>  align=left
>> in the setup of your description, I don’t see why the output would be 
>> unexpected. With the following version of your example code I get the 
>> attached PDF output.
> 
> I got the left/right discrepancy between the sample code and the rendering.
> However the unexpected is the fact that it does not indent properly:
> 
> The intended is this:
> 
> 1 one
>   a   two
>   b   three
> 2 four
>   c   five
>   d   six
>   x   seven
>   y   eight
>   z   nine
> 3 ten
> 
> The unintended result (also in your rendering) is this:
> 
> 1 one
> a two
> b three
> 2 four
> c five
> d six
> x seven
> y eight
> z nine
> 3 ten
> 
> 
> 
> ___
> 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
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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
___

Re: [NTG-context] description renders unintended results

2017-03-04 Thread Floris van Manen

> On 4 Mar 2017, at 11:25, Otared Kavian  wrote:
> 
> Since you specify
>   align=left
> in the setup of your description, I don’t see why the output would be 
> unexpected. With the following version of your example code I get the 
> attached PDF output.

I got the left/right discrepancy between the sample code and the rendering.
However the unexpected is the fact that it does not indent properly:

The intended is this:

1   one
a   two
b   three
2   four
c   five
d   six
x   seven
y   eight
z   nine
3   ten

The unintended result (also in your rendering) is this:

1   one
a   two
b   three
2   four
c   five
d   six
x   seven
y   eight
z   nine
3   ten





signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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
___

Re: [NTG-context] description renders unintended results

2017-03-04 Thread Henning Hraban Ramm
Am 2017-03-04 um 11:25 schrieb Otared Kavian :

> Since you specify
>   align=left
> in the setup of your description, I don’t see why the output would be 
> unexpected. With the following version of your example code I get the 
> attached PDF output.

While the alignment was to be expected, the items are still not nested.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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

Re: [NTG-context] description renders unintended results

2017-03-04 Thread Otared Kavian
Hi Floris,Since you specify	align=leftin the setup of your description, I don’t see why the output would be unexpected. With the following version of your example code I get the attached PDF output.%%% begin \setuppapersize[A5]\definedescription[descr][	headstyle=bold,	style=normal,%	align=flushright,	location=hanging,	width=broad,	margin=1cm	]\starttext\startdescr{Para}	This is a shorter item label, and some text that talks about it.	The text is wrapped into a paragraph, with successive lines indented.	This is another paragraph under the "Para" item.	\startdescr{Sub Item}  		This is a description of an item which is within the "Para" item.  	\stopdescr	\startdescr{Sub Item} 		Another Sub Item   	\stopdescr\stopdescr\startdescr{Short}	A short item that's not part of that really long "Para" item.\stopdescr\stoptext%%% end

description-indentation.pdf
Description: Adobe PDF document
On 3 Mar 2017, at 09:59, Floris van Manen  wrote:The documentation on pagehttp://wiki.contextgarden.net/Descriptionprovides sample code to stack multiple levels of description such as:\setuppapersize[A5]\definedescription[descr][  headstyle=bold, style=normal, align=left, location=hanging,   width=broad, margin=1cm]\starttext\startdescr{Para}  This is a shorter item label, and some text that talks about it.  The text is wrapped into a paragraph, with successive lines indented.  This is another paragraph under the "Para" item.  \startdescr{Sub Item}      This is a description of an item which is within the "Para" item.  \stopdescr\startdescr{Sub Item}     Another Sub Item   \stopdescr\stopdescr\startdescr{Short}  A short item that's not part of that really long "Para" item.\stopdescr\stoptextwhich should generate the included rendering.But reality is somewhat more diverse …My current context / luatex, as well as the online context engine come up with a different renderingEven when you correct for the right/left alignment, the itemising does not properly stack up:It there a work around ?$ context --versionmtx-context     | ConTeXt Process Management 0.63mtx-context     |mtx-context     | main context file: /Applications/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.mkivmtx-context     | current version: 2016.09.24 12:40$ luatex --versionThis is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)Thanks.Floris van Manen___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] description questions

2017-02-21 Thread Csikos Bela
Aditya Mahajan írta:
>> I am experimenting with descriptions and I couldn't find in the documentation
>> the following:
>>
>> 1. What is the default value of width option? It seems that default width 
>> uses the
>> longest head + some distance for every head in a descriptions list. 

Sorry, I wasn't right. context uses a default width for head. Accidentally the 
longest
term I used in my document was almost the same as the default head width, 
therefore
I thought that the head was calculated according to my term's width.

>>Neither  width=fit nor width=broad,distance=dimension results in the same.
>
>Some information is given here: http://www.ntg.nl/maps/36/09.pdf
>Enumerations and descriptions share a lot of settings.

Thank you. I read it. I have a question: is it possible to add some text or 
command
between the head and text in description? For example a dash or symbol which 
separates the head from the text. In enumerations it seems to be different, 
because
there the variable head (title) goes after a static head. I would need the 
opposite:
variable head part - static head part. I tried to use headcommand option but it 
puts
stuff before head.

>There is no way to reset options in ConTeXt. The canonical way to do this 
>is:
>
>\definedescription[defa]
>\definedescription[defb][defa][width=broad, distance=1cm]
>
>\startdefa ... \stopdefa
>
>\startdefb ... \stopdefb
>
>(Untested): This should also work:
>
>\startdefa[width=broad, distance=1cm] ... \stopdefa

I see. 

Thank you again,

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

Re: [NTG-context] description questions

2017-02-20 Thread Aditya Mahajan

I am experimenting with descriptions and I couldn't find in the documentation
the following:

1. What is the default value of width option? It seems that default width uses 
the
longest head + some distance for every head in a descriptions list. Neither
width=fit nor width=broad,distance=dimension results in the same.


Some information is given here: http://www.ntg.nl/maps/36/09.pdf
Enumerations and descriptions share a lot of settings.


2. In the same document how can I reset to the default options of a defined
description list? For example:

\definedescription[defa]

\defa{head}  % deafult options are used

\setupdescription[defa][width=broad,distance=1cm] 
\defa{head}  % above options are used


But still the previously set options are used, they haven't been reset.


There is no way to reset options in ConTeXt. The canonical way to do this 
is:


\definedescription[defa]
\definedescription[defb][defa][width=broad, distance=1cm]

\startdefa ... \stopdefa

\startdefb ... \stopdefb

(Untested): This should also work:

\startdefa[width=broad, distance=1cm] ... \stopdefa

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] description setup error

2012-05-13 Thread Wolfgang Schuster

Am 13.05.2012 um 22:16 schrieb Meer, H. van der:

 Of all the parameter values for \setupdescriptions[][alternative=value] there 
 is one that fails here, i.e. right. right is a value mentioned in 
 http://wiki.contextgarden.net/Command/setupdescriptions.
 
 Below a minimal example and the error.
 
 \definedescription[htmldd][before=,after=]
 \setupdescriptions[htmldd][alternative=right]
 \starttext
 Text before.\crlf
 \starthtmldd{item-1}description\stophtmldd
 \starthtmldd{item-2}description\stophtmldd
 Text after.
 \stoptext
 
 ! Undefined control sequence.
 
 system   tex  error on line 5 in file description.tex: Undefined 
 control sequence ...
 
 \12:153:right:none ...nstructions_pure_hang_box 
  \raggedleft \rlap {\hskip ...
 \148construction ...parameter \c!renderingsetup }
  \relax \dostoptagged \dost...
 \dodogotopar ...andler \v!construction \endcsname 
  \BeforePar \emptytoks 
 to be read again 
   d
 l.5 \starthtmldd{item-1}d
 escription\stophtmldd
 
 Hans van der Meer


The commented line in the setups environment is wrong and the line below is the 
fix.

\unprotect

\startsetups[\??constructionrenderings:\v!right:\v!none]
\let\\=\crlf
\noindent
\leftskip\leftconstructionskip
\rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth\relax
   %\strc_constructions_pure_hang_box\raggedleft
\strc_constructions_set_pure_box\v!flushright
\rlap {
\hskip\dimexpr\hsize-\leftskip-\rightskip\relax
\copy\constructionheadbox
\hskip\rightconstructionskip
}
\advance\rightskip \constructionsheaddistance
\useconstructionstyleandcolor\c!style\c!color
\ignorespaces
\stopsetups

\protect

\definedescription[description][alternative=right,headalign=]

\starttext

BEFORE

\startdescription{Knuth}
\input knuth
\stopdescription

AFTER

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


Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-11 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... OK, thanks for explanation.

Best regards,

Lukas

On Tue, 10 Apr 2012 17:42:46 +0200, Wolfgang Schuster 
schuster.wolfg...@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:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___

Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-10 Thread 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


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

XXX _
^
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.wolfg...@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:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___


Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-10 Thread Aditya Mahajan

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?


XXX _
  ^
  V - this distance to be specified.
blablabla blabla
blabla blabla bl
a bla.


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

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] \description - indenting lines, alternative=top

2012-04-10 Thread Wolfgang Schuster

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
___


Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .

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

Lukas


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


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


XXX _
  ^
  V - this distance to be specified.
blablabla blabla
blabla blabla bl
a bla.


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

Aditya



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___


Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Tue, 10 Apr 2012 11:49:56 +0200, Wolfgang Schuster 
schuster.wolfg...@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:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___


Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-10 Thread Wolfgang Schuster

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.wolfg...@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
___

Re: [NTG-context] \description - indenting lines, alternative=top

2012-04-09 Thread Wolfgang Schuster

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:
 
 XX
 
  blablabla bla
  bla blablabla
  blabla.
 
 | |
 |-| A constant of indenting - to be specified by the user.
 
 |  |
 || Text width.
 
 
 But my trials give just:
 
 
 X  bla bla
  blablabl bla
  bla.
 
 = alternative=hanging - unwanted
 
 Or:
 
 X
 
 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
___


Re: [NTG-context] \description - indenting lines from the 2nd

2012-04-04 Thread Wolfgang Schuster

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

 Hello,
 
 what option(s) to use with \definedescription if I'd like to get the 
 following shape (attempt to ACSII art):
 
 XX blablabla
   blablabla bla
   blabla.
 
 | |
 |-| A constant of indenting - to be specified by the user.
 
 |  |
 || Text width.
 
 I inspired by wiki (the code bellow) but shapes I got could be illustrated:
 
 \A:
 
 XX blablabla
   blablabla
   bla blab-
   la.
 
 | |
 |---| Indenting given by the width of the head - unwanted.
 
 
 \B=\C:
 
  XX blablabla
 blablabla
 bla blab-
 la.
 
  | |
  |---| Indenting given by the width of the head - unwanted.
 
 | |
 |-] The margin option affects indenting of the whole description - unwanted,
I want to indent only lines from the 2nd.
 
 I tried some combinations of options - location, width, margin - nothing 
 leads to the desired form.
 
 My trials e.g.:
 
 
 \definedescription[A][headstyle=bold,location=hanging,width=fit,]
 \definedescription[B][headstyle=bold,location=hanging,width=fit,margin=1cm,]
 \definedescription[C][headstyle=bold,location=hanging,width=fit,margin=1cm,command=\hskip-1cm]

\definedescription[A][headstyle=bold,alternative=hanging,width=fit,margin=1cm]
\definedescription[B][headstyle=bold,alternative=hanging,width=fit,margin=2cm]
\definedescription[C][headstyle=bold,alternative=hanging,width=fit,margin=3cm]

When you don’t want any indentation you need “alternative=serried” because when
you set “margin=0pt” (for hanging) context don’t use this value but 1.5em 
instead.

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] \description - indenting lines from the 2nd

2012-04-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Thank you, now it's perfect.

So option alternative= is to be used instead of location=.

Does location still have any meaning or is it deprecated and replaced by 
alternative?

- On wiki, location is still frequently noticed...

Best regards,

Lukas


On Wed, 04 Apr 2012 14:28:31 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



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


Hello,

what option(s) to use with \definedescription if I'd like to get the following 
shape (attempt to ACSII art):

XX blablabla
  blablabla bla
  blabla.

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

|  |
|| Text width.

I inspired by wiki (the code bellow) but shapes I got could be illustrated:

\A:

XX blablabla
  blablabla
  bla blab-
  la.

| |
|---| Indenting given by the width of the head - unwanted.


\B=\C:

 XX blablabla
blablabla
bla blab-
la.

 | |
 |---| Indenting given by the width of the head - unwanted.

| |
|-] The margin option affects indenting of the whole description - unwanted,
   I want to indent only lines from the 2nd.

I tried some combinations of options - location, width, margin - nothing leads 
to the desired form.

My trials e.g.:


\definedescription[A][headstyle=bold,location=hanging,width=fit,]
\definedescription[B][headstyle=bold,location=hanging,width=fit,margin=1cm,]
\definedescription[C][headstyle=bold,location=hanging,width=fit,margin=1cm,command=\hskip-1cm]


\definedescription[A][headstyle=bold,alternative=hanging,width=fit,margin=1cm]
\definedescription[B][headstyle=bold,alternative=hanging,width=fit,margin=2cm]
\definedescription[C][headstyle=bold,alternative=hanging,width=fit,margin=3cm]

When you don’t want any indentation you need “alternative=serried” because when
you set “margin=0pt” (for hanging) context don’t use this value but 1.5em 
instead.

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
___



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___

Re: [NTG-context] \description - indenting lines from the 2nd

2012-04-04 Thread Wolfgang Schuster

Am 04.04.2012 um 16:03 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 ... Thank you, now it's perfect.
 
 So option alternative= is to be used instead of location=.
 
 Does location still have any meaning or is it deprecated and replaced by 
 alternative?

For MkIV not because the alternative key has replaced the location key.

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] Description inheritance?

2011-09-06 Thread Wolfgang Schuster

Am 06.09.2011 um 12:20 schrieb Marcin Borkowski:

 Is there a way to define a description based on another one, so that all
 parameters except the specified ones are inherited from the base one?

\definedescription[base]
\definedescription[clone][base]

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] Description

2011-04-20 Thread Wolfgang Schuster

Am 20.04.2011 um 11:56 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 is it possible to specify some text to be used as the end of a description?
 
 I tried this:
 
 ---
 \starttext
  \definedescription[Owner][headstyle=em,width=broad,titleright={--- }]
 
  \Owner{AAA} Abc
 
 \stoptext
 ---
 
 - Hoping to get AAA --- Abc.
 
 But I got just AAA Abc.
 
 So what is the purpose of the titleright option of the \description?


You can use “titleright” only in enumerations.

\definedescription[Owner][headstyle=em,width=fit,command=\groupedcommand{}{ 
---},distance=.5em]

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] Description

2011-04-20 Thread Procházka Lukáš Ing . - Pontex s . r . o .

OK, thanks.

On Wed, 20 Apr 2011 18:20:18 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


You can use “titleright” only in enumerations.


I thought titleright was valid for descriptions [as well], see contextref.pdf, sec. 
Descriptions, table on the pg. 237:

\setupdescriptions  [...,...][..,.=.,..]
...

Lukas




\definedescription[Owner][headstyle=em,width=fit,command=\groupedcommand{}{ 
---},distance=.5em]

Wolfgang



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@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
___

Re: [NTG-context] description

2010-10-26 Thread Arthur Reutenauer
On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:
 Please explain the meaning of align=left. To me it
 is more a raggedleft. (mkiv, TeXLive)

  Yes, you're right.  This has been the case since the beginning, and
has been retained for compatibility reasons, even if the name is
confusing.

Arthur
___
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] description

2010-10-26 Thread Arthur Reutenauer
On Tue, Oct 26, 2010 at 08:30:08PM +0200, Arthur Reutenauer wrote:
 On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:
  Please explain the meaning of align=left. To me it
  is more a raggedleft. (mkiv, TeXLive)
 
   Yes, you're right.

  ... no pun intended...

Arthur
___
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] description

2010-10-26 Thread Jelle Huisman

On 26/10/10 14:31, Arthur Reutenauer wrote:

On Tue, Oct 26, 2010 at 08:30:08PM +0200, Arthur Reutenauer wrote:

On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:

Please explain the meaning of align=left. To me it
is more a raggedleft. (mkiv, TeXLive)


   Yes, you're right.


   ... no pun intended...



Right... you left me wondering about it ;-)

Jelle
___
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] description

2010-10-26 Thread Herbert Voss
Am 26.10.2010 20:30, schrieb Arthur Reutenauer:
 On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:
 Please explain the meaning of align=left. To me it
 is more a raggedleft. (mkiv, TeXLive)
 
   Yes, you're right.  This has been the case since the beginning, and
 has been retained for compatibility reasons, even if the name is
 confusing.

with mkii left is left ...  ;-)

Herbert

___
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] description

2010-10-26 Thread luigi scarso
On Tue, Oct 26, 2010 at 8:39 PM, Jelle Huisman je...@jhnet.nl wrote:
 On 26/10/10 14:31, Arthur Reutenauer wrote:

 On Tue, Oct 26, 2010 at 08:30:08PM +0200, Arthur Reutenauer wrote:

 On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:

 Please explain the meaning of align=left. To me it
 is more a raggedleft. (mkiv, TeXLive)

   Yes, you're right.

   ... no pun intended...


 Right... you left me wondering about it ;-)
Threre were times and countries where be Left was right, and be Right was wrong.

-- 
luigi
___
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] description

2010-10-26 Thread Hans Hagen

On 26-10-2010 8:30, Arthur Reutenauer wrote:

On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:

Please explain the meaning of align=left. To me it
is more a raggedleft. (mkiv, TeXLive)


   Yes, you're right.  This has been the case since the beginning, and
has been retained for compatibility reasons, even if the name is
confusing.


you can use flushleft instead of (ragged)right

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | 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] description

2010-10-26 Thread Henning Hraban Ramm

Am 2010-10-26 um 20:51 schrieb luigi scarso:

  Yes, you're right.

... no pun intended...

Right... you left me wondering about it ;-)
Threre were times and countries where be Left was right, and be  
Right was wrong.


War doesn't decide who's right but who's left.

Greetlings, Hraban
___
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] description

2010-10-26 Thread Alan BRASLAU
On Tuesday 26 October 2010 20:51:15 luigi scarso wrote:
 On Tue, Oct 26, 2010 at 8:39 PM, Jelle Huisman je...@jhnet.nl wrote:
  On 26/10/10 14:31, Arthur Reutenauer wrote:
  On Tue, Oct 26, 2010 at 08:30:08PM +0200, Arthur Reutenauer wrote:
  On Tue, Oct 26, 2010 at 08:28:17PM +0200, Herbert Voss wrote:
  Please explain the meaning of align=left. To me it
  is more a raggedleft. (mkiv, TeXLive)
  
Yes, you're right.
  
... no pun intended...
  
  Right... you left me wondering about it ;-)
 
 Threre were times and countries where be Left was right, and be Right was
 wrong.

Is this something like: red-right-returning?

(You probably have to be a sailor from North America to understand this...)

Alan
___
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] description: whitespace between head and text

2010-07-23 Thread Wolfgang Schuster

 Am 23.07.10 15:45, schrieb Jan Pohanka:

Hello,


\definedescription
  [definition]
  [headstyle=bold,
   inbetween=,
   headcolor=TheColor,
   location=top]

\definition{AAA}
AAA is an aglorithm  \par

which parameter controls the white space between the description title 
(at top location) and the description text.


inbetween

Wolfang

___
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] description fails on \if

2008-03-27 Thread Wolfgang Schuster
On Wed, Mar 26, 2008 at 9:23 PM, Hans van der Meer [EMAIL PROTECTED] wrote:
 Wolfgang,

  From your observation I am inclined to guess that the \ifx falls prey
 to the collection of arguments. The \relax can be replaced by an extra
 pair {} behind the description: \answerblock{}{}% also typesets
 without the if-error.

You could also add title=no to \definedescription[answerblock], this stops
TeX from looking after a optional argument between the braces.

 I more or less conclude that the lookahead from \dodoublegroupempty
 does not stop on the \if. If I remember correctly, that behaviour is
 to be expected from tex and the prospects for solving it generically
 within the format bleak. If Hans Hagen is listening, can he comment on
 this?

I tried your module also with my ancient ConTeXt from august last year
and it did also show this effect. Your module is broken since a very long time.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] description fails on \if

2008-03-26 Thread Wolfgang Schuster
On Tue, Mar 25, 2008 at 8:38 PM, Hans van der Meer [EMAIL PROTECTED] wrote:
 There is the following problem on code that did work around july 2007,
 but no longer under the current context version (2008-03-11).

 Define a description, I did:
 \definedescription[answerblock][%
\c!margin=\v!no,\c!location=\v!left,%
\c!headstyle=\@@exmintrostyle,\c!style=\@@exmstyle,%
\c!before=,\c!inbetween=,\c!after=,%
\c!hang=\@@exmhang,\c!width=\questionblockwidth,%
\c!text=\placeanswerstart]

Could you try to set title=no.

 Typeset with this description inside the following macro:
 \def\shortanswer#1\par{%
\par % be sure to end paragraph here
\answerblock{}% % {} needed here in description call
\ifanswers #1\else\dotfill\strut\fi %  crashing on this if
\par%  final \par of description ... \par
}
 The above code crashes with: ! Incomplete \ifx; all text was ignored
 after ...

 After some detective work in which Wolfgang Schuster had a large share
 and has found the most elegant workaround, the addition of a \relax
 just after the description call prevents the error:
 \def\shortanswer#1\par{%
\par % be sure to end paragraph here
\answerblock{}% % {} needed here in description call
\relax  %\relax prevents crash on if
\ifanswers #1\else\dotfill\strut\fi
\par%  final \par of description ... \par
}

 The way \relax stops the error reminds me of the \relax that one
 places after a number in order to separate that from the code following.
 I did compare core-des.tex, both the last version and the archived
 from 2007-04-17. But I must admit, I did not succeed finding a clue
 among the differences about what could have happened. The code is a
 bit too intricate to just jump in and pinpoint the culprit -- at least
 for me.

 Allthough Wolfgang's workaround saves the day, I feel this problem
 deserves solving inside ConTeXt, not outside it. Someday somewhere
 another person will stumble on the same problem -- a situation that
 can and should be avoided, in my view.
 Therefore I explain the problem here as fully as possible hoping
 someone knowledgeable with descriptions we might need to fall back
 to Taco or Hans will find the best remedy.

I would say the message comes from \dodoublegroupempty in \@@description.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] description fails on \if

2008-03-26 Thread Hans van der Meer
Wolfgang,

 From your observation I am inclined to guess that the \ifx falls prey  
to the collection of arguments. The \relax can be replaced by an extra  
pair {} behind the description: \answerblock{}{}% also typesets  
without the if-error.

I more or less conclude that the lookahead from \dodoublegroupempty  
does not stop on the \if. If I remember correctly, that behaviour is  
to be expected from tex and the prospects for solving it generically  
within the format bleak. If Hans Hagen is listening, can he comment on  
this?

Hans van der Meer




On 26 mrt 2008, at 08:32, Wolfgang Schuster wrote:


 Allthough Wolfgang's workaround saves the day, I feel this problem
 deserves solving inside ConTeXt, not outside it. Someday somewhere
 another person will stumble on the same problem -- a situation that
 can and should be avoided, in my view.
 Therefore I explain the problem here as fully as possible hoping
 someone knowledgeable with descriptions we might need to fall back
 to Taco or Hans will find the best remedy.

 I would say the message comes from \dodoublegroupempty in  
 \@@description.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] description fails on \if

2008-03-26 Thread Hans Hagen
Hans van der Meer wrote:

 After some detective work in which Wolfgang Schuster had a large share  
 and has found the most elegant workaround, the addition of a \relax  
 just after the description call prevents the error:
 \def\shortanswer#1\par{%
   \par % be sure to end paragraph here
   \answerblock{}% % {} needed here in description call
   \relax  %\relax prevents crash on if
   \ifanswers #1\else\dotfill\strut\fi
   \par%  final \par of description ... \par
   }
 
 The way \relax stops the error reminds me of the \relax that one  
 places after a number in order to separate that from the code following.
 I did compare core-des.tex, both the last version and the archived  
 from 2007-04-17. But I must admit, I did not succeed finding a clue  
 among the differences about what could have happened. The code is a  
 bit too intricate to just jump in and pinpoint the culprit -- at least  
 for me.

i cannot put a \relax in there because \answerblock looks ahead

the argument grabber handles some of the if's but only the primitives;

in your case ... don't use \ifanswers, just use modes ...

\enablemode[answers] ... \doirmnode{answers}

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] description fails on \if

2008-03-26 Thread Hans Hagen
Hans van der Meer wrote:

 I more or less conclude that the lookahead from \dodoublegroupempty  
 does not stop on the \if. If I remember correctly, that behaviour is  
 to be expected from tex and the prospects for solving it generically  
 within the format bleak. If Hans Hagen is listening, can he comment on  
 this?

indeed, but cooking up a solution that always works is hard

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Description nesting

2006-05-06 Thread Hans Hagen
nico wrote:
 Hello,

 Is there a way to nest some descriptions, where the nested descriptions  
 respect the enclosing indentation?

 Funnily the wiki speaks about the subject  
 (http://wiki.contextgarden.net/Description) but doesn't give any solution  
 (btw, the given solution to have several paragraphs in a description looks  
 obsolete since \start \stop works pretty well).
   
you can play with this patch

\setvalue{@@description\v!hanging}[#1]#2%
  {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}% % adds \c!margin to 
\leftskip
   \noindent\ignorespaces
   \advance\leftskip -\leftskipadaption \relax
   \ifdim\leftskipadaption=\zeropoint
 \leftskipadaption1.5em % just some default
 \ifnum\insidedefinition=\plusone
   \ifdim\leftskip\zeropoint \relax
 \leftskipadaption\leftskip
   \fi
 \fi
   \fi
   \ifnum\insidedefinition\zerocount
 \advance\leftskip \leftskipadaption
   \fi
   \hskip-\leftskipadaption
   \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
   \kern\ifdim\!!widthb=\zeropoint .75em\else\!!widthb\fi
   \ignorespaces
   \@@dodescription}

 Here is an example that I would like to see working:

 \definedescription[descr][
headstyle=bold,style=normal,align=left,location=hanging,
width=broad,margin=1cm]

 \setupwhitespace[medium]

 \starttext

 \startdescr{Para}
This is a shorter item label, and some text that talks about it.
The text is wrapped into a paragraph, with successive lines indented.

This is another paragraph under the Para item.

\startdescr{SubPara1}
This is a shorter item label, and some text that talks about it.
The text is wrapped into a paragraph, with successive lines indented.
\stopdescr
\startdescr{SubPara2}
This is a shorter item label, and some text that talks about it.
The text is wrapped into a paragraph, with successive lines indented.
\stopdescr
 \stopdescr

 \stoptext
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   


-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Description nesting

2006-05-06 Thread Hans Hagen
nico wrote:
 Hello,

 Is there a way to nest some descriptions, where the nested descriptions  
 respect the enclosing indentation?
   
btw, we need some test files for descriptions in the test-suite 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Description nesting

2006-05-06 Thread nico
On Sat, 06 May 2006 10:29:56 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 Hello,

 Is there a way to nest some descriptions, where the nested descriptions
 respect the enclosing indentation?

 you can play with this patch

Ok, it works fine, thanks! It also makes the indentation of a hanging  
description put in an itemize more consistent.

BTW, I wonder if it should not be also applied to location=left.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Description nesting

2006-05-06 Thread nico
On Sat, 06 May 2006 10:30:24 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 Hello,

 Is there a way to nest some descriptions, where the nested descriptions
 respect the enclosing indentation?

 btw, we need some test files for descriptions in the test-suite

I've added two tests under core-des.tex/, one about basic combination of  
location and width options, the other about the footnotes.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Description nesting

2006-05-05 Thread Aditya Mahajan
On Fri, 5 May 2006, nico wrote:

 Hello,

 Is there a way to nest some descriptions, where the nested descriptions
 respect the enclosing indentation?

 Funnily the wiki speaks about the subject
 (http://wiki.contextgarden.net/Description) but doesn't give any solution
 (btw, the given solution to have several paragraphs in a description looks
 obsolete since \start \stop works pretty well).

 Here is an example that I would like to see working:

 \definedescription[descr][
   headstyle=bold,style=normal,align=left,location=hanging,
   width=broad,margin=1cm]

Try,

  \definedescription[descr][
 headstyle=bold,style=normal,align=left,location=hanging,
 width=broad,margin=2em, before=\doMySetup]

  \def\doMySetup{
 \setupdescriptions[descr]
 [before=\startnarrower,after=\stopnarrower]}



 \setupwhitespace[medium]

 \starttext

 \startdescr{Para}
   This is a shorter item label, and some text that talks about it.
   The text is wrapped into a paragraph, with successive lines indented.

   This is another paragraph under the Para item.

   \startdescr{SubPara1}
   This is a shorter item label, and some text that talks about it.
   The text is wrapped into a paragraph, with successive lines indented.
   \stopdescr
   \startdescr{SubPara2}
   This is a shorter item label, and some text that talks about it.
   The text is wrapped into a paragraph, with successive lines indented.
   \stopdescr
 \stopdescr

 \stoptext



-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] description question (bis)

2005-12-27 Thread Hans Hagen

VnPenguin wrote:


Hi,
I have another question about description list : How to make
description list with idented text, not header ?
Example:


This is header

This is the text of description. This is the text of description.
This is the text of description. This is the text of description.
This is the text of description. This is the text of description.

Thank you in advance,
 


ugly but working:

\setupcolors[state=start]

\definedescription
   [Desc]
   [location=top,
hang=3,
headstyle=bold,
headcolor=red,
command=\hskip-2cm,
margin=2cm]

\starttext

\input tufte \startDesc {test} \input tufte \stopDesc

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] description question (bis)

2005-12-27 Thread VnPenguin
On 12/27/05, Hans Hagen [EMAIL PROTECTED] wrote:
 ugly but working:

 \setupcolors[state=start]

 \definedescription
 [Desc]
 [location=top,
  hang=3,
  headstyle=bold,
  headcolor=red,
  command=\hskip-2cm,
  margin=2cm]

 \starttext

 \input tufte \startDesc {test} \input tufte \stopDesc

 \stoptext


wow, your solution works well :)
Thank you so much,
Regards,

--
http://vnoss.org
Vietnamese Open Source Software Community
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] description question (bis)

2005-12-27 Thread VnPenguin
On 12/27/05, VnPenguin [EMAIL PROTECTED] wrote:
 On 12/27/05, Hans Hagen [EMAIL PROTECTED] wrote:
  ugly but working:
 
  \setupcolors[state=start]
 
  \definedescription
  [Desc]
  [location=top,
   hang=3,
   headstyle=bold,
   headcolor=red,
   command=\hskip-2cm,
   margin=2cm]
 
  \starttext
 
  \input tufte \startDesc {test} \input tufte \stopDesc
 
  \stoptext
 

 wow, your solution works well :)
 Thank you so much,
 Regards,

Just added this solution to wiki :-)

  http://wiki.contextgarden.net/Description

Thanks,
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context