Difference between revisions of "Command/MPdrawing"
< Command
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
<context source="yes"> | <context source="yes"> | ||
\startluacode | \startluacode | ||
− | context( | + | context.MPdrawingdonetrue() |
context.startMPdrawing() | context.startMPdrawing() | ||
context("fill fullcircle scaled 2cm withcolor darkyellow;") | context("fill fullcircle scaled 2cm withcolor darkyellow;") |
Revision as of 12:49, 8 May 2024
Contents
\MPdrawing
Summary
The command \MPdrawing is used for Metapost inline graphics.
Settings
Description
Similar to the environment \startMPdrawing.
It was introduced in 2010 to reduce needed calls with lua. Source: https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/AIAWMGBFQQ5QPKNPOPDKFE4U3P4DZJDY/
With \startMPdrawing :
\startluacode context.MPdrawingdonetrue() context.startMPdrawing() context("fill fullcircle scaled 2cm withcolor darkyellow;") context.stopMPdrawing() context("text before") context.getMPdrawing() context("text after") \stopluacode
With \MPdrawing :
\startluacode context.MPdrawingdonetrue() context.MPdrawing("fill fullcircle scaled 2cm withcolor darkgreen;") context("text before") context.getMPdrawing() context("text after") \stopluacode