ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to use module simpleslides' SideToc
@ 2013-01-08  9:35 土卜皿
  2013-01-08  9:56 ` Alan BRASLAU
  0 siblings, 1 reply; 7+ messages in thread
From: 土卜皿 @ 2013-01-08  9:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

hi, all
  I want to use simplesides' SideToc wirte a presentation like sample
SideToc.pdf<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/styles/SideToc.pdf>,
there is some introduction in Simple
Slides<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf>
A Context presentation
module<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf>,
but no talking about how to set  background color in every region.
  where can I get the tex source of SideToc.pdf, or tell me what should I
do?

Thanks a lot!

BEST REGARDS
PengCZ

[-- Attachment #1.2: Type: text/html, Size: 872 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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] 7+ messages in thread

* Re: How to use module simpleslides' SideToc
  2013-01-08  9:35 How to use module simpleslides' SideToc 土卜皿
@ 2013-01-08  9:56 ` Alan BRASLAU
       [not found]   ` <CADT5_1_B875ydrv39Cc9ROgB6HcHo5AJM3U24mkE5Cprrp7ZHg@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Alan BRASLAU @ 2013-01-08  9:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I believe that simpleslides SideToc style is broken (has been for a
while). Adrien and Thomas who wrote the simpleslides module will need
to eventually look into this.

Alan




On Tue, 8 Jan 2013 17:35:07 +0800
土卜皿 <pengcz.nwpu@gmail.com> wrote:

> hi, all
>   I want to use simplesides' SideToc wirte a presentation like sample
> SideToc.pdf<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/styles/SideToc.pdf>,
> there is some introduction in Simple
> Slides<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf>
> A Context presentation
> module<http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf>,
> but no talking about how to set  background color in every region.
>   where can I get the tex source of SideToc.pdf, or tell me what
> should I do?
> 
> Thanks a lot!
> 
> BEST REGARDS
> PengCZ

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

* Re: How to use module simpleslides' SideToc
       [not found]   ` <CADT5_1_B875ydrv39Cc9ROgB6HcHo5AJM3U24mkE5Cprrp7ZHg@mail.gmail.com>
@ 2013-01-08 14:10     ` Alan BRASLAU
  2013-01-08 22:26       ` Thomas A. Schmitz
  0 siblings, 1 reply; 7+ messages in thread
From: Alan BRASLAU @ 2013-01-08 14:10 UTC (permalink / raw)
  To: 土卜皿, mailing list for ConTeXt users

Yes,

Many simpleslides styles seem to be broken.
Thomas seems to be aware of this but has not gotten to looking into it.

(t-slidesvisualcounter.tex is part of the simpleslides module:
texmf-modules/tex/context/third/simpleslides)

Alan

On Tue, 8 Jan 2013 21:05:38 +0800
土卜皿 <pengcz.nwpu@gmail.com> wrote:

> hi, all
>    Also, simpleslides' Shaded,Boxed are not successful, when
> compiling I got the same error as follows:
> 84 >>  \definevisualcounter
> 85       [simpleslides:shadedcounter]
> 86       [markers]
> 87       [counter=userpage,
> 88     %   distance=0.5cm,
> 89        distance={(\the\dimexpr\visualcounterparameter{maxwidth})/m
> + width},
> 90        path=unitcircle,
> 91        maxwidth=\textwidth,
> 92        width=0.3cm]
> 93
> 94     \definepalet[visualcounter:markers]
> 
> I thought the above error  was led by t-visualcounter, so I executed
> the command:
> sh first-setup.sh --modules="t-visualcounter"
> but it did not find module visualcounter,
> what should I do?
> 
> Thanks!
> BEST REGARDS
> 
> 
> 2013/1/8 Alan BRASLAU <alan.braslau@cea.fr>
> 
> > I believe that simpleslides SideToc style is broken (has been for a
> > while). Adrien and Thomas who wrote the simpleslides module will
> > need to eventually look into this.
> >
> > Alan
> >
> >
> >
> >
> > On Tue, 8 Jan 2013 17:35:07 +0800
> > 土卜皿 <pengcz.nwpu@gmail.com> wrote:
> >
> > > hi, all
> > >   I want to use simplesides' SideToc wirte a presentation like
> > > sample SideToc.pdf<
> > http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/styles/SideToc.pdf
> > >,
> > > there is some introduction in Simple
> > > Slides<
> > http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf
> > >
> > > A Context presentation
> > > module<
> > http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simpleslides/simpleslides.pdf
> > >,
> > > but no talking about how to set  background color in every region.
> > >   where can I get the tex source of SideToc.pdf, or tell me what
> > > should I do?
> > >
> > > Thanks a lot!
> > >
> > > BEST REGARDS
> > > PengCZ

-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.braslau@cea.fr
___________________________________________________________________________________
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] 7+ messages in thread

