Re: [NTG-context] Metapost and TeX [OT]

2004-08-24 Thread Brooks Moses
On Mon, Aug 23, 2004 at 10:48:42PM -0400, [EMAIL PROTECTED] wrote:
 I don't have any experience in metapost.  I would appreciate if someone would
 please answer this question without me having to do thru tutorials and
 metapost source code.
 
 I was wondering how does metapost talk to TeX?  Quicky glancing through the
 metafun book, I found out that you can super-impose text typeset by
 TeX on top of a diagram.  I imagine you could do the same with
 mathematical equations too.

The following is as I understand it; others can I'm sure correct any
misunderstandings:

Metapost dumps out a TeX file, consisting of any header commands
specified in the Metapost file, and whatever is between btex and etex
tags.  It also puts in stuff so that what's between each pair of tags
gets put on its own page.  (This is actually done with the mpto command,
rather than in Metapost itself; if you just run that, you can examine
the output to see what TeX commands it uses.)

TeX is then run on this file, creating a .dvi file.

Metapost then reads in the .dvi file, using that to create the typeset
text that appears in the output Postscript file.

- Brooks

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


Re: [NTG-context] Metapost and TeX [OT]

2004-08-24 Thread Taco Hoekwater


[EMAIL PROTECTED] wrote:

 So how does it happen in reality?

Matthias' reply is better for your situation, but for curiosity's
sake, here is what actually happens:

- MetaPost is happily reading MetaPost commands when suddenly it sees
  a btex command.

- Now it will throw away everything upto the next etex, and it will
  run the external command makempx with the current filename as argument.
  
* makempx's goal is to create a file with the same name as it's argument, but
  with the extension replaced with .mpx. That file will contain a series of
  low-level MetaPost commands for each label in the source file, and 
  those lists of commands are separated by the MetaPost command mpxbreak.

* nothing is done by makempx if the mpx file exists and is newer than the  
  source file.

** otherwise, the source file is scanned for verbatimtex ... etex and btex ... etex
   blocks. These are wrapped in very simple TeX macros and written to a TeX input
   file.

** TeX is run, to produce a DVI file from these commands (each dvi page representing 
   a label)

** The entire DVI file is then converted into the .mpx file in a single action.

- MetaPost will now open the .mpx file as a concurrent source of commands
  linked to the current source file, and read commands from it up to the
  first mpxbreak.

- The location pointer in the .mpx file is saved for subsequent labels.

Greetings, Taco

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


Re: [NTG-context] Metapost and TeX [OT]

2004-08-24 Thread Hans Hagen
Brooks Moses wrote:
On Mon, Aug 23, 2004 at 10:48:42PM -0400, [EMAIL PROTECTED] wrote:
 

I don't have any experience in metapost.  I would appreciate if someone would
please answer this question without me having to do thru tutorials and
metapost source code.
I was wondering how does metapost talk to TeX?  Quicky glancing through the
metafun book, I found out that you can super-impose text typeset by
TeX on top of a diagram.  I imagine you could do the same with
mathematical equations too.
   

The following is as I understand it; others can I'm sure correct any
misunderstandings:
Metapost dumps out a TeX file, consisting of any header commands
specified in the Metapost file, and whatever is between btex and etex
tags.  It also puts in stuff so that what's between each pair of tags
gets put on its own page.  (This is actually done with the mpto command,
rather than in Metapost itself; if you just run that, you can examine
the output to see what TeX commands it uses.)
TeX is then run on this file, creating a .dvi file.
Metapost then reads in the .dvi file, using that to create the typeset
text that appears in the output Postscript file.
 

you miss a step: a mpx file is created from the dvi file; an mpx file is a bunch of metapost pictures that will replace the btex..etex's in the mp file 

Hans 

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Referencing eqalignno-formulas, and some more

2004-08-24 Thread Eeri Kask
Hello,
I started using context recently and have encountered
some difficulties where I need some help to get over.
(1) References in math formulas:
\placeformula [Ref]
\startformula
\eqalignno {
   ...
}
\stopformula
It seems that referencing to '\eqalignno'-formulas
needs some tricks. Is there any (non-)documented way
to attach a reference to a line inside '\eqalignno'
multiline formula?  E.g. a mechanism like \xxx[Ref]
\eqalignno {
   ...
   f(x) = x^n - 1\xxx[Ref]  \cr
   ...
}
so one can point to \in{formula}[Ref] and get the
correct reference number subsituted?
(2) Left/right margins of different width in doublesided
layout:  I invented my favorite layout as in
\setuplayout [location={doublesided,duplex}, marking=off,
   top=6mm, topdistance=6mm, bottom=6mm, bottomdistance=18mm,
   topspace=18mm,
   height=243mm,
   header=6mm, headerdistance=6mm,
   footer=6mm, footerdistance=18mm,
   backspace=46mm,
   width=124mm,
   leftmargin=12mm, leftmargindistance=4mm,
   leftedge=2mm, leftedgedistance=2mm,
   rightmargin=28mm, rightmargindistance=4mm,
   rightedge=6mm, rightedgedistance=2mm
]
\setuppapersize [A4][A4]
\setuppagenumbering [style=normal, alternative=doublesided, 
location={footer,middle}]
\showframe

