ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* compound titles, lists and headers
@ 2003-02-12 21:05 Henning Hraban Ramm
  2003-02-13 21:45 ` Willi Egger
  0 siblings, 1 reply; 11+ messages in thread
From: Henning Hraban Ramm @ 2003-02-12 21:05 UTC (permalink / raw)


Dear list,

my publisher forces me to set different things as titles, in headers  
and table of contents.
In some cases \nolist and \nomarking aren't enough.

here are my actual definitions:

----
\def\Untertitel#1{\blank[3pt]{\ss\bf #1}\blank} % ok
\def\Titel#1#2{{\nohyphens\chapter{#1}\Untertitel{#2}}} % ok

\def\KomplexTitel#1#2#3{{\writetolist[chapter]{#3}\nohyphens\title{#1}\U 
ntertitel{#2}}}
----

with
----
\start
\setupheadertexts[][manual entry][part][] % normally defined as  
[][chapter][part][]
\KomplexTitel{Main chapter title}{chapter subtitle}{toc entry}

Much text

\stop % of other headertext
----
Real life example:
\start
\setupheadertexts	[][Vorwort][][]
\KomplexTitel{Die neutrale Schweiz und das globale Dorf}%
{Vorwort von Prof.|~|Dr.|~|Heinrich Ott}%
{Vorwort Prof.|~|Dr.|~|Heinrich Ott:\\Die neutrale Schweiz und das  
globale Dorf}
...

Now there stay two issues:
1. I'd like to get a four-parameter command that can set the header  
text also.
2. I must get a line feed into the toc, but neither \\ nor \crlf works.

Please help!
Thanks.

Grüßlis vom Hraban!
-- 
www.fiee.net/texnique/
www.ramm.ch/context/

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

* Re: compound titles, lists and headers
  2003-02-12 21:05 compound titles, lists and headers Henning Hraban Ramm
@ 2003-02-13 21:45 ` Willi Egger
  2003-02-14 16:15   ` Henning Hraban Ramm
  0 siblings, 1 reply; 11+ messages in thread
From: Willi Egger @ 2003-02-13 21:45 UTC (permalink / raw)


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

Hi Hraban,

> 1. I'd like to get a four-parameter command that can set the header

See attachment ...

> 2. I must get a line feed into the toc, but neither \\ nor \crlf works.

I thought that \writebetweenlist[chapter]{\blank} should work. At least that
is what is stated in the manual.

Gruss Willi

[-- Attachment #2: Hraban-header.tex --]
[-- Type: application/octet-stream, Size: 921 bytes --]

\setupoutput[pdftex]

\def\Untertitel#1{\blank[3pt]\bgroup\ss\bf #1 \egroup \blank} %Funktioniert nicht in Sambeek
\def\Titel#1#2{\nohyphens\chapter{#1}\Untertitel{#2}} % ok
\def\Eintrag#1{\writetolist[chapter]{#1}} %\writebetweenlist[chapter]{\blank}: Gemäss Handbuch sollte dies gehen??
\def\Kopfeintrag#1{\setupheadertexts[#1]}

\def\KomplexTitel#1#2#3#4{\Eintrag{#3}\nohyphens\Titel{#1}\Untertitel{#2}\Kopfeintrag{#4}}


\starttext

\completecontent

%\setupheadertexts [][Vorwort][][]
\KomplexTitel{Die neutrale Schweiz und das globale Dorf}%
{Vorwort von Prof.|~|Dr.|~|Heinrich Ott}%
{Vorwort Prof.|~|Dr.|~|Heinrich Ott: Die neutrale Schweiz und das
globale Dorf}{Vorwort ha,ha}


\input tufte

\KomplexTitel{Die Schweiz und das  Dorf}%
{Einleitung von Prof.|~|Dr.|~|Heinrich Ott}%
{Einleitung Prof.|~|Dr.|~|Heinrich Ott: Die Schweiz und das Dorf}{Einleitung}

\input tufte

\stoptext

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

* Re: compound titles, lists and headers
  2003-02-13 21:45 ` Willi Egger
