ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* internal mptopdf converter skips some glyphs in labels
@ 2013-08-09 20:26 Sanjoy Mahajan
  2013-08-09 20:41 ` Aditya Mahajan
  2013-08-09 21:50 ` Hans Hagen
  0 siblings, 2 replies; 12+ messages in thread
From: Sanjoy Mahajan @ 2013-08-09 20:26 UTC (permalink / raw)
  To: ntg-context

The internal mptopdf converter in MkIV omit some glyphs in the labels.
Here's a minimal example (test.tex):

\starttext

\externalfigure[testfig.1][frame=on]
\blank
\externalfigure[testfig-1.pdf][frame=on]

\stoptext

And testfig.1 is produced by testfig.mp

beginfig(1)
label(btex $\Omega$ etex, (0,0));
currentpicture := currentpicture scaled 5;
endfig;
end

Here's testfig.1 to save a step in debugging:

%!PS
%%BoundingBox: -18 -18 18 18 
%%HiResBoundingBox: -17.98805 -17.0195 17.98798 17.0195 
%%Creator: MetaPost 1.803
%%CreationDate: 2013.08.09:1612
%%Pages: 1
%*Font: cmr10 49.81323 9.96265 0a:8
%%BeginProlog
%%EndProlog
%%Page: 1 1
 0 0 0 setrgbcolor
-17.98805 -17.0195 moveto
(\012) cmr10 49.81323 fshow
showpage
%%EOF

Then do:

  mptopdf testfig.1
  context test.tex
  xpdf test.pdf

The first framed box, using the internal mps->pdf conversion, is empty.
The second framed go, using the pdf file produced by mptopdf, correctly
contains \Omega.

With \enabletrackers[graphics.conversion,graphics.inclusion], the log
has the following lines, none of which seem to pinpoint the problem:

  graphics        > inclusion > checking conversion of 'testfig.1', fullname 'testfig.1', old format 'mps', new format 'pdf', conversion 'default', resolution 'default'
  graphics        > inclusion > no converter for 'mps' to 'pdf'
  [MP to PDF]
  graphics        > inclusion > checking conversion of 'testfig-1.pdf', fullname 'testfig-1.pdf', old format 'pdf', new format 'pdf', conversion 'default', resolution 'default'
  graphics        > inclusion > no converter for 'pdf' to 'pdf'
  graphics        > inclusion > new graphic, using hash 'testfig-1.pdf->1->crop->unknown->unknown->unknown->'

(Though I don't believe the "no converter for 'mps' to 'pdf'" diagnostic.)

This is with Context 2013.05.28 00:36 MKIV (TL2013 on Debian).

-Sanjoy
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 20:26 internal mptopdf converter skips some glyphs in labels Sanjoy Mahajan
@ 2013-08-09 20:41 ` Aditya Mahajan
  2013-08-09 23:50   ` Sanjoy Mahajan
  2013-08-09 21:50 ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2013-08-09 20:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 9 Aug 2013, Sanjoy Mahajan wrote:

> The internal mptopdf converter in MkIV omit some glyphs in the labels.
> Here's a minimal example (test.tex):
>
> \starttext
>
> \externalfigure[testfig.1][frame=on]
> \blank
> \externalfigure[testfig-1.pdf][frame=on]
>
> \stoptext
>
> And testfig.1 is produced by testfig.mp

Any particular reason that you are compiling metapost files using mp and 
then including them in ConTeXt rather than directly using any one of the 
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, 
\processMPbuffer, etc.)

> beginfig(1)
> label(btex $\Omega$ etex, (0,0));
> currentpicture := currentpicture scaled 5;
> endfig;
> end
>
> Here's testfig.1 to save a step in debugging:
>
> %!PS
> %%BoundingBox: -18 -18 18 18
> %%HiResBoundingBox: -17.98805 -17.0195 17.98798 17.0195
> %%Creator: MetaPost 1.803
> %%CreationDate: 2013.08.09:1612
> %%Pages: 1
> %*Font: cmr10 49.81323 9.96265 0a:8
> %%BeginProlog
> %%EndProlog
> %%Page: 1 1
> 0 0 0 setrgbcolor
> -17.98805 -17.0195 moveto
> (\012) cmr10 49.81323 fshow
> showpage
> %%EOF
>
> Then do:
>
>  mptopdf testfig.1
>  context test.tex
>  xpdf test.pdf
>
> The first framed box, using the internal mps->pdf conversion, is empty.
> The second framed go, using the pdf file produced by mptopdf, correctly
> contains \Omega.

Try adding

     prologues := 2;

or

     prologues := 3;

in your mp file.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 20:26 internal mptopdf converter skips some glyphs in labels Sanjoy Mahajan
  2013-08-09 20:41 ` Aditya Mahajan
@ 2013-08-09 21:50 ` Hans Hagen
  2013-08-09 23:45   ` Sanjoy Mahajan
  2014-06-05  2:17   ` Sanjoy Mahajan
  1 sibling, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2013-08-09 21:50 UTC (permalink / raw)
  To: ntg-context

