Re: [NTG-context] using metapost library makecirc with context.
On 4/20/2019 11:16 PM, Alan Braslau wrote: On Sat, 20 Apr 2019 23:00:09 +0200 Hans Hagen wrote: On 4/20/2019 10:09 PM, Andrea De Michele wrote: I didn't understand the magic behind that but it's works. mp has no real text typesetting options so this hack provides it Why not let latex=textext ; That crashed here. Another question: there is a library to draw electrics circuit alternative to makecirc but more context/metafun friendly? the node library but it lacks things for drawing resistors ... i'll discuss this whith alan I played with makecirc a while back (and I even used it to make simple circuit diagrams that I used in a patent application). A real electronic circuit drawing program these days will do circuit board layouts and automatic routing, etc. I'm not sure that we want to get into this with MP. I assume only for some simple educational drawings. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] using metapost library makecirc with context.
On Sat, 20 Apr 2019 23:00:09 +0200 Hans Hagen wrote: > On 4/20/2019 10:09 PM, Andrea De Michele wrote: > > > I didn't understand the magic behind that but it's works. > > mp has no real text typesetting options so this hack provides it Why not let latex=textext ; > > Another question: there is a library to draw electrics circuit > > alternative to makecirc but more context/metafun friendly? > the node library but it lacks things for drawing resistors ... i'll > discuss this whith alan I played with makecirc a while back (and I even used it to make simple circuit diagrams that I used in a patent application). A real electronic circuit drawing program these days will do circuit board layouts and automatic routing, etc. I'm not sure that we want to get into this with MP. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] using metapost library makecirc with context.
On 4/20/2019 10:09 PM, Andrea De Michele wrote: I didn't understand the magic behind that but it's works. mp has no real text typesetting options so this hack provides it Another question: there is a library to draw electrics circuit alternative to makecirc but more context/metafun friendly? the node library but it lacks things for drawing resistors ... i'll discuss this whith alan Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] using metapost library makecirc with context.
Hans Hagen writes: > On 4/19/2019 5:48 PM, Andrea De Michele wrote: >> >> I'm trying to use with Context makecirc a metapost library to draw >> electric circuits, but I have problems with the labels of the circuits >> element that are not displayed correctly. >> >> FIRST EXAMPLE (No labels are displayed) >> - >> \starttext >> >> \startMPinclusions >>input makecirc; >> \stopMPinclusions >> >> >> \startstaticMPfigure{circ1} >> u:= 1cm ; >> source.e((0,0u),DC,90,"\Delta V","2V") ; >> resistor.a((2u,1u),normal,90,"R_1","1$\Omega$") ; >> resistor.b((2u,-1u),normal,90,"R_2","2$\Omega$") ; >> wire(S.e.p,R.a.r,udsq) ; >> wire(S.e.n,R.b.l,udsq) ; >> wire(R.a.l,R.b.r,udsq) ; >> \stopstaticMPfigure >> \usestaticMPfigure[circ1] >> >> \stoptext > I searched ctab for that library and it has soem hard wired latex > stuff in it. You can make latex.mp empty (to play safe), > > Load the file with: > > \startMPinclusions > string LaTeXsetup ; LaTeXsetup := ""; > input "makecirc.mp"; > vardef latex(expr t) = textext(t) enddef ; > \stopMPinclusions > > I didn't look into the details but yoru example runs then. > > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ > Thank you, I didn't understand the magic behind that but it's works. Another question: there is a library to draw electrics circuit alternative to makecirc but more context/metafun friendly? -- Andrea De Michele -- Andrea De Michele ___ 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] Left frame on a block of text
Thanks, that's exactly what I needed. I got inspired by your post at https://adityam.github.io/context-blog/post/frame-with-solid-left-line/ for my original code. I just added linecap:=butt; at the beginning of the metapost code to get squared ends. Gilles > Framed does not provide enough hooks to control the spaces. For something > like this, you can also use metapost to draw the background: > > \showframe > \showboxes > \defineframedtext[leftbartext][ > width=broad, > frame=off, > rulethickness=.5ex, > background=mp:offsetframe, > offset=overlay, > ] > > \defineoverlay[mp:offsetframe][\useMPgraphic{mp:offsetframe}] > \startuseMPgraphic{mp:offsetframe} linecap:=butt; draw leftboundary OverlayBox xshifted -(LeftMarginDistance + 0.5OverlayLineWidth) withpen pencircle scaled OverlayLineWidth; setbounds currentpicture to OverlayBox; \stopuseMPgraphic > > \starttext > \startleftbartext > \input knuth > \stopleftbartext > \stoptext > > > Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \abovedisplayshortskip
Mikael P. Sundqvist schrieb am 20.04.2019 um 15:30: On Mon, Apr 15, 2019 at 1:42 PM Mikael P. Sundqvist wrote: Hi, is \abovedisplayshortskip inserted in formulas that come after short lines? Or is there a more ConTeXt-way to tune this? Small example file below, but I see no change after I set it, so I guess it is not used? /Mikael \starttext Foo \startformula 1+1=2 \stopformula \abovedisplayshortskip = -12pt Foo \startformula 1+1=2 \stopformula \stoptext Bump. Nobody knows? ConTeXt inserts always the same vertical space before a formula independent of the length of the previous line. 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] Imposition: 4 on 1, last 2 pages upside down
Thanks, but don't bother if I'm the only one using this formatting. I've lowercased the switch name in the wiki section. ___ 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] Left frame on a block of text
On Sat, 20 Apr 2019, Gilles Waeber wrote: Hi, I'm trying to create a style with a left border in the margin. I want the border to start and stop with the text. For the bottom I used framedepth but the bar still goes too far on the top? \showframe \showboxes \defineframedtext[leftbartext][ width=broad, frame=off, leftframe=on, rulethickness=.5ex, offset=-\framedparameter{rulethickness}, frameoffset=\dimexpr\leftmargindistance + \framedparameter{rulethickness}\relax, framedepth=-\framedparameter{frameoffset}, ] \starttext \startleftbartext \input knuth \stopleftbartext \stoptext Framed does not provide enough hooks to control the spaces. For something like this, you can also use metapost to draw the background: \showframe \showboxes \defineframedtext[leftbartext][ width=broad, frame=off, rulethickness=.5ex, background=mp:offsetframe, offset=overlay, ] \defineoverlay[mp:offsetframe][\useMPgraphic{mp:offsetframe}] \startuseMPgraphic{mp:offsetframe} draw leftboundary OverlayBox xshifted -(LeftMarginDistance + 0.5OverlayLineWidth) withpen pencircle scaled OverlayLineWidth; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \starttext \startleftbartext \input knuth \stopleftbartext \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \abovedisplayshortskip
On Mon, Apr 15, 2019 at 1:42 PM Mikael P. Sundqvist wrote: > > Hi, > > is \abovedisplayshortskip inserted in formulas that come after short > lines? Or is there a more ConTeXt-way to tune this? Small example file > below, but I see no change after I set it, so I guess it is not used? > > /Mikael > > \starttext > Foo > \startformula > 1+1=2 > \stopformula > > \abovedisplayshortskip = -12pt > > Foo > \startformula > 1+1=2 > \stopformula > \stoptext Bump. Nobody knows? /Mikael ___ 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] Left frame on a block of text
Hi, I'm trying to create a style with a left border in the margin. I want the border to start and stop with the text. For the bottom I used framedepth but the bar still goes too far on the top? \showframe \showboxes \defineframedtext[leftbartext][ width=broad, frame=off, leftframe=on, rulethickness=.5ex, offset=-\framedparameter{rulethickness}, frameoffset=\dimexpr\leftmargindistance + \framedparameter{rulethickness}\relax, framedepth=-\framedparameter{frameoffset}, ] \starttext \startleftbartext \input knuth \stopleftbartext \stoptext Regards, Gilles ___ 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] Imposition: 4 on 1, last 2 pages upside down
On 4/20/2019 12:41 PM, Paul Schalck wrote: Hi, I ended up creating a new imposition schema. I've added a little wiki section on the matter: https://wiki.contextgarden.net/Imposition best use lowercase, so: 1*4*reversed Is this often used? if so, should we add it? Willi (who is the imposition master)? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Filling the diamond in enumeration
Hi Fabrice, You can define your own symbol, as in the following: \starttext \definesymbol[mysymbol][{$\red\blacklozenge$}] \definesymbol[redtriangle][{$\red\blacktriangleright$}] \startitemize[mysymbol] \item foo \item bar \item baz \stopitemize \startitemize[redtriangle] \item foo \item bar \item baz \stopitemize \stoptext Best regards: OK > On 20 Apr 2019, at 12:24, Fabrice Couvreur > wrote: > > Hi, > Is it possible to fill the diamond ? > Thank you. > Fabrice > > \starttext > \startitemize[4][color=red] > \item One > \item Two > \stopitemize > \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] Imposition: 4 on 1, last 2 pages upside down
Hi, I ended up creating a new imposition schema. I've added a little wiki section on the matter: https://wiki.contextgarden.net/Imposition Greetings! Paul ___ 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] Filling the diamond in enumeration
Hi, Is it possible to fill the diamond ? Thank you. Fabrice \starttext \startitemize[4][color=red] \item One \item Two \stopitemize \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 ___