@ 2003-02-14 16:15   ` Henning Hraban Ramm
  2003-02-14 21:21     ` Willi Egger
  0 siblings, 1 reply; 11+ messages in thread
From: Henning Hraban Ramm @ 2003-02-14 16:15 UTC (permalink / raw)



Am Donnerstag, 13.02.03 um 22:45 Uhr schrieb Willi Egger:

> \def\Eintrag#1{\writetolist[chapter]{#1}} 
> %\writebetweenlist[chapter]{\blank}: Gemäss Handbuch sollte dies 
> gehen??

That works, but it's not what I asked after.
I need a CRLF *in* the faked chapter name, no blank line between some 
entries.

> \def\Kopfeintrag#1{\setupheadertexts[#1]}

Ok, that's what I'm using already.
I thought to change perhaps the variable...
But you're right, that's enough.


Grüßlis vom Hraban!
-- 
www.fiee.net/texnique/
www.ramm.ch/context/

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

* Re: compound titles, lists and headers
  2003-02-14 16:15   ` Henning Hraban Ramm
@ 2003-02-14 21:21     ` Willi Egger
  2003-02-14 22:40       ` Henning Hraban Ramm
  0 siblings, 1 reply; 11+ messages in thread
From: Willi Egger @ 2003-02-14 21:21 UTC (permalink / raw)


Hi Hraban,

Weil die Katze das Mausen nicht lassen kann ...

> That works, but it's not what I asked after.
> I need a CRLF *in* the faked chapter name, no blank line between some
> entries.

\def\Eintrag#1{\writetolist[chapter]{%

\framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsize}]{
#1}}}

May be this is not anwering everything. In my test file I was able to
produce a TOC where different length of entries did break into two lines...

Willi

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

* Re: compound titles, lists and headers
  2003-02-14 21:21     ` Willi Egger
@ 2003-02-14 22:40       ` Henning Hraban Ramm
  2003-02-15 11:23         ` Willi Egger
  2003-02-16 23:31         ` Hans Hagen
  0 siblings, 2 replies; 11+ messages in thread
From: Henning Hraban Ramm @ 2003-02-14 22:40 UTC (permalink / raw)


> \def\Eintrag#1{\writetolist[chapter]{%
>
> \framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsi 
> ze}]{
> #1}}}

Thanks for the tip. I have now:

\def\KomplexTitel#1#2#3{%
{\writetolist[chapter]{%
\framed[{frame=off, align=right,
width=0.8\textwidth, height=2\baselineskip,
offset=none}]{#3}%
}%
\nohyphens\title{#1}%
\Untertitel{#2}}}

But the code (fixed measures) is as ugly as the output.
The lines in the frames are set a bit to high, and the page number is  
too low.
I guess it could work with linecorrection, but that always throws  
errors (at least
if used in a \def).

Any more hints?

Grüßlis vom Hraban!
-- 
www.fiee.net/texnique/
www.ramm.ch/context/

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

* Re: compound titles, lists and headers
  2003-02-14 22:40       ` Henning Hraban Ramm
@ 2003-02-15 11:23         ` Willi Egger
  2003-02-16 23:31         ` Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Willi Egger @ 2003-02-15 11:23 UTC (permalink / raw)


Hi Hraban,

> But the code (fixed measures) is as ugly as the output.
> The lines in the frames are set a bit to high, and the page number is
> too low.
> I guess it could work with linecorrection, but that always throws
> errors (at least
> if used in a \def).
>
> Any more hints?

What you could try is the trickery in paragraph 4.19 pages 101 and following
of the English Manual. There Hans presents possibilities to use different
boxes with different alignment.

I believe, that with the problem you deal you will have to make some
'low'-level definitions.


Gruss Willi

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

