Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-06 Thread Jan Willem Flamma
Dear Wolfgang, Thank you for taking the time to go through the example and indicating these improvements. I will definitely evaluate and start applying this to my own code. Kind regards,Jan WillemFrom: Wolfgang SchusterSent: Friday, 4 September 2020 10:47To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Jan Willem Flamma schrieb am 03.09.2020 um 10:29:> Dear Julian,> > I use something similar using a main product file, an environment file > that contain the styling and several components that build up the > frontmatter, the manual and the appendices.> > Below my setup where I start the roman numbering on the table of > contents page (page 5 or v in roman)> > Once the bodymatter starts the pagenumber is set  to the arabic 1 (see > below in the main product file)> > You should be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move setups from the document content into the environment file. 4. Use pagestate=start to increase the page counter with \startstandardmakeup. 5. Set search path for figures (\copypages use the figure mechanism) with \setupexternalfigure[location=...]. Below is a modified (but untested) version of your sample document. Wolfgang   begin product\startproduct product \environment env-WA % \setvariables%   [document]%   [ manual={Course Manual},%  title={Title},%    subtitleone={Subtitle 1},%    subtitletwo={Subtitle 2},%  revnumber={Revision number}] \setupdocument   [ manual={Course Manual},  title={Title},    subtitleone={Subtitle 1},    subtitletwo={Subtitle 2},  revnumber={Revision number}] \startfrontmatter    \component fm-frontpage   \component fm-titlepage   \component fm-tableofcontents \stopfrontmatter \startbodymatter    \component co-01   \component co-02 \stopbodymatter \startappendices    \component co-ap-01   \component co-ap-02 \stopappendices \startbackmatter    \copypages[app1.pdf][n=4] \stopbackmatter \stopproduct end product  begin environment\startenvironment env-WA \setuppagenumbering   [alternative=doublesided,  location=right]   \defineconversionset   [frontpart:pagenumber] [] [romannumerals] \setupexternalfigures   [directory={External PDF}] \startsectionblockenvironment [frontpart]    \setupbackgrounds [leftpage] [setups=pagenumber:left]    \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [bodypart]    \setupbackgrounds [leftpage] [setups=pagenumber:left]    \setupbackgrounds [rightpage] [setups=pagenumber:right]    \setuppagenumber [number=1] \stopsectionblockenvironment \startsectionblockenvironment [appendix]    \setupbackgrounds [leftpage] [setups=pagenumber:left]    \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [backpart]    \setuppagenumber[state=stop] \stopsectionblockenvironment \stopenvironment end environment  begin component\startcomponent fm-frontpage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] % \dontleavehmode\externalfigure[frontpage-logo.png][width=12cm] \framed   [height=5cm,width=broad,frame=off]   {\externalfigure[frontpage-logo.png][width=12cm]} \blank[6*big] {\bfc \documentvariable{manual}} \blank[4*big] {\tfc \documentvariable{title}} \blank[2*big] {\tfc \documentvariable{subtitleone}} \blank[2*big] {\tfc \documentvariable{subtitletwo}} \stopstandardmakeup \stopcomponent end component  begin component\startcomponent fm-titlepage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] {\tfb \documentvariable{manual}} \blank[2*big] {\tfb \documentvariable{title}} \blank[2*big] {\tfb \documentvariable{subtitleone}} \blank[2*big] {\tfb \documentvariable{subtitletwo}} \blank[10*big] {\tfb \documentvariable{revnumber}} \blank {\tfb \currentdate[month,year]} \blank[10*big] {\tfb Written by:} \blank {\tfb Company name} \blank {\tfb City, Country} \stopstandardmakeup \stopcomponent end component  begin component\startcomponent fm-tableofcontents \product product \starttitle [title=Table of Contents] \placecontent \stoptitle \stopcomponent end component 
___
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 / htt

Re: [NTG-context] Combining modes and MetaFun

2020-09-06 Thread Jan Willem Flamma
Thank you Hans, this is exactly what I need. I will wikify the examples. Kind regards,Jan Willem Flamma  From: Hans HagenSent: Friday, 4 September 2020 15:09To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] Combining modes and MetaFun On 9/4/2020 2:20 PM, Jan Willem Flamma wrote:> Dear list members,> > Is it possible to combine modes and MetaFun?> > In the below MWE, the \doifmode construction does not work.> > Kind regards,> > Jan Willem Flamma> > ===> > \enablemode[en]> > %\enablemode[nl]> > \starttext> > \startbuffer[square]> >      u := 2cm ;> >      draw unitsquare scaled u ;> >      drawdblarrow (0,-0.2u)..(u,-0.2u) ;> >      drawdblarrow (1.2u, 0)..(1.2u, u) ;> >      %\doifmode{en}{label(\sometxt{length},  (0.5u,-0.4u)) ;}> >      %\doifmode{nl}{label(\sometxt{lengte},  (0.5u,-0.4u)) ;}> >      %\doifmode{en}{label(\sometxt{width},   (1.6u, 0.5u)) ;}> >      %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}> > \stopbuffer> > \placefigure> >      [here,none][]{}> >      {\scale[width=0.5\textwidth]{\processMPbuffer[square]}}> > \stoptextYou need to compensate these solutions by "wikifying" them: \starttext \startuseMPgraphic{whatever}{s::mode} u := 2cm ; draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..(u,-0.2u) ; drawdblarrow (1.2u, 0)..(1.2u, u) ; if "\MPvar{mode}" = "en" : label("e", (0.5u,-0.4u)) ; label("n", (1.6u, 0.5u)) ; else : label("n", (0.5u,-0.4u)) ; label("l", (1.6u, 0.5u)) ; fi ;\stopuseMPgraphic \useMPgraphic{whatever}{mode=en} \blank\useMPgraphic{whatever}{mode=nl} \blank \startuseMPgraphic{whatever} u := 2cm ; draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..(u,-0.2u) ; drawdblarrow (1.2u, 0)..(1.2u, u) ; if texmode("en") : label("e", (0.5u,-0.4u)) ; label("n", (1.6u, 0.5u)) ; else : label("n", (0.5u,-0.4u)) ; label("l", (1.6u, 0.5u)) ; fi ;\stopuseMPgraphic { \enablemode[en] \useMPgraphic{whatever} } \blank{ \useMPgraphic{whatever} } \blank \stoptext   -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typing efficiency

2020-09-06 Thread Jan Willem Flamma
Thank you Taco and Wolfgang. I will have a look at both solutions. Kind regards,Jan Willem Flamma From: Wolfgang SchusterSent: Friday, 4 September 2020 16:26To: mailing list for ConTeXt usersSubject: Re: [NTG-context] Typing efficiency Taco Hoekwater schrieb am 04.09.2020 um 15:51:> > Hi,> > Sounds like a job for the blocks mechanism more so than buffers:> > > \defineblock[entext]> \defineblock[nltext]>    > \defineselector [language] [max=2,n=1]> \startmode[en]>  \setupselector[language][n=1]>  \keepblocks[entext]> \stopmode> \startmode[nl]>  \setupselector[language][n=2]>  \keepblocks[nltext]> \stopmode>   > \starttext>   > \startsection[title=\select{language}{English title}{Dutch title}]>   > \beginentext>  This is English text.> \endentext> \beginnltext>  This is Dutch text.> \endnltext>   > \stopsection>   > \stoptext  It can also be done with buffers. \definebuffer [entext]\definebuffer [nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \def\stopentext{\getentext}\stopmode \startmode[nl] \setupselector[language][n=2] \def\stopnltext{\getnltext}\stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \startentext This is English text.\stopentext\startnltext This is Dutch text.\stopnltext \stopsection \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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Combining modes and MetaFun

2020-09-04 Thread Jan Willem Flamma
Dear list members, Is it possible to combine modes and MetaFun? In the below MWE, the \doifmode construction does not work. Kind regards,Jan Willem Flamma ===\enablemode[en]%\enablemode[nl] \starttext \startbuffer[square]    u := 2cm ;    draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..(u,-0.2u) ;    drawdblarrow (1.2u, 0)..(1.2u, u) ; %\doifmode{en}{label(\sometxt{length},  (0.5u,-0.4u)) ;}    %\doifmode{nl}{label(\sometxt{lengte},  (0.5u,-0.4u)) ;} %\doifmode{en}{label(\sometxt{width},   (1.6u, 0.5u)) ;}    %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}\stopbuffer \placefigure    [here,none][]{}    {\scale[width=0.5\textwidth]{\processMPbuffer[square]}} \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Typing efficiency

2020-09-04 Thread Jan Willem Flamma
Dear list member, Following up from:https://www.mail-archive.com/ntg-context@ntg.nl/msg94719.html The below MWE works but how can I avoid having to type    \startmode[en]    \getbuffer[en]    \stopmode    \startmode[nl]    \getbuffer[nl]    \stopmode after every block of text?  I tried to define a new start/stop pair as follows:\definestartstop[Bufen][    before={\startmode[en]    \startbuffer[en]},    after={\stopbuffer    \getbuffer[en]    \stopmode}] but that fails. No doubt a clever solution exists that minimizes the typing.  Kind regards,Jan Willem  ===\setupinteraction[state=start] %\enablemode[nl]\enablemode[en] \defineselector [language] [max=2,n=1]\startmode[en]    \setupselector[language][n=1]\stopmode\startmode[nl]    \setupselector[language][n=2]\stopmode \starttext \startsection[title=\select{language}{English title}{Dutch title}] \startbuffer[en]    This is English text.    \stopmode    \stopbuffer    \startbuffer[nl]    This is Dutch text.    \stopbuffer \startmode[en]    \getbuffer[en]    \stopmode    \startmode[nl]    \getbuffer[nl]    \stopmode \stopsection \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-04 Thread Jan Willem Flamma
Credits to Pragma who helped me to set this up a few years ago. From: jbfSent: Friday, 4 September 2020 00:20To: Jan Willem FlammaCc: ntg >> mailing list for ConTeXt usersSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Thanks Jan, that is an extensive bit of work below! Might take me a while to digest, but I'll explore it carefully.JulianOn 3/9/20 6:29 pm, Jan Willem Flamma wrote:Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices.  Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set  to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma   The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter    \component fm-frontpage    \component fm-titlepage    \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds    [leftpage]    [setups=pagenumber:left]\setupbackgrounds    [rightpage]    [setups=pagenumber:right]\setuppagenumber[number=1]    \component co-01    \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds   [leftpage]   [setups=pagenumber:left]\setupbackgrounds   [rightpage]   [setups=pagenumber:right]\startappendices   \component co-ap-01   \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct=   The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering    [alternative=doublesided,  location=right]    % Pagenumbering style\definestructureconversionset    [frontpart:pagenumber][][romannumerals]\definestructureconversionset    [bodypart:pagenumber] [][numbers]\definestructureconversionset    [appendix:pagenumber] [][numbers]=   The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page\framed[height=5cm,width=broad,frame=off]{\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent   The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MyTitle}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}}    \blank    \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}}    \blank    \midaligned{\color[Modu_Blue]{\tfb Company name}}    \blank    \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds   [leftpage]   [setups=pagenumber:left]\setupbackgrounds   [rightpage]   [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent  From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[numberconv

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-03 Thread Jan Willem Flamma
Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices.  Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set  to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma   The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter    \component fm-frontpage    \component fm-titlepage    \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds    [leftpage]    [setups=pagenumber:left]\setupbackgrounds    [rightpage]    [setups=pagenumber:right]\setuppagenumber[number=1]    \component co-01    \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds   [leftpage]   [setups=pagenumber:left]\setupbackgrounds   [rightpage]   [setups=pagenumber:right]\startappendices   \component co-ap-01   \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct=   The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering    [alternative=doublesided,  location=right]    % Pagenumbering style\definestructureconversionset    [frontpart:pagenumber][][romannumerals]\definestructureconversionset    [bodypart:pagenumber] [][numbers]\definestructureconversionset    [appendix:pagenumber] [][numbers]=   The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page \framed[height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent   The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MyTitle}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}}    \blank[2*big]    \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}}    \blank    \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}}    \blank    \midaligned{\color[Modu_Blue]{\tfb Company name}}    \blank    \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds   [leftpage]   [setups=pagenumber:left]\setupbackgrounds   [rightpage]   [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent  From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[numberconversion=romannumerals]\setuplist[chapter][pageconversionset=pagenumber]\setuppagenumber[number=1]\stopsectionblockenvironment\startsectionblockenvironment[bodypart]\setuppagenumber[number=1]\stopsectionblockenvironmentThe frontmatter is some 16 pages worth (ends on a verso page but that verso carries the arabic number 1 instead of page xvi which it should be, since the final paragraph on that page ends

[NTG-context] Error with negative superscript

2020-09-01 Thread Jan Willem Flamma
Dear list, I noticed that negative superscripts are not printed correctly. ConTeXt  ver: 2020.08.31 22:16 LMTX  fmt: 2020.9.1  \starttext 10\high{6} 10\high{-6} \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] using modeset

2020-06-17 Thread Jan Willem Flamma
Thank you for your advice Hraban.  From: Henning Hraban RammSent: Monday, 15 June 2020 20:23To: mailing list for ConTeXt usersSubject: Re: [NTG-context] using modeset  > Am 12.06.2020 um 11:26 schrieb Jan Willem Flamma :> > Thank you Wolfgang, BPJ and Robert for your answers and feedback. Much appreciated. >  > I will explorer the solutions that have been offered to extend my knowledge on using ConTeXt but at the same time I value the advice of not going down that route for large document. The project that pays my bills is technical documentation in several languages (in LaTeX3, setup by Marei). Each manual is constructed from many small building blocks of text. Each block is in its own file.That makes editing one whole manual somewhat tedious, but pays off if you recycle the same blocks. E.g. each block is only translated once, even if it appears in several manuals (think of security instructions or legal stuff that is the same in all). Each block has an explicite change date to keep track of the state of the different translations.The two main files of each product are one that contains just a few settings and one that pulls in all the needed building blocks. In this case all blocks with the same content in different languages are kept together in one directory (files have a language code). Another approach would be same structures and file names below a main language directory.If you have only one translation, the latter might be better. If you need to keep several translations in sync, the first approach might make more sense. Hraban___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] using modeset

