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
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
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
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
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
... Thank you, Aditya, that's it!
Lukas
On Tue, 10 Apr 2012 11:27:05 +0200, Aditya Mahajan
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
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
On Tue, 10 Apr 2012 11:49:56 +0200, Wolfgang Schuster
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
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
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
... OK, thanks for explanation.
Best regards,
Lukas
On Tue, 10 Apr 2012 17:42:46 +0200, Wolfgang Schuster
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
participants (3)
-
Aditya Mahajan
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Wolfgang Schuster