* Re: compound titles, lists and headers
  2003-02-14 22:40       ` Henning Hraban Ramm
  2003-02-15 11:23         ` Willi Egger
@ 2003-02-16 23:31         ` Hans Hagen
  2003-02-17 21:54           ` Henning Hraban Ramm
  2010-09-26 15:54           ` Tomas Bures
  1 sibling, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2003-02-16 23:31 UTC (permalink / raw)


At 11:40 PM 2/14/2003 +0100, you wrote:
>>\def\Eintrag#1{\writetolist[chapter]{%
>>
>>\framed[{frame=on,align=right,width=0.5\textwidth,height=2.5\bodyfontsi ze}]{
>>#1}}}
>
>Thanks for the tip. I have now:
>
>\def\KomplexTitel#1#2#3{%
>{\writetolist[chapter]{%
>\framed[{frame=off, align=right,
>width=0.8\textwidth, height=2\baselineskip,
>offset=none}]{#3}%
>}%
>\nohyphens\title{#1}%
>\Untertitel{#2}}}
>
>But the code (fixed measures) is as ugly as the output.
>The lines in the frames are set a bit to high, and the page number is
>too low.
>I guess it could work with linecorrection, but that always throws
>errors (at least
>if used in a \def).
>
>Any more hints?

(untested)

better make a dedicated list:

   \definelist
     [mylist]

and configure that one (so no \framed in write)

   \setuplist
     [mychapter]
     [alternative=command,
      command=\MyChapterList]

with something

   \def\ChapterList#1#2#3%
     {\framed
        [frame=off,
         align={right,broad,nothyphenated},
         width=0.8\textwidth,
         height=2\baselineskip,
         offset=none]
        {#2}}

your title command

   \def\KomplexTitel#1#2#3%
     {\title{#1}\subject{#2}\writetolist[mychapter]{}{#3}}

   (next version will contain a direct write command, which avoids an 
interfering node)

call lists like:

   \placelist[chapter,mychapter]

etc
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: compound titles, lists and headers
  2003-02-16 23:31         ` Hans Hagen
@ 2003-02-17 21:54           ` Henning Hraban Ramm
  2010-09-26 15:54           ` Tomas Bures
  1 sibling, 0 replies; 11+ messages in thread
From: Henning Hraban Ramm @ 2003-02-17 21:54 UTC (permalink / raw)


> better make a dedicated list:
>   \definelist
>     [mylist]

I tried such also, defined a list and something like
\definecombinedlist	[inhalt]
					[part, chapter, mychapter]
					[level=chapter, alternative=b]

But I got only errors.

Now everything's too late, I had to deliver the book today.
I wrote one line with \writebetweenlist and \moveongrid
and the second with \writetolist -- not really sophisticated
or clean logical markup, but the only I got working.

I'll send you a template when it's printed.

Thank you anyway.

Grüßlis vom Hraban!
-- 
www.fiee.net/texnique/
www.ramm.ch/context/

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

* Re: compound titles, lists and headers
  2003-02-16 23:31         ` Hans Hagen
  2003-02-17 21:54           ` Henning Hraban Ramm
@ 2010-09-26 15:54           ` Tomas Bures
  2010-09-26 16:06             ` Wolfgang Schuster
  1 sibling, 1 reply; 11+ messages in thread
From: Tomas Bures @ 2010-09-26 15:54 UTC (permalink / raw)
  To: ntg-context

Dear all,

I found this useful, but still I'm wondering, how shall I extend the 
\KomplexTitel to put current chapter number to the \writetolist command?

Thank you. Best regards,
Tomas

