Am 30.08.2010 um 08:33 schrieb Hans Hagen:
On 29-8-2010 7:11, Xan xan wrote:
Hi,
I want to "migrate" one LaTeX document to ConTeXt document. I only want to put the _exact_ margins LaTeX use for \documentclass[12pt,a4paper]{article}.
Anyone could say me the exact values I have to put in **layout**?
You first have to figure out what the exact latex values are. I suppose that they are documented somewhere or can be deduced from the document class (maybe make a list for more popular document classes).
At some point there can be a module doing things like
\definelayout[latex-article][...]
I looked now in the files where the layout for the standard classes in latex is defined and it's a mess to reproduce them in context because all values depend on the papersize and fontsize and it takes a lot of code (even with etex’s \dimexpr) because there are checks whether a calculated dimensions exceeds a fixed limit. This is how the layout for a document with a fontsize of 10pt looks: \definelayout [latex10] [width=\ifdim\dimexpr\paperwidth-2in\relax>345pt\relax 345pt\else\dimexpr\paperwidth-2in\relax\fi, % \paperwidth-2in or 345pt, use the smaller value backspace=\dimexpr(\paperwidth-\textwidth)/2-1in\relax, leftmargindistance=7pt, leftmargin=, topspace=, header=12pt, headerdistance=.25in, height=, footer=, footerdistance=,] Wolfgang