Re: [NTG-context] [MkIV] How to get the local size of a column
Hello Hans, I try to get the equivalent of \the\hsize in Lua, in order to render some verbatim text to the current width of the column. Thank you for your help, Pierre-François. On 19 May 2015, at 12:16, Hans Hagen pra...@wxs.nl wrote: On 5/18/2015 8:00 PM, Pierre-François Bonnefoi wrote: Hello, Is it possible to get the current width of a column from a paragraph into Lua ? it all depends on where and how you access that but normally the width of a hlist will do Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr mailto:bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___ -- - 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] [MkIV] How to get the local size of a column
Thank you ! tex.hzize / 2^16 gives me the expected value ! This is a lot to learn :) On 19 May 2015, at 13:04, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: contex -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] [MkIV] How to get the local size of a column
I've found a workaround by passing the value as an argument to the lua code : \def\stopzonetexte {\ctxlua{userdata.traiterbuffer(buffers.getcontent('zonetexte'),[==[\the\hsize]==])} Now, I try to figure how to get em size in points. On 19 May 2015, at 12:31, Pierre-François Bonnefoi bonne...@unilim.fr wrote: Hello Hans, I try to get the equivalent of \the\hsize in Lua, in order to render some verbatim text to the current width of the column. Thank you for your help, Pierre-François. On 19 May 2015, at 12:16, Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl wrote: On 5/18/2015 8:00 PM, Pierre-François Bonnefoi wrote: Hello, Is it possible to get the current width of a column from a paragraph into Lua ? it all depends on where and how you access that but normally the width of a hlist will do -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
[NTG-context] [MkIV] How to get the local size of a column
Hello, Is it possible to get the current width of a column from a paragraph into Lua ? Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] line number overwriting
Hello, I've tracked down the problem : \def\numeroLigneCode#1{\inframed[width=fit,strut=yes,frame=off,rightframe=on]{\switchtobodyfont[9pt]#1}} \definetyping[code][numbering=line,page=yes,bodyfont=9pt,before={% \begingroup% \setuplinenumbering[location=text,align=left,style=\tt,command=\numeroLigneCode,distance=-.5em,width=2em]% },after={\endgroup},tab=2] \starttext \startcode one two three \stopcode \stoptext The result is that the option command=\numeroLigneCode is oddly ignored. If I put the command \setuplinenumbering[location=text,align=left,style=\tt,command=\numeroLigneCode,distance=-.5em,width=2em] outside of the definition of the verbatim zone code, it works. This behavior seems rather strange and when it collides with using verbatim zone enclosed in framedtext, it leads to two line numbering overwriting each other. regards, Pierre-François. On 28 Apr 2015, at 23:43, Pierre-François Bonnefoi bonne...@unilim.fr wrote: Hello, I've got some strange behavior with verbatim text : PastedGraphic-1.png The lines of the verbatim text got two different numbering that overwrite each other. I think that I've read something about this but I don't find it in the mail archive. If I remember correctly, there is a bug into the line number routine when you use a verbatim text into a column set with the paragraph command and when the verbatim text is enclosed into a frame. Regards, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr mailto:bonne...@unilim.fr http://libpfb.so/ http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] line number overwriting
Thank you very much for your solution. When using it into a paragraph, the line number disappears : \defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on] \definetyping[code][numbering=line,page=yes,bodyfont=9pt,tab=2] \setuplinenumbering[code][location=text,align=left,style={\switchtobodyfont[9pt,tt]},command=\numeroLigneCode,distance=-.5em,width=2em] \defineparagraphs[TwoCols][n=2,before=,after=] \starttext \startTwoCols \startcode one two three \stopcode \TwoCols hum \stopTwoCols \stoptext I've tried to use the command \definelinenumbering without success. I don't know what happened... On 29 Apr 2015, at 16:40, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: \defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on] \definetyping[code][numbering=line,page=yes,bodyfont=9pt,tab=2] \setuplinenumbering[code][location=text,align=left,style={\switchtobodyfont[9pt,tt]},command=\numeroLigneCode,distance=-.5em,width=2em] -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
[NTG-context] line number overwriting
Hello, I've got some strange behavior with verbatim text : The lines of the verbatim text got two different numbering that overwrite each other. I think that I've read something about this but I don't find it in the mail archive. If I remember correctly, there is a bug into the line number routine when you use a verbatim text into a column set with the paragraph command and when the verbatim text is enclosed into a frame. Regards, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Hello Wolfgang, thank you very much for all these solutions. Do you have any recommendations about using one over the others ? Currently, the conditional selection of my slides works pretty good : I have created the following macros : \courseSlideList[resavi][1-10,20-30,34,37-40], this macro allows me to activate all the slides given by their number in a list defined in the current file ; \includeSelectionFrom{adressage_groupe_utf8}{1-100} this macro allows me to include some slides given by a list of number from an external file ; \skipSlide that can suppress the process of the following slide. Of course, all of theses macros work beautifully recursively with files using them (the numbering macro work nicely on currently defined slides as included slides). This is why I use only ConTeXt for all my work ! Cheers ! Pierre-François. On 08 Nov 2014, at 12:08, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 08.11.2014 um 00:00 schrieb Pierre-François Bonnefoi bonne...@unilim.fr: Just before going to bed, I've found a solution with all your help and the help of Taco Hoekwater through the ntg mail archive : \def\startSlide% {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}% \dostartbuffer[Slide][startSlide][stopSlide]} Let me know if it's my philosopher's stone... I've tried it and it works so far. No more ugly gobbling, my mind is free. Below are two other methods. Method 1 === \newconditional\SkipSlide \setfalse\SkipSlide \definebuffer[Slide] \def\stopSlide {\ifconditional\SkipSlide \else \page \getbuffer[\thedefinedbuffer{Slide}]% \fi \setfalse\SkipSlide} \starttext \startSlide First Slide \stopSlide \settrue\SkipSlide \startSlide Second Slide \stopSlide \startSlide Third Slide \stopSlide \stoptext Method 2 === \def\startSlide {\dosingleempty\dostartSlide} \def\dostartSlide[#1]% {\doifelse{#1}{-} {\let\stopSlide\stopSlideNop} {\let\stopSlide\stopSlideYes}% \grabbufferdata[Slide][startSlide][stopSlide]} \let\stopSlideNop\relax \def\stopSlideYes {\page \getbuffer[Slide]} \starttext \startSlide First Slide \stopSlide \startSlide[-] Second Slide \stopSlide \startSlide Third Slide \stopSlide \stoptext Wolfgang ___ 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Hello Keith and Luigi, On 06 Nov 2014, at 17:57, Keith J. Schultz keithjschu...@web.de wrote: Hi Pierre, I think you are approaching your problem from the wrong direction! The way I understand your problem is that you have certain criteria in your slides when encountered decides whether it should be output or not. Yes. If this is the case then what you have is a classical parsing problem. That is you start parsing the content of the slide, until you find the criteria that excludes it or come to the end of the slide. If you find the criteria then you just continue reading to the end of the slide and not output it, otherwise send the gathered content to be output. Yes, beautifully expressed. That would be the most elegant way and can be used for dynamic content. Yes, but my current solution brakes on crossing the path of C code : I use \gobbleinput that is defined as (according to some documentation) : \def\gobbleuntil#1% {\long\def\next##1#1{}\next} As I understand this code, the goblling is made as enclosing the text that you dan't want to be added to the output as the body of a function. If the text contains some restricted characters as the %, this proposition brakes. Now, If you already know if the level is know a head of time the slides can be given a level and you can use a custom mode that only outputs the slides to this level. This is what I've made : I express a list of numbered slides and check if each slide has to be outputted or not into the final document. Another way is to build a database or table which is processed from which to choose your slides! This is the path I've followed so far with success for some of my lectures. But, when I've applied the same process to slides containing C code, this process brakes. I've tried yesterday evening to modify my slide definition to use the solution provided by Luigi, but I've failed. Or define a start/stop command that has a user level parameter and use mode to decide output or not! this approach should not interfere with other macros you are using. How do you make this ? Please save my remaining hairs on my head ! Hope this helps regards Keith. Thank you very much for sparing some time to express so efficiently my problem. best regards, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Hello Hans, thank you for contributing to solve my problem. I've tried your proposition : how can I get the content of the buffer afterward ? I've tried \getbuffer[Slide] with no success on MKIV beta that I've just updated. Does a buffer work only for verbatim content ? best regards, Pierre-François. On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl wrote: \starttext \definebuffer[Slide] foo % \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide bar \stoptext -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Just before going to bed, I've found a solution with all your help and the help of Taco Hoekwater through the ntg mail archive : \def\startSlide% {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}% \dostartbuffer[Slide][startSlide][stopSlide]} Let me know if it's my philosopher's stone... I've tried it and it works so far. No more ugly gobbling, my mind is free. So depressing problem and so simple and elegant solution... On 07 Nov 2014, at 16:17, Hans Hagen pra...@wxs.nl wrote: On 11/7/2014 2:26 PM, Pierre-François Bonnefoi wrote: Hello Hans, thank you for contributing to solve my problem. I've tried your proposition : how can I get the content of the buffer afterward ? I've tried \getbuffer[Slide] with no success on MKIV beta that I've just updated. \starttext \definebuffer[Slide] foo \startSlide bla bla bla \starttyping language C code \stoptyping bla bla bla \stopSlide bar \getbuffer[\thedefinedbuffer{Slide}] \getSlide \stoptext Does a buffer work only for verbatim content ? no, for everything best regards, Pierre-François. On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl wrote: \starttext \definebuffer[Slide] foo % \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide bar \stoptext -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr mailto:bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___ -- - 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
[NTG-context] ConTeXt gobble my mind
Hello, I've made a lot of improvement to my slides format for my teaching material and I've run into a serious issue with gobbleinput that I can express with with simple lines : \starttext \gobbleuntil\stoptyping \starttyping { printf(%d, data); } \stoptyping This is ignored ! \stoptext How can I use correctly gobbleinput to make it works ? Thank you for your help, kind regards, Pierre-François Bonnefoi. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Hello Luigi, thank you for proposing a solution, but it's not suitable to my needs as it modifies the content of the typing region : the backlash is displayed I want to be able to gobble or not the typing region by using a macro without modifying it. On 06 Nov 2014, at 12:16, luigi scarso luigi.sca...@gmail.com wrote: On Thu, Nov 6, 2014 at 10:35 AM, Pierre-François Bonnefoi bonne...@unilim.fr wrote: Hello, I've made a lot of improvement to my slides format for my teaching material and I've run into a serious issue with gobbleinput that I can express with with simple lines : \starttext \gobbleuntil\stoptyping \starttyping { printf(%d, data); } \stoptyping This is ignored ! \stoptext How can I use correctly gobbleinput to make it works ? %d in this situation means [][ token comment ] other tokens --- \gobbleuntil neutralizes \starttyping that changes the catcode of '%' --- so you are left with an open group (the { before printf) that needs to be closed. So the first step is to make '%' a letter token \starttext %\tracingall \gobbleuntil\stoptyping \starttyping { printf(\%d, data); } \stoptyping %\tracingnone This is not more ignored ! \stoptext -- luigi ___ 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
Hello Wolfgang and Luigi, My example lines are too small to fully understand the purpose of using the gobbleinput instruction : I have made some slides for my students that I can choose or not ton include in the final presentation : \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide I've made some macros to include or not a slide according to its number given into a list or by just putting before the macro \skipSlide. This is very useful as I have students of different levels. The gobbleinput solution is the best solution : I can activate or not a slide according to my audience. If I use the buffer solution, I'll not be able to deactivate the whole slide containing the typing region. From my understanding, I've used the gobbleinput command as in shell : cat EOF one two three EOF And now, I've ran into this problem. On 06 Nov 2014, at 13:12, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 06.11.2014 um 10:35 schrieb Pierre-François Bonnefoi bonne...@unilim.fr: Hello, I've made a lot of improvement to my slides format for my teaching material and I've run into a serious issue with gobbleinput that I can express with with simple lines : \starttext \gobbleuntil\stoptyping \starttyping { printf(%d, data); } \stoptyping This is ignored ! \stoptext How can I use correctly gobbleinput to make it works ? Replace the typing environment with normal buffers and use the \typebuffer command to print the content of the buffer. \starttext \startbuffer { printf(%d, data); } \stopbuffer %\typebuffer This is ignored ! \stoptext Wolfgang ___ 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
Re: [NTG-context] ConTeXt gobble my mind
I can not define a mode for each of my slide neither I can express a list of activated slides. On 06 Nov 2014, at 14:12, luigi scarso luigi.sca...@gmail.com wrote: On Thu, Nov 6, 2014 at 1:59 PM, Pierre-François Bonnefoi bonne...@unilim.fr wrote: Hello Wolfgang and Luigi, My example lines are too small to fully understand the purpose of using the gobbleinput instruction : I have made some slides for my students that I can choose or not ton include in the final presentation : \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide I've made some macros to include or not a slide according to its number given into a list or by just putting before the macro \skipSlide. This is very useful as I have students of different levels. The gobbleinput solution is the best solution : I can activate or not a slide according to my audience. If I use the buffer solution, I'll not be able to deactivate the whole slide containing the typing region. Perhaps Modes ? http://wiki.contextgarden.net/Modes -- luigi ___ 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
[NTG-context] [doifinset] how it works ?
Hello, I'm currently prepping my teaching material for my back-to-university. I want to design some conditional slides based presentation where I can select the slides that I want to show in my final presentation. My current attempt is to use : 1 - MKIV as I use currently only MKII; 2 - a counter is defined, that it is incremented at each slide definition; 3 - a commalist to indicate the slides that I want. The number affected to each slide is made according to its definition in the file and not the slide number displayed; 4 - a block is added to enclosed each slide in order to allow or not it to be shown in the final presentation. \definenumber[slide][way=bytext,prefix=no] % firstly I generate a full commalist \def\slidelist{} \dorecurse{8}{ \doglobal\appendtocommalist{#1}\slidelist } % then I define my slide where I increment the counter \def\startSlide{\setupbackgrounds[page][background={fond,Auteur,backgraphics,foreground,foregraphics}] \directsetup{slide:start}} \def\stopSlide{\directsetup{slide:stop}} \startsetups slide:start \page \incrementnumber[slide] \switchtobodyfont[14pt] \setupinteractionbar[state=start] \startnarrower[left] \stopsetups \startsetups slide:stop \stopnarrower \page \stopsetups \starttext \doifinset{\getnumber[slide]}{\slidelist} { \startSlide \SlideTitleSub{Hello there} What is my number ? \getnumber[slide] ! \stopSlide } \stoptext This doesn't work. the doifinset doesn't work. I've tried to put some \expanded in order to expand the arguments with no success. The only way is to use direct argument as : \doifinset{1}{1,2,3,4,5} Let me know it it is possible. best regards, Pierre-François Bonnefoi. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas| Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE| The Avengers. ___ 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 ___
[NTG-context] [MKIV] Itemize nowhite option broken
Hello, I'm currently porting my work to the mkIV version of ConTeXt : I've found this annoying regression with this simple example : \starttext Some previous sentence before the list \startitemize[columns,n,nowhite] \item one \item two \stopitemize \startitemize[continue,columns,nowhite] \item one \item two \stopitemize \startitemize[continue,columns,nowhite] \item one \item two \stopitemize And the text continues after the list \stoptext I get some space between itemization with mkIV that I don't get with mkII. I use the standalone version on ConTeXt. mtx-context | ConTeXt Process Management 0.52 mtx-context | mtx-context | main context file: /Volumes/MacBookProInternal/Users/pef/context/tex/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2012.04.25 17:29 Thank you for your support, best regards, Pierre-François Bonnefoi. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [Layout] Problem with ConTeXt mkII
Hello Aditya, You're the witness ! I obtain the same document that you've obtained : look at the third page : the size of the document is smaller, the text doesn't flow correctly on this page. I've tried it on my document : no success. For Hans, the \page make me jump ton a new page but doesn't correct the problem. Thank you for your help, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [Layout] Problem with ConTeXt mkII
Hello Luigi, your solution is better...but doesn't work completely : the first page is correct, the second is not, and after this one, the end of the document is correctly formatted... hum... Very strange and annoying... Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [Layout] Problem with ConTeXt mkII
Hello Luigi, Wolfgang, neither the first proposition, nor the second solves my problem, the size of the text area (textheight) is modified on the first page, but not well computed from the second page (it's stuck to the same value). thank you for your help, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [Layout] Problem with ConTeXt mkII
Hello Wolfgang, Thank you for your help, but your solution required ConTeXt mkIV, and I'm stuck to ConTeXt mkII. Sorry to learn that this bug make its path to the mkIV version. Could a new version of mkII could solve this bug ? Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [Layout] Problem with ConTeXt mkII
Hello Luigi, Thanks for the footer ;-) But, currently, I've some difficulties to commit to the Don't panic ! I've tried the following : %% \setuptolerance[verytolerant,stretch] \setuppapersize[A4][A4] \setuplayout[ backspace=3cm, topspace=1.5cm, rightmargin=0cm,leftmargin=1.3cm, width=15cm, leftmargindistance=0.2cm, height=fit, header=0cm, footer=1cm, textheight=25.7cm ] And I obtain this (with \showlayout) : topspace1.49979cm height 26.6962cm header 0.0cm headerdistance 0.0cm textheight 25.69635cm footer 0.99985cm footerdistance 0.0cm %% BUT, when I add the following : %% \definelayout[1][ topspace=5.2cm, height=fit, textheight=23.7cm ] \definelayout[2][reset] For the page (1): topspace5.19925cm height 19.29726cm header 0.0cm headerdistance 0.0cm textheight 18.2974cm footer 0.99985cm footerdistance 0.0cm For the page (2) and the following : topspace1.49979cm height 26.6962cm header 0.0cm headerdistance 0.0cm textheight 18.2974cm footer 0.99985cm footerdistance 0.0cm %% The textheight is blocked to an unexpected value : 18.3cm for the whole document. I've read and re-read the manual, but I've not found my error... Thank you for your help, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] Multipages registers
Where is such a macro given in the garden. A quick search did not show it. Aditya Hum... It's a long time ago...I think I've heavily modified the initial macro... Thank you for your much cleaner version. Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
[NTG-context] [Layout] Problem with ConTeXt mkII
Hello, I use extensively ConTeXt for my work as a teacher. I run into this problem : I've defined the following layout for giving work for my students : \setuptolerance[verytolerant,stretch] \setuppapersize[A4][A4] \setuplayout[ backspace=3cm, topspace=1.5cm, rightmargin=0cm,leftmargin=1.3cm, width=15cm, leftmargindistance=0.2cm, height=26.7cm, header=0cm, footer=1cm ] \definelayout[1][ topspace=5.2cm, height=23cm, textheight=22cm] \definelayout[2][reset] The purpose is to give some space on the first page to put a layer with a big title (it's for a document full of exercices, an example could be found at http://ishtar.msi.unilim.fr/uploads/media/Reseaux_I_TD_1_2011_2012.pdf). But, after having the correct layout for the first page, the second page gives me a reduced textheight : the text don't flow on the lower part of the page. That could be explain as the textheight variable is not computed for the second page. This is very annoying. I've found a workaround by using the same layout for the whole document and put some blank lines on the first page. I use the following version ConTeXt ver: 2011.05.18 18:04 MKII fmt: 2011.8.31 int: english/english. Thank you for your help, Pierre-François. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] Multipages registers
Hello Wolfgang, You said that I can break the page before a new letter, but can I wrap this page with some chosen text like a title ? best regards, Pierre-François. On 18 sept. 2011, at 20:23, Wolfgang Schuster wrote: Am 14.09.2011 um 11:54 schrieb Pierre-François Bonnefoi: Hello Wolfgang, thank you for your answer. It's not what I want. Let me explain : - when I join the registers to my presentation with \placeindex I obtain more than one slide ; - so, I would like to be able to split this register into two or more slides with something like this : \startslide \placeindex[a-k] \stopslide \startslide \placeindex[l-z] \stopslide Is this possible ? No but you can tell context to break the page before a new letter. Wolfgang -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] Multipages registers
I want to use the following macro taken from the ConTeXt garden : \define[1]\SlideTitle{\framed[height=1.5\lineheight,frame=off, bottomframe=on, topframe=on, width=broad]{\leftaligned{\tfb \chapter {#1}}\pagenumber}} On 18 sept. 2011, at 20:34, Wolfgang Schuster wrote: Am 18.09.2011 um 20:29 schrieb Pierre-François Bonnefoi: Hello Wolfgang, You said that I can break the page before a new letter, but can I wrap this page with some chosen text like a title ? What do want show in the title? Wolfgang -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] Multipages registers
Hello Wolfgang, thank you for your answer. It's not what I want. Let me explain : - when I join the registers to my presentation with \placeindex I obtain more than one slide ; - so, I would like to be able to split this register into two or more slides with something like this : \startslide \placeindex[a-k] \stopslide \startslide \placeindex[l-z] \stopslide Is this possible ? best regards, Pierre-François Bonnefoi. Wolfgang Schuster wrote : Am 01.09.2011 um 18:54 schrieb Pierre-François Bonnefoi: Hello, I would like to be able to spread a registers on several slides from my lecture notes, with the possibility to include some text at the beginning of each of these slides : first slide : title index entries next slides : title next index entries I've not found the way to do this. Can you be more concrete, it’s not clear what do you want. When you need a index entry which spans multiple pages you can write it with “\startregister[index][identifier]{entries} … \stopregister[index][identifier]”. Wolfgang -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
[NTG-context] Multipages registers
Hello, I would like to be able to spread a registers on several slides from my lecture notes, with the possibility to include some text at the beginning of each of these slides : first slide : title index entries next slides : title next index entries I've not found the way to do this. Kind regards, Pierre-François Bonnefoi. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ 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 ___
Re: [NTG-context] [NTG-Context] How to compute correct page number for handout
Dear Peter, I run into some problem with font handling in MKIV so I'm stuck in MKII for some time. I've tried the following : \starttext \def\ChapterPrefix#1{% \the\numexpr\number#1/4\relax } \setupcombinedlist[content][level=1] \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix] \setuplist[section][] \completecontent \dorecurse{3}{\chapter{test} \dorecurse{4}{test \page}} \stoptext In MKII, I get a Missing number error. I've isolated the problem : the value given to the \chapterprefix by the pagecommand option seems to be a text value and not a numeral value. I've tried to find a function to translate text to number but I've not find it. I hope to get some help. kind regards, Pierre-François. Le 30 sept. 2010 à 14:12, Peter Münster a écrit : On Thu, Sep 30 2010, Pierre-François Bonnefoi wrote: I've tried it and I'm sorry to report that this only works in MK IV, that I don't use (I've tried but some of my documents don't translate correctly). Hello, Your \ChapterPrefix works out of the box with mkiv. Eventually it's easier to solve the problems you have with mkiv, than dividing the page number by 4 in mkii? I don't know... Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___ ___ 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 ___
Re: [NTG-context] [NTG-Context] How to compute correct page number for handout
So, I've to forget it... I'm a little bit disappointed that it's not possible. But the waiting time for my students to get the lecture notes is over : I'll give them the handout with no page numbers. Thank you for your support. I hope that I could use MKIV in near future, kind regards, Pierre-François. Le 3 oct. 2010 à 17:12, Hans Hagen a écrit : On 3-10-2010 4:16, Pierre-François Bonnefoi wrote: Dear Peter, I run into some problem with font handling in MKIV so I'm stuck in MKII for some time. I've tried the following : \starttext \def\ChapterPrefix#1{% \the\numexpr\number#1/4\relax } \setupcombinedlist[content][level=1] \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix] manipulating the number that way is just a lucky guess: pagecommand (and numbercommand) get some text passes and it might not even be a number, as it all depends on conversion and special rendering -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. ___ 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 ___
Re: [NTG-context] [NTG-Context] How to compute correct page number for handout
But this function \structurelistrealpagenumber is not defined in MKII. ok, ok I've to go to MKIV some day ;-) Le 3 oct. 2010 à 17:34, Hans Hagen a écrit : On 3-10-2010 5:25, Pierre-François Bonnefoi wrote: So, I've to forget it... I'm a little bit disappointed that it's not possible. But the waiting time for my students to get the lecture notes is over : I'll give them the handout with no page numbers. you can try to use \structurelistrealpagenumber which is set for each entry - 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 ___
Re: [NTG-context] [NTG-Context] How to compute correct page number for handout
You saved my day ! Le 3 oct. 2010 à 17:52, Wolfgang Schuster a écrit : Am 29.09.2010 um 13:13 schrieb Pierre-François Bonnefoi: Hello, I'use extensively context to write my lecture notes and for all of my printing needs. For my students, I've made some lecture presentations in color, and I print them in blackwhite, with four pages on one page for the handout. I would like to compute a correct Table of contents according to the handout : so to divide the current page number by four to get a correct page number for the handout. \def\ChapterPrefix#1{\the\numexpr#1/4 \relax} \setupcombinedlist[content][level=1] \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix] That doesn't work, and I've some difficulties to figure how computation is performed in e-TeX... Could you help me to resolve this issue ? A very dirty hack: \setuppapersize[A6][A6] \let\normaltranslatednumber\translatednumber \def\translatednumber[#1]% {\number\numexpr(\normaltranslatednumber[#1]+1)/4\relax} \starttext \completecontent \dorecurse{12} {\chapter{Chapter #1} \dorecurse{#1}{\input knuth\par}} \stoptext Wolfgang ___ 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 ___ ___ 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 ___
[NTG-context] [NTG-Context] How to compute correct page number for handout
Hello, I'use extensively context to write my lecture notes and for all of my printing needs. For my students, I've made some lecture presentations in color, and I print them in blackwhite, with four pages on one page for the handout. I would like to compute a correct Table of contents according to the handout : so to divide the current page number by four to get a correct page number for the handout. \def\ChapterPrefix#1{\the\numexpr#1/4 \relax} \setupcombinedlist[content][level=1] \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix] That doesn't work, and I've some difficulties to figure how computation is performed in e-TeX... Could you help me to resolve this issue ? Kind regards, Pierre-François Bonnefoi. -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. ___ 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 ___
Re: [NTG-context] [NTG-Context] How to compute correct page number for handout
Dear Hans, Thank you to answer my question. I've tried it and I'm sorry to report that this only works in MK IV, that I don't use (I've tried but some of my documents don't translate correctly). From my point of view, I don't know if it is the correct answer because I want to get some altered page number, and I think that I have to alter them artificially, only for display purpose. best regards, Pierre-François Bonnefoi. Le 30 sept. 2010 à 09:47, Hans Hagen a écrit : On 29-9-2010 1:13, Pierre-François Bonnefoi wrote: Hello, I'use extensively context to write my lecture notes and for all of my printing needs. For my students, I've made some lecture presentations in color, and I print them in blackwhite, with four pages on one page for the handout. I would like to compute a correct Table of contents according to the handout : so to divide the current page number by four to get a correct page number for the handout. \def\ChapterPrefix#1{\the\numexpr#1/4 \relax} \setupcombinedlist[content][level=1] \setuplist[chapter][after=,before=,numbercolor=yellow,numbercommand=\underbar,pagecommand=\ChapterPrefix] That doesn't work, and I've some difficulties to figure how computation is performed in e-TeX... Could you help me to resolve this issue ? \starttext \setupuserpagenumber[way=bychapter] \dorecurse{3}{\chapter{test} \dorecurse{4}{test \page}} \stoptext - 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 ___ -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. ___ 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 ___