ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* using metapost library makecirc with context.
@ 2019-04-19 15:48 Andrea De Michele
  2019-04-19 16:10 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Andrea De Michele @ 2019-04-19 15:48 UTC (permalink / raw)
  To: ntg-context


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

SECOND EXAMPLE (In the first circuit are displayed the labels of the
second one and in the second only ?? are displayed)
-----------------
\starttext

\startstaticMPfigure{circ1}
  input makecirc;
        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]

\startstaticMPfigure{circ2}
  input makecirc;
        u:= 1cm ;
        source.e((0,0u),DC,90,"\Delta V","4V") ;
        resistor.a((2u,1u),normal,90,"R_3","3$\Omega$") ;
        resistor.b((2u,-1u),normal,90,"R_4","4$\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[circ2]

\stoptext


-- 
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-21 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 15:48 using metapost library makecirc with context Andrea De Michele
2019-04-19 16:10 ` Hans Hagen
2019-04-20 20:09   ` Andrea De Michele
2019-04-20 21:00     ` Hans Hagen
2019-04-20 21:16       ` Alan Braslau
2019-04-20 21:49         ` Hans Hagen
2019-04-21 14:02           ` Alan Braslau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).