ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Tried it myself first... ;=}
@ 1998-07-31 12:13 Frans Goddijn
  0 siblings, 0 replies; 4+ messages in thread
From: Frans Goddijn @ 1998-07-31 12:13 UTC (permalink / raw)


said Hans Hagen  to me:

HH> \definieersynoniem[Auteur][Auteurs][\Boek]
HH> \Auteur {FRANS} {Frans Goddijn} { \ConTeXt\ voor experts}
HH> \stelhoofdtekstenin [\FRANS] [\Boek{FRANS}]
HH> \plaatslijstmetAuteurs

I tried this, but got the titles of the books from the synonyms on the
first page of the book in one string, and in the table of contents and on
the chapter head I got both the abbreviation for the author's name and the
author's name...

I printed the pages 146--149 of the big PDF manual and banged my head on
the heavy wooden desk a few times when I couldn't grasp what the pages
meant. this didn't help...

 HH> \expanded{\hoofdstuk{...}} would have worked also

Not with my luck it didn't ;=}

Now I have it back to the simplest somewhat dumb looking way, BUT it
*works!*

\def\deauteur{} % redefine before each chapter
\def\zijnboek{} % redefine before each chapter
\stelhoofdtekstenin [ ] [\zijnboek] [\deauteur] [ ]
\stelkopin[hoofdstuk][hoofd=leeg] 

\pagina[ja]
\stelhoofdtekstenin [ ] [Liesbeth en de wereld van Bob en Daphne] 
                        [Han B. Aalberse] [ ]
\hoofdstuk{Han B. Aalberse:\\ Liesbeth en de wereld van Bob en Daphne}

tekst in chapter...

Met hartelijke groet!

 Frans Goddijn   | bbs: +31 (0)26 3217041
 Postbus 30196   | email: fg@fgbbs.iaf.nl
 6803 AD Arnhem  | tel: +31 (0)26 3219342
 The Netherlands | http://www.iaf.nl/Users/Meridian 
--
You are what you is


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

* Re: Tried it myself first... ;=}
@ 1998-07-31 16:23 Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 1998-07-31 16:23 UTC (permalink / raw)
  Cc: ntg-context

Frans Goddijn wrote:

> HH> \definieersynoniem[Auteur][Auteurs][\Boek]
> HH> \Auteur {FRANS} {Frans Goddijn} { \ConTeXt\ voor experts}

              [FRANS]

Sorry, my mistake. 

> HH> \stelhoofdtekstenin [\FRANS] [\Boek{FRANS}]
> HH> \plaatslijstmetAuteurs

This one typesets all the Authors and Books. 

Hans

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


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

* Re: Tried it myself first... ;=}
@ 1998-07-31  8:39 Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 1998-07-31  8:39 UTC (permalink / raw)
  Cc: ntg-context

Frans Goddijn wrote:

> Only problem is that the author and his booktitle are ingored in the table
> of contents, where only the colon is shown as chapter title information...

This is due to suppressed expansion when saving the titles. 

\stellijstin[hoofdstuk][expansie=ja] 

is ene oplossing, maar beter kun je het synoniemen mechanisme gebruiken,
zie \afkorting (\abbreviation). Bijkoment voordeel is dat je dan de
gebruikte auteurs kan oproepen. 

> This is the present code:
> 
> [...]
> \def\deauteur{} % (re)define before each chapter
> \def\zijnboek{} % (re)define before each chapter

\definieersynoniem[Auteur][Auteurs][\Boek]

\Auteur {FRANS} {Frans Goddijn} { \ConTeXt\ voor experts}

\stelhoofdtekstenin [\FRANS] [\Boek{FRANS}]

Nu kun je ook opvragen

\plaatslijstmetAuteurs

> % I tried the following additions, no success
> % \hoofdstuk{\geentest\deauteur:\\ \geentest\zijnboek}
> % also tried \noexpand and \expandafter instead of \geentest
> % (even though I don't have a real clue what these do)
> % one of them made the title also vanish on the chapter page,
> % the other made no difference.

Just turn expansion on. 

\expanded{\hoofdstuk{...}} would have worked also

> In LaTeX, I could define a \newcommand{\deauteur}{} and later issue a new
> command \renewcommand{\deauteur}{Han B. AALBERSE} and/or then have a
> command
> \newcommand\auteur[1]{\renewcommand{\deauteur}{#1}} but I must find out
> how to re-\def an already \def'd command ;=}

Just use \def. Suggestion: use capitals to prevent name clashes with
internal commands. 

Hans

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


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

* Tried it myself first... ;=}
@ 1998-07-30 18:16 Frans Goddijn
  0 siblings, 0 replies; 4+ messages in thread
From: Frans Goddijn @ 1998-07-30 18:16 UTC (permalink / raw)


About my wishes for clever headers, Hans Hagen said:

 HH> Try it yourself first ... 

That inspired me to have a go at it!

I have it working now, although I think I should be able to get the
commands shorter. 

Only problem is that the author and his booktitle are ingored in the table
of contents, where only the colon is shown as chapter title information...

This is the present code:

[...]
\def\deauteur{} % (re)define before each chapter
\def\zijnboek{} % (re)define before each chapter

% author's name on left of verso page, 
% the booktitle on right of recto page
% see the use of \hoofdstuk command later on
\stelhoofdtekstenin [ ] [\zijnboek] [\deauteur] [ ]

% the following line keeps headers on first chapter page empty
\stelkopin[hoofdstuk][hoofd=leeg]

\volledigeinhoud

\def\deauteur{HAN B. AALBERSE}
\def\zijnboek{Liesbeth en de wereld van Bob en Daphne}

% the folowing line gets only ":" in the table of contents for this
chapter
\hoofdstuk{\deauteur:\\ \zijnboek}

% I tried the following additions, no success
% \hoofdstuk{\geentest\deauteur:\\ \geentest\zijnboek}
% also tried \noexpand and \expandafter instead of \geentest
% (even though I don't have a real clue what these do)
% one of them made the title also vanish on the chapter page,
% the other made no difference.

tekst of chapter...

\hoofdstuk{Tweede hoofdstuk}
tekst tekstteksttekstteksttekst

\stoptekst

PS:
In LaTeX, I could define a \newcommand{\deauteur}{} and later issue a new
command \renewcommand{\deauteur}{Han B. AALBERSE} and/or then have a
command
\newcommand\auteur[1]{\renewcommand{\deauteur}{#1}} but I must find out
how to re-\def an already \def'd command ;=}

Met hartelijke groet!

 Frans Goddijn   | bbs: +31 (0)26 3217041
 Postbus 30196   | email: fg@fgbbs.iaf.nl
 6803 AD Arnhem  | tel: +31 (0)26 3219342
 The Netherlands | http://www.iaf.nl/Users/Meridian 
--
You are what you is


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

end of thread, other threads:[~1998-07-31 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-31 12:13 Tried it myself first... ;=} Frans Goddijn
  -- strict thread matches above, loose matches on Subject: below --
1998-07-31 16:23 Hans Hagen
1998-07-31  8:39 Hans Hagen
1998-07-30 18:16 Frans Goddijn

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