On 17.2.2003 0:31, Hans Hagen wrote:
>
> better make a dedicated list:
>
> \definelist
> [mylist]
>
> and configure that one (so no \framed in write)
>
> \setuplist
> [mychapter]
> [alternative=command,
> command=\MyChapterList]
>
> with something
>
> \def\ChapterList#1#2#3%
> {\framed
> [frame=off,
> align={right,broad,nothyphenated},
> width=0.8\textwidth,
> height=2\baselineskip,
> offset=none]
> {#2}}
>
> your title command
>
> \def\KomplexTitel#1#2#3%
> {\title{#1}\subject{#2}\writetolist[mychapter]{}{#3}}
>
> (next version will contain a direct write command, which avoids an
> interfering node)
>
> call lists like:
>
> \placelist[chapter,mychapter]
>
> etc
> -------------------------------------------------------------------------
> Hans Hagen | PRAGMA ADE | pragma@wxs.nl
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
> -------------------------------------------------------------------------
> information: http://www.pragma-ade.com/roadmap.pdf
> documentation: http://www.pragma-ade.com/showcase.pdf
> -------------------------------------------------------------------------

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

* Re: compound titles, lists and headers
  2010-09-26 15:54           ` Tomas Bures
@ 2010-09-26 16:06             ` Wolfgang Schuster
  2010-09-26 18:39               ` Tomas Bures
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2010-09-26 16:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 26.09.2010 um 17:54 schrieb Tomas Bures:

> Dear all,
> 
> I found this useful, but still I'm wondering, how shall I extend the \KomplexTitel to put current chapter number to the \writetolist command?

I wouldn’t use this method anymore because with \startchapter etc. you have a even more powerful mechanism without such tricks, see also http://www.ntg.nl/pipermail/ntg-context/2010/052429.html

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 786 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] 11+ messages in thread

* Re: compound titles, lists and headers
  2010-09-26 16:06             ` Wolfgang Schuster
@ 2010-09-26 18:39               ` Tomas Bures
  0 siblings, 0 replies; 11+ messages in thread
From: Tomas Bures @ 2010-09-26 18:39 UTC (permalink / raw)
  To: ntg-context

Thank you Wolfgang and all,

this was exactly what I needed. One more thing. I would like to add a 
date to every chapter in TOC. I do it this way:

\define[1]\ChapterListTextCommand{%
#1\hskip 1.5em
\hbox{
\doiftextelse{\structurelistuservariable{date}{(\structurelistuservariable{datum})}{}
}
}

But actually I would like to align the date to some fixed horizontal 
position. Something like this:

1. Title of chapter 1         (9.2.2010) .... 5
2. Title of another chapter   (10.3.2010) .. 10
3. A very long title of a chapter
                               (10.5.2010) .. 34
4. Title of fourth chap.      (8.4.2010) ... 25

Another complication is that I would like the line to snap to a grid.
I tried it with framed, but I'm not good enough in ConTeXt.

Please, any idea?

Thank you, best regards,
Tomas


On 26.9.2010 18:06, Wolfgang Schuster wrote:
>
> Am 26.09.2010 um 17:54 schrieb Tomas Bures:
>
>> Dear all,
>>
>> I found this useful, but still I'm wondering, how shall I extend the
>> \KomplexTitel to put current chapter number to the \writetolist command?
>
> I wouldn’t use this method anymore because with \startchapter etc. you
> have a even more powerful mechanism without such tricks, see also
> http://www.ntg.nl/pipermail/ntg-context/2010/052429.html
>
> 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
> ___________________________________________________________________________________

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

end of thread, other threads:[~2010-09-26 18:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12 21:05 compound titles, lists and headers Henning Hraban Ramm
2003-02-13 21:45 ` Willi Egger
2003-02-14 16:15   ` Henning Hraban Ramm
2003-02-14 21:21     ` Willi Egger
2003-02-14 22:40       ` Henning Hraban Ramm
2003-02-15 11:23         ` Willi Egger
2003-02-16 23:31         ` Hans Hagen
2003-02-17 21:54           ` Henning Hraban Ramm
2010-09-26 15:54           ` Tomas Bures
2010-09-26 16:06             ` Wolfgang Schuster
2010-09-26 18:39               ` Tomas Bures

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