Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread George N. White III
On 4/16/07, Sanjoy Mahajan [EMAIL PROTECTED] wrote:

  can also try to create the pd file by hand with dvips -Ppdf test,
  that gave a correct output on my system.

 Thanks, that works.  I guess -Ppdf tells it to use map files that find
 the type1 fonts, so cmr in the metapost figures is replaced by the
 lmodern .pfb.  Oh, that's not what happens: it instead finds the
 cmr10.pfb and includes it correctly.  So the final document uses
 lmodern for the page number (from the ConTeXt src file) and cmr10 for
 the 'hello' from the metapost figure.

This is a hint that the underlying problem is related to map files.  With the
lm-rep maps the cm hello should become lmodern.

 Though I'm a bit scared of -Ppdf from years ago when I think it caused
 encoding problems.  A few characters didn't show up correctly in the
 pdf file, but only when using non-cmr fonts.

I think that was fixed long ago, but I rarely use .dvi anymore.

-- 
George N. White III [EMAIL PROTECTED]
Head of St. Margarets Bay, Nova Scotia
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread Sanjoy Mahajan
George N. White III [EMAIL PROTECTED] wrote:
 Your ConTeXt example is using the default latin modern fonts.  The
 reason the mpost files work with plain TeX is that the cm fonts are
 being used by plain tex, so the fonts are already defined in the .ps
 file when the font commands in the figure file are found.

That's 95% of the story, but I think with a small addendum.  e.g. If
the .tex file uses only cmr10 but fig.1 file uses cmsy7 for a
subscript, dvips will handle it correctly and download cmsy7 into the
.ps file.  So it's not only that the fonts are defined in the .ps
file, but that dvips knows how to handle the inclusion correctly when
the font is listed in a fig.1 embedded by plain TeX.

 For debian, the procedure for changing updmap.cnf has been debianized,
 but it is mentioned in the README for the lmodern package

Thanks, I didn't know about that.  The directions are easy enough to
do, esp. on an Ubuntu system.

Though I prefer to use the vanilla system, so that I can test the
distributions to see what works and breaks, and try to get the
upstream folks to fix it.  Although, I'm not sure who is the relevant
upstream here.  Mojca (off-list) suggested trying an older ConText and
I'll try that.

Meanwhile I'll put the 'dvips -Ppdf' workaround into my Makefiles.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread Sanjoy Mahajan
 I think that was fixed long ago, but I rarely use .dvi anymore.

Nor me except for arxiv.org.  By the way, the next email will have
directions on how to submit ConText documents to arxiv.org.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread Taco Hoekwater
Sanjoy Mahajan wrote:
 A font-embedding issue puzzles me.  First I make a metapost figure that
 uses plain tex for the label, so it uses cmr10.  Then I include it in a
 context document to get a .ps file.  The problem is that the label shows
 up in Courier (which ghostscript uses when it cannot find the font, I
 think).
 
 Here is the test.tex 
 
   \starttext
   \externalfigure[fig.1]
   \stoptext
 
 and this fig.mp
 
   beginfig(1)
   label(btex hello etex, origin);
   endfig;
   end
 
 The commands are:
 
   mpost fig
   texexec --ps test
   gv test.ps

If you set prologues := 1 in the mp file, that should help.

In a new metapost (texlive2007) you can even generate an
image with the font included by using prologues := 3.

Best, Taco



___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread Sanjoy Mahajan
 If you set prologues := 1 in the mp file, that should help.

That still gave Courier fonts after including fig.1 in test.ps.

 In a new metapost (texlive2007) you can even generate an
 image with the font included by using prologues := 3.

That worked.  [I'm using MetaPost 0.993 (Web2C 7.5.6) from the Debian
texlive2007-2 packages.]

From p.24 of the corresponding mpman.pdf manual:

   It is worth noting that the default value prologues:=0 is
   sufficient for graphics included in TEX-based documents.

