[NTG-context] Suppress the Chapter Number in the Section Numbering
I am trying to suppress the chapter number in a section number as below as in 1., 2., etc instead of 1.1, 1.2, etc. Is there a simple way to achieve this? 1. The First Chapter 1. The First Section ... 2. The Second Section ... 2. The Second Chapter 1. The Third Section ... 2. The Fourth Section ... ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Adjusted Chapter Headings
I have been able to achieve it as following, but the first frame width is fixed so will cause problems with other chapter numbers such as VIII \unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \setupframed[offset=.5em,frame=off] \tbox{\framed[width=22mm,align=right]{#1}}% \tbox{\framed[width=130mm,align=right,leftframe=on, rulethickness=0.8pt]{#2}}% \egroup} \setuplabeltext[chapter=Boek~] \setuphead[chapter][style={\bfc}, command=\HeadTitle, textstyle=bold] ... \startchapter [title={Algemene Beginselen}, ownnumber={I}] Op di 19 mrt 2024 om 15:49 schreef Hraban Ramm : > Hi Jeroen, > > it might make sense to use > > \setuphead[chapter][ > conversion=R, > ] > \setuplabeltext[nl][chapter={Boek }] > > instead of ownnumber. > > I would use one command for number and title and put both in the same kind > of frame. Probably you should use a \strut in the text or > \inframed[strut=yes] to assure the same text height. > > HTH, Hraban > Am 19.03.24 um 12:59 schrieb Jeroen: > > I have some style adjustments for the chapters. The chapter "numbers" need > to be Boek I, Boek II, etc. A vertical separator was introduced with an > inframe. The chapter title at the right side does not vertically align > properly with the chapter number in the frame (inside the frame is > vertically centered, the title not). Is there a way to align the chapter > title with the chapter number? > > > > \starttexdefinition MyNumberChapterCommand #1 > \inframed[frame=off,rightframe=on,framecolor=black, > rulethickness=1px,height=30pt]{#1\enspace} > \stoptexdefinition > > \setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand, > page=no] > > \starttext > > \startchapter > [title={Algemene Beginselen}, >ownnumber={Boek I}] > > \samplefile{tufte} > > \stopchapter > > \startchapter > [title={Organisatorische Structuren}, >ownnumber={Boek II}] > > \samplefile{tufte} > > \stopchapter > > \stoptext > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > ___ > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Comments placed in the margin
This one unbolds the margin text: \setupmargindata[inouter][style=\tf] This one works well, it unbolds and reduces the size of the margin text: \setupmargindata [inouter] [style={\switchtobodyfont[8pt]}] This one does not seem to make a change: \setupmargindata[inmargin][style={\tf}] Also the inline options seems to unbold the inline text nicely: \margindata[inouter]{\rm \it example} Op di 19 mrt 2024 om 16:17 schreef Marco Patzer : > On Tue, 19 Mar 2024 15:38:16 +0100 > Jeroen wrote: > > > Can this text be placed in the margin in regular text or possibly > > in slightly smaller font size compared to the regular text in the > > document? > > \setupmargindata > [inleft] > [style=\tfx] > > Marco > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Comments placed in the margin
For comments that are placed in the margin, the \inleft{}, \inouter{} etc will place text in the margin in bold. Can this text be placed in the margin in regular text or possibly in slightly smaller font size compared to the regular text in the document? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Adjusted Chapter Headings
I have some style adjustments for the chapters. The chapter "numbers" need to be Boek I, Boek II, etc. A vertical separator was introduced with an inframe. The chapter title at the right side does not vertically align properly with the chapter number in the frame (inside the frame is vertically centered, the title not). Is there a way to align the chapter title with the chapter number? \starttexdefinition MyNumberChapterCommand #1 \inframed[frame=off,rightframe=on,framecolor=black, rulethickness=1px,height=30pt]{#1\enspace} \stoptexdefinition \setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand, page=no] \starttext \startchapter [title={Algemene Beginselen}, ownnumber={Boek I}] \samplefile{tufte} \stopchapter \startchapter [title={Organisatorische Structuren}, ownnumber={Boek II}] \samplefile{tufte} \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Local alternative to \input
With a single environment it seems to work, though when I expand it to multiple, it does not seem to work anymore \starttext SomeText \\ \environment aaa \\ SomeText \\ \environment bbb \\ SomeText \\ \startenvironment aaa \samplefile{lorem} \stopenvironment \startenvironment bbb \samplefile{tufte} \stopenvironment \stoptext Op do 4 jan 2024 om 20:14 schreef Henning Hraban Ramm : > Am 04.01.24 um 18:00 schrieb Jeroen: > > I just would like to have a lot of mark-up for combined figures and > > tables etc moved out of the way, similar to this. I am loosing the > > general documetn flow because of all this markup. Would there be a > > construction similar to this: > > > > \starttext > > > > \environment foo > > \environment bar > > > > \startenvironment foo > > this is a lot of text > > \stopenvironment > > > > \startenvironment bar > > and this is another piece of text > > \stopenvironment > > > > \stoptext > > An environment is a separate file. > \environment is like \input with a few more checks, e.g. it loads the > file only once. > > e.g. > > -- file "env_foo.tex" -- > \startenvironment env_foo > % settings > \stopenvironment > -- > > > -- file document.tex -- > \environment env_foo > > \starttext > % whatever > \stoptext > -- > > Instead of the call within your document, you can also call > > context --environment=env_foo.tex document > > (Usually that makes only sense in XML workflows.) > > Hraban > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Text in Margin
In a textbook I am looking to place a large left margin at every page of each chapter. At left printed pages a left margin and at right printed pages a right margin, so like a double sided construction. In this margin I would like to place: 1. Keywords and small descriptions to emphasize some text from the textflow 2. Figures 3. An expansion of a table that is placed in the main textflow but that needs to cover a wider range then the text area so it expands into the margin What is the the easiest way to achieve this? Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Local alternative to \input
I have a document that is getting a lot of mark-up instructions for creating tables and placing figures. I would like to move this out of the main text flow. The easiest way would be using \input, but i rather place all this at the bottom of the file and just refer to it with something like \localinput or so to a textblock at the bottom of the same file. What would be the easiest way to implement this? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Status of Asymptote
Below is how I have used Asymptote in the past with the Context filter module: download portable ghostsctipt create dir c:\context\ghostscript and install from https://portableapps.com/apps/utilities/ghostscript_portable download non-portable asymptote create dir c:\context\asymptote and install from http://asymptote.sourceforge.net/ create file c:\context\asy.bat with context ASYMPTOTE_GS=C:context/ghostscript/bin/gswin64.exe C:/context/asymptote/asy.exe %* test with: \usemodule[filter] \defineexternalfilter[ASY] [filter={/context/asy.bat -tex context -outformat pdf -outname \externalfilteroutputfile}, output=\externalfilterbasefile.pdf, cache=yes, readcommand=\ReadImage,] \define[1]\ReadImage{\externalfigure[#1]} \starttext Testing if we can include an asymptote image \startplacefigure[location={here}, title={An Asymptote figure}] \startASY size(10cm); import graph; real f(real x) {return sin(x);} draw(graph(f,-3,3,300),blue); \stopASY \stopplacefigure \stoptext OR alternatively: \usemodule[filter] \defineexternalfilter[ASY] [filter={/context/asy.bat -tex context -outformat pdf -outname \externalfilteroutputfile}, output=\externalfilterbasefile.pdf, cache=yes, readcommand=\ReadImage,] \define[1]\ReadImage{\externalfigure[#1]} \starttext Testing if we can include an asymptote image \startplacefigure[location={here}, title={An Asymptote figure}] \startASY unitsize(1cm); draw((-.1,0) -- (2,0), arrow=Arrow(TeXHead)); draw((0,-.1) -- (0,2), arrow=Arrow(TeXHead)); draw((0,0) .. (1,1) .. (2,sqrt(2))); \stopASY \stopplacefigure \stoptext Op 31/12/2023 om 00:33 schreef Aditya Mahajan: On Sun, 31 Dec 2023, Shiv Shankar Dayal wrote: It would be nice to either support Metapost 3D or Asymptote. Right now I generate images separately and embed them in PDF using externalfigure command which works but I have to maintain all the graphics separately. It is possible to obtain simple integration for asymptote using the filter module: https://github.com/adityam/filter Using that you could define an asymptote environment so that: \startbuffer[asymptote-preamble] \stopbuffer \starttext \startasymptote % Asymptote figure \stopasymptote \stoptext saves the content of the asymptote-preamble and the figure in a separate file, runs asymptote to generate a PDF figure and includes the figure. The results are cached so the asymptote is re-run only if the content of the figure environment changes. A drawback of this approach is that the labels are generated by asymptote. That means that the font, colors, and any macros needed for the figures need to be redefined at both context and asymptote end. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Frontpage and Titlepage
The following MWE is how I create my frontpage and titlepage. Is this the proper way to do so? \definemakeup [frontpage] [align=middle] \definemakeup [titlepage] \setupmakeup [titlepage] [align={right,top}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [\rm\bfd] [] \starttext \startmakeup [frontpage] \authorstyle {The Author} \blank \titlestyle {This is the Title} \stopmakeup \startmakeup [titlepage] \titlestyle {This is the Title} \stopmakeup \startchapter [title={Chapter Title}] \samplefile{tufte} \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Framed Text with Chapter Numbers as Counter
That works fine except that the following line does only issue the sequential number and not the chapter number. Refer to \in{code fragment}[tit1] bla MWE: \startuseMPgraphic{CountFrame} picture p; numeric w, h, o; p := textext.rt("\wrappedcurrentconstruction"); w := OverlayWidth; h := OverlayHeight; o := BodyFontSize; p := p shifted (2o,h-ypart center p); draw p; path b; b := boundingbox p enlarged (o/10); path a; a := (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h); drawoptions (withpen pencircle scaled 1pt withcolor black); draw a; draw b; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [CountFrame] [\useMPgraphic{CountFrame}] \defineframedtext [CountFramedText] [frame=off, background=CountFrame, offset=\bodyfontsize, width=\textwidth, % style={\switchtobodyfont[11pt,tt]}] bodyfont=11pt, style={\tt}] \defineenumeration [Code] [title=yes, alternative=empty, before=\startCountFramedText, after=\stopCountFramedText, left={\somenamedheadnumber{chapter}{current}.}] \starttext \startchapter [title=first] \startCode [title={The First Title}, reference={tit1}] Some verbatim text \stopCode \startCode [title={The Second Title}, reference={tit2}] Some verbatim text \stopCode Refer to \in{code fragment}[tit1] bla \stopchapter \startchapter [title=second] \startCode [title={The Third Title}, reference={tit3}] Some verbatim text \stopCode \stopchapter \stoptext Op zo 17 sep 2023 om 17:31 schreef Bruce Horrocks : > > > > On 16 Sep 2023, at 21:28, Jeroen wrote: > > > > This MWE has a framed text for some verbatim text (code) with as title > ref. a counter 1, 2, etc.. Is there a way to change this frame text title > as following with the chapter number and a sequential number and the title. > > Amemd the \defineenumeration as follows: > > \defineenumeration > [Counter] > [title=yes, >alternative=empty, >before=\startCountFramedText, >after=\stopCountFramedText, >left={\somenamedheadnumber{chapter}{current}:}] > > — > Bruce Horrocks > Hampshire, UK > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Framed Text with Chapter Numbers as Counter
This MWE has a framed text for some verbatim text (code) with as title ref. a counter 1, 2, etc.. Is there a way to change this frame text title as following with the chapter number and a sequential number and the title. Code Fragment 1.1 (The First Title) Code Fragment 1.2 (The Second Title) Code Fragment 2.1 (The Third Title) MWE: \startuseMPgraphic{CountFrame} picture p; numeric w, h, o; p := textext.rt("\wrappedcurrentconstruction"); w := OverlayWidth; h := OverlayHeight; o := BodyFontSize; p := p shifted (2o,h-ypart center p); draw p; path b; b := boundingbox p enlarged (o/10); drawoptions (withpen pencircle scaled 1pt withcolor black); draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h); draw b; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay [CountFrame] [\useMPgraphic{CountFrame}] \defineframedtext [CountFramedText] [frame=off, background=CountFrame, offset=\bodyfontsize, width=\textwidth, % style={\switchtobodyfont[11pt,tt]}] bodyfont=11pt, style={\tt}, ] \def\FrameTitle#1% {\setMPtext{CountFrame} {\hbox spread 1em{\hss\strut#1\hss}}}\setMPtext{CountFrame} {} \defineenumeration [Counter] [title=yes, alternative=empty, before=\startCountFramedText, after=\stopCountFramedText] \starttext \startchapter [title=first] \startCounter [title={The First Title}, reference={tit1}] Some verbatim text \stopCounter \startCounter [title={The Second Title}, reference={tit2}] Some verbatim text \stopCounter Refer to \in{code fragment}[tit1] bla \stopchapter \startchapter [title=second] \startCounter [title={The Third Title}, reference={tit3}] Some verbatim text \stopCounter \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Chapters without new page
In the \startbackmatter ... \stopbackmatter section i would like to have some chapters that are not automatically placed on a new page for the next chapter. Is there an easy way to suppress the new page for these chapters? Thanks, Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Reduce space between lines in Natural Tables
It does not seem to have an effect to the table. The distance between the rows remains the same Thanks, Jeroen Op ma 11 sep 2023 om 09:08 schreef : > \bTABLE[spaceinbetween=0cm] > > ... > > \eTABLE > > > > > > > > *Von:* Jeroen > *Gesendet:* Sonntag, 10. September 2023 22:05 > *An:* mailing list for ConTeXt users > *Betreff:* [NTG-context] Reduce space between lines in Natural Tables > > > > Is there an easy way to reduce the line space between rows in a natural > table so the table takes less vertical space. > > Thanks, Jeroen > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Reduce space between lines in Natural Tables
Is there an easy way to reduce the line space between rows in a natural table so the table takes less vertical space. Thanks, Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Verbatim Textbox with Reference NUmbering
This is a longshot, but would be great to have. Below I have at MWE1 the verbatim codefragment textbox I am using. I found in the forum MWE2 which is a textbox with an automatic reference number. Is there a way to get the same for MWE1 with automatic reference numbering like 1.1, 1.2 etc for chapter 1, codefragment 1, 2 etc. with the possibility that in the text I can refer to the codefragment like \in{codefragment\space}[code:ccpsample] similar as to tables and figures? Thanks Jeroen %% % MWE1 %% \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground [listingbackground] [state=start, mp=mpos:par:myexample, location=paragraph, topoffset=0.4em, leftoffset=0em, rulethickness=0.7pt] \definetyping[Listing] [option=commands] \setuptyping [Listing] [bodyfont=10pt, margin=1em, before=% {\blank[3*medium] \setupinterlinespace[line=2.4ex] \starttextbackground[listingbackground]}, after=% {\stoptextbackground \blank[4*medium]}, align={flushleft,verytolerant}] \starttext \startListing this is a code example \stopListing \stoptext %% % MWE2 %% \startuseMPgraphic{FunnyFrame} picture p ; numeric w, h, o ; p := textext.rt(\MPstring{FunnyFrame}) ; w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ; p := p shifted (2o,h-ypart center p) ; draw p ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ; draw boundingbox p ; setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame] \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{} % Add the enumeration \defineenumeration [Counter] [text=, alternative=empty, before={\FrameTitle{Counter \getnumber[Counter]} \startFunnyText}, after={\stopFunnyText}] \starttext \startCounter First example \stopCounter \startCounter Second example \stopCounter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Text runs out of Verbatim Frame
I am using the following to print some verbatim text in a frame. At the right side, it keeps running out of the frame, is there a way to prevent this with the MWE? This verbatim frame always is textwidth, is there a way for a single frame just for if the situation asks for it to have it only have a frame half pagewidth, like a width=0.5\textwidth Thanks Jeroen \unprotect \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground [listingbackground] [state=start, mp=mpos:par:myexample, location=paragraph, topoffset=0.4em, leftoffset=0em, rulethickness=0.7pt] \definetyping[Listing] [option=commands] \setuptyping [Listing] [bodyfont=10pt, margin=1em, before=% {\blank[3*medium] \setupinterlinespace[line=2.4ex] \starttextbackground[listingbackground]}, after=% {\stoptextbackground \blank[4*medium]}] \protect \starttext \startListing test test test test test test test test test test test test test test test test test test test test test test test \stopListing \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Vertical Space between Text and Itemize List
To get a packed itemize list I use this in the preamble \setupitemgroup [itemize] [packed] To get less vspace between the text and the first item, i changed it to this \setupitemgroup [itemize] [packed, nowhite] now there is indeed no whitespace. Is there a more granular way to place just a little vertical whitespace between the text and the first item? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Adjust width of section part of table of contents
The following is a setuplist for the table of contents. Is there a way to have the section part only go to 80% of the page width, similar to width=0.8\textwidth \setuplist [chapter] [style={\bf}] \setuplist [section] [style={\tfx}] \setuplist [chapter,section] [headnumber=no] \setuplist [section] [alternative=d] \placecontent ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Adjust pagenumbering while skipping first page
Pablo, Thanks, even though I use LMTX, only this form works: [\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax] Thanks Jeroen Op ma 4 sep 2023 om 18:43 schreef Pablo Rodriguez : > On 9/4/23 18:09, Jeroen wrote: > > The following MWE shows pagenumbering starting at the second page with > > page number 1. With the totalnumberofpages we end up with one page too > > many. Is there a way to reduce this with 1? > > Hi Jeroen, > > this might do the work (LMTX only): > > [\pagenumber{} of \the\numexpr{\totalnumberofpages - 1}] > > For MkIV, you would need: > > [\pagenumber{} of \the\numexpr\totalnumberofpages - 1\relax] > > Just in case it helps, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Adjust pagenumbering while skipping first page
The following MWE shows pagenumbering starting at the second page with page number 1. With the totalnumberofpages we end up with one page too many. Is there a way to reduce this with 1? \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setcounter [userpage] [0] \setuppagenumbering [location=] \startdocument \setupfooter[state=stop] \startfrontmatter frontpage \stopfrontmatter \setupfooter[state=start] \startbodymatter \dorecurse{10}{\samplefile{lorem}} \stopbodymatter \stopdocument ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Different Layout for First Page
I have a document with the first page in startfrontmatter and all other pages in startbodymatter. The layout setting is as following \setuplayout [backspace=20mm, width=175mm, topspace=15mm, header=0mm, footer=2mm, height=275mm, bottomheight=1mm, footerdistance=10mm] \setupfootertexts [title] [\pagenumber{} of \totalnumberofpages] \setupfooter[state=stop] \startfrontmatter \input{frontpage.tex} \stopfrontmatter \setupfooter[state=start] \startbodymatter \input{introduction.tex} \stopbodymatter What would be the easiest way to change the layout only for the first page since it has no footer. For the first page, I would like to have the text run all the way to the bottom with \vfill where normally the footer would be. Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Moving up a Figure
This one works very nicely, though the movesidefloat gives nicely complete control. \samplefile{tufte} \startplacefigure [location={right,halfline}, number=no] \externalfigure[autocad.png][width=0.6\textwidth] \stopplacefigure \samplefile{tufte} Below the figure there is quite some space before the first line of text starts, is there a way for the next text line to start immediately below the future? Op ma 5 jun 2023 om 19:38 schreef Aditya Mahajan via ntg-context < ntg-context@ntg.nl>: > On Mon, 5 Jun 2023, Alan Braslau via ntg-context wrote: > > > On 05/06/23 05/06/23, 00:08, Mikael Sundqvist via ntg-context wrote: > > > On Mon, Jun 5, 2023 at 4:03 AM Jeroen via ntg-context > > > wrote: > > >> Not fully, it indeed moves up the figure but a little too much. Is > there a > > >> more granular method? > > > Not that I know of, but maybe {right,halfline} will do? > > > > Maybe try "location={right,-1*hang}," > > For finer control, you can use `\movesidefloat`: > > \movesidefloat[x=-..., y=...] > \startplacefigure > [..] > \stopplacefigure > > Aditya > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Moving up a Figure
Not fully, it indeed moves up the figure but a little too much. Is there a more granular method? Op za 3 jun 2023 om 20:24 schreef Mikael Sundqvist via ntg-context < ntg-context@ntg.nl>: > Hi, > > On Sat, Jun 3, 2023 at 6:36 PM Jeroen via ntg-context > wrote: > > > > With the following example, the figure is placed a little lower than the > first text line. The top of the figure is at about the middle of the first > line. Is there a way to move-up the figure slightly to align it with the > top of the text line? > > > > \useMPlibrary[dum] > > > > \starttext > > > > \startplacefigure > > [number=no, > >location=right] > > \externalfigure[dummy] > > \stopplacefigure > > > > \samplefile{tufte} > > > > \stoptext > > Maybe > > location={right,high} > > is what you look for? > > /Mikael > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Moving up a Figure
With the following example, the figure is placed a little lower than the first text line. The top of the figure is at about the middle of the first line. Is there a way to move-up the figure slightly to align it with the top of the text line? \useMPlibrary[dum] \starttext \startplacefigure [number=no, location=right] \externalfigure[dummy] \stopplacefigure \samplefile{tufte} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Context Live
I would like to setup a website with a live Context renderer like live.contextgarden.net Is there a procedure how to setup such a live setup? Thanks, Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Inline framed verbatim text
Many thanks. Is there a proper way to add some space (a couple of pt or em) to the left and the right of the text itself so the frame does not get so close to the text? Op vr 19 mei 2023 om 14:10 schreef Wolfgang Schuster via ntg-context < ntg-context@ntg.nl>: > Jeroen via ntg-context schrieb am 19.05.2023 um 14:22: > > In order to get some inline framed verbatim text, I have in the past > > always used the following: > > > > \starttext > > > > This is an > > \inframed > > [frame=on, > > corner=00, > > radius=2mm,offset=-1.5pt] > > {\ttx \bf example} > > > > \stoptext > > > > Since this has come-up more and more often, I created the following: > > > > \define[1]\infr{ > > \inframed > > [frame=on, > > corner=00, > > radius=2mm,offset=-1.5pt]{#1}} > > > > \starttext > > > > This is an \infr{example} > > > > \stoptext > > > > This works fine except that I cannot get the text in > > verbatim/teletype. I have tried style=mono and style={\ttx \bf} but > > nothing seems to work. > > \framed has no style key, you have to use the foregroundstyle to change > font style, size etc. > > To create your own \framed (or \inframed when you add location=low) you > can use the \defineframed command: > > \defineframed >[infr] >[location=low, > frame=on, > corner=00, > radius=2mm, > %offset=-1.5pt, > foregroundstyle=\tt\bfx] > > \starttext > > This is an \infr{example} > > \stoptext > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Inline framed verbatim text
In order to get some inline framed verbatim text, I have in the past always used the following: \starttext This is an \inframed [frame=on, corner=00, radius=2mm,offset=-1.5pt] {\ttx \bf example} \stoptext Since this has come-up more and more often, I created the following: \define[1]\infr{ \inframed [frame=on, corner=00, radius=2mm,offset=-1.5pt]{#1}} \starttext This is an \infr{example} \stoptext This works fine except that I cannot get the text in verbatim/teletype. I have tried style=mono and style={\ttx \bf} but nothing seems to work. Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Filter Module with Openscad
I am using OpenSCAD to create drawings with the filter module with the following MWE: \usemodule[filter] \defineexternalfilter[openscad] [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile}, output={\externalfilterbasefile.png}, cache=force, readcommand=\ReadImage] \define[1]\ReadImage{\externalfigure[#1]} \starttext \startopenscad square(4,2); \stopopenscad \stoptext This works fine. I now want to use the following options added to the command line: --view axes,edges,scales --viewall When I create an Openscad file test.scad, I can run it fine with the following command line at a CLI window: openscad.com test.scad -o test.png --view axes,edges,scales --viewall When I add this to the filtercommand as following [filtercommand={/context/openscad/openscad -o \externalfilteroutputfile --view axes,edges,scales --viewall} I cannot get it to run. Is there anything I am missing? Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Example from Practex Journal
Hello, Could anybody help me out with the setup and a MWE to get a document exactly as the one from Steve Peter in the Practex Journal in 2005 as in https://tug.org/pracjourn/2005-1/peter/peter.pdf I find this one hard to replicate. What is the font type that was used for this document ? Thanks Jeroen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Rotating pages
For the following document, the last 3 pages are landscape, but I would like to have the pdf-ed rotated so they are in the pdf document portrait, ie rotated 90 degree to the left but leave the page as how they are now. Is there an easy way to achieve this? \startbuffer[apx] \setuppapersize[ A4,landscape] \setuppagenumbering[ location={footer,center}] \setbreakpoints[compound] \starttext \startsection[title={MyTitle},ref={apx}] \dorecurse{10}{\input zapf\par} \stopsection \stoptext \stopbuffer \savebuffer[list=apx, file=apx.tex] \starttext \startbodymatter \dorecurse{10}{\input zapf\par} \typesetfile[\jobname-apx.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname-apx.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname-apx.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \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] Code document and simpleslides and create in one go the document with simpleslides added
> > > One final question on this one. As per latest comments this works great, > but is there a way so the presentation pages in the appendix are made-up > landscape as they are now, but are rotated 90 degrees so they are created > in the pdf document as the first two pages. \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=slides.tex] \starttext \startbodymatter \dorecurse{10}{\input zapf\par} \typesetfile[\jobname-slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname-slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname-slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \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] Code document and simpleslides and create in one go the document with simpleslides added
I worked around it, instead of simpleslides just use larger fonts to with regular pages \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no] \starttext \startbodymatter \dorecurse{25}{\input zapf\par} \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname_slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname_slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \stoptext Op za 31 jul. 2021 om 16:22 schreef Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl>: > > On 7/31/21 4:06 PM, Pablo Rodriguez via ntg-context wrote: > > BTW, I cannot get simpleslides working with LMTX. > > > I had to make some slight adjustments but have been to lazy to upload a > new and improved version. One reason being that I can't remember my > username and password for the modules section of the garden... I'll have > to ask Taco to reset it for me. > > Thomas > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://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] Code document and simpleslides and create in one go the document with simpleslides added
Is there an easy way to write a Context document and also code simpleslides in the same document so that the simpleslides are automatically added to the document as for example an appendix? Ie one tex document with Context code, perhaps with some \input and something like a two-pass job. I was thinking if the simpleslides could be saved as a number of png images and then with the recurse add them to the document with placefigure. Jeroen ___ 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] Verbatim text in a frame
I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi] \definetextbackground [Code] [frame=on, framecolor=black, %corner=0, %offset=10pt, background=color, backgroundcolor=gray, location=paragraph] \setuptyping [before={\blank\starttextbackground[Code]}, after={\stoptextbackground\blank}] \starttext \starttyping example \stoptyping \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] Different Styles of Typing
Is there a way to have two different types of typing. I tried the following, but it does not seem to work. \setuptyping[abc][style=\ttx] \setuptyping[def][style=\ttxx] \starttext \starttyping[abc] text text \stoptyping \starttyping[def] text text \stoptyping \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] Different Typing Styles
Is there a way to have two different styles of typing. I tried the following, but it does not seem to work. \setuptyping[abc][style=\ttx] \setuptyping[def][style=\ttxx] \starttext \starttyping[abc] example example \stoptyping \starttyping[def] example example \stoptyping \stoptext Thanks Jeroen ___ 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] Metapost Animation of Sine
Hi, both solutions are great! This is what I had in mind, a rolling sine. Is there a way to get the same result with the Tikz module? \usemodule[animation] \setupinteraction[state=start] \starttext \input tufte \framed{ \startanimation[menu=yes,framerate=40] \dorecurse{50}{\expanded {\startframe \startMPcode numeric u, omega, mylength, tt ; u := 2cm ; omega := 4 ; mylength := 3.141596 ; tt := \recurselevel ; path p ; p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 upto 100 : .. (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) endfor ; draw p withpen pencircle scaled .5pt withcolor darkred ; \stopMPcode \stopframe} } \stopanimation } \stoptext Op wo 21 jul. 2021 om 23:26 schreef Otared Kavian : > Hi, > > I wonder whether something like the following is what you are looking for: > > % begin wave-sine.tex > \usemodule[animation] > \setupinteraction[state=start] > \starttext > \startTEXpage[offset=2pt] > \startanimation[menu=yes,framerate=10] > \dorecurse{100}{\expanded > {\startframe > \startMPcode > numeric u, omega, mylength, tt ; > u := 2cm ; > omega := 4 ; > mylength := 3.141596 ; > tt := \recurselevel ; > path p ; > p := (0u,sin(omega*(mylength/100)*tt)*u) for i = 1 > upto 100 : > .. > (((mylength/100)*i)*u,sin(omega*(mylength/100)*(i + tt))*u) > endfor ; > draw p withpen pencircle scaled .5pt withcolor > darkred ; > \stopMPcode > \stopframe} > } > \stopanimation > \stopTEXpage > \stoptext > % end wave-sine.tex > > Best regards: OK > > > On 21 Jul 2021, at 19:44, Jeroen wrote: > > > > I am looking for a sine animation as the one file f.pdf on this site > > > > > http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm > > > > Jeroen > > > > Op wo 21 jul. 2021 om 17:54 schreef Fabrice L : > > Hi, > > > >> Le 21 juill. 2021 à 10:08, Jeroen a écrit : > >> > >> I use this small animation to enlarge a circle > >> > >> > >> \usemodule[animation] > >> \setupinteraction[state=start] > >> \starttext > >> \startanimation[menu=yes,framerate=10] > >> \dorecurse{7}{\expanded > >> {\startframe > >> \startMPcode > >> path p; > >> numeric n, u; > >> u := 1cm; > >> n:=\recurselevel*u; > >> p := fullcircle scaled n; > >> draw p; > >> \stopMPcode > >> \stopframe}} > >> \stopanimation > >> \stoptext > >> > >> > >> This I use to draw a sine > >> > >> > >> \starttext > >> \startMPcode > >> draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i)))endfor; > >> \stopMPcode > >> \stoptext > >> > >> > >> When I put it together to animate the sine as following, it does not > entirely create the sine animation I am looking for > >> > >> > >> \usemodule[animation] > >> \setupinteraction[state=start] > >> \starttext > >> \startanimation[menu=yes,framerate=10] > >> \dorecurse{7}{\expanded > >> {\startframe > >> \startMPcode > >> path p; > >> numeric n, u; > >> u := 1cm; > >> n:=\recurselevel*u; > >> p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0); > >> draw p; > >> \stopMPcode > >> \stopframe}} > >> \stopanimation > >> \stoptext > >> > >> > >> What better way can I create a sine animation with Metapost? > >> > >> > > > > Here is another way to do your animation. This is doing something, but I > guess not what you want. Could you describe what do you have in mind ? > > > > \starttext > > \dorecurse{7}{ % 3180 > > \startMPpage > > myvariable := #1 ; > > path p; > > numeric n, u; > > u := 1cm; > > n:=myvariable*u; > > p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0); > > draw p; > > \stopMPpage > > } > > \stoptext > > > > Fabrice. > > > > >
Re: [NTG-context] Metapost Animation of Sine
I am looking for a sine animation as the one file f.pdf on this site http://www.12000.org/my_notes/Mathematica_animation_into_PDF_using_latex/index.htm Jeroen Op wo 21 jul. 2021 om 17:54 schreef Fabrice L : > Hi, > > Le 21 juill. 2021 à 10:08, Jeroen a écrit : > > I use this small animation to enlarge a circle > > > \usemodule[animation] > \setupinteraction[state=start] > \starttext > \startanimation[menu=yes,framerate=10] > \dorecurse{7}{\expanded > {\startframe > \startMPcode > path p; > numeric n, u; > u := 1cm; > n:=\recurselevel*u; > p := fullcircle scaled n; > draw p; > \stopMPcode > \stopframe}} > \stopanimation > \stoptext > > > This I use to draw a sine > > > \starttext > \startMPcode > draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i)))endfor; > \stopMPcode > \stoptext > > > When I put it together to animate the sine as following, it does not > entirely create the sine animation I am looking for > > > \usemodule[animation] > \setupinteraction[state=start] > \starttext > \startanimation[menu=yes,framerate=10] > \dorecurse{7}{\expanded > {\startframe > \startMPcode > path p; > numeric n, u; > u := 1cm; > n:=\recurselevel*u; > p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0); > draw p; > \stopMPcode > \stopframe}} > \stopanimation > \stoptext > > > What better way can I create a sine animation with Metapost? > > > > > Here is another way to do your animation. This is doing something, but I > guess not what you want. Could you describe what do you have in mind ? > > \starttext > \dorecurse{7}{ % 3180 > \startMPpage > myvariable := #1 ; > path p; > numeric n, u; > u := 1cm; > n:=myvariable*u; > p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. > (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0); > draw p; > \stopMPpage > } > \stoptext > > Fabrice. > > > > ___ > 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] Metapost Animation of Sine
I use this small animation to enlarge a circle \usemodule[animation] \setupinteraction[state=start] \starttext \startanimation[menu=yes,framerate=10] \dorecurse{7}{\expanded {\startframe \startMPcode path p; numeric n, u; u := 1cm; n:=\recurselevel*u; p := fullcircle scaled n; draw p; \stopMPcode \stopframe}} \stopanimation \stoptext This I use to draw a sine \starttext \startMPcode draw(-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. (i/360*1.5cm,0.9cm*(sind(i)))endfor; \stopMPcode \stoptext When I put it together to animate the sine as following, it does not entirely create the sine animation I am looking for \usemodule[animation] \setupinteraction[state=start] \starttext \startanimation[menu=yes,framerate=10] \dorecurse{7}{\expanded {\startframe \startMPcode path p; numeric n, u; u := 1cm; n:=\recurselevel*u; p := (-90/360*1.5cm,-0.9cm) for i = -90 upto 630: .. (i/360*1.5cm,0.9cm*(sind(i))) endfor shifted (n,0); draw p; \stopMPcode \stopframe}} \stopanimation \stoptext What better way can I create a sine animation with Metapost? ___ 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] specify a directory for tex files
similar to this for figures \setupexternalfigures [directory={./myfigures}] is there a way to specify a directory for tex files so with \input{myfile.tex} the file myfile.tex can be placed in a subdirectory for example ./mytexfiles? ___ 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] One chapter with different heading settings
In the preamble I have the following setup for the chapter header setup. There is one chapter I want to have a different heading setup with some less spacing, what would be the easiest way to achieve this? \setuphead [section] [style=bold, before={\vskip 4mm}, after={\vskip 1.5mm}] ___ 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] Expanding a table into the second column
In a document with two columns, is there a method to expand a table partially into the second column in case there are many tablecolumns to show ___ 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] Hand Style Sketching in Metapost
I have updated LMTX and indeed seems to be working now Thanks Op do 20 mei 2021 om 21:05 schreef Aditya Mahajan : > On Thu, 20 May 2021, Jeroen wrote: > > > I have the following working example with hatching. This works fine, but > > when I uncomment the sketching commands, no figure is rendered. Is the > > mp-sketch macro still working? > > Seems to be working here with LMTX ver. 2021.04.29. See attached. > > > 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 ___
[NTG-context] Hand Style Sketching in Metapost
I have the following working example with hatching. This works fine, but when I uncomment the sketching commands, no figure is rendered. Is the mp-sketch macro still working? \starttext \startMPcode input hatching; %input mp-sketch; %sketchypaths; %sketch_amount := 2bp; u := 1cm; path circle; circle = fullcircle scaled 4u; hatchfill circle withcolor (45, 5mm, -.5bp); draw circle; \stopMPcode \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] Chapternumber and chaptertitle in footer
How can I combine in the footer the chapternumber and the chaptertitle in the footer. This way I can achieve the chaptertitle \setupfootertexts [chapter] [\pagenumber] \starttext \input{tufte} \stoptext The following I achieve this with the chapternumber \setupfootertexts [chapternumber] [\pagenumber] \starttext \input{tufte} \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] Expanding a figure into the second column
I have the following MWE whereby the figure nicely fits the first column. If I now have a picture with more details and want to expand it partially into the second column, it will not work with width=1.5\textwidth , is there a simple way to achieve this? \starttext \startcolumns[n=2] \input{tufte} \placefigure [here] [] {my pic} {\externalfigure [cow] [width=.95\textwidth]} \dorecurse{3}{\input{tufte}} \stopcolumns \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] Multiple Layouts
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \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] (no subject)
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \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] Loading modules in Windows
Many thanks. Would you perhaps have the method to install third party modules by hand in Windows. I have found a way to do it in Linux only. Jeroen Op za 31 okt. 2020 om 09:37 schreef Wolfgang Schuster < wolfgang.schuster.li...@gmail.com>: > Jeroen schrieb am 31.10.2020 um 06:42: > > Hi, > > > > In Context MKIV I always used the gnuplot module. I switched to > > Context lmtx on MS Windows but seem to have great difficulty loading > > the Gnuplot module. Any suggestions? > > Third party modules are still missing in LMTX (you can intstall them by > Hans) but for gnuplot there is a new module by Hans which uses > \externalfigure to load the graphic. > > https://www.mail-archive.com/ntg-context@ntg.nl/msg93713.html > > 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 ___
[NTG-context] Loading modules in Windows
Hi, In Context MKIV I always used the gnuplot module. I switched to Context lmtx on MS Windows but seem to have great difficulty loading the Gnuplot module. Any suggestions? Thanks jeroen ___ 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] general syntax for startparagraph command
Many thanks. Is there also a simple way to place a 2 above the = character as the definition does. Thanks Jeroen Op zo 29 sep. 2019 om 18:47 schreef Wolfgang Schuster < wolfgang.schuster.li...@gmail.com>: > Jeroen schrieb am 29.09.2019 um 20:30: > > Dear list members, > > > > I am trying to get the following with the 1 elevated and 2 above the = > > character. The square brackets and all in between I would like italic > > and OPT below both terms. > > > > *\startparagraph [.1..] [..,..2=..,..] ..**.\stopparagraph* > > > > Would anybody be able to help. Would Metapost be needed here? > > When you look at the command definition in setup-en.pdf you can two > lines below the command which refer to the two arguments. > > >1 2 > \startparagraph [...] [..,..=..,..] ... \stopparagraph > OPT OPT > > 1 NAME > 2 inherits: \setupparagraph > > > The NAME for the first arguments means you can the pass of a named > instance, such a instance can be created with the \defineparagraph > command, e.g. \defineparagraph [bold] [style=bold]. > > The inherits: ... means you can pass options from the \setupparaph > command, e.g. \startparagraph [color=blue]. For get a list of all > possible options for this argument take a look at \setupparagraph. > > 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] Custom Footertext
I have condensed it into a single document. The footer has in the right side the page numbering and at the left the "section". Both only start at the second page, which is good. I was wondering if the "section" could have the "title" in front of it. The title always stays the same, and the section changes. Many Thanks Jeroen \setuppapersize[A4,portrait] [A4,portrait] \setuplayout[backspace=20mm, width=175mm, topspace=20mm, header=0mm, footer=2mm, height=263mm, bottomheight=1mm, footerdistance=10mm] \usetypescript[pagella] \setupbodyfont[pagella,12pt] \setupcolors[state=start] \setupfootertexts[section][] \setupfooter[alternative=,style=\bf\em] \setuppagenumbering[alternative=,location={footer,right},style=\bf\em] \setcounter[userpage][0] \setupcombinedlist[content][level=1] \setupexternalfigures[directory={images}] \startdocument[ metadata:title={MkIV Context Notes}, metadata:subtitle={}, metadata:subject={MkIV Context}, affiliation=Context] \starttext \startfrontmatter \title{MkIV \CONTEXT\ Notes.} \startcolumns[n=2] \input zapf \stopcolumns \vfill \placecontent \stopfrontmatter \startbodymatter \section{Introduction} \dorecurse{5}{\input knuth} \section{Closure} \dorecurse{5}{\input bryson} \stopbodymatter \startappendices \setupcombinedlist[content][level=1] \section{Appendix A} \dorecurse{5}{\input tufte} \stopappendices \stoptext Op zo 29 sep. 2019 om 21:36 schreef Wolfgang Schuster < wolfgang.schuster.li...@gmail.com>: > Jeroen schrieb am 29.09.2019 um 20:36: > > This is the main file. > Neither minimal nor complete and \stopdocument is also missing. > > \environment mkivcnotesenv > > \startdocument > > [metadata:subject={MkIV Context}, > >affiliation=Context] > > \starttext > > \startfrontmatter > > \input{frontpage.tex} > > \stopfrontmatter > > \startbodymatter > > \section{Introduction} > > \dorecurse{10}{input knuth} > > \stopbodymatter > > \startappendices > > %\input{a1.tex} > > \stopappendices > > \stoptext > > Are you looking for something like this (I need more information for a > better answer): > > \definetext [sectionfooter] [footer] [section] > %\definetext [sectionfooter] [footer] [text] [section] [] > > \setupfootertexts [I'm a footer text!] [pagenumber] > > \setuppagenumbering >[location=, > style=bolditalic] > > \setuphead >[section] >[page=yes, % needed for the footer setting > footer=sectionfooter] > > \starttext > > \section{Introduction} > > \dorecurse{10}{\input knuth} > > \stoptext > > Wolfgang > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Custom Footertext
This is the main file. \environment mkivcnotesenv \startdocument [metadata:subject={MkIV Context}, affiliation=Context] \starttext \startfrontmatter \input{frontpage.tex} \stopfrontmatter \startbodymatter \section{Introduction} \dorecurse{10}{input knuth} \stopbodymatter \startappendices %\input{a1.tex} \stopappendices \stoptext Op zo 29 sep. 2019 om 18:28 schreef Henning Hraban Ramm : > > > Am 2019-09-29 um 20:16 schrieb Jeroen : > > > > Dear list members, > > > > I am using the following environment file. The document itself is > made-up of sections only. Instead of the section as footer, I would like to > add a custom footer text throughout the document, starting at the second > page as is the page numbering. I just don't seem to be able to adjust it. > Who can help me out? > > What’s wrong with > \setupfootertexts[some][text][of your][own] > ? > > Greetlings, Hraban > --- > https://www.fiee.net > http://wiki.contextgarden.net > https://www.dreiviertelhaus.de > GPG Key ID 1C9B22FD > > > ___ > 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] general syntax for startparagraph command
Dear list members, I am trying to get the following with the 1 elevated and 2 above the = character. The square brackets and all in between I would like italic and OPT below both terms. *\startparagraph [.1..] [..,..2=..,..] ..**.\stopparagraph* Would anybody be able to help. Would Metapost be needed here? Thanks Jeroen ___ 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] Custom Footertext
Dear list members, I am using the following environment file. The document itself is made-up of sections only. Instead of the section as footer, I would like to add a custom footer text throughout the document, starting at the second page as is the page numbering. I just don't seem to be able to adjust it. Who can help me out? Best Regards, Jeroen \startenvironment mkivcnotesenv \setuppapersize[A4,portrait] [A4,portrait] \setuplayout[backspace=20mm, width=175mm, topspace=20mm, header=0mm, footer=2mm, height=263mm, bottomheight=1mm, footerdistance=10mm] \usetypescript[pagella] \setupbodyfont[pagella,12pt] \setupcolors[state=start] \setuptype[style={\switchtobodyfont[11pt,tt]}] \setuptyping[style={\switchtobodyfont[11pt,tt]}] \setupfootertexts[section][] \setupfooter[alternative=,style=\bf\em] \setuppagenumbering[alternative=,location={footer,right},style=\bf\em] \setcounter[userpage][0] \setupcombinedlist[content][level=1] \setupexternalfigures[directory={images}] \stopenvironment ___ 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] MetaPost with Multiple Variable Sections
I have been working with MetaPost as following, which worked fine with one startMPcode section with variables, but with 2 startMPcode Metapost sections, it keeps telling me the numbers dont add up: \definefloat [floatright][figure] \setupfloat [floatright][default={right,none}] \setuplayout [backspace=20mm,width=170mm,topspace=20mm,height=250mm] \starttext \placefloatright{}{ \startMPcode pair a, b; a := (0,0); b := (50,50); draw a -- b; \stopMPcode} \placefloatright{}{ \startMPcode pair a; a := 2cm; draw fullcircle scaled (2*a); \stopMPcode} \stoptext I also have tried with the startbuffer combination as below, but this gave the same error codes. Is there any other way of working with multiple MetaPost sections with variables in a single document? \definefloat [floatright][figure] \setupfloat [floatright][default={right,none}] \setuplayout [backspace=20mm,width=170mm,topspace=20mm,height=250mm] \starttext \startbuffer \startMPcode pair a, b; a := (0,0); b := (50,50); draw a -- b; \stopMPcode \stopbuffer \floatright{}{\getbuffer} \startbuffer \startMPcode pair a; a := 2cm; draw fullcircle scaled (2*a); \stopMPcode \stopbuffer \floatright{}{\getbuffer} \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] Fwd: Fwd: IBM Wordcloud with the Filter Module
I have installed portable java8 in /context/java, so paths will not be needed when using absolute paths with the commands in these files. When I execute the following batch file sample2.bat with a command on a single line, it will create the sample2.png wordcould file as expected in the /context/documents folder: /context/java/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 < /context/wordcloud/examples/hamlet.txt > /context/documents/sample2.png I now use this test2.tex file with filter with the defineexternalfilter command on one line without crlf or spaces: \usemodule[filter] \defineexternalfilter[wordcloud][filtercommand={/context/java/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 -o \externalfilteroutputfile\space -i \externalfilterinputfile}, output=\externalfilterbasefile.png, readcommand=\ExternalFigure, continue=yes, read=yes, cache=yes, purge=no,] \def\ExternalFigure#1{\externalfigure[#1]} \traceexternalfilters \starttext \startwordcloud Een bak cijfers vertalen naar een visuele weergave kan ervoor zorgen dat statistische data beter gecommuniceerd wordt. Grafieken zijn zoals Tufte (1997), een bekende auteur op het gebied van analytisch ontwerp, zegt instruments for reasoning. Voordat het zover is zullen echter eerst een paar stappen genomen moeten worden. Ervan uitgaande dat de bak met data al verzameld is moet er gekeken worden welke cijfers met elkaar in verband kunnen worden gebracht. Is er een ontwikkeling in tijd, zijn er verschillen, is er een stijgende of dalende lijn in te ontdekken etcetra. Door deze data te rangschikken en te ordenen kunnen deze patronen zichtbaar gemaakt worden. Ontwikkelingen, schommelingen hierin, de frequentie hiervan, onderlinge relaties en een totaaloverzicht kunnen in beeld gebracht worden. \stopwordcloud \stoptext and the created pdf file states "output file missing", and the following is the test2.log file content: open source > level 1, order 1, name 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.07.02 14:39 MKIV beta fmt: 2018.9.28 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name 'C:/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 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 'test2', input './test2', result 'test2' 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 'C:/context/documents/test2.tex' modules > 'filter' is loaded open source > level 3, order 4, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv' loading > Filter (ver: 2018.08.10) modules > 'module-catcodes' is loaded open source > level 4, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv' loading > Module Catcodes (ver: 2018.04.16) close source> level 4, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv' close source> level 3, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv' fonts > preloading latin modern fonts (second stage) fonts > defining > source file 'D:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf' is not found fonts > defining > using source file 'C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf' due to cache mismatch fonts > defining > source file 'D:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf' is not found fonts > defining > using source file 'C:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf' due to cache mismatch fonts > 'fallback modern-designsize rm 12pt' is loaded t-filter> current filter : wordcloud t-filter> base file : test2-temp-wordcloud-0 t-filter> input file : test2-temp-wordcloud-0.tmp t-filter> output file : test2-temp-wordcloud-0.png t-filter> command : /context/java/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 -o test2-temp-wordcloud-0.png -i test2-temp-wordcloud-0.tmp t-filter> state : t-filter> cached output file 'test2-temp-wordcloud-0.png' missing. Rerunning filter t-filter> file 'test2-temp-wordcloud-0.png' cannot be found t-filter> current filter : wordcloud t-filter> base file : test2-temp-wordcloud-0 t-filter> input file : test2-tem
[NTG-context] Fwd: IBM Wordcloud with the Filter Module
I am able to run R, asymptote, graphviz, octave, openscad, python and freecad all on the filter module without problems. The same problem as I have with wordcloud I have with maxima and geogebra. \traceexternalfilters isnt giving me a lot. I have tried the following sample1.bat batch file and it seems to create the wc file from the sample text file that comes with wordcloud java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 < /context/wordcloud/examples/hamlet.txt > /context/documents/sample1.png ___ ___ 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] Fwd: Question and Answer Iteration
This worked very well, thanks. I now want at the end of each chapter some questions with the chapter number in the follow-up number, and then at the end of the document a separate chapter with the answers with matching numbers. In general for a single QA section this works, but now I start distributing it over a number of chapters, the question and answer numbering seems to be an issue. Would the define require a change? % QUESTION AND ANSWER \define[1]\QuestionTextCommand {\doglobal\increment\QuestionCounter \pagereference[question:\QuestionCounter]% \doifreferencefoundelse{answer:\QuestionCounter} {\goto{#1}[answer:\QuestionCounter]} {#1}} \define[1]\AnswerTextCommand {\doglobal\increment\AnswerCounter \pagereference[answer:\AnswerCounter]% \doifreferencefoundelse{question:\AnswerCounter} {\goto{#1}[question:\AnswerCounter]} {#1}} \defineenumeration [question] [text={\black Question}, titledistance=2em, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text={\black Answer}, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\AnswerTextCommand] \defineblock[answer] % END SETUP \starttext \chapter{Chap1} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \chapter{Chap2} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \Chapter{End of Chapter Answers} \section{Answers Chapter 1} \useblocks[answer] \section{Answers Chapter 2} \useblocks[answer] \stoptext I have it working with a single chapter: % QUESTION AND ANSWER \define[1]\QuestionTextCommand {\doglobal\increment\QuestionCounter \pagereference[question:\QuestionCounter]% \doifreferencefoundelse{answer:\QuestionCounter} {\goto{#1}[answer:\QuestionCounter]} {#1}} \define[1]\AnswerTextCommand {\doglobal\increment\AnswerCounter \pagereference[answer:\AnswerCounter]% \doifreferencefoundelse{question:\AnswerCounter} {\goto{#1}[question:\AnswerCounter]} {#1}} \defineenumeration [question] [text={\black Question}, titledistance=2em, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text={\black Answer}, width=fit, distance=0.5em, headstyle=bold, number=yes, prefix=yes, prefixsegments=chapter, alternative=serried, headcommand=\AnswerTextCommand] \defineblock[answer] % END SETUP \starttext \chapter{Chap1} \section{End of Chapter Questions} \startquestion Question 1 \stopquestion \beginanswer \startanswer Answer 1 \stopanswer \endanswer \startquestion Question 2 \stopquestion \beginanswer \startanswer Answer 2 \stopanswer \endanswer \useblocks[answer] \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] Fwd: Meptapost Drawing not showing-up in Context Letter Style
Eventually, these two options worked. Firstly changing \setupbackgrounds % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path p; p := (0,0)--(100,0)--(100,100)--(0,100)--cycle; path q; q := p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt; \stopuseMPgraphic \definelayer [logo] [repeat=no] \setlayer [logo] [hoffset=160mm,voffset=17mm] {\scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}} \setupbackgrounds[paper][background=logo] % END MP LOGO SETUP, BEGIN LETTER SETUP \usemodule [letter] [style=dinb] \setupletterlayer [reference] [list={name,phone,email,date}] \setupletterlayer [address] [y=55mm] \setupletterdescription [enclosure] [location=top, leftmargin=0.5em, symbol=#1,] \usesymbols [mvs] \definesymbol [1] [{\symbol[martinvogel 2][PointingHand]}] \setupletter [toname={John Doe}, toaddress={201, Main Street\\23124 London\\United Kingdom}, fromname={Jansen NV}, fromaddress={Waalhaven 2200\\2842 KL Rotterdam}, name={Piet jansen}, phone={+31(010)4234 4232}, email={peter.jan...@gmail.com}, date={\currentdate}, signature={Pete},] % END LETTER SETUP, START LETTER \startletter [subject={Outstanding Invoices}, opening={Dear Sir,}, closing={Kind Regards,}, enclosure={list:Commercial Invoice,Accounts Statement},] \dorecurse{3}{\input knuth \par} \stopletter Alternatively, adjusting \setupletterlayer \usemodule [letter] [style=dinb] % BEGIN MP LOGO SETUP \startuseMPgraphic{mpglogo} path p; p := (0,0)--(100,0)--(100,100)--(0,100)--cycle; path q; q := p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt; \stopuseMPgraphic \startsetups[letter:layer:lettermain] \scale [width=25mm,height=25mm] {\useMPgraphic{mpglogo}} \stopsetups \setupletterlayer [lettermain] [alternative=setups, x=160mm, y=17mm] % END MP LOGO SETUP, BEGIN LETTER SETUP \setupletterlayer [reference] [list={name,phone,email,date}] \setupletterlayer [address] [y=55mm] \setupletterdescription [enclosure] [location=top, leftmargin=0.5em, symbol=#1,] \usesymbols [mvs] \definesymbol [1] [{\symbol[martinvogel 2][PointingHand]}] \setupletter [toname={John Doe}, toaddress={201, Main Street\\23124 London\\United Kingdom}, fromname={Jansen NV}, fromaddress={Waalhaven 2200\\2842 KL Rotterdam}, name={Piet jansen}, phone={+31(010)4234 4232}, email={peter.jan...@gmail.com}, date={\currentdate}, signature={Pete},] % END LETTER SETUP, START LETTER \startletter [subject={Outstanding Invoices}, opening={Dear Sir,}, closing={Kind Regards,}, enclosure={list:Commercial Invoice,Accounts Statement},] \dorecurse {3} {\input knuth \par} \stopletter -- Forwarded message - From: Wolfgang Schuster Date: ma 11 mrt. 2019 om 20:55 Subject: Re: [NTG-context] Meptapost Drawing not showing-up in Context Letter Style To: mailing list for ConTeXt users , Context NTG < context...@gmail.com> Context NTG schrieb am 10.03.19 um 16:59: > I am trying to get a metapost drawing as logo added to right upper > corner of a DIN B style letterhead, but it does not show up, just the > letter itself. Is there anything to change to the layers for the MP toe > reveal itself? The letter module uses local settings for the page background to place all the layer for the header, footer etc. and your own background setup is overloaded by the module. What you can do in this case is to use the predefined but unused lettermain layer to place your logo in the background. \usemodule[letter][style=dinb] \startuseMPgraphic{mpglogo} path p; p := (0,0)--(100,0)--(100,100)--(0,100)--cycle ; path q; q := p cornered 30pt; draw q withcolor black withpen pencircle scaled 7pt ; \stopuseMPgraphic \startsetups[letter:layer:lettermain] \scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}} \stopsetups \setupletterlayer [lettermain] [alternative=setups, x=160mm, y=17mm] \startletter \dorecurse{3}{\input knuth \par} \stopletter Another way to place content in the background is to use the “paper” (or “text”) background which isn’t used by the letter module and your settings won’t be overloaded. 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 ___
[NTG-context] Question and Answer Iteration
Dear list The configuration below is what I found for a question and answer section. If would like the text to start immediately after "question 1", "question2", etc. and not below it and the same for the answers. Is there an easy way to achieve this? Regards, Jeroen \setupinteraction[state=start] \define[1]\QuestionTextCommand {\doglobal\increment\QuestionCounter \pagereference[question:\QuestionCounter]% \doifreferencefoundelse{answer:\QuestionCounter} {\goto{#1}[answer:\QuestionCounter]} {#1}} \define[1]\AnswerTextCommand {\doglobal\increment\AnswerCounter \pagereference[answer:\AnswerCounter]% \doifreferencefoundelse{question:\AnswerCounter} {\goto{#1}[question:\AnswerCounter]} {#1}} \defineenumeration [question] [text=Question, headcommand=\QuestionTextCommand] \defineenumeration [answer] [text=Answer, headcommand=\AnswerTextCommand] \defineblock[answer] \startbuffer % \startquestion \input knuth \stopquestion % \beginanswer \startanswer \input knuth \stopanswer \endanswer % \stopbuffer \starttext \dorecurse{10}{\getbuffer} \page \useblocks[answer] \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] IBM Wordcloud with the Filter Module
Yes, there is a batch file for testing purposes, and that one works fine Thanks, Jeroen Op ma 11 mrt. 2019 om 16:55 schreef Aditya Mahajan : > Can you run the java file from the command promt? > > Aditya > > On Mon, 11 Mar 2019, Jeroen wrote: > > > Dear List, > > > > I am trying to get the IBM wordcloud java application working with the > > filter module on MS Windows. This configuration does not create the > > wordcloud png file. The in and out files > "naamloos-10-temp-wordcloud-x.tmp" > > are actually created. If this configuration correct? Java is installed > and > > I am indicating absolute file locations. > > > > Thanks, Jeroen > > > > > > \usemodule[filter] > > > > \defineexternalfilter > > > > [wordcloud] > > > > [filtercommand={/Program Files/Java/jre1.8.0_181/bin/java > > > > -jar /context/wordcloud/ibm-word-cloud.jar > > > > -c /context/wordcloud/examples/configuration.txt > > > > -w 800 > > > > -h 600 > > > > -o \externalfilteroutputfile\space > > > > -i \externalfilterinputfile}, > > > > output=\externalfilterbasefile.png, > > > > readcommand=\ExternalFigure, > > > > continue=yes, > > > > purge=no,] > > > > \def\ExternalFigure#1{\externalfigure[#1]} > > > > \starttext > > > > \startwordcloud %[width=100] > > > > Thus, I came to the conclusion that the designer of a new > > > > system must not only be the implementer and first > > > > large||scale user; the designer should also write the first > > > > user manual. > > > > The separation of any of these four components would have > > > > hurt \TeX\ significantly. If I had not participated fully in > > > > all these activities, literally hundreds of improvements > > > > would never have been made, because I would never have > > > > thought of them or perceived why they were important. > > > > But a system cannot be successful if it is too strongly > > > > influenced by a single person. Once the initial design is > > > > complete and fairly robust, the real test begins as people > > > > with many different viewpoints undertake their own > > > > experiments. > > > > \stopwordcloud > > > > \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 > > ___ > ___ 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] IBM Wordcloud with the Filter Module
Dear List, I am trying to get the IBM wordcloud java application working with the filter module on MS Windows. This configuration does not create the wordcloud png file. The in and out files "naamloos-10-temp-wordcloud-x.tmp" are actually created. If this configuration correct? Java is installed and I am indicating absolute file locations. Thanks, Jeroen \usemodule[filter] \defineexternalfilter [wordcloud] [filtercommand={/Program Files/Java/jre1.8.0_181/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 -o \externalfilteroutputfile\space -i \externalfilterinputfile}, output=\externalfilterbasefile.png, readcommand=\ExternalFigure, continue=yes, purge=no,] \def\ExternalFigure#1{\externalfigure[#1]} \starttext \startwordcloud %[width=100] Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large||scale user; the designer should also write the first user manual. The separation of any of these four components would have hurt \TeX\ significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them or perceived why they were important. But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and fairly robust, the real test begins as people with many different viewpoints undertake their own experiments. \stopwordcloud \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] Gnuplot module: Patching of Gnuplot binary still needed?
I have tried texexec --make --all and changing line 484 from \getfiguredimensions[\@@GNUPLOTresult] into \getfiguredimensions[\@@GNUPLOTfinalresult] but neither is giving me any luck. Now also install-setup.bat --extras="t-gnuplot" is not working anymore. Not sure what the issue is. Jeroen -- This message was sent on behalf of jeroen.mus...@hotmail.com at openSubscriber.com http://www.opensubscriber.com/message/ntg-context@ntg.nl/14992530.html ___ 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] Gnuplot module: Patching of Gnuplot binary still needed?
In the past I was using this instruction set to install GnuPlot in Windows Context Mkiv minimals but it does not work anymore. Is there a bug in t-gnuplot version 2009-07-21? Create folder c:\context\gnuplot Download from http://dl.contextgarden.net/modules/gnuplot-win.zip the gnuplot file gnuplot-win.zip and unzip in folder c:\context so you have folders c:\context\gnuplot\bin and c:\context\gnuplot\term Create a batch file c:\context\gnuplot\bin\gnuplot.bat with content "c:\context\gnuplot\bin\wgnuplot.exe" %* START>RUN>CMD ENTER SET PATH=%PATH%;c:\context\gnuplot\bin ENTER Test GNUPLOT by entering gnuplot in the CLI console and give in gnuplot the command plot sin(x) ENTER Create folder c:\context\tex\texmf\tex\context\third\gnuplot Download http://theory.uwinnipeg.ca/scripts/CTAN/macros/context/contrib/context-gnuplot.zip or http://dl.contextgarden.net/modules/t-gnuplot-2009.07.21.zip module and unzip and put in folder c:\context\tex\texmf\tex\context\third\gnuplot and c:\context\text\texmf\metapost\base\ so you have c:\context\tex\texmf\tex\context\third\gnuplot\t-gnuplot.tex and c:\context\text\texmf\metapost\base\mp-gnuplot.mp Start>run>cmd>c: ENTER cd \context\tex\texmf-mswin\bin ENTER context – -generate ENTER (For MkII users use the following command mktexlsr) Enter the following data to test GNUPLOT \usemodule[gnuplot] \enableregime[utf] \setupGNUPLOT[terminal=mp] \startGNUPLOTscript[mysinplot] set xlabel “time” set ylabel “value” plot sin(x) \stopGNUPLOTscript \starttext text before picture \useGNUPLOTgraphic[mysinplot] text after picture \stoptext -- This message was sent on behalf of jeroen.mus...@hotmail.com at openSubscriber.com http://www.opensubscriber.com/message/ntg-context@ntg.nl/14815843.html ___ 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] Fields and JS Calculations
OK, I started off with a simpler example, just an addition of 2 numbers. I know this should be pretty close to the correct setup by looking at other Javascript examples, but it just does not work jet. Any suggestions Thanks Jeroen \startJSpreamble {Calculate} used now function Calculate () { v = getField("textC") ; v.value = 0 ; v.value += AFMakeNumber(getField("textA").value) ; v.value += AFMakeNumber(getField("textB").value) } \stopJSpreamble \starttext \setupfield [lineABC] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \definefield[textA] [line] [lineABC] [] [] \definefield[textB] [line] [lineABC] [] [] \definefield[textC] [line] [lineABC] [] [] \startJScode{Calculate} AFSimple_Calculate("SUM", new Array ("textA", "textB")); \stopJScode Calculate the addition: A + B = C \\ \field[textA][Please enter A] \\ \field[textB][Please enter B] \\ \goto{Calculate the Result}[JS(Calculate)] \\ \field[textC][The Calculation Result C = ] \stoptext From: jeroen.mus...@hotmail.com To: ntg-context@ntg.nl Date: Sat, 21 Nov 2009 14:19:03 +0100 Subject: [NTG-context] Fields and JS Calculations I want to calculate the pressure of a hydrostatic fluid column with p(psi)=0.052*density(lb/gal)*depth(ft) I have created a form with fields to enter the input, but I need somehow to pass the information entered to the JS calculation to display the result. How can you pass an entered field value to JS caluclation and show the result into another field. Thanks Jeroen \setupcolors[state=start] \setupinteraction[state=start] \starttext \definefield[textdensity] [line] [linedensity] [] [] \definefield[textdepth] [line] [linedepth] [] [] \definefield[textpressure] [line] [linepressure] [] [] \setupfield [linedensity] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \setupfield [linedepth] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \setupfield [linepressure] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \startJScode{presscalc} pressure=0.052*density*depth; \stopJScode Calculate the hydrostatic pressure in psi with p = 0.05194 x density x depth \blank \field[textdensity][Please enter Density (lb/gal):] \blank \field[textdepth][Please enter Depth (ft):] \blank \goto{Calculate Pressure}[JS(presscalc)] \blank \field[textpressure][Hydrostatic Pressure (psi):] \stoptext Windows Live: Make it easier for your friends to see what you’re up to on Facebook. _ Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010___ 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] Fields and JS Calculations
I want to calculate the pressure of a hydrostatic fluid column with p(psi)=0.052*density(lb/gal)*depth(ft) I have created a form with fields to enter the input, but I need somehow to pass the information entered to the JS calculation to display the result. How can you pass an entered field value to JS caluclation and show the result into another field. Thanks Jeroen \setupcolors[state=start] \setupinteraction[state=start] \starttext \definefield[textdensity] [line] [linedensity] [] [] \definefield[textdepth] [line] [linedepth] [] [] \definefield[textpressure] [line] [linepressure] [] [] \setupfield [linedensity] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \setupfield [linedepth] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \setupfield [linepressure] [label,frame,horizontal] [frame=off] [height=18pt,width=15em,align=middle,frame=off] [height=18pt,width=20em,align=right,style=\tfx,,frame=on] \startJScode{presscalc} pressure=0.052*density*depth; \stopJScode Calculate the hydrostatic pressure in psi with p = 0.05194 x density x depth \blank \field[textdensity][Please enter Density (lb/gal):] \blank \field[textdepth][Please enter Depth (ft):] \blank \goto{Calculate Pressure}[JS(presscalc)] \blank \field[textpressure][Hydrostatic Pressure (psi):] \stoptext _ Windows Live: Make it easier for your friends to see what you’re up to on Facebook. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009___ 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] How to make this section header in ConTeXt?
Hans Hagen: > rough approach > ... > > Thanks a lot, this is what I'm looking for - although it's a bit more involved than I had expected. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] How to make this section header in ConTeXt?
Hi, I'm new to ConTeXt, but so far most things I wanted to do turned out to be quite easy. However, now I'm trying to make a particular section heading, but I can't get it right: |-| | SECTION HEADINGKey 1 Value 1 | | Key 2 Value 2 | | Key 3 Value 3 | | Key 4 Value 4 | | Text Key 5 Value 5 | |-| Or in text, a box containing a section heading in the left top, some additional text in the left bottom, and a table with pairs of values on the right side of the box. Getting a box with a section heading and some text was easy enough, but I couldn't get the table where and how I wanted it. I also tried to do all of it in a table, but I got errors when trying to put a \section in the table. Any suggestion on how to do this will be highly appreciated. thanks, Jeroen Heijmans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context