* Re: How to use module simpleslides' SideToc
  2013-01-08 14:10     ` Alan BRASLAU
@ 2013-01-08 22:26       ` Thomas A. Schmitz
  2013-01-08 22:55         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas A. Schmitz @ 2013-01-08 22:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/08/2013 03:10 PM, Alan BRASLAU wrote:
> Yes,
>
> Many simpleslides styles seem to be broken.
> Thomas seems to be aware of this but has not gotten to looking into it.
>
> (t-slidesvisualcounter.tex is part of the simpleslides module:
> texmf-modules/tex/context/third/simpleslides)
>
> Alan

I hope there aren't that many broken styles... Anyway, I'm not teaching 
this year, so I don't use the module too often, so this slips by me. I 
looked at the SideToc style, but I can't figure out the problem; 
something must have changed in the core. So all I can do is give a 
minimal example for what fails and hope that one of the real experts 
will have an idea. Most of the clever code in the example is actually 
Wolfgang's... So here comes:

\setuplayout [leftmargin=4cm,
	      backspace=5cm]

\define[3]\FancyEntry
  {\doifelse{#1}{\MyMark}%
     {\color[red]{#1 = \MyMark}\blank[medium]}
     {\color[blue]{#1 = \MyMark}\blank[medium]}
}

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
   {\dosingleargument\doTopic}

\def\doTopic[#1]{%
   \def\MyMark{#1}%
   \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
           [pagenumber=no,
            alternative=command,
            command=\FancyEntry]

\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]

First Topic

\page

\Topic[Second]

Second Topic

\stoptext

The problem is that the \doifelse always evaluates to "false," even when 
\MyMark is defined and equal to the topic; I hope the example clarifies 
this. [tested with latest beta mkiv]

All best

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

* Re: How to use module simpleslides' SideToc
  2013-01-08 22:26       ` Thomas A. Schmitz
@ 2013-01-08 22:55         ` Hans Hagen
  2013-01-09  0:38           ` 土卜皿
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2013-01-08 22:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz

On 1/8/2013 11:26 PM, Thomas A. Schmitz wrote:

> \define[3]\FancyEntry
>   {\doifelse{#1}{\MyMark}%
>      {\color[red]{#1 = \MyMark}\blank[medium]}
>      {\color[blue]{#1 = \MyMark}\blank[medium]}
> }

When you're back in teaching mode I'll tell you how to do it properly, 
so here's a quick hack:

\define[3]\FancyEntry {
     \ifnum\structurelistrealpagenumber=\realpageno\relax SAME \else 
OTHER \fi PAGE
     \blank[medium]
     \doifelse \rawstructurelistfirst \MyMark
       {\color[red] {#1 = \MyMark}}
       {\color[blue]{#1 = \MyMark}}
     \blank[medium]
}

In your case you compare an unexpandable macro with a regular one so 
that will always be false.

Last year the list macros became more flexible and more properties are 
available as either unexpandable or expandable macro

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 7+ messages in thread

* Re: How to use module simpleslides' SideToc
  2013-01-08 22:55         ` Hans Hagen
@ 2013-01-09  0:38           ` 土卜皿
  2013-01-09 14:47             ` Sietse Brouwer
  0 siblings, 1 reply; 7+ messages in thread
From: 土卜皿 @ 2013-01-09  0:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

hi,
 I compiled the following code,

\setuplayout [leftmargin=4cm,
              backspace=5cm]

\define[3]\FancyEntry {
    \ifnum\structurelistrealpagenumber=\realpageno\relax SAME \else OTHER
\fi PAGE
    \blank[medium]
    \doifelse \rawstructurelistfirst \MyMark

      {\color[red] {#1 = \MyMark}}
      {\color[blue]{#1 = \MyMark}}
    \blank[medium]
}

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  \def\MyMark{#1}%
  \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
          [pagenumber=no,
           alternative=command,
           command=\FancyEntry]

\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]

First Topic

\page

\Topic[Second]

Second Topic

\stoptext

but I can not get the right pdf, please check the attachment!

context  version: 2013.01.08 01:19
LuaTeX, Version beta-0.74.0-2012122510

  Thanks!

BEST REGARDS
PengCZ


2013/1/9 Hans Hagen <pragma@wxs.nl>

> On 1/8/2013 11:26 PM, Thomas A. Schmitz wrote:
>
>  \define[3]\FancyEntry
>>   {\doifelse{#1}{\MyMark}%
>>      {\color[red]{#1 = \MyMark}\blank[medium]}
>>      {\color[blue]{#1 = \MyMark}\blank[medium]}
>> }
>>
>
> When you're back in teaching mode I'll tell you how to do it properly, so
> here's a quick hack:
>
> \define[3]\FancyEntry {
>     \ifnum\**structurelistrealpagenumber=\**realpageno\relax SAME \else
> OTHER \fi PAGE
>     \blank[medium]
>     \doifelse \rawstructurelistfirst \MyMark
>
>       {\color[red] {#1 = \MyMark}}
>       {\color[blue]{#1 = \MyMark}}
>     \blank[medium]
> }
>
> In your case you compare an unexpandable macro with a regular one so that
> will always be false.
>
> Last year the list macros became more flexible and more properties are
> available as either unexpandable or expandable macro
>
> Hans
>
> ------------------------------**------------------------------**-----
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> ------------------------------**------------------------------**-----
>
> ______________________________**______________________________**
> _______________________
> 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 <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/<http://foundry.supelec.fr/projects/contextrev/>
> wiki     : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 4716 bytes --]

[-- Attachment #2: sidetuc.pdf --]
[-- Type: application/pdf, Size: 7582 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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] 7+ messages in thread

* Re: How to use module simpleslides' SideToc
  2013-01-09  0:38           ` 土卜皿
@ 2013-01-09 14:47             ` Sietse Brouwer
  0 siblings, 0 replies; 7+ messages in thread
From: Sietse Brouwer @ 2013-01-09 14:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello PengCZ,

This is not exactly what you want, because it took me very long to
remember to look at SideToc.pdf. But it is close, and I have tried to
put in a lot of comments. Hopefully you can solve it from here?

Cheers, and good luck,
Sietse

% * We use \Topic to set the current topic, and to
%   record it in the topic list

% * \setuptexttexts places the topic list in the left margin
%   on every page
%   http://wiki.contextgarden.net/Command/setuptexttexts
%   (needs improving)

% * \setupbackgrounds sets the backgrond color of the left
%   margin on every page: this highlights the TOC area
%   http://wiki.contextgarden.net/Command/setupbackgrounds

% * the entry typesetting command (called \FancyTopic) typesets
%   entries inside a \framed block as wide as the margin is.
%   This allows highlighting the background of the current topic,
%   and also allows linebreaks etc.
%   http://wiki.contextgarden.net/Command/framed

\setuppapersize[A6,landscape][A6,landscape]
\setuplayout [leftmargin=5cm,
              backspace=6cm,
              width=6cm,
          ]
% Color for the margin (topic list area)
\definecolor[colMyTopics][r=1,g=0.7,b=0.7] % pink

% Color for the current topic (in the topic list)
% I like white, because it attaches the current topic to the
%   main area; but perhaps you prefer pale yellow?
% \definecolor[colCurrentTopic][r=1,g=1,b=0.7] % pale yellow
\definecolor[colCurrentTopic][r=1,g=1,b=1] % white

% When \placelist[MyTopics] is called, it calls this \FancyEntry
% function to typeset each individual entry.
% #1: entry (i.e. topic name) to typeset
% \MyMark: section (i.e. topic name) we are currently in (set by
%     \Topic).
\define[3]\FancyEntry {
    \ifnum\structurelistrealpagenumber=\realpageno\relax SAME \else
OTHER \fi PAGE
    \blank[medium]
    \doifelse \rawstructurelistfirst \MyMark
      {\framed[frame=off,
               align=normal,
               width=5cm, % same as leftmargin in \setuplayout
               background=color,
               backgroundcolor=colCurrentTopic]{%
        --- current mark's entry \par
        \color[red]{--- arg (entry): #1}\par
        \color[red]{--- mark: \MyMark}
      }}
      {\framed[frame=off, align=normal]{%
        --- other entry \par
        \color[blue]{--- arg (entry): #1}\par
        \color[blue]{--- mark: \MyMark}
      }}
    \blank[medium]
}

% Show the margin areas, headers, footers, etc.
\showframe

% Color the margin area. \setupbackgrounds must be called after
% \showframe, or \showframe will 'overwrite' \setupbackgrounds.
\setupbackgrounds[text][leftmargin][
    background=color,
    backgroundcolor=colMyTopics]
\definelist[MyTopics][criterium=all]

\def\MyMark{}

% \Topic takes one optional argument: #1, the topic name.
\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  % let it be known that we are in section #1 (used by \FancyTopic)
  \def\MyMark{#1}%
  % let topic #1 appear in the TOC (well, the MyTopics list)
  \writetolist[MyTopics]{#1}{}%
}

\setuplist[MyTopics]
          [pagenumber=no,
           alternative=command,
           command=\FancyEntry]

% On every page, place the TOC in the margin, plzkthx
\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]

\starttext

\Topic[First]
First Topic

\page

\Topic[Second]
Second Topic

\page

\Topic[Third]
Third Topic

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

end of thread, other threads:[~2013-01-09 14:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08  9:35 How to use module simpleslides' SideToc 土卜皿
2013-01-08  9:56 ` Alan BRASLAU
     [not found]   ` <CADT5_1_B875ydrv39Cc9ROgB6HcHo5AJM3U24mkE5Cprrp7ZHg@mail.gmail.com>
2013-01-08 14:10     ` Alan BRASLAU
2013-01-08 22:26       ` Thomas A. Schmitz
2013-01-08 22:55         ` Hans Hagen
2013-01-09  0:38           ` 土卜皿
2013-01-09 14:47             ` Sietse Brouwer

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