ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* chapter head and placelist
@ 2011-02-05  1:13 Jeong Dalyoung
  2011-02-05 10:21 ` Andreas Harder
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dalyoung @ 2011-02-05  1:13 UTC (permalink / raw)
  To: ntg-context

Dear all,

The otherday, I asked about three line chapter head and got a solution.

\chapter{\tfd Title \\ \tfc subtitle}

Then, in the table of contents, it also listed as a big fonts.

How to make the contents with a normal fonts?

I tried \setuplist[style=normal, textstyle=normal], but no differences.

Best regards,

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

* Re: chapter head and placelist
  2011-02-05  1:13 chapter head and placelist Jeong Dalyoung
@ 2011-02-05 10:21 ` Andreas Harder
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Harder @ 2011-02-05 10:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]

Hi,

you could play with my attached example.



Nearly the same is wikified under http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content 

Greeting
	Andreas

Am 05.02.2011 um 02:13 schrieb Jeong Dalyoung:

> Dear all,
> 
> The otherday, I asked about three line chapter head and got a solution.
> 
> \chapter{\tfd Title \\ \tfc subtitle}
> 
> Then, in the table of contents, it also listed as a big fonts.
> 
> How to make the contents with a normal fonts?
> 
> I tried \setuplist[style=normal, textstyle=normal], but no differences.
> 
> Best regards,
> 
> Dalyoung
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2.1: Type: text/html, Size: 231 bytes --]

[-- Attachment #1.2.2: head-with-subtitle.tex --]
[-- Type: application/octet-stream, Size: 1209 bytes --]


\setuphead
  [chapter]
  [style=\tfd,
   command=\MyHeadCommand]

\define[2]\MyHeadCommand%
  {\bTABLE[width=broad,offset=0pt,frame=off]
    \setupTABLE[column][first][width=1.5em]
    \bTR \bTD #1 \eTD \bTD #2 \eTD \eTR
    \bTR \bTD    \eTD
      \bTD[style=\tfc\setupinterlinespace] \structureuservariable{subtitle} \eTD
    \eTR
   \eTABLE}

\setuplist
  [chapter]
  [alternative=command,command=\MyListCommand]

\define[3]\MyListCommand%
  {\bTABLE[offset=0pt,frame=off,distance=.5em,width=broad]
     \bTR
       \bTD[width=1.5em] #1 \eTD
       \bTD              #2
         \doifsomething % test if a subtitle is set
           {\structurelistuservariable{subtitle}}
           {– \structurelistuservariable{subtitle}}
       \eTD
       \bTD[width=1.5em,align={left,low}] #3 \eTD
     \eTR
   \eTABLE}


\starttext

\placelist[chapter]

\startchapter
  [title=Title]
  [subtitle=Subtitle]
  
  \input tufte
\stopchapter

\startchapter
  [title=A \dorecurse{15}{very }long Title]
  [subtitle=A \dorecurse{15}{very }long Subtitle]
  
  \input tufte
\stopchapter

\stoptext

%%% Local Variables: 
%%% mode: context
%%% TeX-master: t
%%% End: 

[-- Attachment #1.2.3: Type: text/html, Size: 1845 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: chapter head and placelist
  2011-02-05 11:41 Jeong Dalyoung
@ 2011-02-05 12:32 ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2011-02-05 12:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.02.2011 um 12:41 schrieb Jeong Dalyoung:

> Dear Andreas,
> 
> Thank you for your code.
> I'll try it.
> 
> The other day, Wolfgang suggested me the same page in wiki.
> But, It looks a little bit complicate, so I use another simple method.

It’s no so complicated as you think.

The \startchapter command has two arguments, the first is used for
the chapter argument like title, reference, bookmark etc. and
the second argument, which is optional, for your own values, like
author, subtitle etc.

You can now access these values in your own chapter layout with
\structurevariable for the normal arguments (e.g. title) and
\structureuservariable for your own arguments (e.g. subtitle).

\define[2]\ChapterCommand
  {\starttabulate[|l|l|]
   \NC title     \EQ \structurevariable    {title}     \NC\NR
   \NC reference \EQ \structurevariable    {reference} \NC\NR
   \NC author    \EQ \structureuservariable{author}    \NC\NR
   \NC subtitle  \EQ \structureuservariable{subtitle}  \NC\NR
   \stoptabulate}

\setuphead[chapter][command=\ChapterCommand]

\starttext
\startchapter[reference=sec:knuth,title=Knuth][author=Donald E. Knuth,subtitle=ConTeXt Sample File]
\input knuth
\stopchapter
\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] 4+ messages in thread

* Re: chapter head and placelist
@ 2011-02-05 11:41 Jeong Dalyoung
  2011-02-05 12:32 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dalyoung @ 2011-02-05 11:41 UTC (permalink / raw)
  To: ntg-context

Dear Andreas,

Thank you for your code.
I'll try it.

The other day, Wolfgang suggested me the same page in wiki.
But, It looks a little bit complicate, so I use another simple method.

Now, it is the time to look at it once more.

Thanks again.

best regards,

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

end of thread, other threads:[~2011-02-05 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-05  1:13 chapter head and placelist Jeong Dalyoung
2011-02-05 10:21 ` Andreas Harder
2011-02-05 11:41 Jeong Dalyoung
2011-02-05 12:32 ` Wolfgang Schuster

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