2020-06-12 Thread Jan Willem Flamma
Thank you Wolfgang, BPJ and Robert for your answers and feedback. Much appreciated.  I will explorer the solutions that have been offered to extend my knowledge on using ConTeXt but at the same time I value the advice of not going down that route for large document. In any case, I have learned something! Kind regards,Jan Willem Flamma  From: r.erm...@hccnet.nlSent: Friday, 12 June 2020 07:56To: mailing list for ConTeXt usersSubject: Re: [NTG-context] using modeset I tried this too, a number of times. For lengthy texts it makes little sense. One important thing is that, as BPJ says, you loose the flow during writing. When the document is finished, it is difficult to get an overview. If you consider it using for lengthy documents, I would consider to set up an xml file. You can then have the overview via scripts. Yet for short texts it can be a solution. I have case material for my trainings in both English and Dutch in the same file. Instead of modes, I use blocks. Like this: \defineblock[ENblok]\defineblock[NLblok] \setupblock[NLblok][before={\mainlanguage[nl]},after=]\setupblock[ENblok][before={\mainlanguage[en]},after=] Then, determine which blocks you want to use in your file: \hideblocks[NLblok]%\hideblocks[ENblok] For the titles I use another method: %\def\NL#1{#1}\def\NL#1{{}}%\def\EN#1{}\def\EN#1{#1} You have to comment and uncomment, depending on the language, but I think you can put them in the NLblok or ENbloks instead. \definecomplexenumeration[Casus]… definition \def\refno#1{{\em{(no. \small #1})}} My files look like this: \starttext \startCasus[casus-349][\NL{Een moeilijke zaak}\EN{A complicated case}] \refno{casus-349}\crlf The casus-349 element is used as a label. After the text I have a list of questions for this case in a separate block for questions, introduced by \in[casus-349]). You can probably also use something like \section[\NL{Een moeilijke zaak}\EN{A complicated case}]{} \begin[NLblok]\startlinenumberingtext ... \stoplinenumbering\end[NLblok] \begin[Enblok]\startlinenumberingtext... \stoplinenumbering\end[Enblok]\stoptext I hope this helps finding a solution. Robert  Op 11 jun. 2020, om 20:53 heeft BPJ <b...@melroch.se> het volgende geschreven: Den tors 11 juni 2020 10:45Jan Willem Flamma <register...@gmail.com> skrev: Dear list members, I write training manuals and use the Modes mechanism a lot to create documents at various competency levels using a single set of source files. So far the manuals have been written in English but now a separate Dutch translation has to be created. It is important that the two manuals are setup similarly so the section/subsection numbers and question numbers are the same in the English manual and the Dutch manual. Note: I do not intend to create a manual that has the English and Dutch text at opposite sides (as can be done using streams) I’m keen to continue using a single set of source files and thought it would be best to simply type the translated sections and subsections just below the original English sections and subsections using modeset. This gives me the option of creating an English case and a Dutch case. Within this two cases I would still apply all sorts of other modes using \startmode and \doifmode. I have done that with LaTeX and IMHO that way lies madness. It may work for shorter text but for text(s) of any length it gets messy. You lose the "flow"  in both texts, and it shows when you read the typeset text, and the source becomes hard to navigate. You are probably better off using an editor which allows you to have the two versions open side by side in their own viewports (I use what Vim calls "windows").  If each section heading is on its own line you might try something like a Perl script to loop over the lines in the English version and print only the section headings to a new file, where you translate them and build up the Dutch version around them. It's even better if the editor has the capacity to show an outline pane for each version — if there is an outline mode which understands ConTeXt. I'm sorry to discourage you but chances are that you end up with an intractable mess which you will have to spend much time disentangling later.___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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-ad

[NTG-context] using modeset

2020-06-11 Thread Jan Willem Flamma
 Dear list members, I write training manuals and use the Modes mechanism a lot to create documents at various competency levels using a single set of source files. So far the manuals have been written in English but now a separate Dutch translation has to be created. It is important that the two manuals are setup similarly so the section/subsection numbers and question numbers are the same in the English manual and the Dutch manual. Note: I do not intend to create a manual that has the English and Dutch text at opposite sides (as can be done using streams) I’m keen to continue using a single set of source files and thought it would be best to simply type the translated sections and subsections just below the original English sections and subsections using modeset. This gives me the option of creating an English case and a Dutch case. Within this two cases I would still apply all sorts of other modes using \startmode and \doifmode. Duplication is unavoidable but it would make sense to try and re-use the existing structural elements such as \startsection \startsubsection \placefigure etc as much as possible. After all, only the title and caption text needs to be translated.I tried doing this but in the case of \startchapter using a \doifmode but the PDF bookmarks text is not correctly generated. I also tried placing a figure in between 2 modeset cases but this does not work.See attached .tex file. Finally in the attached PDF below, I noticed that a double space appears depending on the position of the text and curly bracket. Is this intended? Questions:Is the modeset mechanism indeed the best way forward or are there better ways to achieve the desired outcome?How can I re-use the existing ConTeXt code as much as possible and still have the correct English and Dutch title and caption text for all the structural elements and floats. Kind regards,Jan Willem Flamma

test_modeset.pdf
Description: Adobe PDF document


test_modeset.tex
Description: Binary data
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-10 Thread Jan Willem Flamma
Dear list, I have seen the use of blocks mechanism with and without a start/stop combination. It is not clear to me in which cases it is required to also include a start/stop combination in this mechanism. \beginquestion\startquestionQuestion A\stopquestion\endquestion\beginanswer\startanswerAnswer A\stopanswer\endanswer Regards,Jan Willem Flamma  From: Hans HagenSent: Tuesday, 9 June 2020 09:37To: mailing list for ConTeXt users; Fabrice LSubject: Re: [NTG-context] start/stop executed conditionally on mode ? On 6/8/2020 9:53 PM, Fabrice L wrote:> > >> Le 7 juin 2020 à 23:19, Aditya Mahajan >> > a écrit :>> >> On Sun, 7 Jun 2020, Fabrice L wrote:>> >>> Dear List,>>> >>> I would like to insert a page using (ideally) start/stop >>> instructions. The problem is that this page should be inserted only >>> in a certain mode. Consulting the mailing list, I thought the >>> following code was working, but it’s not ! The code is executed in >>> the mode as expected, but the following instructions ("Some other >>> text... » in the exemple) is not typeset.>>> >>> Here is a minimal (not working!) example:>>> >>> % >>> \unexpanded\def\StartQuestionsList{>>> \startmode[ClassRoom]  \page[yes] Here are some questions: \blank>>> }>>> \unexpanded\def\StopQuestionsList{>>> \page[yes] \stopmode>>> }>>> \definestartstop[Questions][>>> before=\StartQuestionsList,>>> after=\StopQuestionsList>>> ]>>> >>> >>> \startQuestions>>> Question A….>>> Question B….>>> \stopQuestions>>> >>> Some other text...>>> % One of the oldest mechanism available ... blocks: \enablemode[classroom] % comment this \defineblock[Question] \doifmode {classroom} { \keepblocks[Question]} \starttext  Text A  \beginQuestion Question A…. \endQuestion      Text B  \beginQuestion Question B…. \endQuestion  \page  \doifnotmode {classroom} { \useblocks[Question] } \stoptext -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | 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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Proposal to update the "Manuals" wiki page

2020-05-22 Thread Jan Willem Flamma
This is great work. Many thanks! Kind regards,Jan Willem Flamma From: GarulfoSent: Tuesday, 19 May 2020 15:23To: ntg-context@ntg.nlSubject: [NTG-context] Proposal to update the "Manuals" wiki page Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki:https://wiki.contextgarden.net/ManualsGallery 2 objectives:1/ to make something more visual, to help the user identify the different documents, their organization, their date of release.2/ to gather all the updated documents in one place Sources were :- http://www.pragma-ade.com/overview.htm- https://wiki.contextgarden.net/Manuals, and wiki snippets here and there.- https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals.  Best,   ___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math font not embedded

2020-03-18 Thread Jan Willem Flamma
Now also to  the list: Result are identical and attached. mtxrun --find-file dejavu-math.otf givesC:/data/context/tex/texmf/fonts/opentype/public/dejavu/dejavu-math.otf  From: Hans HagenSent: Wednesday, 18 March 2020 11:38To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] Math font not embedded On 3/18/2020 11:20 AM, Jan Willem Flamma wrote:> Wiping the cache directory > (C:\data\context\tex\texmf-cache\luatex-cache\context\5fe67e0bfe781ce0dde776fb1556f32e\fonts)> > and mtxrun --script fonts --reload --force> > has not solved my issue.> > Running Pablo’s example on a Mac and Windows machine gives the attached > logs and output.can you test this: \setupbodyfont[dejavu] \starttext    \m{\sin^2(t)^2 + \cos^2(t) = 1}    \switchtobodyfont[pagella]    \m{\sin^2(t)^2 + \cos^2(t) = 1} \stoptext is there a dejavu-math.otf file on your system?  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl- 

hans-mac.log
Description: Binary data


hans-mac.pdf
Description: Adobe PDF document


hans-win.log
Description: Binary data


hans-win.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math font not embedded

