ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* An Index problem (repost)
@ 2007-03-06  8:44 luigi scarso
  2007-03-06  9:40 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: luigi scarso @ 2007-03-06  8:44 UTC (permalink / raw)
  To: ntg-context

I have the following
\starttext
%%\placemaincontent
\chapter{AAA}
\section{Hause one} Foo one \page
\section{Hause two} Foo  two \page
\section{Hause three} Foo  three \page
\section{Hause four} Foo  four\page
\section{Dog boo} Koo   \page
\section{Dog foo} Boo \page
\section{Money ba} Boo \page
\section{Mail bee} Ugh \page
\stoptext
In main content I should like to have
\bf{AAA} %% no problem here
\bf{HAUSE} one ..... page x
 Hause two ..............page x
 Hause three............page x
 Hause four ..............page x
\bf{DOG} boo ...........page x
 Dog foo.....................page x
\bf{MONEY} ba.........page x
\bf{MAIL} bee.............page x

ie, the very first word in bold face and upper case,
the following in normal face if and only of the very first word was
equal to the first
word of actual item (I know, it's strange).

Many thanks in advance
luigi

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

* Re: An Index problem (repost)
  2007-03-06  8:44 An Index problem (repost) luigi scarso
@ 2007-03-06  9:40 ` Taco Hoekwater
  2007-03-06 11:11   ` luigi scarso
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2007-03-06  9:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hi Luigi,

Sorry, no time right now for an elaborate example.

luigi scarso wrote:
> 
> ie, the very first word in bold face and upper case,
> the following in normal face if and only of the very first word was
> equal to the first
> word of actual item (I know, it's strange).

I would propose you create your own combined list
(\definecombinedlist) and use that instead of the TOC.
You have to write the items to that list explicitly then,
but it would be reasonably straightforward.


Another option is to create a dummy macro that you
redefine where it is needed.


    \unexpanded \def\tocbf#1{{\bf #1}}
vs
    \unexpanded \def\tocbf#1{#}

and
    \section{\tocbf{Bold} ..}

Best, Taco

	

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

* Re: An Index problem (repost)
  2007-03-06  9:40 ` Taco Hoekwater
@ 2007-03-06 11:11   ` luigi scarso
  0 siblings, 0 replies; 3+ messages in thread
From: luigi scarso @ 2007-03-06 11:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3/6/07, Taco Hoekwater <taco@elvenkind.com> wrote:
>
> Hi Luigi,
>
> Sorry, no time right now for an elaborate example.
>
> luigi scarso wrote:
> >
> > ie, the very first word in bold face and upper case,
> > the following in normal face if and only of the very first word was
> > equal to the first
> > word of actual item (I know, it's strange).
>
> I would propose you create your own combined list
> (\definecombinedlist) and use that instead of the TOC.
> You have to write the items to that list explicitly then,
> but it would be reasonably straightforward.
>
>
> Another option is to create a dummy macro that you
> redefine where it is needed.
>
>
>     \unexpanded \def\tocbf#1{{\bf #1}}
> vs
>     \unexpanded \def\tocbf#1{#}
>
> and
>     \section{\tocbf{Bold} ..}
>
> Best, Taco

OK.

\def\SectionCommand#1#2#3{%
%% something like this ??
%% (check for #1)
%% if #1 == 1
%% then
%%   put bold+CAP #2
%%   store #2 in LastSecTitle
%% else
%%   if #2 == LastSecTile
%%   then
%%      put normal #2
%%   else
%%      put bold+CAP #2
%%      store #2 in LastSecTitle
%%
}%
\setuplist[section]
          [alternative=none,
	   sectionnumber=no, partnumber=no,
	   command={\SectionCommand}]

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

end of thread, other threads:[~2007-03-06 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-06  8:44 An Index problem (repost) luigi scarso
2007-03-06  9:40 ` Taco Hoekwater
2007-03-06 11:11   ` luigi scarso

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