On 8/9/2013 10:26 PM, Sanjoy Mahajan wrote:

> With \enabletrackers[graphics.conversion,graphics.inclusion], the log
> has the following lines, none of which seem to pinpoint the problem:
>
>    graphics        > inclusion > checking conversion of 'testfig.1', fullname 'testfig.1', old format 'mps', new format 'pdf', conversion 'default', resolution 'default'
>    graphics        > inclusion > no converter for 'mps' to 'pdf'
>    [MP to PDF]
>    graphics        > inclusion > checking conversion of 'testfig-1.pdf', fullname 'testfig-1.pdf', old format 'pdf', new format 'pdf', conversion 'default', resolution 'default'
>    graphics        > inclusion > no converter for 'pdf' to 'pdf'
>    graphics        > inclusion > new graphic, using hash 'testfig-1.pdf->1->crop->unknown->unknown->unknown->'
>
> (Though I don't believe the "no converter for 'mps' to 'pdf'" diagnostic.)

don't worry .. that concerns an additional plugin (one can plug in 
downsamplers and so)

> This is with Context 2013.05.28 00:36 MKIV (TL2013 on Debian).

the beta works ok .. are there any messages with respect to missing 
fonts or map files?

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 21:50 ` Hans Hagen
@ 2013-08-09 23:45   ` Sanjoy Mahajan
  2014-06-05  2:17   ` Sanjoy Mahajan
  1 sibling, 0 replies; 12+ messages in thread
From: Sanjoy Mahajan @ 2013-08-09 23:45 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> the beta works ok .. are there any messages with respect to missing 
> fonts or map files?

I got rid of page numbering and added a few more trackers:

\enabletrackers[graphics.conversion,graphics.inclusion,fonts.mapfiles,fonts.loading,fonts.missing,fonts.mapping]
\setuppagenumbering[location=]

The log file didn't look strange (I've included it below).  I also
changed the label to btex $1$ etex (intead of $\Omega$), which works
fine, and diffed the context log files when making test.pdf with the
$\Omega$ figure and the $1$ figure.  The only difference is at line 132,
where the $1$ version loads cmr10.pfb

) )</usr/local/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>

which makes sense, since "1" is in cmr10, and the conversion of
testfig.1 must have figured out that cmr10 was needed.  But in the
$\Omega$ version, no font file is loaded.  

Probably it should have loaded (and reported <blah.otf> in the log file)
this file:

/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf

Does this help track down the problem in the jungle of map files and paths?

-Sanjoy

(/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2013.8.6  int: english/english

system          > 'cont-new.mkiv' loaded
(/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv)
system          > files > jobname 'test', input './test', result 'test'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
(/home/sanjoy/sfse/test.tex
fonts           > mapfiles > loading map file 'mkiv-base.map'
{/usr/local/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown library 'loc'
fonts           > mapfiles > loading map file 'lm-math.map'
{/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-math.map}
fonts           > mapfiles > loading map file 'lm-rm.map'
{/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-rm.map}
fonts           > defining > memory usage before: 29 MB (ctx: 28 MB)
fonts           > defining > start stage one: Serif sa 1
fonts           > defining > specification 'Serif sa 1', lookup 'file', name 'Serif', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: LMRoman-Regular (size 786432)
fonts           > defining > remapping name 'LMRoman-Regular', specification 'auto', size 786432, designsize 'file:lmroman12-regular'
fonts           > defining > trying (reader sequence driven) type 'otf' for 'lmroman12-regular' with file ''
fonts           > otf loading > loading from cache using hash 'lmroman12-regular'
fonts           > otf loading > apply enhancement 'unpack' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf'
fonts           > otf loading > apply enhancement 'add dimensions' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf'
fonts           > defining > defining tfm, name 'lmroman12-regular', fullname 'LMRoman12-Regular', filename '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf', hscale 786.432, vscale 786.432, math 'disabled', italics 'enabled'
fonts           > defining > registering 'lmroman12-regular' as 'otf', used 'lmroman12-regular.otf'
fonts           > defining > loaded and hashed: lmroman12-regular @ normal:curs=true+kern=true+liga=true+mark=true+mkmk=true+mode=auto+script=auto+tlig=true+trep=true @ 786432
fonts           > defining > using opentype font with id '', name 'lmroman12-regular', size 786432, bytes 2, encoding '', fullname 'LMRoman12-Regular', filename 'lmroman12-regular.otf'
fonts           > defining > registering font, id 1, hash 'lmroman12-regular @ normal:curs=true+kern=true+liga=true+mark=true+mkmk=true+mode=auto+script=auto+tlig=true+trep=true @ 786432'
fonts           > defining > defining 'lmroman12-regular', id 1, target 'modern-designsize-12pt-rm-tf-0--0', features '' / 'default', fallbacks '' / ''
fonts           > defining > memory usage after: 30 MB (ctx: 29 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 30 MB (ctx: 29 MB)
fonts           > defining > start stage one: MathRoman mo 1
fonts           > defining > specification 'MathRoman mo 1', lookup 'file', name 'MathRoman', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 458752)
fonts           > otf loading > loading from cache using hash 'latinmodern-math'
fonts           > otf loading > apply enhancement 'unpack' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > otf loading > apply enhancement 'add dimensions' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > defining > defining tfm, name 'latinmodern-math', fullname 'LatinModernMath-Regular-2', filename '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf', hscale 393.216, vscale 393.216, math 'enabled', italics 'enabled'
fonts           > defining > registering 'latinmodern-math' as 'otf', used 'latinmodern-math.otf'
fonts           > defining > loaded and hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=2+tlig=true+trep=true @ 458752
fonts           > defining > using opentype font with id '', name 'latinmodern-math', size 393216, bytes 2, encoding '', fullname 'LatinModernMath-Regular-2', filename 'latinmodern-math.otf'
fonts           > defining > registering font, id 2, hash 'latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=2+tlig=true+trep=true @ 458752'
fonts           > defining > defining 'latinmodern-math-regular.otf', id 2, target 'modern-designsize-12pt-mm-mr--3', features '' / 'math-scriptscript,lm-math', fallbacks '' / ''
fonts           > defining > memory usage after: 34 MB (ctx: 33 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 34 MB (ctx: 33 MB)
fonts           > defining > start stage one: MathRoman mo 1
fonts           > defining > specification 'MathRoman mo 1', lookup 'file', name 'MathRoman', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 589824)
fonts           > otf loading > loading from cache using hash 'latinmodern-math'
fonts           > otf loading > apply enhancement 'unpack' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > otf loading > apply enhancement 'add dimensions' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > defining > defining tfm, name 'latinmodern-math', fullname 'LatinModernMath-Regular-3', filename '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf', hscale 550.5024, vscale 550.5024, math 'enabled', italics 'enabled'
fonts           > defining > registering 'latinmodern-math' as 'otf', used 'latinmodern-math.otf'
fonts           > defining > loaded and hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=1+tlig=true+trep=true @ 589824
fonts           > defining > using opentype font with id '', name 'latinmodern-math', size 550502.4, bytes 2, encoding '', fullname 'LatinModernMath-Regular-3', filename 'latinmodern-math.otf'
fonts           > defining > registering font, id 3, hash 'latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=1+tlig=true+trep=true @ 589824'
fonts           > defining > defining 'latinmodern-math-regular.otf', id 3, target 'modern-designsize-12pt-mm-mr--2', features '' / 'math-script,lm-math', fallbacks '' / ''
fonts           > defining > memory usage after: 35 MB (ctx: 34 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 35 MB (ctx: 34 MB)
fonts           > defining > start stage one: MathRoman mo 1
fonts           > defining > specification 'MathRoman mo 1', lookup 'file', name 'MathRoman', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 786432)
fonts           > otf loading > loading from cache using hash 'latinmodern-math'
fonts           > otf loading > apply enhancement 'unpack' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > otf loading > apply enhancement 'add dimensions' to file '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf'
fonts           > defining > defining tfm, name 'latinmodern-math', fullname 'LatinModernMath-Regular-4', filename '/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf', hscale 786.432, vscale 786.432, math 'enabled', italics 'enabled'
fonts           > defining > registering 'latinmodern-math' as 'otf', used 'latinmodern-math.otf'
fonts           > defining > loaded and hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mode=base+script=math+ssty=false+tlig=true+trep=true @ 786432
fonts           > defining > using opentype font with id '', name 'latinmodern-math', size 786432, bytes 2, encoding '', fullname 'LatinModernMath-Regular-4', filename 'latinmodern-math.otf'
fonts           > defining > registering font, id 4, hash 'latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mode=base+script=math+ssty=false+tlig=true+trep=true @ 786432'
fonts           > defining > defining 'latinmodern-math-regular.otf', id 4, target 'modern-designsize-12pt-mm-mr--1', features '' / 'math-text,lm-math', fallbacks '' / ''
fonts           > defining > memory usage after: 36 MB (ctx: 36 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 36 MB (ctx: 36 MB)
fonts           > defining > start stage one: MathRomanBold mo 1
fonts           > defining > specification 'MathRomanBold mo 1', lookup 'file', name 'MathRomanBold', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 458752)
fonts           > defining > already hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=2+tlig=true+trep=true @ 458752
fonts           > defining > reusing latinmodern-math-regular.otf, id 2, target 'modern-designsize-12pt-mm-mb--3', features '' / 'math-scriptscript,lm-math', fallbacks '' / '', goodies '' / 'lm', designsize 'auto' / ''
fonts           > defining > memory usage after: 37 MB (ctx: 36 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 37 MB (ctx: 36 MB)
fonts           > defining > start stage one: MathRomanBold mo 1
fonts           > defining > specification 'MathRomanBold mo 1', lookup 'file', name 'MathRomanBold', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 589824)
fonts           > defining > already hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mathsize=true+mode=base+script=math+ssty=1+tlig=true+trep=true @ 589824
fonts           > defining > reusing latinmodern-math-regular.otf, id 3, target 'modern-designsize-12pt-mm-mb--2', features '' / 'math-script,lm-math', fallbacks '' / '', goodies '' / 'lm', designsize 'auto' / ''
fonts           > defining > memory usage after: 37 MB (ctx: 36 MB)
fonts           > defining > stop stage two
fonts           > defining > memory usage before: 37 MB (ctx: 36 MB)
fonts           > defining > start stage one: MathRomanBold mo 1
fonts           > defining > specification 'MathRomanBold mo 1', lookup 'file', name 'MathRomanBold', sub '', method '', detail ''
fonts           > defining > stop stage one
fonts           > defining > start stage two: file:latinmodern-math-regular.otf (size 786432)
fonts           > defining > already hashed: latinmodern-math @ normal:goodies=lm+kern=true+language=dflt+liga=true+mathalternates=true+mathitalics=true+mode=base+script=math+ssty=false+tlig=true+trep=true @ 786432
fonts           > defining > reusing latinmodern-math-regular.otf, id 4, target 'modern-designsize-12pt-mm-mb--1', features '' / 'math-text,lm-math', fallbacks '' / '', goodies '' / 'lm', designsize 'auto' / ''
fonts           > defining > memory usage after: 37 MB (ctx: 36 MB)
fonts           > defining > stop stage two
fonts           > 'fallback modern rm 12pt' is loaded
graphics        > inclusion > checking conversion of 'testfig.1', fullname 'testfig.1', old format 'mps', new format 'pdf', conversion 'default', resolution 'default'
graphics        > inclusion > no converter for 'mps' to 'pdf'
[MP to PDF]
fonts           > defining > specification 'cmr10', lookup 'file', name 'cmr10', sub '', method '', detail ''
fonts           > defining > trying (reader sequence driven) type 'otf' for 'cmr10' with file ''
fonts           > defining > trying (reader sequence driven) type 'ttf' for 'cmr10' with file ''
fonts           > defining > trying (reader sequence driven) type 'afm' for 'cmr10' with file ''
fonts           > afm loading > forcing afm format for '/usr/local/texlive/2013/texmf-dist/fonts/afm/public/amsfonts/cm/cmr10.afm'
fonts           > defining > defining tfm, name 'cmr10', fullname 'CMR10', filename '/usr/local/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb', hscale 3276.764, vscale 3276.764, math 'disabled', italics 'enabled'
fonts           > defining > registering 'cmr10' as 'afm', used 'cmr10.afm'
fonts           > defining > loaded and hashed: cmr10 @ unknown @ 3276764
fonts           > defining > registering font, id 5, hash 'cmr10 @ unknown @ 3276764'
fonts           > defining > using type1 font with id 5, name 'cmr10', size 3276764, bytes 2, encoding '', fullname 'CMR10', filename 'cmr10.pfb'
graphics        > inclusion > checking conversion of 'testfig-1.pdf', fullname 'testfig-1.pdf', old format 'pdf', new format 'pdf', conversion 'default', resolution 'default'
graphics        > inclusion > no converter for 'pdf' to 'pdf'
graphics        > inclusion > new graphic, using hash 'testfig-1.pdf->1->crop->unknown->unknown->unknown->'
backend         > xmp > using file '/usr/local/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml'
 <testfig-1.pdf>
pages           > flushing realpage 1, userpage 1
 ) )

system          > files > start used files

used files      >    1: filename=cont-yes.mkiv filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv usedmethod=otherwise
used files      >    2: filename=cont-new.mkiv filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv usedmethod=otherwise
used files      >    3: filename=lang-us.lua filetype=lua foundname=/usr/local/texlive/2013/texmf-dist/tex/context/patterns/lang-us.lua usedmethod=otherwise
used files      >    4: filename=/home/sanjoy/sfse/test foundname=/home/sanjoy/sfse/test.tex usedmethod=qualified
used files      >    5: filename=mkiv-base.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map usedmethod=database
used files      >    6: filename=lm.lfg filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/fonts/lm.lfg usedmethod=otherwise
used files      >    7: filename=lm-math.lfg filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/fonts/lm-math.lfg usedmethod=otherwise
used files      >    8: filename=lm-math.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-math.map usedmethod=database
used files      >    9: filename=lm-rm.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-rm.map usedmethod=database
used files      >   10: filename=lmroman12-regular filetype=otf format=otf foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used files      >   11: filename=latinmodern-math.otf filetype=opentypefonts foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used files      >   12: filename=latinmodern-math.otf filetype=otf format=otf foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used files      >   13: filename=testfig.1 format=tex foundname=testfig.1 usedmethod=direct
used files      >   14: filename=cmr10 filetype=afm format=afm foundname=/usr/local/texlive/2013/texmf-dist/fonts/afm/public/amsfonts/cm/cmr10.afm usedmethod=database
used files      >   15: filename=cmr10.pfb filetype=pfb format=pfb foundname=/usr/local/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb usedmethod=database
used files      >   16: filename=testfig-1.pdf format=tex foundname=testfig-1.pdf usedmethod=direct
used files      >   17: filename=lpdf-pdx.xml filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml usedmethod=otherwise

system          > files > stop used files


system          > structure > start used structure

used structure  > text: test

system          > structure > stop used structure


system          > files > start used files

used file       >    1: filename=cont-yes.mkiv filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv usedmethod=otherwise
used file       >    2: filename=cont-new.mkiv filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv usedmethod=otherwise
used file       >    3: filename=lang-us.lua filetype=lua foundname=/usr/local/texlive/2013/texmf-dist/tex/context/patterns/lang-us.lua usedmethod=otherwise
used file       >    4: filename=/home/sanjoy/sfse/test foundname=/home/sanjoy/sfse/test.tex usedmethod=qualified
used file       >    5: filename=mkiv-base.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map usedmethod=database
used file       >    6: filename=lm.lfg filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/fonts/lm.lfg usedmethod=otherwise
used file       >    7: filename=lm-math.lfg filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/fonts/lm-math.lfg usedmethod=otherwise
used file       >    8: filename=lm-math.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-math.map usedmethod=database
used file       >    9: filename=lm-rm.map filetype=map format=map foundname=/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-rm.map usedmethod=database
used file       >   10: filename=lmroman12-regular filetype=otf format=otf foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used file       >   11: filename=latinmodern-math.otf filetype=opentypefonts foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file       >   12: filename=latinmodern-math.otf filetype=otf format=otf foundname=/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file       >   13: filename=testfig.1 format=tex foundname=testfig.1 usedmethod=direct
used file       >   14: filename=cmr10 filetype=afm format=afm foundname=/usr/local/texlive/2013/texmf-dist/fonts/afm/public/amsfonts/cm/cmr10.afm usedmethod=database
used file       >   15: filename=cmr10.pfb filetype=pfb format=pfb foundname=/usr/local/texlive/2013/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb usedmethod=database
used file       >   16: filename=testfig-1.pdf format=tex foundname=testfig-1.pdf usedmethod=direct
used file       >   17: filename=lpdf-pdx.xml filetype=tex foundname=/usr/local/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml usedmethod=otherwise

system          > files > stop used files


system          > options > start commandline options

used option     > currentrun="1"
used option     > fulljobname="./test"
used option     > input="./test"
used option     > kindofrun="1"
used option     > maxnofruns="8"
used option     > no-parse-first-line="true"

system          > options > stop commandline options

system          > options > start commandline files

used file       >    1: ./test

system          > options > stop commandline files



mkiv lua stats  > used config file: selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable: '/usr/local/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9'
mkiv lua stats  > resource resolver: loadtime 0.149 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 17 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 329 modules (0.350 sec), 69 tables (0.000 sec), 398 chunks (0.350 sec)
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 9 lists of 441
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 9 attribute, 28 glue_spec, 3 attribute_list
mkiv lua stats  > node list callback tasks: 6 unique task lists, 5 instances (re)created, 59 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.002 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 177 direct, 186 indirect, 363 total
mkiv lua stats  > randomizer: resumed with value 0.54399479578435
mkiv lua stats  > lxml preparation time: 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, objectcompreslevel 3
mkiv lua stats  > loaded fonts: 3 files: cmr10.afm, latinmodern-math.otf (experimental), lmroman12-regular.otf
mkiv lua stats  > fonts load time: 0.311 seconds 
mkiv lua stats  > graphics processing time: 0.074 seconds including tex, 2 processed images
mkiv lua stats  > mps conversion time: 0.000 seconds, 1 conversions
mkiv lua stats  > luatex banner: this is luatex, version beta-0.76.0-2013061720  (tex live 2013) (rev 4627)
mkiv lua stats  > control sequences: 37371 of 65536 + 100000
mkiv lua stats  > current memory usage: 40 MB (ctx: 39 MB)
mkiv lua stats  > runtime: 0.794 seconds, 1 processed pages, 1 shipped pages, 1.259 pages/second



___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 20:41 ` Aditya Mahajan
@ 2013-08-09 23:50   ` Sanjoy Mahajan
  2013-08-10  0:09     ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Sanjoy Mahajan @ 2013-08-09 23:50 UTC (permalink / raw)
  To: Aditya Mahajan, mailing list for ConTeXt users

> Try adding
>      prologues := 2;
> or
>      prologues := 3;
> in your mp file.
>

Good thought, which I tried, though neither setting resolved the
problem.

> Any particular reason that you are compiling metapost files using mp and 
> then including them in ConTeXt rather than directly using any one of the 
> inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, 
> \processMPbuffer, etc.)

Mostly conservatism.  I cannot quite figure out the canonical
replacement for btex ... etex (textext, sometext?), and then I get
confused by the many possible environments.

What do you recommend as the best btex...etex replacement and the best
environment for replacing a standalong metapost figure (that I would
otherwise just include with \externalfigure)?

-Sanjoy
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 23:50   ` Sanjoy Mahajan
@ 2013-08-10  0:09     ` Aditya Mahajan
  0 siblings, 0 replies; 12+ messages in thread
From: Aditya Mahajan @ 2013-08-10  0:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 9 Aug 2013, Sanjoy Mahajan wrote:

>> Try adding
>>      prologues := 2;
>> or
>>      prologues := 3;
>> in your mp file.
>>
>
> Good thought, which I tried, though neither setting resolved the
> problem.
>
>> Any particular reason that you are compiling metapost files using mp and
>> then including them in ConTeXt rather than directly using any one of the
>> inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
>> \processMPbuffer, etc.)
>
> Mostly conservatism.  I cannot quite figure out the canonical
> replacement for btex ... etex (textext, sometext?), and then I get
> confused by the many possible environments.
>
> What do you recommend as the best btex...etex replacement

Nothing. Just leave them as it is and MkIV is smart enough to process 
them [^1]. If you used the TEX macros (to build strings with metapost 
variables), use textext("...") instead of TEX("....").

> and the best
> environment for replacing a standalong metapost figure (that I would
> otherwise just include with \externalfigure)?

I use the following:

\startcomponent figures

\startbuffer[system-1]
  ... mp code ..
\stopbuffer

% Other figures in separate buffer

\stopcomponent

and then use

\processMPbuffer[list of buffers]

to typeset them [^2]. With this approach you loose some of the features of 
\externalfigure (scaling, backgrounds, etc.) For scaling, you can use

   \scale[....]{\processMPbuffer[...]}


and if you really need a background, you can use \framed.

Another option is to use \startMPcode .... \stopMPcode environment, but I 
usually like my figures to be separate files.

[^1]: To process btex ... etex, the content of each metapost 
environment is processed twice. This can sometimes lead to unexpected 
results. Basically you have to careful with := vs =, otherwise you'll get 
inconsistent equations.

[^2]: You also need to keep in mind that all metapost graphics are 
processed in a single run (think of a single mp file with multiple 
beginfigs). So you have to be careful with initializing and resetting 
variables (\startMPinclusions, \startMPinitializations, 
\startMPdefinitions, see wiki for difference) or adding bgroup ... egroup 
at appropriate location to limit scope.

Another way to avoid interference is to use separate MPinstances, but in 
my opinion that feature is more useful to module writers than normal 
users.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2013-08-09 21:50 ` Hans Hagen
  2013-08-09 23:45   ` Sanjoy Mahajan
@ 2014-06-05  2:17   ` Sanjoy Mahajan
  2014-06-05  8:04     ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: Sanjoy Mahajan @ 2014-06-05  2:17 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> writes:

>> This is with Context 2013.05.28 00:36 MKIV (TL2013 on Debian).
>
> the beta works ok .. are there any messages with respect to missing 
> fonts or map files?

FYI, with recent betas (2014.05.17 from a context standalone or
2014.05.21 from Debian TL2014), I still find the problem with the
internal mptopdf converter dropping glyphs.  I work around it in the
Makefile (convert using mptopdf externally).  However, in case it is
worth tracking down, here is the original report with the minimal
example.

==================

The internal mptopdf converter in MkIV omits some glyphs in the labels.
Here's a minimal example (test.tex):

\starttext

\externalfigure[testfig.1][frame=on]
\blank
\externalfigure[testfig-1.pdf][frame=on]

\stoptext

And testfig.1 is produced by testfig.mp

beginfig(1)
label(btex $\Omega$ etex, (0,0));
currentpicture := currentpicture scaled 5;
endfig;
end

Here's testfig.1 to save a step in debugging:

%!PS
%%BoundingBox: -18 -18 18 18 
%%HiResBoundingBox: -17.98805 -17.0195 17.98798 17.0195 
%%Creator: MetaPost 1.803
%%CreationDate: 2013.08.09:1612
%%Pages: 1
%*Font: cmr10 49.81323 9.96265 0a:8
%%BeginProlog
%%EndProlog
%%Page: 1 1
 0 0 0 setrgbcolor