Does that need a slight exception added to it?  Or have I
misconfigured something in the toolchain from .tex + .mp to .ps?  By
the way, the figure works fine with prologues := 0 if I include it
(using epsf.tex) in a plain-TeX document.

So I think there's something slightly off about what ConTeXt is doing.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread Sanjoy Mahajan
 Since they are not going to process the source, how about generating a 
 pdf and then converting the pdf into ps.

That's a good idea.  I'll do that or set prologues := 3 if I cannot
figure out what change I need to make in the ConTeXt configuration.
I'd like to figure out what's wrong with the dvi-ps route, especially
if someday arxiv.org supports ConTeXt.

By the way, if enough arxiv.org users request ConTeXt support, they
might provide it...

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread George N. White III
On 4/15/07, Sanjoy Mahajan [EMAIL PROTECTED] wrote:

  If you set prologues := 1 in the mp file, that should help.

 That still gave Courier fonts after including fig.1 in test.ps.

  In a new metapost (texlive2007) you can even generate an
  image with the font included by using prologues := 3.

 That worked.  [I'm using MetaPost 0.993 (Web2C 7.5.6) from the Debian
 texlive2007-2 packages.]

 From p.24 of the corresponding mpman.pdf manual:

It is worth noting that the default value prologues:=0 is
sufficient for graphics included in TEX-based documents.

 Does that need a slight exception added to it?  Or have I
 misconfigured something in the toolchain from .tex + .mp to .ps?  By
 the way, the figure works fine with prologues := 0 if I include it
 (using epsf.tex) in a plain-TeX document.

Your ConTeXt example is using the default latin modern fonts.  The reason
the mpost files work with plain TeX is that the cm fonts are being
used by plain tex, so
the fonts are already defined in the .ps file when the font commands
in the figure file
are found.

 So I think there's something slightly off about what ConTeXt is doing.

On my systems I have modified the map files to use the lm-rep map
files (so cm fonts are replaced by lm fonts).  Your example works for
me with TL2007 on FC5 in both plain tex and context.  In context, I
see:

TeXUtil | tuo file saved
This is dvips(k) 5.96 Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2007.04.15:1332' - t.ps
tex.prolm-ec.enclm-rep-cmrm.encfinclude.protexps.prospecial.pro.
lmr10.pfblmr12.pfb[1./fig.1]
TeXExec | runtime: 6.214806

The resulting .ps file has:

%%BeginFont: CMR10
%!PS-AdobeFont-1.0: LMRoman10-Regular 1.010

while for plain tex (using dvips -P pdf ...):
This is dvips(k) 5.96 Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2007.04.15:1327' - pt.ps
tex.proalt-rule.prolm-rep-cmrm.encfinclude.protexps.pro
special.pro. lmr10.pfb[1fig.1]

For debian, the procedure for changing updmap.cnf has been debianized,
but it is mentioned in the README for the lmodern package (watch out
for a typo in the example entry:  test -- text).   If you do
this, you might want to include the following:

$ cat lm-subset-ams.map
# AMS fonts not provided by lm-rep
# needed with the lm-rep maps to avoid duplicate entries from the ams maps
# msbm
msbm5 MSBM5 msbm5.pfb
msbm6 MSBM7 msbm7.pfb
msbm7 MSBM7 msbm7.pfb
msbm8 MSBM7 msbm7.pfb
msbm9 MSBM10 msbm10.pfb
msbm10 MSBM10 msbm10.pfb

-- 
George N. White III [EMAIL PROTECTED]
Head of St. Margarets Bay, Nova Scotia
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread Wolfgang Schuster
On Sun, 15 Apr 2007 16:23:35 +0100
Sanjoy Mahajan [EMAIL PROTECTED] wrote:

  If you set prologues := 1 in the mp file, that should help.
 
 That still gave Courier fonts after including fig.1 in test.ps.
 
  In a new metapost (texlive2007) you can even generate an
  image with the font included by using prologues := 3.
 
 That worked.  [I'm using MetaPost 0.993 (Web2C 7.5.6) from the Debian
 texlive2007-2 packages.]
 
 From p.24 of the corresponding mpman.pdf manual:
 