2020-03-18 Thread Jan Willem Flamma
Wiping the cache directory (C:\data\context\tex\texmf-cache\luatex-cache\context\5fe67e0bfe781ce0dde776fb1556f32e\fonts)and mtxrun --script fonts --reload --forcehas not solved my issue. Running Pablo’s example on a Mac and Windows machine gives the attached logs and output.--JW  From: Hans HagenSent: Wednesday, 18 March 2020 10:51To: mailing list for ConTeXt users; Pablo RodriguezSubject: Re: [NTG-context] Math font not embedded On 3/18/2020 10:44 AM, Pablo Rodriguez wrote:> \definefontfamily [mainface] [rm] [DejaVu Serif]>    \definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]>    \setupbodyfont[mainface]>    \starttext>    \m{\sin^2(t)^2 + \cos^2(t) = 1}>    \setupbodyfont[pagella]>    \m{\sin^2(t)^2 + \cos^2(t) = 1}>    \stoptext what if you wipe the cache? --  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | 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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net___ 

pablo-mac.log
Description: Binary data


pablo-mac.pdf
Description: Adobe PDF document


pablo-win.log
Description: Binary data


pablo-win.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Math font not embedded

2020-03-18 Thread Jan Willem Flamma
Dear list members, I have been running ConTeXt on a Mac for a number of years.I just installed ConTeXt LMTX on a new Windows machine following instructions from the Pragma-ADE website. When I process the below MWE on the Windows machine the formulas are not displayed in the correct font. The log file shows the followingfonts   > math: unset for global bodyfont mainface at 9ptmkiv lua stats  > loaded fonts: 4 files: texgyretermes-math.otf, dejavusans.ttf, dejavusansmono.ttf, dejavuserif.ttfmkiv lua stats  > font embedding time: 0.025 seconds, 3 fonts Full log file attached. I tried the below without success.context --generatecontext --makemtxrun --script font –reloadmtxrun --script font --reload --force Regards,Jan Willem Flamma ===\definefontfamily [mainface] [serif] [DejaVu Serif]\definefontfamily [mainface] [sans]  [DejaVu Sans]\definefontfamily [mainface] [mono]  [DejaVu Sans Mono] [feature=none]\definefontfamily [mainface] [math]  [TeX Gyre Termes Math] [scale=1.1] \setupbodyfont[mainface,sans,9pt] \starttext {\rm\input ward 1 2 3 4 5 6 7 8 9 10} \blank[big] {\ss\input ward 1 2 3 4 5 6 7 8 9 10} \blank[big] {\tt\input ward 1 2 3 4 5 6 7 8 9 10} \blank[big] \m{\sin^2(t)^2 + \cos^2(t) = 1} \blank[big] \startformula\sin^2(t)^2 + \cos^2(t) = 1\stopformula \stoptext

test-win.log
Description: Binary data
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] margintext and floats in the margin

2020-01-31 Thread Jan Willem Flamma
Dear Otared,

Please have a look at:

https://www.mail-archive.com/ntg-context@ntg.nl/msg63579.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg63579.html>

Kind regards,
Jan Willem Flamma


> On 29 Jan 2020, at 09:30, Otared Kavian  wrote:
> 
> Hi,
> 
> Is it possible to put some short notes in the margin, together with a float?
> Below is an example, which puts the float on top of the text in the margin.
> The option « stack=yes » works fine for the margintext when there is no 
> float, but it does not seems to be an option which puts the figure and 
> margintext in a sort of stack.
> 
> Thanks for any advice: Otared K.
> 
> % begin margintext-float.tex
> \setuppapersize[A4][A4]
> \setuplayout[
>   width=120mm,
>   leftmargin=25mm,rightmargin=50mm]
>   
> \setupmargindata[margintext]
>   [align=raggedright,
>   stack=yes,
>   location=outer,
>   style={\rm}]
> 
> \showframe
> \startbuffer[sine]
>   numeric u ; u = 5mm ;
>   draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u 
>   withcolor transparent(1,.5,darkblue) 
>   withpen pencircle scaled 2pt ;
> \stopbuffer
> 
> \starttext
> 
> This is some text.\margintext{This is a remark in the margin.}
> This is some more text.\margintext{This text is also in the margin.}
> \startplacefigure[location=outermargin,number=no]
> \scale[width=\rightmarginwidth]{\processMPbuffer[sine]}
> \stopplacefigure
> 
> \stoptext
> % end margintext-float.tex
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LMTX issue with multple question blocks

2019-11-08 Thread Jan Willem Flamma
Thanks, this solves the issue.

Can I assume things like these are changed in the next beta?

> On 7 Nov 2019, at 20:19, Wolfgang Schuster 
>  wrote:
> 
> Jan Willem Flamma schrieb am 07.11.2019 um 20:08:
>> Rik: thank you for testing and confirming.
>> 
>> Hans,
>> 
>> Wiping the tuc file (or others) does not solve the issue.
>> The data-vir.lua file already contains the proposed change. 
> Change the line to
> 
> local filename = suffix and f_virtual_y(path,n,suffix) or 
> f_virtual_n(path,n)
> 
> and remake the format (context --make).
> 
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LMTX issue with multple question blocks

2019-11-07 Thread Jan Willem Flamma
Rik: thank you for testing and confirming.

Hans,

Wiping the tuc file (or others) does not solve the issue.
The data-vir.lua file already contains the proposed change. 

Jan Willem

> On 7 Nov 2019, at 17:06, Hans Hagen  wrote:
> 
> On 11/7/2019 3:50 PM, Jan Willem Flamma wrote:
>> Dear list members,
>> The below MWE runs fine and generates a usable PDF.
>> If I uncomment the second question block and run the MWE on a OS X system it 
>> generates an unusable PDF and a nearly empty log file:
>> open source > level 1, order 1, name 'cont-yes.mkiv'
>> system  >
>> system  > ConTeXt  ver: 2019.10.28 18:57 MKIV beta  fmt: 2019.11.7  
>> int: english/english
>> system  >
>> system  > 'cont-new.mkiv' loaded
>> open source > level 2, order 2, name 
>> '/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
>> system  > beware: some patches loaded from cont-new.mkiv
>> close source> level 2, order 2, name 
>> '/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
>> system  > files > jobname 'co-intro', input './co-intro', result 
>> 'co-intro'
>> fonts   > latin modern fonts are not preloaded
>> languages   > language 'en' is active
>> system  > synctex functionality is enabled, expect 5-10 pct runtime 
>> overhead!
>> open source > level 2, order 3, name './co-intro.tex'
>> fonts   > preloading latin modern fonts (second stage)
>> fonts   > 'fallback modern-designsize rm 12pt' is loaded
>> open source > level 3, order 4, name 'knuth.tex'
>> close source> level 3, order 4, name 'knuth.tex'
>> I cannot reproduce the problem on a Windows system.
>> Can somebody on an OS X system check and confirm the issue?
> What if you wipe the tuc file?
> 
> No message?
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] LMTX issue with multple question blocks

2019-11-07 Thread Jan Willem Flamma
Dear list members,

The below MWE runs fine and generates a usable PDF.

If I uncomment the second question block and run the MWE on a OS X system it 
generates an unusable PDF and a nearly empty log file:

open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.10.28 18:57 MKIV beta  fmt: 2019.11.7  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/Users/JW/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'co-intro', input './co-intro', result 
'co-intro'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
system  > synctex functionality is enabled, expect 5-10 pct runtime 
overhead!
open source > level 2, order 3, name './co-intro.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
open source > level 3, order 4, name 'knuth.tex'
close source> level 3, order 4, name 'knuth.tex'

I cannot reproduce the problem on a Windows system. 

Can somebody on an OS X system check and confirm the issue?

Thanks,
Jan Willem Flamma



\defineblock[question]
\defineblock[answer]

\hideblocks[question]
\hideblocks[answer]

\defineenumeration[question]
\defineenumeration[answer]

\starttext

\input knuth

\beginquestion
\startquestion
Question text
\startitemize[a]
\item Answer A
\item Answer B
\item Answer C
\stopitemize
\stopquestion
\endquestion
\beginanswer
\startanswer
A
\stopanswer
\endanswer

%\beginquestion
%\startquestion
%Questions text
%\startitemize[a]
%\item Answer A
%\item Answer B
%\item Answer C
%\stopitemize
%\stopquestion
%\endquestion
%\beginanswer
%\startanswer
%A
%\stopanswer
%\endanswer

\useblocks[question]

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Tagged blocks

2019-06-18 Thread Jan Willem Flamma
Dear list members,

I would like to add a tag to a block so I can easily select a few blocks and 
print them in another chapter.

In the below MWE I would like to print the normal (non-tagged) block in the 
first chapter. The second block with the tag [exam] should not be processed in 
the first chapter and only appear in the second chapter.

According to the wiki and reference manual it should be possible using either 
\useblocks or \selectblocks but I can't get it to work.

Who can help me out?

Best regards,
Jan Willem Flamma


\defineenumeration[question][location=margin,text=Question,way=bychapter]
\defineenumeration[answer]  [location=margin,text=Answer]

\defineblock[question]
\defineblock[answer]

\hideblocks[question]
\hideblocks[answer]

\starttext

\startchapter[title=Chapter for regular questions]

\beginquestion
\startquestion 
Normal question
\stopquestion
\endquestion
\beginanswer
\startanswer 
Normal answer
\stopanswer
\endanswer

\beginquestion[exam]
\startquestion 
Exam question
\stopquestion
\endquestion
\beginanswer[exam]
\startanswer 
Exam answer
\stopanswer
\endanswer

\startsection[title=Questions]
\useblocks[question][criterium=chapter]
\stopsection

\startsection[title=Answers]
\useblocks[answer][criterium=chapter]
\stopsection

\stopchapter

\startchapter[title=Chapter for exam questions]

\startsection[title=Exam Questions]
%\useblocks[question][exam]   %<--- does not work
\stopsection

\startsection[title=Exam Answers]
%\useblocks[answer][exam] %<--- does not work
\stopsection

\stopchapter

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] prevent page break when using blocks

2018-09-27 Thread Jan Willem Flamma
Dear list members,

How can I prevent that a question block breaks across a page?

Kind regards,
Jan Willem Flamma


MWE

\defineblock[question]
\defineblock[answer]

\hideblocks[question] 
\hideblocks[answer] 
 

\defineenumeration
[question]
[text={Question},
 after={\blank[2*big]},
 inbetween={\blank[nowhite]},
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]
  
\defineenumeration
[answer]
[counter=answer,
 text=,
 width=,
 before={\blank[nowhite]},
 after={\blank[nowhite]},
 indenting=no,
 titledistance=1cm,
 location=inmargin,
 alternative=left,
 headstyle=,
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

\starttext

\startchapter

\startbuffer[question]
\beginquestion
\startquestion
Question text
\startitemize[a,packed][stopper=,right=)]
\item Answer 1
\item Answer 2
\item Answer 3
\item Answer 4
\item Answer 5
\stopitemize
\stopquestion
\endquestion
\beginanswer
\startanswer
B
\stopanswer
\endanswer
\stopbuffer

\dorecurse{30}{\getbuffer[question]}

\startsection[title=Questions]
\useblocks[question][criterium=chapter]
\page
\startsubsubsection[title=Answers]
\useblocks[answer][criterium=chapter]
\stopsubsubsection

\stopsection

\stopchapter

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Itemize and natural tables

2018-09-24 Thread Jan Willem Flamma
Thank you, also for the follow up in reporting the bug.

I have playing around with \item at various positions but hadn’t considered 
using \itemtag.

As a more general question:
My understanding is that in a tabulate environment \NI is short for \NC 
\itemtag \NC
Is that the case as well in a TABLE environment. E.g., \NI is short for \bTD 
\itemtag \eTD?