-17.98805 -17.0195 moveto
(\012) cmr10 49.81323 fshow
showpage
%%EOF

Then do:

  mptopdf testfig.1
  context test.tex
  xpdf test.pdf

The first framed box, using the internal mps->pdf conversion, is empty.
The second framed go, using the pdf file produced by mptopdf, correctly
contains \Omega.

==================
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2014-06-05  2:17   ` Sanjoy Mahajan
@ 2014-06-05  8:04     ` Hans Hagen
  2014-06-05 19:37       ` Sanjoy Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2014-06-05  8:04 UTC (permalink / raw)
  To: Sanjoy Mahajan, ntg-context

On 6/5/2014 4:17 AM, Sanjoy Mahajan wrote:
> Hans Hagen <pragma@wxs.nl> writes:
>
>>> This is with Context 2013.05.28 00:36 MKIV (TL2013 on Debian).
>>
>> the beta works ok .. are there any messages with respect to missing
>> fonts or map files?
>
> FYI, with recent betas (2014.05.17 from a context standalone or
> 2014.05.21 from Debian TL2014), I still find the problem with the
> internal mptopdf converter dropping glyphs.  I work around it in the
> Makefile (convert using mptopdf externally).  However, in case it is
> worth tracking down, here is the original report with the minimal
> example.

you see the message:

LuaTeX warning (file cmr10): Font cmr10 at 3000 not found

so you need to load a map file that matches the used fonts:

\loadmapfile[mkiv-base]


> ==================
>
> The internal mptopdf converter in MkIV omits some glyphs in the labels.
> Here's a minimal example (test.tex):
>
> \starttext
>
> \externalfigure[testfig.1][frame=on]
> \blank
> \externalfigure[testfig-1.pdf][frame=on]
>
> \stoptext
>
> And testfig.1 is produced by testfig.mp
>
> beginfig(1)
> label(btex $\Omega$ etex, (0,0));
> currentpicture := currentpicture scaled 5;
> endfig;
> end
>
> Here's testfig.1 to save a step in debugging:
>
> %!PS
> %%BoundingBox: -18 -18 18 18
> %%HiResBoundingBox: -17.98805 -17.0195 17.98798 17.0195
> %%Creator: MetaPost 1.803
> %%CreationDate: 2013.08.09:1612
> %%Pages: 1
> %*Font: cmr10 49.81323 9.96265 0a:8
> %%BeginProlog
> %%EndProlog
> %%Page: 1 1
>   0 0 0 setrgbcolor
> -17.98805 -17.0195 moveto
> (\012) cmr10 49.81323 fshow
> showpage
> %%EOF
>
> Then do:
>
>    mptopdf testfig.1
>    context test.tex
>    xpdf test.pdf
>
> The first framed box, using the internal mps->pdf conversion, is empty.
> The second framed go, using the pdf file produced by mptopdf, correctly
> contains \Omega.
>
> ==================
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2014-06-05  8:04     ` Hans Hagen
@ 2014-06-05 19:37       ` Sanjoy Mahajan
  2014-06-05 20:25         ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Sanjoy Mahajan @ 2014-06-05 19:37 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> you see the message:
> LuaTeX warning (file cmr10): Font cmr10 at 3000 not found

You are right, though I had unwisely ignored it (weak excuse below).

> so you need to load a map file that matches the used fonts:
> \loadmapfile[mkiv-base]

That does fix it, thanks.

The warning message, which is helpful, seems to happen only with a
relatively recent LuaTeX.  In my earlier tests, with 0.78, there wasn't
a message, and also with the luatex in Debian's TL2014 there isn't one
(which is why I ignored it).

Debian's TL has luatex beta-0.79.1 (TeX Live 2014/Debian) (rev 4971)

The version in the context standalone is just a bit later:

beta-0.79.1 (TeX Live 2014/dev) (rev 4972) 

Hard to believe that one svn revision makes all the difference, but
maybe it does.

-Sanjoy
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2014-06-05 19:37       ` Sanjoy Mahajan
@ 2014-06-05 20:25         ` Hans Hagen
  2014-06-05 21:27           ` Sanjoy Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2014-06-05 20:25 UTC (permalink / raw)
  To: Sanjoy Mahajan, ntg-context

