[NTG-context] Converting math from LaTeX to ConTeXt

2004-07-25 Thread Brooks Moses
First, by way of introduction: I've been using LaTeX for about five years 
now, but am quite new to ConTeXt.  I'm a grad student in mechanical 
engineering, so my primary uses of ConTeXt in the near future are likely to 
be for my thesis and associated presentations, all of which will likely 
have lots of complicated equations in them.

After looking at what documentation is available for this, I think I have a 
fair handle on the basics of including math in ConTeXt.  However, I do have 
some questions about things beyond the basics that I use rather frequently, 
and I haven't been able to find useful answers in the documentation or the 
list archives.

To begin with, I have the following sets of definitions in my standard 
LaTeX preamble.  I know that \newcommand and \renewcommand are 
LaTeX-specific; what's the appropriate ConTeXt equivalent?  Also, do \hat, 
\vec, and \overline work as I would expect?  And is there a direct 
equivalent to \boldsymbol from the amsmath package?  (I need something that 
will handle both roman and greek letters.)

  \renewcommand{\vec}[1]{{\boldsymbol{#1}}}
  \renewcommand{\hatn}{\hat{\vec{n}}}
  \newcommand{\filter}[1]{\overline{#1}}
Also, many of these equations run over multiple lines using the macros from 
the amsmath package (the "split" environment in particular, but also the 
"align" environment), and I haven't been able to find much documentation on 
how to do this in ConTeXt.  For an example of the sorts of things I end up 
doing:

  \begin{equation}
  \begin{split}
  \lefteqn{
\frac{\partial (\rho (\phi u)_j)}{\partial t}
   + \nabla_k (\rho (\phi u)_k u_j)
  }\quad\quad
  \\
  = &\;
-\nabla_j (\phi p)
+ \nabla_j (\lambda \nabla_k (\phi u_k))
+ \nabla_k \left[\mu \left( \nabla_k (\phi u)_j
+ (\nabla_j (\phi u)_k) \right) \right]
  \\&\;
{} - \lambda (\nabla_j u_k) \nabla_k \phi
- \mu (\nabla_k \phi) \nabla_k u_j
- \mu (\nabla_k u_k) \nabla \phi_j
- \tau_{\text{surface, $jk$}} \nabla_k \phi
  \end{split}
  \end{equation}
Looking at that reminds me that I also rather heavily use the \text command 
from amsmath as well, and rely on its ability to properly size things in 
subscripts and such.  Does this (or an analogue) exist in ConTeXt?

Any suggestions?  I'd like to be able to simply cut and paste the equations 
like this one from my LaTeX documents into my ConTeXt documents with as 
little editing as possible (so that I can maintain consistency between 
documents in each format), but anything that produces the same output would 
be good to know about.

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


Re: [NTG-context] Strange error ...

2004-07-25 Thread Hans Hagen Outside
Willi Egger wrote:
Hi,
Thanks for the fast reply.
The pdf-file resulting from compilation of the metapost code can 
perfectly be opend in acrobat 6. Acrobat 5 opens the file after giving
a warning "this file may contain infromation... newer version"

Where to put the \pdfminorversion=5. When put into the ConTeXt 
source-file it creates an undefined controlsequence error.
i put it in spec-tpd 

-
 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] Re: A few questions regarding ConTeXt

2004-07-25 Thread Willi Egger
Hi,
following this list for a couple of years now, I can not remember that 
Hans or other list members hinted how to solve arrising problems. - 
Specially if it concerns interesting / necessary features, Hans has 
always beeing prepared to cook them up!

Kind regards Willi
Mats Broberg wrote:
-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Münster
Sent: den 24 juli 2004 19:45

Hello Mats,
I agree with you: ConTeXt is certainly superior to LaTeX, but 
sometimes, I know how to do a special thing in LaTeX, but not 
in ConTeXt. Often I don't know, if a special feature is 
already there but undocumented, or not. Sometimes, I find a 
sort of "workaround" to get some LaTeX behaviour, for example 
"\flushbottom". For beginners there is the document 
http://www.berenddeboer.net/tex/LaTeX2ConTeXt.> pdf by Berend 
de Boer. It would be nice, to have something 
like this for advanced topics, such as varioref or lettrine. 
These special "LaTeX to ConTeXt" examples can then be added 
to the ConTeXt-wiki: http://contextgarden.net/From_LaTeX_to_ConTeXt
Cheers, Peter

Thanks for the info.
Having looked more closely at this, I guess it now stands between
learning LaTeX and the memoir class, or learning ConTeXt. There are
things that talk in favour for both these roadmaps, but I have not
decided yet. 

One of the issues is how to solve a problem in ConTeXt if it suddenly
becomes clear this or that feature is not implemented. 

Best regards,
Mats Broberg
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Strange error ...

2004-07-25 Thread Willi Egger
Hi,
Thanks for the fast reply.
The pdf-file resulting from compilation of the metapost code can 
perfectly be opend in acrobat 6. Acrobat 5 opens the file after giving
a warning "this file may contain infromation... newer version"

Where to put the \pdfminorversion=5. When put into the ConTeXt 
source-file it creates an undefined controlsequence error.

Kind regards Willi
Hans Hagen Outside wrote:
Willi Egger wrote:
Hi,
I got a simple drawing madeup in Metapost, which is then compiled into 
a pdf file with context.
Now that I want to include this graphic in a text I stumble over the 
following:

pdfeTeXk, Version 3.141592-1.11a-2.1 (Web2c 7.5.2)
ConTeXt  ver: 2004.6.30  fmt: 2004.7.21
Error: PDF version 1.5 -- xpdf supports version 1.4 (continuing anyway)
Error (0): PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
subsubject : - De tekst op het Gabarit
Error: pdfetex.exe (file ./gabarit.pdf): xpdf: reading PDF image failed
 ==> Fatal error occurred, the output PDF file is not finished!

try \pdfminorversion=5
is the to be included pdf file ok  ?
-
 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 mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Strange error ...

2004-07-25 Thread Hans Hagen Outside
Willi Egger wrote:
Hi,
I got a simple drawing madeup in Metapost, which is then compiled into 
a pdf file with context.
Now that I want to include this graphic in a text I stumble over the 
following:

pdfeTeXk, Version 3.141592-1.11a-2.1 (Web2c 7.5.2)
ConTeXt  ver: 2004.6.30  fmt: 2004.7.21
Error: PDF version 1.5 -- xpdf supports version 1.4 (continuing anyway)
Error (0): PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
subsubject : - De tekst op het Gabarit
Error: pdfetex.exe (file ./gabarit.pdf): xpdf: reading PDF image failed
 ==> Fatal error occurred, the output PDF file is not finished!
try \pdfminorversion=5 

is the to be included pdf file ok  ? 

-
 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] Strange error ...

2004-07-25 Thread Willi Egger
Hi,
I got a simple drawing madeup in Metapost, which is then compiled into a 
pdf file with context.
Now that I want to include this graphic in a text I stumble over the 
following:

pdfeTeXk, Version 3.141592-1.11a-2.1 (Web2c 7.5.2)
ConTeXt  ver: 2004.6.30  fmt: 2004.7.21
Error: PDF version 1.5 -- xpdf supports version 1.4 (continuing anyway)
Error (0): PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
subsubject : - De tekst op het Gabarit
Error: pdfetex.exe (file ./gabarit.pdf): xpdf: reading PDF image failed
 ==> Fatal error occurred, the output PDF file is not finished!
Does anybody have a clue what happens?
Kind regards Willi
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Disable Metapost rendering?

2004-07-25 Thread Hans Hagen Outside
Sebastian Sturm wrote:
Hi,
I really like ConTeXt's MP processing features, but as soon as I 
include more than five or six MP graphics in a document, typesetting 
slows down to a crawl. As far as I know, the PSTricks package has some 
option to only process a given range of the figures defined in the TeX 
file and reuse the existing output for the other ones. Is there a 
similar function in ConTeXt?

Some global command like \donotrerender[1-n] would be great, a 
processing tag for each figure like 
\startuseMPgraphic{...}[rerender=no] would be perfect.
--automp will collect graphics and run them in between
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] Re: Disable Metapost rendering?

2004-07-25 Thread Hans Hagen Outside
Sebastian Sturm wrote:
Hi,
that sounds very promising - especially --automp, since I don't really 
want to change my ConTeXt script everytime I changed a MP figure. 
Including --automp in my script file, however, didn't stop ConTeXt 
from recalculating my MP figures every time I typeset the document, 
even though I hadn't changed them in the meantime. I couldn't find 
anything about automp in the TeXExec manual, but the --help option 
tells me that automp causes it to render mp pictures only if needed. 
So how does it determine whether a recalculation is necessary or not? 
Is it a problem if my figures rely on the randomizers, like 
uniformdeviate()?
indeed, that can be solved by setting the random seed occasionally or manually   

\setupsystem[random=big] % or random=12345
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] ConTeXt output & commercial printing houses

2004-07-25 Thread Adam Lindsay
Mats Broberg said this at Sun, 25 Jul 2004 12:01:03 +0200:

>- I don't quite understand how ConTeXt:ers deal with solid PMS spot
>colours 

Mats, have a look at:
 

Disclaimer: I haven't used spot colours yet, but I know it's in a manual. :)

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay  [EMAIL PROTECTED]
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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


