Re: [NTG-context] How to use module simpleslides' SideToc
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
土卜皿
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
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 土卜皿
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/simples... , there is some introduction in Simple Slides< http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simples...
A Context presentation module< http://modules.contextgarden.net/dl/t-simpleslides/doc/context/third/simples... , 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
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
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 -----------------------------------------------------------------
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
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 ______________________________**______________________________** _______________________
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
participants (5)
-
Alan BRASLAU
-
Hans Hagen
-
Sietse Brouwer
-
Thomas A. Schmitz
-
土卜皿