On 6/5/2014 9:37 PM, Sanjoy Mahajan wrote:
> Hans Hagen <pragma@wxs.nl> writes:
>
>> you see the message:
>> LuaTeX warning (file cmr10): Font cmr10 at 3000 not found
>
> You are right, though I had unwisely ignored it (weak excuse below).
>
>> so you need to load a map file that matches the used fonts:
>> \loadmapfile[mkiv-base]
>
> That does fix it, thanks.
>
> The warning message, which is helpful, seems to happen only with a
> relatively recent LuaTeX.  In my earlier tests, with 0.78, there wasn't
> a message, and also with the luatex in Debian's TL2014 there isn't one
> (which is why I ignored it).
>
> Debian's TL has luatex beta-0.79.1 (TeX Live 2014/Debian) (rev 4971)
>
> The version in the context standalone is just a bit later:
>
> beta-0.79.1 (TeX Live 2014/dev) (rev 4972)
>
> Hard to believe that one svn revision makes all the difference, but
> maybe it does.

I've added a "--mapfiles" option to "mtxrun --script metapost" (the more 
modern replacement for mptopdf) and default to some base map files. Will 
be in next beta. In context itself (when embedding such graphics) one 
still need to include those map files. However, when
using mp graphics in context, it makes much more sense to define them 
runtime.