> On 23 Sep 2018, at 19:09, Wolfgang Schuster 
>  wrote:
> 
> You would use the \itemtag command in the same way as you would do it with 
> tabulate
> 
> \starttext
> 
> \startitemize[n]
> \bTABLE
> \bTR
> \bTD (\itemtag) Item 1 \eTD
> \eTR
> \eTABLE
> \stopitemize
> 
> \stoptext
> 
> but there is a bug which prevents the item counter to appear in the output 
> (which I will report in a different thread).
> 
> Wolfgang
> 
> 
> Jan Willem Flamma schrieb am 23.09.18 um 17:33:
>> Dear list members,
>> 
>> I’m able to combine itemize and tabulate as per:
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg86189.html 
>> <https://www.mail-archive.com/ntg-context@ntg.nl/msg86189.html>
>> 
>> Also, based on this discussion, I understand that combining modes and 
>> tabulate is not possible. Instead modes must be comined with natural tables.
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg88877.html 
>> <https://www.mail-archive.com/ntg-context@ntg.nl/msg88877.html>
>> 
>> A logical follow up questions is if itemize can be combined with natural 
>> tables that include modes like in the MWE below.
>> 
>> MWE:
>> 
>> \startsetups [table]
>> \setupTABLE [start]  [frame=off,rulethickness=0pt,offset=0pt]
>> \setupTABLE [column] [1] [width=4cm,align=flushleft]
>> \setupTABLE [row][1] [toffset=5pt]
>> \setupTABLE [column] [2] [width=4cm,align=flushleft]
>> \stopsetups
>> 
>> \enablemode[test]
>> 
>> \starttext
>> 
>> \bTABLE [setups=table]
>> \bTR\bTC Item 1 \eTC\bTC Column 1 \eTC   \startmode[test] \bTC 
>> Column 2 \eTC \stopmode \eTR
>> \bTR\bTC Item 2 \eTC\bTC Column 1 \eTC  \startmode[test] \bTC Column 
>> 2 \eTC \stopmode \eTR
>> \eTABLE
>> 
>> \stoptext
>> 
>> Kind regards,
>> Jan Wilem Flamma
>> 
>> 
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto: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://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Itemize and natural tables

2018-09-23 Thread Jan Willem Flamma
Dear list members,

I’m able to combine itemize and tabulate as per:
https://www.mail-archive.com/ntg-context@ntg.nl/msg86189.html 


Also, based on this discussion, I understand that combining modes and tabulate 
is not possible. Instead modes must be comined with natural tables.
https://www.mail-archive.com/ntg-context@ntg.nl/msg88877.html 


A logical follow up questions is if itemize can be combined with natural tables 
that include modes like in the MWE below.

MWE:

\startsetups [table]
\setupTABLE [start]  [frame=off,rulethickness=0pt,offset=0pt]
\setupTABLE [column] [1] [width=4cm,align=flushleft]
\setupTABLE [row][1] [toffset=5pt]
\setupTABLE [column] [2] [width=4cm,align=flushleft]
\stopsetups

\enablemode[test]

\starttext

\bTABLE [setups=table]
\bTR\bTC Item 1 \eTC\bTC Column 1 \eTC  \startmode[test] \bTC Column 2 
\eTC \stopmode \eTR
\bTR\bTC Item 2 \eTC\bTC Column 1 \eTC  \startmode[test] \bTC Column 2 
\eTC \stopmode \eTR
\eTABLE

\stoptext

Kind regards,
Jan Wilem Flamma


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Construct tables column after column

2018-09-10 Thread Jan Willem Flamma
Dear list members,

Table are constructed row after row like in the code below:

Building up a table row after row
\par
\bTABLE
\bTR
\bTC Row 1, Column 1 \eTC
\bTC Row 1, Column 2 \eTC
\eTR
\bTR
\bTC Row 2, Column 1 \eTC
\bTC Row 2, Column 2 \eTC
\eTR
\eTABLE

But is it possible to construct tables column after column?
(The code below does not generate output. I merely switched the xTC and xTR to 
illustate the idea)

Building up a table column after column
\par
\bTABLE
\bTC
\bTR Column 1, Row 1 \eTR
\bTR Column 1, Row 2 \eTR
\eTC
\bTC
\bTR Column 2, Row 1 \eTR
\bTR Column 2, Row 2 \eTR
\eTC
\eTABLE

Kind regards,
Jan Willem Flamma
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Modes in tables

2018-09-10 Thread Jan Willem Flamma
Thank you again Wolfgang.

Yet another question: 

I like to get rid of the \par and tried integrating it into the tablesetups 
somehow. I've tried adding things like before={\blank} and before\par but 
couldn’t get it to work.


\starttext

\startsetups [tablesetups]

\setupTABLE [start]  [frame=off,rulethickness=0pt,offset=0pt]
\setupTABLE [column] [1] [width=6cm,align=flushleft]
\setupTABLE [column] [2] [width=3cm,align=flushleft]
\stopsetups

Calculate the hydrostatic pressure of the following fluid.
\par% <-- can I get rid of this par?
\bTABLE [setups=tablesetups]
\bTR
\bTD Well depth \eTD
\bTD 10100 ft   \eTD
\bTD 3100 m \eTD
\eTR
\bTR
\bTD Fluid density  \eTD
\bTD 9.0 ppg\eTD
\bTD 1.08 kg/l  \eTD
\eTR
\eTABLE

\stoptext

> On 7 Sep 2018, at 20:19, Wolfgang Schuster 
>  wrote:
> 
> 
> 
> Jan Willem Flamma schrieb am 07.09.18 um 20:01:
>> Thank you Wolfgang.
>> 
>> When comparing the results between tabulate and TABLE, I noticed some 
>> different results in formatting.
>> 
>> 1. When using TABLE the table text is slightly shifted to the right. My 
>> initial guess was that this is due to the frame thickness but setting 
>> rulethickness= 0pt did not solve this.
>> How can I get the text in the table to align with the regular text?
> 
> In a natural table each cell acts like \framed where you have a offset value 
> on each side, to get rid of it set offset to 0pt.
> 
> \setupTABLE [start] [frame=off,rulethickness=0pt,offset=0pt]
> 
>> 2. In both cases column widths of 6cm and 3 cm have been set. Yet, the 
>> results show a difference in column width (not sure which one is correct)
> 
> Tabulate adds extra space between the columns but it can be disabled.
> 
> \starttabulate[|lw(6cm)j0|i0lw(3cm)|p|]
> 
>> 3. The vertical space between the regular text and the start of the table 
>> varies. It is larger when using tabulate.
> 
> Tabulate add by default a \blank before and after the table which can be 
> disabled.
> 
> \starttabulate [...] [before=,after=]
> 
> or
> 
> \setuptabulate [before=,after=]
> 
>> 4. The vertical space between the lines in the table text also varies. It is 
>> larger when using TABLE.
> 
> Setting offset to 0pt reduces the vertical space in natural table but there 
> will always be differences between different table types.
> 
> 
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Modes in tables

2018-09-07 Thread Jan Willem Flamma
Thank you Wolfgang.

When comparing the results between tabulate and TABLE, I noticed some different 
results in formatting.

1. When using TABLE the table text is slightly shifted to the right. My initial 
guess was that this is due to the frame thickness but setting rulethickness= 
0pt did not solve this. 
How can I get the text in the table to align with the regular text?

2. In both cases column widths of 6cm and 3 cm have been set. Yet, the results 
show a difference in column width (not sure which one is correct)

3. The vertical space between the regular text and the start of the table 
varies. It is larger when using tabulate.

4. The vertical space between the lines in the table text also varies. It is 
larger when using TABLE.

(I left out the modes in MWE below because I don’t think it is relevant here.)

\starttext

\setupwhitespace[big]

\startsetups [tablesetups]
\setupTABLE [start]  [frame=off, rulethickness=0pt]
\setupTABLE [column] [1] [width=6cm,align=flushleft]
\setupTABLE [column] [2] [width=3cm,align=flushleft]
\stopsetups

Calculate the hydrostatic pressure of the following fluid.
\par
\bTABLE [setups=tablesetups]
\bTR
\bTD Well depth \eTD
\bTD 10100 ft   \eTD
\bTD 3100 m \eTD
\eTR
\bTR
\bTD Fluid density  \eTD
\bTD 9.0 ppg\eTD
\bTD 1.08 kg/l  \eTD
\eTR
\eTABLE

Calculate the hydrostatic pressure of the following fluid.
\starttabulate[|lw(6cm)|lw(3cm)|p|]
\NC Well depth  \NC 10100 ft\NC 3100 m  \NC \NR
\NC Fluid density   \NC 9.0 ppg \NC 1.08 kg/l   \NC \NR
\stoptabulate

\stoptext



> On 6 Sep 2018, at 18:53, Wolfgang Schuster 
>  wrote:
> 
> You can’t do this with tabulate but it’s possible with natural tables.
> 
> %\enablemode [BL]
> 
> \starttext
> 
> \startsetups [tablesetups]
> \setupTABLE [start]  [frame=off]
> \setupTABLE [column] [1] [width=6cm,align=flushleft]
> \setupTABLE [column] [2] [width=2cm,align=flushleft]
> \stopsetups
> 
> \bTABLE [setups=tablesetups]
> \bTR
> \bTD Well depth \eTD
> \bTD 10100 ft \eTD
> \startmode [BL] \bTD \unit{3100 meter} \eTD \stopmode
> \eTR
> \bTR
> \bTD Fluid density \eTD
> \bTD 9.0 ppg \eTD
> \startmode [BL] \bTD \unit{1.08 kilogram per liter} \eTD \stopmode
> \eTR
> \eTABLE
> 
> \stoptext
> 
> Wolfgang
> 
> 
> Jan Willem Flamma schrieb am 06.09.18 um 11:44:
>> Dear list members
>> 
>> I would like to disable to third column in the question when mode BL is not 
>> enabled.
>> 
>> When mode BL is enabled (using the toggle), the third column should of 
>> course appear again.
>> 
>> How can I achieve this?
>> 
>> Regards,
>> Jan Willem
>> 
>> 
>> MWE:
>> 
>> \starttext
>> 
>> %Toggles
>> %\enablemode[BL]
>> 
>> \defineblock[question]
>> \defineblock[answer]
>> 
>> \hideblocks[question]
>> \hideblocks[answer]
>>  
>> \defineenumeration
>> [question]
>> [text=Question,
>>  after={\blank[2*big]},
>>  inbetween={\blank[nowhite]},
>>  way=bychapter,
>>  prefixsegments=chapter,
>>  prefix=yes]
>> 
>>  \defineenumeration
>> [answer]
>> [counter=answer,
>>  text=,
>>  width=,
>>  before={\blank[nowhite]},
>>  after={\blank[nowhite]},
>>  indenting=no,
>>  titledistance=1cm,
>>  location=inmargin,
>>  alternative=left,
>>  headstyle=,
>>  way=bychapter,
>>  prefixsegments=chapter,
>>  prefix=yes]
>>\beginquestion
>> \startquestion
>> Calculate the hydrostatic pressure of the following fluid.
>> \starttabulate[|lw(6cm)|lw(3cm)|\doifmode{BL}{p|}]
>> \NC Well depth   \NC 10100 ft\doifmode{BL}{\NC 3100 m}   
>>  \NC \NR
>> \NC Fluid density\NC 9.0 ppg \doifmode{BL}{\NC 1.08 
>> kg/l}\NC \NR
>> \stoptabulate
>> \stopquestion
>> \endquestion
>> \beginanswer
>> \startanswer
>> 4726 psi\doifmode{BL}{ / 328 bar}
>> \stopanswer
>> \endanswer
>> 
>> 
>> \startsection[title=Questions]
>> \useblocks[question]
>> \startsubsubsection[title=Answers]
>> \useblocks[answer]
>> \stopsubsubsection
>> \stopsection
>> 
>> \stoptext
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wi

[NTG-context] Modes in tables

2018-09-06 Thread Jan Willem Flamma
Dear list members

I would like to disable to third column in the question when mode BL is not 
enabled.

When mode BL is enabled (using the toggle), the third column should of course 
appear again.

How can I achieve this?

Regards,
Jan Willem


MWE: 

\starttext

%Toggles
%\enablemode[BL]

\defineblock[question]
\defineblock[answer]