and if '\showframe' is active I can verify by ruler that
all distances and measures etc. are drawn correctly
according to both sides of the printed sheet.
(Though it remains to be investigated why only
'backspace=46mm' gives 26mm whitespace at the left paper
edge, i.e. the distance from the left paper edge to the
left edge of the 'leftedge'.)  :-)
Putting \inmargin{Some text} on evennumbered
pages (in a doublesided setup) shows margin area width as
in 'leftmargin' in '\setuplayout';  shouldn't it adapt
itself according to doublesided layout as the margin
frame does in '\showframe'?
(3) Math formulas in footnotes result in
Math formula deleted: Insufficient symbol fonts.
I have the same style for margins and footnotes
(I hope the following setup does this as was my
intention),
\setupfootnotes [style=\tfx\setupinterlinespace]
\setupinmargin [style=\tfx\setupinterlinespace, align=right]
and in typesetting formulas in margins this error doesn't
occur, i.e. there are sufficient symbol fonts available
(whatever it means) :-)
I am using Adobe Utopia text with Palatino math fonts.
(4) HZ-algorithm. This, as well as metafun positional graphics
and metapost color transparency, was the reason I started
trying out context.  My understanding is, HZ gets activated
not with
   \font\tenrm=cmr10 at 10pt stretch 30 shrink 20 step 10
as documented in 'pre-hz.pdf' at PRAGMA-ADE but using
   \pdffontexpand\tenrm 30 20 10 1000
as I noticed somewhere. The question is, are *.tfm files
like
   cmr10-20.tfm
   cmr10-10.tfm
   cmr10+10.tfm
   cmr10+20.tfm
   cmr10+30.tfm
enough to get it going, and can be generated manually
from *.afm files using 'afm2tfm'?
Though, '\pdffontexpand\tenrm 30 20 10 1000'  results in
Missing font identifier.  in context...  :-)
I am using Context 2003.1.31 with pdfetex 1.10a-2.1 as
in tetex 2.0.1 distributed in SuSE Linux 8.2.

Thanks in advance for any help, item (1) is most
critical, though.
Eeri Kask
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and TeX [OT]

2004-08-24 Thread Hans Hagen
Taco Hoekwater wrote:
- The location pointer in the .mpx file is saved for subsequent labels.
 

a small addition: 

- since we are dealing with parsing, btex .. etex cannot be changed dynamically, which is one of the reasons why metafun has the textext macro which provides an alternative for btex .. etex 

Hans 

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Referencing eqalignno-formulas, and some more

2004-08-24 Thread Tobias Burnus
Hello,
Eeri Kask wrote:
(1) References in math formulas:
\placeformula [Ref]
\startformula
\eqalignno {
   ...
}
\stopformula
This should work ok. Try
\placeformula[ref]
\startformula\eqalignno{
a = b \formulanumber[refa]{a}\cr
b =c  \subformulanumber[refb]{b}\cr
}\stopformula
\in[ref], \in[refa], \in[refb]
or
\placeformula
\startformula\eqalignno{
a = b \formulanumber[ref1]\cr
b =c  \formulanumber[ref2]\cr
}\stopformula
\in[ref1], \in[ref2]
Tobias
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: How to use PostScript font

2004-08-24 Thread Siep Kroonenberg
On Mon, Aug 23, 2004 at 01:26:06AM +0200, Hans Hagen Outside wrote:
 
 ok; btw, also take a look at sieps afm2pl since it has some other nice 
 features 
 Hans 

My belated three cents on some of the things which were discussed in
this thread:

As to texnansi: this is supported in Latex by texnansi.sty. For
Western European languages, it seems to cover pretty much
everything, so there is no need for text companion fonts or virtual
fonts. Basic support (without artificial smallcaps) for a font
family with non-virtual texnansi fonts consists of just four tfms, a
mapfile fragment and, for Latex, an fd file.

As to fontinst: doing it the easy way, using just the latinfamily
command, you get dozens of files, in 8R, T1, OT1 and TS1 encoding.
You have to be pretty expert if you want more fine-grained control
and a more economical set of support files. I don't even know
whether Fontinst can generate non-virtual texnansi fonts which are
suitable for regular typesetting. Besides, I believe that nowadays
fontinst depends on Latex.

Sorry about just mentioning Latex here: I am only an occasional
Context user, and don't use typescripts or texfont at all.

As to afm2pl: the latest version available from tex.aanhet.net is
0.6; later versions are written to be part of TeX Live 2004 which is
currently under development. Because of changes in the TDS, these
may not work correctly in an older TeX installation.

Version 0.7.02 with afm2tfm compatibility is not yet in the TeX Live
source tree, last time I checked.


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


Re: [NTG-context] Re: How to use PostScript font

2004-08-24 Thread Siep Kroonenberg
On Tue, Aug 24, 2004 at 12:09:50PM +0200, Patrick Gundlach wrote:
 
 texnansi does not work with german.sty which I'd say is necessary for
 german texts. T1 and OT1 is hardcoded. I don't know about babel.
 
 Patrick

Checking babel.def, I saw that it sets \latinencoding to OT1 if T1
is unavailable - which might explain some encoding-related oddities
I have run into in the past.

Guess some patches for babel and german are needed.

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


[NTG-context] Footnotes in margin (again)

2004-08-24 Thread Steffen Wolfrum
Hi,

as the dust has settled over the ancient greeks I would like to re-ask a posting that 
is about another quite crucial question: How to place footnotes in the margin?

Every time I turn on \showframe I think that the margin is such a beautiful place for 
placing footnotes (per page, flushbottom). There must be a way!

Isn't there a way, Hans?

Steffen




Date: Wed, 18 Aug 2004 10:22:07 +0200
To: ConTeXt
From: Steffen Wolfrum [EMAIL PROTECTED]
Subject: Footnotes in margin?
Cc: 
Bcc: 
X-Attachments: 

Hi,

does ConTeXt provide a way to place footnote (not margin notes!) per page - but not 
below the body text?
A suitable place could be the margin. But there is no 
\setupfootnotes[location=inmargin]
and somthing like \inmargin{\footnote{}The footnote's text.} doesn't flow.

Does anybody know a working solution?

Thank you,

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