Alternatively, you can consider making your mp graphics like this:

\startMPpage
   some code
\stopMPpage

This will use the regular font system, gives access to everything 
context as well, and makes it possible to opentype fonts. The resulting 
(cropped) graphic can of course be included. One can also have more of 
them:

\starttext

\startMPpage
   some code
\stopMPpage

\startMPpage
   some code
\stopMPpage

\stoptext

and include the pages selectively.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2014-06-05 20:25         ` Hans Hagen
@ 2014-06-05 21:27           ` Sanjoy Mahajan
  2014-06-05 23:19             ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Sanjoy Mahajan @ 2014-06-05 21:27 UTC (permalink / raw)
  To: Hans Hagen, ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> Alternatively, you can consider making your mp graphics like this:
>
> \startMPpage
>    some code
> \stopMPpage
>
> This will use the regular font system, gives access to everything 
> context as well, and makes it possible to opentype fonts. The resulting 
> (cropped) graphic can of course be included. One can also have more of 
> them:

That's an improvement on what I am doing.  (Though I may be getting lots
of ConTeXt and OpenType fonts, by using a preamble with

  verbatimtex %&cont-en
  ...
  etex

)

Right now my figure source (blah.mpfig, say) is what would go in between
begin/endfig.  The Makefile wraps it in begin/endfig, and includes a
header.mp with all the definitions hopefully consistent with the main
document's environment (terrible, I know), writes out blah.mp, which is
run through metapost and mptopdf.