\hideblocks[question] 
\hideblocks[answer] 
 

\defineenumeration
[question]
[text=Question,
 after={\blank[2*big]},
 inbetween={\blank[nowhite]},
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

 
\defineenumeration
[answer]
[counter=answer,
 text=,
 width=,
 before={\blank[nowhite]},
 after={\blank[nowhite]},
 indenting=no,
 titledistance=1cm,
 location=inmargin,
 alternative=left,
 headstyle=,
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]
 
 
\beginquestion
\startquestion
Calculate the hydrostatic pressure of the following fluid. 
\starttabulate[|lw(6cm)|lw(3cm)|\doifmode{BL}{p|}]
\NC Well depth   \NC 10100 ft\doifmode{BL}{\NC 3100 m}  
 \NC \NR
\NC Fluid density\NC 9.0 ppg \doifmode{BL}{\NC 1.08 kg/l}   
\NC \NR
\stoptabulate
\stopquestion
\endquestion
\beginanswer
\startanswer
4726 psi\doifmode{BL}{ / 328 bar}
\stopanswer
\endanswer


\startsection[title=Questions]
\useblocks[question]
\startsubsubsection[title=Answers]
\useblocks[answer]
\stopsubsubsection
\stopsection

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Multicolumn enumeration in a column

2018-01-02 Thread Jan Willem Flamma
Fabrice,

Please have a look at:
https://www.mail-archive.com/ntg-context@ntg.nl/msg86189.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg86189.html>

Kind regards,
Jan Willem Flamma


> On 31 Dec 2017, at 11:57, Fabrice Couvreur <fabrice1.couvr...@gmail.com> 
> wrote:
> 
> Hello,
> Thank you for your solution that works on the proposed example, but that does 
> not work on a more complex example.
> Fabrice
> 
> \definemixedcolumns
>   [Mycolumns]
>   [
> n=2,
> separator=rule,
> rulecolor=,
> balance=,
> grid=strut,
>   ]
> 
> \setupalign[verytolerant,stretch,hanging]
> 
> \setuppapersize[A4,landscape]
> \setupinteractionscreen[option=landscape]
> 
> \starttext
>   \startMycolumns
> \startitemize[n]
>   \startitem
> One
>   \stopitem
>   \startitem
> \startitemize[a,packed, horizontal, three]
>   \startitem
> \math{Q_1\approx -8}
>   \stopitem
>   \startitem
>  \math{M_e\approx 22}
>\stopitem
>\startitem
>  \math{Q_3\approx 40}
>   \stopitem
> \stopitemize
>   \stopitem
> \stopitem
> \stopitemize
>   \stopMycolumns
> \stoptext
> 
> 2017-12-30 21:07 GMT+01:00 Lars <axteff...@gmail.com 
> <mailto:axteff...@gmail.com>>:
> I also just saw that columnized itemization doesn't work with "columns" key. 
> Use "horizontal" instead:
> 
> 
> \definemixedcolumns
>   [Mycolumns]
>   [
> n=2,
> separator=rule,
> rulecolor=,
> balance=,
> grid=strut,
>   ]
> 
> \setupalign[verytolerant,stretch,hanging]
> 
> \setuppapersize[A4,landscape]
> \setupinteractionscreen[option=landscape]
> 
> \starttext
>   \startMycolumns
> 
> \startitemize[packed, columns, three]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> \blank[medium]
> \startitemize[packed, horizontal, three]
>   \startitem
> three
>   \stopitem
>   \startitem
> four
>   \stopitem
> \stopitemize
> 
>   \stopMycolumns
> \stoptext
> 
> 
> Cheers
> 
> 
>  Weitergeleitete Nachricht 
> Betreff:  Re: [NTG-context] Multicolumn enumeration in a column
> Datum:Sat, 30 Dec 2017 20:49:06 +0100
> Von:  Lars <axteff...@gmail.com> <mailto:axteff...@gmail.com>
> An:   ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
> 
> 
> Hey there,
> 
> the code that you're using won't work with \item command.
> Use the \startitem ... \stopitem command pair instead.
> 
> Another way to get itemizations in columns is to simply place one 
> itemizeation per column:
> 
> \starttext
> 
>   two columns:
> 
>   \startcolumns[n=2]
>   
> \startitemize[packed]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> 
> \column
> 
> \startitemize[packed]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> 
>   \stopcolumns
>   
>   \blank[big]
>   
>   three columns:
>   
>   \startcolumns[n=3]
> 
> \startitemize[packed]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> 
> \column
> 
> \startitemize[packed]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> 
> \column
> 
> \startitemize[packed]
>   \startitem
> one
>   \stopitem
>   \startitem
> two
>   \stopitem
> \stopitemize
> 
>   \stopcolumns
>   
> \stoptext
> 
> 
> Cheers
> 
> 
> 
> Am 30/12/2017 um 10:18 schrieb Fabrice Couvreur:
>> Hello,
>> How to modify the code for an enumeration on three columns in a column ?
>> Thank you
>> Fabrice
>> 
>> 
>> \definemixedcolumns
>>   [Mycolumns]
>>   [
>> n=2, 
>> separator=rule,
>> rulecolor=,
>> balance=,
>> grid=strut,
>>   ]
>> 
>> \setupalign[verytolerant,stretch,hanging]
>> 
>> \setuppapersize[A4,landscape]
>> \setupinteractionscreen[option=landscape]
>> 
>> \starttext
>> \startMycolumns
>> \startitemize[n]
>>   \item 
>>   \item 

Re: [NTG-context] Couple of questions

2017-07-31 Thread Jan Willem Flamma
Dear Pablo,

I experienced the same caption numbering issue late 2015.
See https://www.mail-archive.com/ntg-context@ntg.nl/msg80129.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg80129.html> and 
https://www.mail-archive.com/ntg-context@ntg.nl/msg80131.html 
<https://www.mail-archive.com/ntg-context@ntg.nl/msg80131.html>

Can’t really recall exactly but probably found the answer eventually via the 
test suite (see http://www.pragma-ade.com/download-1.htm 
<http://www.pragma-ade.com/download-1.htm>)

Regards,
Jan Willem



> On 31 Jul 2017, at 17:15, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 07/31/2017 08:01 AM, Jan Willem Flamma wrote:
>> Dear Gerion,
>> 
>> Add 
>> 
>> \setuphead[subsubsection]
>>[incrementnumber=no]
> 
> Dear Jan Willem,
> 
> do you have an explanation for that behaviour?
> 
> At least to me, it isn’t very intuitive (I’m trying to understand).
> 
> Many thanks for your help,
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-31 Thread Jan Willem Flamma
Dear Gerion,

Add 

\setuphead[subsubsection]
[incrementnumber=no]

Regards,
Jan Willem Flamma


> On 30 Jul 2017, at 22:51, Gerion Entrup <gerion.entrup-c...@flump.de> wrote:
> 
> Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
>> On 07/29/2017 04:45 AM, Gerion Entrup wrote:
>>> Was not that simple, but I found the problem, that causes it:
>>> subsubsections without numbers.
>>> [...]
>>> Is there a way to fix this?
>> 
>> I would say this may be a bug.
> Does someone know a way to workaround?
> 
> This only way I see is to simply simulate a subsubsection (with some blanks
> and a big font).
> 
> Gerion
> 
> 
>> I don’t know how it is implemented, but prefixsegments (or prefixes) for
>> captions only work when number is enabled.
>> 
>> This makes sense if the section is part of the prefixsegments, but not
>> if it isn’t.
>> 
>> Another sample that shows the problem:
>> 
>>\mainlanguage[de]
>>\setupexternalfigures[location=default]
>>\setuphead[subsection][number=no]
>>\setupcaptions[prefixsegments=chapter]
>>\setuphead[subsubsection][number=yes]
>> 
>>\starttext
>> 
>>\chapter[title=Kapitel]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\section[title=Abschnitt]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsection[title=Hier gibt’s ein Problem]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsection[title=Und hier gibt’s ein Problem auch]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsubsection[title=Aber hier gibt’s kein Problem]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>>\stoptext
>> 
>> If this isn’t a bug, the code to avoid the problem is too tricky for me
>> (and simply far beyond my knowledge).
>> 
>> Excuse my ignorance,
>> 
>> Pablo
>> 
> 
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-27 Thread Jan Willem Flamma

> On 28 Jul 2017, at 02:22, Gerion Entrup  wrote:
> 
> 
> 1. Color of references and table of content:
> How can I define/change the colors of references and the table of content? And
> why are some references red and others green?
> 

This is what I use to control the TOC

% state=start enables clickable links; contrastcolor= prevents green links
\setupinteraction
[state=start,
 style=,
 color=,
 contrastcolor=,
 openaction=FitWindow]

% enable TOC in PDF sidebar
\placebookmarks 



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Large space between mode blocks

2017-05-18 Thread Jan Willem Flamma
Dear list members,

Another mode related question:

When combining modes, a rather large double space appears between two mode 
blocks (i.e. where the first mode stops and the second mode begins)
In the MWE below are 3 cases. The large space is not present in the 3rd case

Is this intended behaviour?

Kind regards,
Jan Willem

==

\enablemode[X]
\enablemode[Y]

\starttext

% Case 1 - Double space present
\startmode[X]
\input ward
\stopmode
\startmode[Y]
\input ward
\stopmode

\blank[big]

% Case 2 - Double space present
\startmode[X]
\input ward
\doifmode{Y}{
\input ward
}
\stopmode

\blank[big]

% Case 3 - Double space NOT present
\startmode[X]
\input ward
\doifmode{Y}{\input ward}
\stopmode

\stoptext



> On 18 May 2017, at 14:28, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 5/18/2017 1:48 PM, Jan Willem Flamma wrote:
>> Dear list members
>> 
>> If using modes to show or hide certain part of the text.
>> 
>> In the MWE below the part between the startmode[test] .. stopmode works jus 
>> fine. When using the \doifmode construction an error is produced on the 
>> position of the closing curly bracket.
>> I prefer to use \doifmode constructions because they can be nested. The 
>> question block must play a role here but I don’t know why.
>> 
>> Am I overlooking something here?
>> 
>> Kind regards,
>> Jan Willem Flamma
>> 
>> 
>> 
>> \enablemode[test]
>> 
>> \defineblock[question]
>> \defineblock[answer]
>> 
>> \starttext
>> 
>>\doifmode{test}{
>> 
>>\input knuth
>> 
>>\beginquestion
>>\startquestion
>>Question
>>\stopquestion
>>\endquestion
>>\beginanswer
>>\startanswer
>>Answer
>>\stopanswer
>>\endanswer
>> 
>>}
> 
> in order to get rid of the {} the \doifmode match has to grad the argument 
> which doesn't work well with commands that change the nature of the \ on the 
> fly, so it's a no-go
> 
>> 
>>\startmode[test]
>> 
>>\input knuth
>> 
>>\beginquestion
>>\startquestion
>>Question
>>\stopquestion
>>\endquestion
>>\beginanswer
>>\startanswer
>>Answer
>>\stopanswer
>>\endanswer
>> 
>>\stopmode
>> 
>> \stoptext
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto: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://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <http://contextgarden.net/>
>> ___
>> 
> 
> 
> -- 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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 <mailto: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://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] \doifmode error with question blocks

2017-05-18 Thread Jan Willem Flamma
Dear list members

If using modes to show or hide certain part of the text.

In the MWE below the part between the startmode[test] .. stopmode works jus 
fine. When using the \doifmode construction an error is produced on the 
position of the closing curly bracket.
I prefer to use \doifmode constructions because they can be nested. The 
question block must play a role here but I don’t know why.

Am I overlooking something here?

Kind regards,
Jan Willem Flamma



\enablemode[test]

\defineblock[question]
\defineblock[answer]

\starttext

\doifmode{test}{

\input knuth

\beginquestion
\startquestion
Question
\stopquestion
\endquestion
\beginanswer
\startanswer
Answer
\stopanswer
\endanswer

}


\startmode[test]

\input knuth

\beginquestion
\startquestion
Question
\stopquestion
\endquestion
\beginanswer
\startanswer
Answer
\stopanswer
\endanswer

\stopmode

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Colored rule using MPgraphic

2017-05-17 Thread Jan Willem Flamma
Dear list members,

I’m trying to make certain text standout from the surrounding text by adding a 
colored rule to the side.
See below MWE.

The colored rule is not shown over the area where the picture is displaced. 
Does anybody know how can I fix this?

Kind regards,
Jan Willem


\definetextbackground
[Example]
[mp=background:rule,location=paragraph,
rulethickness=3pt,framecolor=red,
leftoffset=1em,rightoffset=1em,
toptoffset=1em,bottomoffset=1em,
before={\testpage[3]\blank[3*big]},
after={\blank[3*big]}]

\startuseMPgraphic{background:rule}
linecap := butt;
begingroup;
for i=1 upto nofmultipars :
draw (ulcorner multipars[i]--llcorner multipars[i]) 
withcolor \MPvar{linecolor} withpen pencircle scaled 
\MPvar{linewidth} ;
endfor ;
endgroup;
\stopuseMPgraphic

\useMPlibrary[dum]

\starttext

\startExample
{\bf Example - Title\hfill{Subtitle}} \blank

\placefigure
[force,none][]{}
{\externalfigure[dum][width=0.3\textwidth]}

\input knuth

\stopExample

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Horizontal adjustment of left/right floats

2017-05-12 Thread Jan Willem Flamma
Hi Aditya,

This is what I could find. Hope it suits your needs.

From the details manual, page 57:

\starttext
\movesidefloat [x=-2cm]
\startplacefigure[location={left,none}]
\externalfigure[cow]
\stopplacefigure
\input knuth
\stoptext

Regards,
Jan Willem Flamma

> On 11 May 2017, at 17:43, Aditya Mahajan <adit...@umich.edu> wrote:
> 
> Hi,
> 
> Is it possible to adjust the horizontal placement of left/right floats 
> (similar to how 2*line etc can adjust the vertical placement).
> 
> Minmal example:
> 
> \starttext
> \startplacefigure[location={left,none}]
> \externalfigure[cow]
> \stopplacefigure
> \input knuth
> \stoptext
> 
> Aditya
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] align text and formula

2017-02-09 Thread Jan Willem Flamma
Dear list members,

The below solution stopped working in the latest bet (2017.01.27 14:39 MKIV 
beta)
It is still workig fine using the wiki ConTeXt online.

Has anything changed using this align feature?

Kind regards,
Jan Willem Flamma


> 
> 
>> On 25 aug. 2016, at 13:52, Henri Menke <henrime...@gmail.com> wrote:
>> 
>> Hi Jan,
>> 
>> if I understood you correctly, this should produce what you are after.
>> 
>> \starttext
>> 
>> \startformula
>> E = mc^2
>> \stopformula
>> 
>> \startformula
>> \startalign[m=3,align={middle},distance=0pt plus 1 fil]
>>   \NC \rlap{\text{Text1}}   \NC\NC E=mc^2 \NR
>>   \NC \rlap{\text{This is an explanation}}   \NC\NC E=mc^2 \NR
>>   \NC \rlap{\text{This is a very very very long explanation}}   \NC\NC 
>> E=mc^2 \NR
>> \stopalign
>> \stopformula
>> 
>> \stoptext
>> 
>> The inner workings of this solution are quite messy.  You *have* to have the 
>> \NC\NC between text and formula and the formula must not contain any further 
>> alignment points; text has to be enclosed in \rlap.  As you can see it 
>> centers the formula unconditionally and just flows into the text if it 
>> doesn't fit.  Just don't do it like this.
>> 
>> Cheers, Henri
>> 
>> On 08/24/2016 05:38 PM, Jan Willem Flamma wrote:
>>> Hi Otared,
>>> 
>>> I apologize for not explaining it better.
>>> 
>>> Maybe the below example will illustrate better what I’m trying to achieve. 
>>> - The first formula is perfectly aligned.
>>> - The bottom three formulas do not line up with the top formula
>>> 
>>> I’m trying to align all formulas regardless of the amount of text added to 
>>> the left of the formula. 
>>> Of course I could add \qquad or \quad to try and manually align but 
>>> basically I’m interested to know if a fool proof method exist that aligns 
>>> all without using \\qquad or \quad
>>> 
>>> \starttext
>>> 
>>> % Mid-aligned formula
>>> \startformula
>>> E = mc^2
>>> \stopformula
>>> 
>>> \setupformulas[align=flushleft]
>>> \startformula
>>>   \startalign[n=3,align={left,middle}]
>>> \NC \text{Text1}
>>> \NC \qquad  \NC E = mc^2\NR
>>> \NC \text{This is an explanation}   \NC \qquad  
>>> \NC  E = mc^2   \NR
>>> \NC \text{This is a longer explanation} \NC \qquad  \NC E = 
>>> mc^2\NR
>>>   \stopalign
>>> \stopformula
>>> 
>>> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Vim wiki page updated

2016-11-02 Thread Jan Willem Flamma
Excellent piece of work. 

Many thanks!

> On 1 Nov 2016, at 14:13, Nicola  wrote:
> 
> I have updated the Vim page at ConTeXt Garden:
> 
>http://wiki.contextgarden.net/Vim
> 
> It may be considered as the official documentation of the ConTeXt scripts in 
> Vim, as the only other documentation is the source code :)
> 
> Happy editing!
> Nicola
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Influence enumeration spacing

