ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Topic{} in s-pre-14 module
       [not found] <Pine.LNX.4.33.0108101117230.29419-100000@ricardo.ecn.wfu.e du>
@ 2001-08-20  9:56 ` Hans Hagen
  2001-08-20 18:32   ` Allin Cottrell
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2001-08-20  9:56 UTC (permalink / raw)
  Cc: conTeXt list

At 11:23 AM 8/10/2001 -0400, Allin Cottrell wrote:
>\Topic{David Ricardo (1772--1823)

There are a couple of ways [beware of spacing screw up]

\setuphead[Topic][incrementnumber=no]

\Topic{David Ricardo (1772--1823)}

\writetolist[Topic]{}{Whow}

so, now the Topic command will not write to the list but you can. You can 
package this as:

\def\MyTopic#1#2%
   {\Topic{#2}\writetolist[Topic]{}{#1}}

\MyTopic{David}{David Ricardo (1772--1823)}

A prelude to a more general mechanism is the following [i seem to have lost 
some code]

\let\Them\secondoftwoarguments

\setuplist[Topic][textcommand=\let\Them\firstoftwoarguments]

\starttext

\Topic{\Them{Ricardo}{David Ricardo (1772--1823)}}

\stoptext

which is a space safe operation.

Hans
-------------------------------------------------------------------------
                                   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
-------------------------------------------------------------------------


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

* Re: Topic{} in s-pre-14 module
  2001-08-20  9:56 ` Topic{} in s-pre-14 module Hans Hagen
@ 2001-08-20 18:32   ` Allin Cottrell
  0 siblings, 0 replies; 5+ messages in thread
From: Allin Cottrell @ 2001-08-20 18:32 UTC (permalink / raw)


On Mon, 20 Aug 2001, Hans Hagen wrote:

> \def\MyTopic#1#2%
>    {\Topic{#2}\writetolist[Topic]{}{#1}}

Thanks -- that did it nicely.

Allin Cottrell.


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

* Re: Topic{} in s-pre-14 module
       [not found] ` <Pine.LNX.4.33.0108101227100.29419-100000@ricardo.ecn.wfu.e du>
@ 2001-08-20  9:57   ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2001-08-20  9:57 UTC (permalink / raw)
  Cc: conTeXt list

At 12:30 PM 8/10/2001 -0400, Allin Cottrell wrote:
>On Fri, 10 Aug 2001, Allin Cottrell wrote:
>
> > E.g. I have "\Topic{David Ricardo (1772--1823)".  At present the link
> > shows up as "David..." which is not what I want.  I'd like to be able
> > to write "\Topic[Ricardo]{David Ricardo (1772--1823)" and have the
> > link show up as "Ricardo".  Any pointers on how this might be done?
>
>Sorry to follow up on my own question, but I now see that the \nolist
>command looks useful:
>
>\Topic{\nolist{David }Ricardo\nolist{ (1772-1823)}}
>
>almost does what I want, except that I get "...Ricardo..." and I don't
>want the dots.

just say

\setuplist[Topic][maxwidth=] % or 10cm or so

Hans

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


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

* Re: Topic{} in s-pre-14 module
  2001-08-10 15:23 Allin Cottrell
@ 2001-08-10 16:30 ` Allin Cottrell
       [not found] ` <Pine.LNX.4.33.0108101227100.29419-100000@ricardo.ecn.wfu.e du>
  1 sibling, 0 replies; 5+ messages in thread
From: Allin Cottrell @ 2001-08-10 16:30 UTC (permalink / raw)


On Fri, 10 Aug 2001, Allin Cottrell wrote:

> E.g. I have "\Topic{David Ricardo (1772--1823)".  At present the link
> shows up as "David..." which is not what I want.  I'd like to be able
> to write "\Topic[Ricardo]{David Ricardo (1772--1823)" and have the
> link show up as "Ricardo".  Any pointers on how this might be done?

Sorry to follow up on my own question, but I now see that the \nolist
command looks useful:

\Topic{\nolist{David }Ricardo\nolist{ (1772-1823)}}

almost does what I want, except that I get "...Ricardo..." and I don't
want the dots.

Allin Cottrell.


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

* Topic{} in s-pre-14 module
@ 2001-08-10 15:23 Allin Cottrell
  2001-08-10 16:30 ` Allin Cottrell
       [not found] ` <Pine.LNX.4.33.0108101227100.29419-100000@ricardo.ecn.wfu.e du>
  0 siblings, 2 replies; 5+ messages in thread
From: Allin Cottrell @ 2001-08-10 15:23 UTC (permalink / raw)


I like this module, but would like to make a modification.  On the
right-hand panel appears a list of topics in the presentation, each
one a link to the appropriate section.  That's fine.  But rather than
have the text for the link be a truncated version of the \Topic{}
text, I'd like to make it a chosen short string.

E.g. I have "\Topic{David Ricardo (1772--1823)".  At present the link
shows up as "David..." which is not what I want.  I'd like to be able
to write "\Topic[Ricardo]{David Ricardo (1772--1823)" and have the
link show up as "Ricardo".  Any pointers on how this might be done?
Thanks.

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC


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

end of thread, other threads:[~2001-08-20 18:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.33.0108101117230.29419-100000@ricardo.ecn.wfu.e du>
2001-08-20  9:56 ` Topic{} in s-pre-14 module Hans Hagen
2001-08-20 18:32   ` Allin Cottrell
2001-08-10 15:23 Allin Cottrell
2001-08-10 16:30 ` Allin Cottrell
     [not found] ` <Pine.LNX.4.33.0108101227100.29419-100000@ricardo.ecn.wfu.e du>
2001-08-20  9:57   ` Hans Hagen

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