From: Alan Stone <software.list.1es9s@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: MP newbie question
Date: Mon, 18 May 2009 20:45:44 +0200 [thread overview]
Message-ID: <326847810905181145p77ce2388q1d4500bbb55c09f7@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 718 bytes --]
Hi,
How do you make this work ?
--- mpframed.tex ---
%\def\myFrameAlternative{line}
%\def\myFrameAlternative{dashes}
\def\myFrameAlternative{dots}
\startuniqueMPgraphic{name}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
show (\myFrameAlternative) ;
if \myFrameAlternative = dashes :
% if (\myFrameAlternative) = dashes :
draw p dashed evenly scaled 2 ;
% elseif (\myFrameAlternative) = dots :
elseif \myFrameAlternative = dots :
draw p dashed withdots scaled 2 ;
else :
draw p ;
fi ;
\stopuniqueMPgraphic
\defineoverlay[myGraphic][\uniqueMPgraphic{name}]
\starttext
\framed[%
offset=5mm,
background=myGraphic,
frame=off]
{mp framed}
\stoptext
---
context.cmd mpframed
--
Alan
[-- Attachment #1.2: Type: text/html, Size: 2361 bytes --]
[-- Attachment #2: mpframed.log --]
[-- Type: application/octet-stream, Size: 5919 bytes --]
This is luaTeX, Version snapshot-0.31.3-2008122922
(mpframed.tex
ConTeXt ver: 2009.01.18 14:39 MKIV fmt: 2009.3.25 int: english/english
system : cont-new loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv) (C:/context/tex/texmf-context/tex/context/base/cont-mtx.tex))
system : cont-fil loaded
(C:/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system : cont-sys.rme loaded
(C:/context/tex/texmf-context/tex/context/user/cont-sys.rme (C:/context/tex/texmf-context/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-context/tex/context/base/type-siz.tex) (C:/context/tex/texmf-context/tex/context/base/type-otf.tex))
bodyfont : 12pt rm is loaded
specials : pdftex loaded
language : language en is active
system : mpframed.top loaded
(mpframed.top) (mpframed.tuo) (mpframed.tuo)
systems : begin file mpframed at line 28
systems : randomizer starts with 1453937370
mplib : loading format: metafun.mp, name: C:/context/tex/texmf-cache/luatex-cache/context/2fea56f92e5267d7cc9662e4d5f52e1e/formats/cont-en-metafun.mem
mplib | mp terminal: >> dots
>> -dashes+dots
! Unknown relation will be considered false.
<to be read again>
:
<*> ...3.7343pt ; show (dots) ; if dots= dashes :
draw p dashed evenly scal...
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal: [1]
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal:
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal:
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal: (Please type a command or say `end')
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal: >> dots
>> -dashes+dots
! Unknown relation will be considered false.
<to be read again>
:
<*> ...3.7343pt ; show (dots) ; if dots= dashes :
draw p dashed evenly scal...
mplib | mp error: unknown, no error, terminal or log messages
mplib | mp terminal: [1]
mplib | mp error: unknown, no error, terminal or log messages
fonts : resetting map file list
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-empty.map}
fonts : using map file: original-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-base.map}
fonts : using map file: lm-math
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts : using map file: lm-rm
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts : using map file: original-ams-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
fonts : using map file: original-ams-euler
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
fonts : using map file: original-public-lm
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map} [1.1]
systems : end file mpframed at line 36
system : cont-err loaded
(C:/context/tex/texmf-context/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
) )<C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
mkiv lua stats : result saved in file - mpframed.pdf
mkiv lua stats : used config path - C:/context/tex/texmf/web2c/texmf.cnf
mkiv lua stats : used cache path - C:/context/tex/texmf-cache
mkiv lua stats : luatex banner - this is luatex, version snapshot-0.31.3-2008122922
mkiv lua stats : modules/dumps/instances - 101/26/1
mkiv lua stats : input load time - 0.063 seconds
mkiv lua stats : startup time - 1.500 seconds (including runtime option file processing)
mkiv lua stats : jobdata time - 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats : fonts load time - 1.234 seconds
mkiv lua stats : xml load time - 0.000 seconds, lpath calls: 0, cached calls: 0
mkiv lua stats : lxml load time - 0.000 seconds preparation, backreferences: 0
mkiv lua stats : mps conversion time - 0.000 seconds
mkiv lua stats : node processing time - 0.000 seconds including kernel
mkiv lua stats : kernel processing time - 0.000 seconds
mkiv lua stats : attribute processing time - 0.016 seconds
mkiv lua stats : language load time - 0.047 seconds, n=2
mkiv lua stats : graphics processing time - 0.000 seconds including tex, n=0
mkiv lua stats : metapost processing time - 0.000 seconds, loading: 0.016 seconds, execution: 0.000 seconds, n: 0
mkiv lua stats : current memory usage - 44 MB (ctx: 45 MB)
mkiv lua stats : cleaned up reserved nodes - 19 nodes, 8 lists of 100
mkiv lua stats : node memory usage - 20 glue_spec, 2 dir
mkiv lua stats : loaded patterns - us:us:pat:exc:2
mkiv lua stats : loaded fonts - lmex10:tfm lmmi12:tfm lmmi7:tfm lmmi9:tfm lmroman10-bolditalic:otf lmroman10-italic:otf lmroman12-bold:otf lmroman12-italic:otf lmroman12-regular:otf lmroman7-bold:otf lmroman7-regular:otf lmroman9-bold:otf lmroman9-italic:otf lmroman9-regular:otf lmromancaps10-regular:otf lmromanslant10-bold:otf lmromanslant10-regular:otf lmromanslant12-regular:otf lmromanslant9-regular:otf lmsy10:tfm lmsy7:tfm lmsy9:tfm msam10:tfm msam7:tfm msbm10:tfm msbm7:tfm rm-lmr12:tfm rm-lmr7:tfm rm-lmr9:tfm
mkiv lua stats : control sequences - 33343 of 165536
mkiv lua stats : callbacks - direct: 423, indirect: 5015, total: 5438
mkiv lua stats : runtime - 1.922 seconds, 1 processed pages, 1 shipped pages, 0.520 pages/second
[-- Attachment #3: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2009-05-18 18:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 18:45 Alan Stone [this message]
2009-05-18 19:58 ` Aditya Mahajan
2009-05-19 6:02 ` Alan Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=326847810905181145p77ce2388q1d4500bbb55c09f7@mail.gmail.com \
--to=software.list.1es9s@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).