The disadvantage of incorparating everything into the .tex may be the
edit--compile cycle gets much longer for the figures, because you have
to compile the whole document or component to see the revised figure.
(My rule of thumb is that typing is about 10 times faster than
handwriting, unless one has to do equations, in which case you lose a
factor of 3; or if you have to make figures, in which case you lose the
other factor of 3 (3^2=10), and maybe more.)

-Sanjoy
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: internal mptopdf converter skips some glyphs in labels
  2014-06-05 21:27           ` Sanjoy Mahajan
@ 2014-06-05 23:19             ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2014-06-05 23:19 UTC (permalink / raw)
  To: Sanjoy Mahajan, ntg-context

On 6/5/2014 11:27 PM, Sanjoy Mahajan wrote:
> Hans Hagen <pragma@wxs.nl> writes:
>
>> Alternatively, you can consider making your mp graphics like this:
>>
>> \startMPpage
>>     some code
>> \stopMPpage
>>
>> This will use the regular font system, gives access to everything
>> context as well, and makes it possible to opentype fonts. The resulting
>> (cropped) graphic can of course be included. One can also have more of
>> them:
>
> That's an improvement on what I am doing.  (Though I may be getting lots
> of ConTeXt and OpenType fonts, by using a preamble with
>
>    verbatimtex %&cont-en
>    ...
>    etex
>
> )

I must admit that I never use verbatimtex (nor btex/etex).

> Right now my figure source (blah.mpfig, say) is what would go in between
> begin/endfig.  The Makefile wraps it in begin/endfig, and includes a
> header.mp with all the definitions hopefully consistent with the main
> document's environment (terrible, I know), writes out blah.mp, which is
> run through metapost and mptopdf.

Including environments and styles is easier when you run the mp graphic 
as context file. Just \environment ... will do.

> The disadvantage of incorparating everything into the .tex may be the
> edit--compile cycle gets much longer for the figures, because you have
> to compile the whole document or component to see the revised figure.
> (My rule of thumb is that typing is about 10 times faster than
> handwriting, unless one has to do equations, in which case you lose a
> factor of 3; or if you have to make figures, in which case you lose the
> other factor of 3 (3^2=10), and maybe more.)

That is only true if you can produce content at high speed -) Otherwise 
the ratio typing - thinking - making up text etc is not that good.

Are you sure' it's 'much' longer? You can still put graphics in external 
files, or use \useMPgraphic etc ... Running mp in context (luatex) is 
pretty fast (esp when your viewer refreshes fast too). And when at some 
point you want to use the new lua extension in mp you can only run it 
that way.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-06-05 23:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09 20:26 internal mptopdf converter skips some glyphs in labels Sanjoy Mahajan
2013-08-09 20:41 ` Aditya Mahajan
2013-08-09 23:50   ` Sanjoy Mahajan
2013-08-10  0:09     ` Aditya Mahajan
2013-08-09 21:50 ` Hans Hagen
2013-08-09 23:45   ` Sanjoy Mahajan
2014-06-05  2:17   ` Sanjoy Mahajan
2014-06-05  8:04     ` Hans Hagen
2014-06-05 19:37       ` Sanjoy Mahajan
2014-06-05 20:25         ` Hans Hagen
2014-06-05 21:27           ` Sanjoy Mahajan
2014-06-05 23:19             ` Hans Hagen

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