It is worth noting that the default value prologues:=0 is
sufficient for graphics included in TEX-based documents.
 
 Does that need a slight exception added to it?  Or have I
 misconfigured something in the toolchain from .tex + .mp to .ps?  By
 the way, the figure works fine with prologues := 0 if I include it
 (using epsf.tex) in a plain-TeX document.
 
 So I think there's something slightly off about what ConTeXt is doing.
 
 -Sanjoy
 

Hi Sanjoy,

can also try to create the pd file by hand with dvips -Ppdf test,
that gave a correct output on my system.

The texexec way used Courier in the PS-File, the dvips use cmr10 in the
PS-File.

Wolfgang
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-15 Thread Sanjoy Mahajan
 can also try to create the pd file by hand with dvips -Ppdf test,
 that gave a correct output on my system.

Thanks, that works.  I guess -Ppdf tells it to use map files that find
the type1 fonts, so cmr in the metapost figures is replaced by the
lmodern .pfb.  Oh, that's not what happens: it instead finds the
cmr10.pfb and includes it correctly.  So the final document uses
lmodern for the page number (from the ConTeXt src file) and cmr10 for
the 'hello' from the metapost figure.

Though I'm a bit scared of -Ppdf from years ago when I think it caused
encoding problems.  A few characters didn't show up correctly in the
pdf file, but only when using non-cmr fonts.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-14 Thread Sanjoy Mahajan
A font-embedding issue puzzles me.  First I make a metapost figure that
uses plain tex for the label, so it uses cmr10.  Then I include it in a
context document to get a .ps file.  The problem is that the label shows
up in Courier (which ghostscript uses when it cannot find the font, I
think).

Here is the test.tex 

  \starttext
  \externalfigure[fig.1]
  \stoptext

and this fig.mp

  beginfig(1)
  label(btex hello etex, origin);
  endfig;
  end

The commands are:

  mpost fig
  texexec --ps test
  gv test.ps

The resulting fig.1 has these lines:

  %*Font: cmr10 9.96265 9.96265 65:912
  ...
  (hello) cmr10 9.96265 fshow

and test.ps has

  %%DocumentFonts: LMRoman12-Regular CMR10

But there's no cmr10 (lowercase) embedded in test.ps.  If I generate
test.pdf directly (with texexec test), then all is well.

Is there a magic option or map file line that I need?

[ConTeXt  ver: 2007.03.19 11:20 MKII  fmt: 2007.4.12]

Thanks for any suggestions!  The reason I'm using dvi and ps is that
arxiv.org cannot handle ConTeXt submissions directly.  A workaround
recommended by the arxiv.org maintainers is to submit document.ps with
all the source files in a separate directory (but it won't let you
submit document.pdf with all the source files, a behavior that the
admins say is a bug or 'oddity' but not one that they'll fix soon).

-Sanjoy

`Intellectual property is intellectual theft.'
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-14 Thread Aditya Mahajan
On Sun, 15 Apr 2007, Sanjoy Mahajan wrote:

 A font-embedding issue puzzles me.  First I make a metapost figure that
 uses plain tex for the label, so it uses cmr10.  Then I include it in a
 context document to get a .ps file.  The problem is that the label shows
 up in Courier (which ghostscript uses when it cannot find the font, I
 think).

I get this all the time when I try to preview my mp figures in 
ghostview. I thought that this was because my system was misconfigured 
and never really bothered to go into the details.


 Thanks for any suggestions!  The reason I'm using dvi and ps is that
 arxiv.org cannot handle ConTeXt submissions directly.  A workaround
 recommended by the arxiv.org maintainers is to submit document.ps with
 all the source files in a separate directory (but it won't let you
 submit document.pdf with all the source files, a behavior that the
 admins say is a bug or 'oddity' but not one that they'll fix soon).

Since they are not going to process the source, how about generating a 
pdf and then converting the pdf into ps.

Aditya
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context