RE: [NTG-context] ConTeXt output & commercial printing houses

2004-07-25 Thread Mats Broberg
Yes, I eventually found it in that manual - sorry for using bandwidth
for RTFM issues... :)

Best regards,
Mats Broberg

> -Original Message-
> From: Adam Lindsay [mailto:[EMAIL PROTECTED] 
> Sent: den 25 juli 2004 13:59
> To: [EMAIL PROTECTED]; 'mailing list for 
> ConTeXt users'
> Subject: Re: [NTG-context] ConTeXt output & commercial printing houses
> 
> 
> Mats Broberg said this at Sun, 25 Jul 2004 12:01:03 +0200:
> 
> >- I don't quite understand how ConTeXt:ers deal with solid PMS spot 
> >colours
> 
> Mats, have a look at:  
>  ade.com/general/manuals/msplit.pdf>
> 
> 
> Disclaimer: I haven't 
> used spot colours yet, but I know it's in a manual. :)
> 
> -- 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Adam T. Lindsay  [EMAIL PROTECTED]
>  Computing Dept, Lancaster University   +44(0)1524/594.537
>  Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> 

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


RE: [NTG-context] Re: A few questions regarding ConTeXt

2004-07-25 Thread Mats Broberg
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Peter Münster
> Sent: den 24 juli 2004 19:45

> Hello Mats,
> I agree with you: ConTeXt is certainly superior to LaTeX, but 
> sometimes, I know how to do a special thing in LaTeX, but not 
> in ConTeXt. Often I don't know, if a special feature is 
> already there but undocumented, or not. Sometimes, I find a 
> sort of "workaround" to get some LaTeX behaviour, for example 
> "\flushbottom". For beginners there is the document 
> http://www.berenddeboer.net/tex/LaTeX2ConTeXt.> pdf by Berend 
> de Boer. It would be nice, to have something 
> like this for advanced topics, such as varioref or lettrine. 
> These special "LaTeX to ConTeXt" examples can then be added 
> to the ConTeXt-wiki: http://contextgarden.net/From_LaTeX_to_ConTeXt
> Cheers, Peter

Thanks for the info.

Having looked more closely at this, I guess it now stands between
learning LaTeX and the memoir class, or learning ConTeXt. There are
things that talk in favour for both these roadmaps, but I have not
decided yet. 

One of the issues is how to solve a problem in ConTeXt if it suddenly
becomes clear this or that feature is not implemented. 

Best regards,
Mats Broberg

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


RE: [NTG-context] ConTeXt output & commercial printing houses

2004-07-25 Thread Mats Broberg
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Matt Gushee
> Sent: den 24 juli 2004 21:42
> To: [EMAIL PROTECTED]

> Are problems likely to arise with normal printers? If so, can 
> anyone suggest questions I should ask to help determine 
> whether they can handle my files? Also, is there anything in 
> particular I should do to my files to make sure they are print-ready?
> 
> Thanks in advance for any suggestions.

Matt,

Being a newbie when it comes to ConTeXt, but having worked in the
commercial printing busines for a decade, I would say that the majority
of printers actually prefer PDF files rather than Quark, InDesign or
Pagemaker files. At least that is the case in Europe, and it would
suprise me if it is not the same situation in USA.

The reason for this is that the printers get away from all the
associated problems with the DTP program files: typfaces that are
lacking, missing image links, text that may reflow etc.

However, a caveat emptor:

- I don't quite understand how ConTeXt:ers deal with solid PMS spot
colours - i.e. not a spot colour in CMYK mode where the spot colour is
made up of a screened colour mix of cyan, magenta, yellow and black, but
a colour that you want to print with a specially mixed Pantone PMS ink
from an additional printing plate (apart from the four C, M, Y, K
process plates). However, this is frequently done in printing, so it
would surprise me if ConTeXt didn't have a solution for it.

- Also, I don't know whether it is possible to downsample images in
PDF's that you generate from ConTeXt. If it is, avoid it. The printer
expects CMYK images (not RGB!) where the resolution is approx. 2 times
the screen count in the final print, @ the physical size on the paper.
So if you have an image in your PDF that is 10 cms /4 in. wide, and you
want it printed in a 150 lpi (lines per inch) screen, make sure the
original resolution is 300 dpi @ 10 cms / 4 in.

All the best,
Mats Broberg

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


Re: [NTG-context] ConTeXt output & commercial printing houses

2004-07-25 Thread Henning Hraban Ramm
I am planning to publish a book that is typeset using ConTeXt, and very
soon I am going to start contacting printers for estimates. Given that 
a
shop prints from PDF files, does it matter that the PDFs are produced 
by
ConTeXt?
Normally they should be able to process nearly every PDF. ;-)
If you don't need color, it'll be no problem.
If you need color, you must be careful to define everything in CMYK 
mode.
If you use pictures, save them as PDF; include ICC profiles if you need 
-
ConTeXt simply includes the PDFs "as is", so nothing gets lost.

If you like to impose yourself (discuss this with your printer!) you
must need some parameters like preferred size of the printing plate,
folding space etc. Normally you should leave this to the printshop.
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problems with left and right

2004-07-25 Thread Henning Hraban Ramm
Am 24.07.2004 um 17:22 schrieb Matt Gushee:
\setupheadertexts [odd-left] [odd-right] [even-left] [even-right] ?
Please explain why I should consider it that way. Most books in every
If you use a single page layout you need only the first two parameters;
and normally one designs right (odd) pages first.
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: Disable Metapost rendering?

2004-07-25 Thread Sebastian Sturm
Hi,
that sounds very promising - especially --automp, since I don't really 
want to change my ConTeXt script everytime I changed a MP figure. 
Including --automp in my script file, however, didn't stop ConTeXt from 
recalculating my MP figures every time I typeset the document, even 
though I hadn't changed them in the meantime. I couldn't find anything 
about automp in the TeXExec manual, but the --help option tells me that 
automp causes it to render mp pictures only if needed. So how does it 
determine whether a recalculation is necessary or not? Is it a problem 
if my figures rely on the randomizers, like uniformdeviate()?

Best regards,
Sebastian Sturm
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context