ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Seems `\definedescription' do not work
@ 2012-04-29  6:48 Vladimir Lomov
  2012-04-29  7:14 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Lomov @ 2012-04-29  6:48 UTC (permalink / raw)
  To: General mailing list for ConTeXt users

Hello,

I borrow this example from wiki:
<example file="ex2.tex">
%\setupbodyfont[computer-modern-unicode,12pt]

\definedescription
  [Desc]
  [location=top,hang=20,
   headstyle={\bf\color[blue]},
   command=\hskip-1cm,margin=1cm]

\starttext
\startDesc{Tufte}
\input tufte
\stopDesc
\stoptext
</example>

but context can't compile it:
<terminal output>
mtx-context     | run 1: luatex --fmt="/usr/local/opt/context/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en" --lua="/usr/local/opt/context/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en.lui" --backend="pdf" "./ex2.tex" \stoptext
This is LuaTeX, Version beta-0.70.1-2011051918 (rev 4277) 
 \write18 enabled.
(ex2.tex

ConTeXt  ver: 2012.04.26 22:27 MKIV  fmt: 2012.4.28  int: english/english

system          > cont-new.mkiv loaded
(/usr/local/opt/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > ex2.top loaded
(ex2.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/usr/local/opt/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/usr/local/opt/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/opt/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
! Missing } inserted.

system          > tex > error on line 11 in file ex2.tex: Missing  ...

 1     %\setupbodyfont[computer-modern-unicode,12pt]
 2     
 3     \definedescription
 4       [Desc]
 5       [location=top,hang=20,
 6        headstyle={\bf\color[blue]},
 7        command=\hskip-1cm,margin=1cm]
 8     
 9     \starttext
10     \startDesc{Tufte}
11 >>  \input tufte
12     \stopDesc
13     \stoptext
14     

<inserted text> 
                }
<to be read again> 
                   \endgroup 
\currentconstructiontext ...ionhandler \endcsname 
                                                  \endstrut 
\144>construction ... \currentconstructionsample }
                                                  }\assignwidth {\constructi...
\dodogotopar ...andler \v!construction \endcsname 
                                                  \BeforePar \emptytoks 
<to be read again> 
                   \input 
l.11 \input
            tufte
? 
</terminal output>

Do I miss something?

---
WBR, Vladimir Lomov

-- 
The time was the 19th of May, 1780.  The place was Hartford, Connecticut.
The day has gone down in New England history as a terrible foretaste of
Judgement Day.  For at noon the skies turned from blue to grey and by
mid-afternoon had blackened over so densely that, in that religious age,
men fell on their knees and begged a final blessing before the end came.
The Connecticut House of Representatives was in session.  And, as some of
the men fell down and others clamored for an immediate adjournment, the
Speaker of the House, one Col. Davenport, came to his feet.  He silenced
them and said these words: "The day of judgment is either approaching or
it is not.  If it is not, there is no cause for adjournment.  If it is, I
choose to be found doing my duty.  I wish therefore that candles may be
brought."
		-- Alistair Cooke
___________________________________________________________________________________
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: Seems `\definedescription' do not work
  2012-04-29  6:48 Seems `\definedescription' do not work Vladimir Lomov
@ 2012-04-29  7:14 ` Wolfgang Schuster
  2012-04-29 12:27   ` Vladimir Lomov
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2012-04-29  7:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.04.2012 um 08:48 schrieb Vladimir Lomov:

> Hello,
> 
> I borrow this example from wiki:
> <example file="ex2.tex">
> %\setupbodyfont[computer-modern-unicode,12pt]
> 
> \definedescription
>  [Desc]
>  [location=top,hang=20,
>   headstyle={\bf\color[blue]},
>   command=\hskip-1cm,margin=1cm]
> 
> \starttext
> \startDesc{Tufte}
> \input tufte
> \stopDesc
> \stoptext
> </example>


The problem is \color which expects a argument for the text to be colored (e.g. \color[blue]{…}) which is never the case when you put it in a style key but you can use the color key to set the value.

\definedescription
 [description]
 [alternative=top,
  headstyle=bold,
  headcolor=blue,
  headcommand={\offset[x=-1cm]},
  margin=1cm]

\starttext

\input tufte

\startdescription{Tufte}
\input tufte
\stopdescription

\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] 3+ messages in thread

* Re: Seems `\definedescription' do not work
  2012-04-29  7:14 ` Wolfgang Schuster
@ 2012-04-29 12:27   ` Vladimir Lomov
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Lomov @ 2012-04-29 12:27 UTC (permalink / raw)
  To: ntg-context

Hello Wolfgang,

** Wolfgang Schuster [2012-04-29 09:14:57 +0200]:


> Am 29.04.2012 um 08:48 schrieb Vladimir Lomov:

>> Hello,

>> I borrow this example from wiki:
>> <example file="ex2.tex">
>> %\setupbodyfont[computer-modern-unicode,12pt]

>> \definedescription
>>  [Desc]
>>  [location=top,hang=20,
>>   headstyle={\bf\color[blue]},
>>   command=\hskip-1cm,margin=1cm]

>> \starttext
>> \startDesc{Tufte}
>> \input tufte
>> \stopDesc
>> \stoptext
>> </example>


> The problem is \color which expects a argument for the text to be colored (e.g. \color[blue]{…}) which is never the case when you put it in a style key but you can use the color key to set the value.

Yes, it is true, I saw some topics about that on ML but forgot (this
example from my old code).

> \definedescription
>  [description]
>  [alternative=top,
>   headstyle=bold,
>   headcolor=blue,
>   headcommand={\offset[x=-1cm]},
>   margin=1cm]

Thanks, this is much "cleaner" solution. (Again, I already saw message
about change from `location=' to `alternative='.)

> \starttext

> \input tufte

> \startdescription{Tufte}
> \input tufte
> \stopdescription

> \stoptext

> Wolfgang

---
WBR, Vladimir Lomov

-- 
Banacek's Eighteenth Polish Proverb:
	The hippo has no sting, but the wise man would rather be sat upon
	by the bee.
___________________________________________________________________________________
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:[~2012-04-29 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-29  6:48 Seems `\definedescription' do not work Vladimir Lomov
2012-04-29  7:14 ` Wolfgang Schuster
2012-04-29 12:27   ` Vladimir Lomov

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