2016-10-25 Thread Jan Willem Flamma
Dear list members,

In the MWE below the amount of vertical space between the enumeration header 
and the question text seems to fully controlled by the global 
\setupwhitespace[big] setting. 
I would like to reduce the distance beteen the enumeration header and the 
question text but inbetween={\blank[nowhite]} seems to be ignored. I tried 
none, disable etc. as well.

Of course I could set \setupwhitespace[small] but this would influence the 
amount whitespace between my paragraph text which should be set to big.

How can I minimize the inbetween distance without changing the spacing between 
paragraphs?


\setupwhitespace[big]   

\defineblock[question]
\keepblocks[question]

\defineenumeration
   [question]
   [inbetween={\blank[nowhite]}]

\starttext

\input ward
\input ward

\beginquestion
\startquestion
Text text text
\startitemize[a,packed]
\item answer a
\item answer b
\stopitemize
\stopquestion
\endquestion

\stoptext

Kind regards
Jan Willem Flamma
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
Thank you Wolfgang.

This suits my needs just fine.

Kind regards,
Jan Willem Flamma

> On 14 okt. 2016, at 10:34, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Jan Willem Flamma <mailto:jwfregis...@icloud.com> 14. Oktober 2016 um 10:12
>> Dear list members,
>> 
>> I create all my MetaFun drawings in a separate environment file where each 
>> individual drawing sits inside a start/stopbuffer. This allows me to easily 
>> use those drawings in all my documents using \processMPbuffer[name]. Works 
>> just fine.
>> 
>> However, I also wish to have all the drawing available in a pdf file (each 
>> drawing on a separate page). This allows me to split the pdf and use the 
>> drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in 
>> another document.
>> 
>> The below MWE represent my MetaFun drawings file.
>> The idea is that by uncommenting the \enablemode[makepdf] I can create the 
>> pdf file with drawings. It seems however that startMPpage does not accept 
>> buffers (I also tried processbuffer and processMPbuffer).
>> 
>> Is it possible to somehow make this work?
> You can use
> 
> \startTEXpage
> \processMPbuffer[…]
> \stopTEXpage
> 
> but loading a buffer in MPpage doesn’t work because the content of the 
> environment
> is just passed to MetaPost and buffers can’t be loaded inside MetaPost code 
> unless
> Hans adds a function for this, e.g.
> 
> \startMPcode
> buffer("mybuffer")
> \stopMPcode
> 
> 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://context.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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
Dear list members,

I create all my MetaFun drawings in a separate environment file where each 
individual drawing sits inside a start/stopbuffer. This allows me to easily use 
those drawings in all my documents using \processMPbuffer[name]. Works just 
fine.

However, I also wish to have all the drawing available in a pdf file (each 
drawing on a separate page). This allows me to split the pdf and use the 
drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in 
another document.

The below MWE represent my MetaFun drawings file.
The idea is that by uncommenting the \enablemode[makepdf] I can create the pdf 
file with drawings. It seems however that startMPpage does not accept buffers 
(I also tried processbuffer and processMPbuffer).

Is it possible to somehow make this work?

Thanks and regards,
Jan Willem Flamma


%\enablemode[makepdf]

\startbuffer[fig1]
  draw fullcircle scaled 2cm withcolor red ;
\stopbuffer

\startbuffer[fig2]
  draw unitsquare scaled 2cm withcolor red ;
\stopbuffer


\startmode[makepdf]
  \starttext
\startMPpage
  \getbuffer[fig1]
\stopMPpage

\startMPpage
  \getbuffer[fig2]
\stopMPpage
  \stoptext
\stopmode



___
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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ANN: Updated Vim scripts for ConTeXt

2016-10-11 Thread Jan Willem Flamma
Hi Nicola,

I’m relatively new to Vim and currently run it as installed (MacVIm 8.0 latest).

Where do I have to place these files in order to use them? (~/.vim folder or do 
I have to copy the individual files into the respective Vim application 
subfolders?)
After placing the files, is there anything else that needs to be done to ensure 
Vim picks up these files?

Appreciate any help you can provide.

Kind regards,
Jan Willem Flamma


> On 10 okt. 2016, at 12:49, Nicola <nvitacolo...@gmail.com> wrote:
> 
> Hello,
> attached you find an update of the Vim scripts for ConTeXt.
> A few highlights:
> 
> - jump commands ([[, ]], [{, ]}, ...);
> 
> - jump to file included with \project, \component, etc... by typing
> gf when the cursor is above the filename;
> 
> - tp (TeX paragraph) text object (e.g., use gqap to reflow a paragraph);
> 
> - i$ and a$ text objects;
> 
> - better integration with MetaPost (indentation and autocompletion
> inside \startMP...\stopMP... works automatically);
> 
> - syntax highglighting can be enabled for any nested filetype (MetaPost
> and Lua are enabled by default);
> 
> - compiler plugin, supporting mtxrun and Makefiles;
> 
> - Asynchronous typesetting with :ConTeXt command.
> 
> I plan to submit these changes for inclusion in Vim, but I'd like to
> get some feedback, especially re background typesetting and especially
> from Windows users.
> 
> I recommend to test with Vim 8.0 patch 22 or later.
> 
> Nicola
> ___
> 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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Looking for wiki master(s)

2016-09-29 Thread Jan Willem Flamma
Hi Mojca and other brainstormers,

I still consider myself a ConTeXt beginner but am willing to help out with at 
least part of the tasks and whenever I have time available.

Regards,
Jan Willem Flamma
___
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] Tabulation in itemize list

2016-09-27 Thread Jan Willem Flamma
Dear Florian,

Maybe this functionality is helpful to you
https://www.mail-archive.com/ntg-context@ntg.nl/msg81351.html 


Regards,
Jan Willem


> On 26 sep. 2016, at 17:25, Florian Leupold  wrote:
> 
> 
>> On 26.09.16, at 17:07, Wolfgang Schuster  wrote:
>> 
>>> Florian Leupold 26. September 2016 um 16:30
>>> 
>>> Dear Wolfgang,
>>> 
>>> thank you for your suggestion!
>>> 
>>> However, it seems the code does not compile properly. Both, frame and 
>>> tabulate compile without the other, but not together. The error I get is 
>>> “Missing } inserted” on the line “\stoptabulate”.
>>> 
>>> Could this be a bug?
>> The example works for me.
>> 
>> mtx-context | current version: 2016.09.24 12:40
>> 
>> 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
>> ___
> 
> Okay, is this something that got fixed since May then?
> 
> Using ConTeXt online (ConTeXt  ver: 2016.05.19 13:43 MKIV current  fmt: 
> 2016.8.24), it also does not work.
> http://live.contextgarden.net/cgi-bin/output.cgi?id=dpiqSe
> 
> That would mean I am in trouble because I am running the MacTeX version of 
> ConTeXt since I could not get the standalone version to work with TeXShop.
> 
> Best,
> Florian
> ___
> 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] Captions numbering

