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
___________________________________________________________________________________

Reply via email to