2016-09-01 Thread Jan Willem Flamma
Hi Jose Luis,

I eventually solved this by setting up the subsubsection as follows:

\setuphead[subsubsection]
[incrementnumber=no]

This links to a set of test files on the pragma website and maybe of use to 
you: http://context.aanhet.net/download-1.htm

Kind regards,
Jan Willem


> On 31 aug. 2016, at 14:04, Jose Luis Arellano  wrote:
> 
> Dear list,
> I experience exactly same issue explained here 
> , but 
> apparently the link provided for Hans doesn't exist.
> I will appreciate any help.
> Thanks.
> ___
> 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] align text and formula

2016-08-25 Thread Jan Willem Flamma
Hi Henri,

Thanks for your solution. This is indeed providing the functionality I was 
after.

I need to pick up a good Tex book one of these days to try and master those 
commands :-)

Regards,
Jan Willem Flamma


> On 25 aug. 2016, at 13:52, Henri Menke <henrime...@gmail.com> wrote:
> 
> Hi Jan,
> 
> if I understood you correctly, this should produce what you are after.
> 
> \starttext
> 
> \startformula
>  E = mc^2
> \stopformula
> 
> \startformula
>  \startalign[m=3,align={middle},distance=0pt plus 1 fil]
>\NC \rlap{\text{Text1}}\NC\NC E=mc^2 \NR
>\NC \rlap{\text{This is an explanation}}   \NC\NC 
> E=\sqrt{p^2c^2+m^2c^4} \NR
>\NC \rlap{\text{This is a longer explanation}} \NC\NC \left(\beta 
> mc^2+c\left(\sum _{n=1}^3 \alpha_n p_n \right)\right) \psi(x,t) = i \hbar 
> \frac{\partial \psi(x,t)}{\partial t} \NR
>  \stopalign
> \stopformula
> 
> \stoptext
> 
> The inner workings of this solution are quite messy.  You *have* to have the 
> \NC\NC between text and formula and the formula must not contain any further 
> alignment points; text has to be enclosed in \rlap.  As you can see it 
> centers the formula unconditionally and just flows into the text if it 
> doesn't fit.  Just don't do it like this.
> 
> Cheers, Henri
> 
> On 08/24/2016 05:38 PM, Jan Willem Flamma wrote:
>> Hi Otared,
>> 
>> I apologize for not explaining it better.
>> 
>> Maybe the below example will illustrate better what I’m trying to achieve. 
>> - The first formula is perfectly aligned.
>> - The bottom three formulas do not line up with the top formula
>> 
>> I’m trying to align all formulas regardless of the amount of text added to 
>> the left of the formula. 
>> Of course I could add \qquad or \quad to try and manually align but 
>> basically I’m interested to know if a fool proof method exist that aligns 
>> all without using \\qquad or \quad
>> 
>> \starttext
>> 
>> % Mid-aligned formula
>> \startformula
>> E = mc^2
>> \stopformula
>> 
>> \setupformulas[align=flushleft]
>> \startformula
>>\startalign[n=3,align={left,middle}]
>>  \NC \text{Text1}
>> \NC \qquad  \NC E = mc^2\NR
>>  \NC \text{This is an explanation}   \NC \qquad  
>> \NC  E = mc^2   \NR
>>  \NC \text{This is a longer explanation} \NC \qquad  \NC E = 
>> mc^2\NR
>>\stopalign
>> \stopformula
>> 
>> \stoptext
>> 
>> Thanks
>> JW
>> 
>>> On 24 aug. 2016, at 10:21, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
>>> 
>>> Hi Otared,
>>> 
>>> Thanks for the (very quick) reply.
>>> 
>>> I’ve experiemented with that solution as well. However, the text can vary 
>>> in length and this would required a lot of tweaking to try and get the 
>>> formulas mid-aligned.
>>> I’m trying to find a fool proof solution that will get the formula 
>>> mid-aligned in all cases (and hope it exists).
>>> 
>>> In any case, thanks for your suggestion!
>>> 
>>> Jan Willem
>>> 
>>>> On 24 aug. 2016, at 10:10, Otared Kavian <ota...@gmail.com> wrote:
>>>> 
>>>> Hi Jan,
>>>> 
>>>> You can specify a certain horizontal distance in the second column, as in 
>>>> the following:
>>>> 
>>>> %%% begin example.tex
>>>> \starttext
>>>> 
>>>> \setupformulas[align=flushleft]
>>>> \startformula
>>>>\startalign[n=2,align={left,middle}]
>>>>\NC \text{Text1}\NC\qquad E = mc^2\NR
>>>>\NC \text{Text2}\NC\qquad E = mc^2\NR
>>>>\NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>>>>\stopalign
>>>> \stopformula
>>>> 
>>>> \stoptext
>>>> %%% end example.tex
>>>> 
>>>>> On 24 Aug 2016, at 10:02, Jan Willem Flamma <jwfregis...@icloud.com> 
>>>>> wrote:
>>>>> 
>>>>> Dear list,
>>>>> 
>>>>> I would like to include text on the same line as a formula.
>>>>> The text needs to be left-aligned and the formula needs to be mid-aligned 
>>>>> (as per normal).
>>>>> 
>>>>> I’ve tried various solutions from the mathalign MyWay but have not 
>>>>> succeeded to get the desi

Re: [NTG-context] align text and formula

2016-08-24 Thread Jan Willem Flamma
Hi Otared,

Thanks for the (very quick) reply.

I’ve experiemented with that solution as well. However, the text can vary in 
length and this would required a lot of tweaking to try and get the formulas 
mid-aligned.
I’m trying to find a fool proof solution that will get the formula mid-aligned 
in all cases (and hope it exists).

In any case, thanks for your suggestion!

Jan Willem
 
> On 24 aug. 2016, at 10:10, Otared Kavian <ota...@gmail.com> wrote:
> 
> Hi Jan,
> 
> You can specify a certain horizontal distance in the second column, as in the 
> following:
> 
> %%% begin example.tex
> \starttext
> 
> \setupformulas[align=flushleft]
> \startformula
>   \startalign[n=2,align={left,middle}]
>   \NC \text{Text1}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>   \stopalign
> \stopformula
> 
> \stoptext
> %%% end example.tex
> 
>> On 24 Aug 2016, at 10:02, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
>> 
>> Dear list,
>> 
>> I would like to include text on the same line as a formula.
>> The text needs to be left-aligned and the formula needs to be mid-aligned 
>> (as per normal).
>> 
>> I’ve tried various solutions from the mathalign MyWay but have not succeeded 
>> to get the desired result sofar.
>> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
>> 
>> Who can help me out?
>> 
>> Regards,
>> Jan Willem
>> 
>> 
>> \starttext
>> 
>> \setupformulas[align=flushleft]
>> \startformula
>>  \startalign[n=2,align={left,middle}]
>>  \NC \text{Text1}\NC E = mc^2\NR
>>  \NC \text{Text2}\NC E = mc^2\NR
>>  \stopalign
>> \stopformula
>> 
>> \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
>> ___
> 
> ___
> 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] align text and formula

2016-08-24 Thread Jan Willem Flamma
Hi Otared,

I apologize for not explaining it better.

Maybe the below example will illustrate better what I’m trying to achieve. 
- The first formula is perfectly aligned.
- The bottom three formulas do not line up with the top formula

I’m trying to align all formulas regardless of the amount of text added to the 
left of the formula. 
Of course I could add \qquad or \quad to try and manually align but basically 
I’m interested to know if a fool proof method exist that aligns all without 
using \\qquad or \quad

\starttext

% Mid-aligned formula
\startformula
E = mc^2
\stopformula

\setupformulas[align=flushleft]
\startformula
\startalign[n=3,align={left,middle}]
\NC \text{Text1}\NC 
\qquad  \NC E = mc^2\NR
\NC \text{This is an explanation}   \NC \qquad  \NC  E 
= mc^2   \NR
\NC \text{This is a longer explanation} \NC \qquad  \NC E = mc^2
\NR
\stopalign
\stopformula

\stoptext

Thanks
JW

> On 24 aug. 2016, at 10:21, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
> 
> Hi Otared,
> 
> Thanks for the (very quick) reply.
> 
> I’ve experiemented with that solution as well. However, the text can vary in 
> length and this would required a lot of tweaking to try and get the formulas 
> mid-aligned.
> I’m trying to find a fool proof solution that will get the formula 
> mid-aligned in all cases (and hope it exists).
> 
> In any case, thanks for your suggestion!
> 
> Jan Willem
> 
>> On 24 aug. 2016, at 10:10, Otared Kavian <ota...@gmail.com> wrote:
>> 
>> Hi Jan,
>> 
>> You can specify a certain horizontal distance in the second column, as in 
>> the following:
>> 
>> %%% begin example.tex
>> \starttext
>> 
>> \setupformulas[align=flushleft]
>> \startformula
>>  \startalign[n=2,align={left,middle}]
>>  \NC \text{Text1}\NC\qquad E = mc^2\NR
>>  \NC \text{Text2}\NC\qquad E = mc^2\NR
>>  \NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>>  \stopalign
>> \stopformula
>> 
>> \stoptext
>> %%% end example.tex
>> 
>>> On 24 Aug 2016, at 10:02, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
>>> 
>>> Dear list,
>>> 
>>> I would like to include text on the same line as a formula.
>>> The text needs to be left-aligned and the formula needs to be mid-aligned 
>>> (as per normal).
>>> 
>>> I’ve tried various solutions from the mathalign MyWay but have not 
>>> succeeded to get the desired result sofar.
>>> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
>>> 
>>> Who can help me out?
>>> 
>>> Regards,
>>> Jan Willem
>>> 
>>> 
>>> \starttext
>>> 
>>> \setupformulas[align=flushleft]
>>> \startformula
>>> \startalign[n=2,align={left,middle}]
>>> \NC \text{Text1}\NC E = mc^2\NR
>>> \NC \text{Text2}\NC E = mc^2\NR
>>> \stopalign
>>> \stopformula
>>> 
>>> \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
>>> ___
>> 
>> ___
>> 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
> ___

___
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] align text and formula

2016-08-24 Thread Jan Willem Flamma
Hi Otared,

Thanks for the (very quick) reply.

I’ve experiemented with that solution as well. However, the text can vary in 
length and this would required a lot of tweaking to try and get the formulas 
mid-aligned.
I’m trying to find a fool proof solution that will get the formula mid-aligned 
in all cases (and hope it exists).

In any case, thanks for your suggestion!

Jan Willem

> On 24 aug. 2016, at 10:10, Otared Kavian <ota...@gmail.com> wrote:
> 
> Hi Jan,
> 
> You can specify a certain horizontal distance in the second column, as in the 
> following:
> 
> %%% begin example.tex
> \starttext
> 
> \setupformulas[align=flushleft]
> \startformula
>   \startalign[n=2,align={left,middle}]
>   \NC \text{Text1}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\qquad E = mc^2\NR
>   \NC \text{Text2}\NC\hskip 3cm E = mc^2\NR
>   \stopalign
> \stopformula
> 
> \stoptext
> %%% end example.tex
> 
>> On 24 Aug 2016, at 10:02, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
>> 
>> Dear list,
>> 
>> I would like to include text on the same line as a formula.
>> The text needs to be left-aligned and the formula needs to be mid-aligned 
>> (as per normal).
>> 
>> I’ve tried various solutions from the mathalign MyWay but have not succeeded 
>> to get the desired result sofar.
>> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
>> 
>> Who can help me out?
>> 
>> Regards,
>> Jan Willem
>> 
>> 
>> \starttext
>> 
>> \setupformulas[align=flushleft]
>> \startformula
>>  \startalign[n=2,align={left,middle}]
>>  \NC \text{Text1}\NC E = mc^2\NR
>>  \NC \text{Text2}\NC E = mc^2\NR
>>  \stopalign
>> \stopformula
>> 
>> \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
>> ___
> 
> ___
> 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] align text and formula

2016-08-24 Thread Jan Willem Flamma
Dear list,

I would like to include text on the same line as a formula.
The text needs to be left-aligned and the formula needs to be mid-aligned (as 
per normal).

I’ve tried various solutions from the mathalign MyWay but have not succeeded to 
get the desired result sofar.
Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.

Who can help me out?

Regards,
Jan Willem


\starttext

\setupformulas[align=flushleft]
\startformula
\startalign[n=2,align={left,middle}]
\NC \text{Text1}\NC E = mc^2\NR
\NC \text{Text2}\NC E = mc^2\NR
\stopalign
\stopformula

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

Re: [NTG-context] Hyphenation errors (again or still) in recent mkiv

2016-08-01 Thread Jan Willem Flamma
Hi Pablo,

I wasn’t aware of the \hyphenatedword feature. Thanks for sharing.

I used an online hyphenation tool (English US) because it’s too tricky for me 
too!
Using English UK the words maintenance and integrated are indeed correctly 
hyphenated. So I jumped to conclusions there.

What remains is that ‘schematic' is incorrectly hyphenated as 'sc-hematic’.
Another example is the word ‘cards’, which I see hyphenated as 'ca-rds’ but I’m 
unable to reproduce it in a MWE for now.

Regards,
Jan Willem



> On 31 jul. 2016, at 21:06, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 07/31/2016 08:40 PM, Jan Willem Flamma wrote:
>> Dear all,
>> 
>> I can confirm it behaves incorrectly on ConTeXt  ver: 2016.07.30 00:26 MKIV 
>> beta
> 
> Hi Jan Willem,
> 
> are patterns for Brittish English better?
> 
>\starttext
>\hyphenatedword{schematic, maintenance and integrated
>beginning procedure adequately style}
> 
> 
>\uk\hyphenatedword{schematic, maintenance and integrated
>   beginning procedure adequately style}
>\stoptext
> 
> Sorry, but English hyphenation is too tricky for me.
> 
> Just in case it helps,
> 
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___
> 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] Hyphenation errors (again or still) in recent mkiv

2016-07-31 Thread Jan Willem Flamma
Dear all,

I can confirm it behaves incorrectly on ConTeXt  ver: 2016.07.30 00:26 MKIV beta

Below a MWE with some example sentences where the words schematic, maintenance 
and integrated are incorrect hyphenated

\mainlanguage[en]
\setuppapersize[A4][A4] 


\setuplayout
[height=middle,
 width=middle,
 backspace=1.25in,
 topspace=0.5in,
 headerdistance=0cm]

\definefontfamily [mainface] [sans]  [DejaVu Sans]
\setupbodyfont[mainface,sans,9pt]

\starttext
The following gives a sequence of events describing what happens when the ram 
close function is activated from one of the control panels. Figure 4.9 provides 
a simplified schematic of the hydraulic control system for activating the ram 
close function.

Test programs can include visual inspections, functional operations, pressure 
tests, maintenance practices and drills.

Subsea BOP systems include choke and kill lines built into the BOP stack and 
LMRP and integrated with the marine riser system. 
\stoptext

Kind regards,
Jan Willem Flamma



> On 31 jul. 2016, at 16:51, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 7/31/2016 12:57 PM, Robert Blackstone wrote:
>> Dear all,
>> 
>> In the setupfile of my project I have \mainlanguage[en]. The font used is 
>> Verdana.
>> With mkiv versions till october 2015 the hyphenation of English words was 
>> always correct.
>> 
>> The same files compiled with mkiv of july 2016 (version 2016.07.18 16;26) 
>> give hyphenations that are definitely wrong.
>> Some examples: begi-nning, pr-ocedure, adequ-ately, st-yle
>> 
>> I made some tests with Linux Libertine sans and here also the earlier mkiv's 
>> gave correct hyphenations, the july version wrong ones.
>> 
>> So it seems that ref. hyphenation something is wrong with this mkiv-version. 
>>  Or do I now have to use something other than  \mainlanguage[en] ?
> 
> no example so no solution
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | 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
> ___

___
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] inconsistent math fontsize

2016-07-30 Thread Jan Willem Flamma

> On 28 jul. 2016, at 00:46, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 7/27/2016 2:29 PM, Jan Willem Flamma wrote:
>> Dear list members
>> 
>> Sofar, I’ve been using \qquad to separate two formulas side-by-side on a 
>> single line.
>> To ensure consistency with spacing I want to change to using a 
>> \startformulas .. \stopformulas construction.
>> See MWE below
>> 
>> However, the solution using the \startformulas .. \stopformulas construction 
>> gives a noticeably smaller fontsize !
>> 
>> I’m using the latest beta: ConTeXt  ver: 2016.07.25; Luatex 0.95
>> 
>> Worth noting that all both fontsizes are identical when using context live 
>> via contextgarden.
>> 
>> Kind regards,
>> Jan Willem Flamma
>> 
>> 
>> MWE:
>> 
>> \starttext
>> 
>> % Printed in normal fontsize
>> \startformula
>>a=\frac{b}{c}
>>\qquad \qquad \qquad
>>a=\frac{b}{c}
>> \stopformula
>> 
>> % Printed in smaller fontsize
>> \startformulas
>>\startformula
>>a=\frac{b}{c}
>>\stopformula
>> 
>>\startformula
>>a=\frac{b}{c}
>>\stopformula
>> \stopformulas
>> 
>> \stoptext
> 
> fixed in next beta

Confirmed okay in ConTeXt  ver: 2016.07.30 00:26 MKIV beta

Thanks for the quick fix.


> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | 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
> ___

___
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] inconsistent math fontsize

2016-07-27 Thread Jan Willem Flamma
Dear list members

Sofar, I’ve been using \qquad to separate two formulas side-by-side on a single 
line.
To ensure consistency with spacing I want to change to using a \startformulas 
.. \stopformulas construction.
See MWE below

However, the solution using the \startformulas .. \stopformulas construction 
gives a noticeably smaller fontsize !

I’m using the latest beta: ConTeXt  ver: 2016.07.25; Luatex 0.95

Worth noting that all both fontsizes are identical when using context live via 
contextgarden.

Kind regards,
Jan Willem Flamma


MWE:

\starttext

% Printed in normal fontsize
\startformula
a=\frac{b}{c}
\qquad \qquad \qquad
a=\frac{b}{c}
\stopformula

% Printed in smaller fontsize
\startformulas
\startformula
a=\frac{b}{c}
\stopformula

\startformula
a=\frac{b}{c}
\stopformula
\stopformulas

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

Re: [NTG-context] disappearing margin text

2016-06-22 Thread Jan Willem Flamma
Thanks for your reply Marco.

Indeed using different margin text I now see they are overlaid. Using your 
suggestion adds the margin text from Question 2 just underneath the margin text 
from Question 1. 

I would like to position it next to Question 2 because I would like to use this 
feature to indicate question categories.

Regards,
Jan Willem



> On 22 jun. 2016, at 11:52, Jan Willem Flamma <jwfregis...@icloud.com> wrote:
> 
> Dear list members
> 
> In the following MWE, the margin text appears at question 1 but not at 
> question 2.
> 
> How is this possible?
> 
> Kind regards,
> Jan Willem
> 
> 
> MWE:
> \defineblock[question]
> \hideblocks[question] 
> 
> \defineenumeration
>[question]
>[text=Question]
> 
> \setupblock[question][before=\startquestion,after=\stopquestion]
> 
> 
> \starttext
> 
> \inmargin{margin}
> \beginquestion
> Text
> \endquestion
> 
> \inmargin{margin}
> \beginquestion
> Text
> \endquestion
> 
> \useblocks[question]
> 
> \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
___

[NTG-context] disappearing margin text

2016-06-22 Thread Jan Willem Flamma
Dear list members

In the following MWE, the margin text appears at question 1 but not at question 
2.

How is this possible?

Kind regards,
Jan Willem


MWE:
\defineblock[question]
\hideblocks[question]   

\defineenumeration
[question]
[text=Question]
 
\setupblock[question][before=\startquestion,after=\stopquestion]


\starttext

\inmargin{margin}
\beginquestion
Text
\endquestion

\inmargin{margin}
\beginquestion
Text
\endquestion

\useblocks[question]

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

[NTG-context] enumeration header spacing control

2016-06-18 Thread Jan Willem Flamma
Dear members,

In the MWE below the amount of vertical space between the enumeration header 
and the text seems to fully controlled by the global \setupwhitespace setting.

The inbetween={\blank[nowhite]} setting seems to be ignored. I noticed this 
change of behaviour some weeks ago for the first time.

Appreciate any suggestion on how to reduce the vertical space between the 
enumeration header and the text



MWE

\setupwhitespace[big]   

\defineblock
[question]

\defineenumeration
[question]
[alternative=top,
after={\blank[2*big]},
inbetween={\blank[nowhite]}]
 
\keepblocks
[question]

\starttext
\input ward

\input ward

\startsection[title=Questions]

\beginquestion
\startquestion  
\dorecurse{10}{Text }
\stopquestion
\endquestion

\beginquestion
\startquestion  
\dorecurse{10}{Text }
\stopquestion
\endquestion

\stopsection

\stoptext

Kind regards,
Jan Willem Flamma
___
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] combining itemize and starttabulate

2016-04-06 Thread Jan Willem Flamma
Dear members,

The following combination of itemize and starttabulate is numbered from 'd. to 
f.' instead of from 'a. to c.'

\starttext
\startitemize[a]
\starttabulate[|l|p|]

\item \NC column1 \NC  column2  \NC \NR
\item \NC column1 \NC  column2  \NC \NR
\item \NC column1 \NC  column2  \NC \NR

\stoptabulate
\stopitemize
\stoptext


I'm unable to figure out why this occurs and also how to get the following 
desired result:
a.  tekst   tekst
b.  tekst   tekst
c.  tekst   tekst   

Kind regards,
Jan Willem

___
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] Unexpected float numbering in unnumbered subsubsection

2015-12-15 Thread Jan Willem Flamma
Dear list members,

I ran into the following issue related to figure/float numbering.

I use numbered chapters, sections, subsections and unnumbered subsubsections. 
See minimal example below.

Figure numbering works as expected in the numbered chapters, sections and 
subsections.
Figures get numbered: Figure 1.1

The figure numbering is unexpected in the unnumbered sub subsection:
Figures get numbered: Figure 2 (in stead of the expected Figure 1.2)

I would like all figures (and floats) to be numbered in sequence according the 
chapter numbering:
Chapter 1: Figure 1.1, Figure 1.2, Table 1.3, Figure 1.4, etc
Chapter 2: Figure 2.1, Figure 2.2 etc

I've tried several \setupcaptions options but was unable to solve so far.
Everything works as expected when using a numbered subsubsection so the problem 
is somehow related to the number=no option

Minimal example:
\setuphead[chapter, section, subsection]
\setuphead[subsubsection]
[number=no]

\starttext

\startchapter[title=Chapter title]
\input ward

\startsection[title=Section title1]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\startsubsubsection[title=Subsubsection title]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\stopsubsubsection
\stopsection

\startsection[title=Section title2]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\stopsection

\stopchapter
\stoptext

Would appreciated some advise on how to solve this.

Best regards,
Jan Willem Flamma___
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
___