Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-09-01 Thread xancorreu

Al 31/08/10 22:29, En/na Wolfgang Schuster ha escrit:

Am 31.08.2010 um 18:33 schrieb xancorreu:

   

Al 31/08/10 12:22, En/na Wolfgang Schuster ha escrit:
 

\definelayout
   [latex10]
   [width=\ifdim\dimexpr\paperwidth-2in\relax345pt\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=,]


   

Thank you very much for your effort, but it does not work for me:
 


This was just a example to show you how difficult it is to emulate latex’s 
layout
in context because the values depend on different paramaters like the fontsize 
and
the papersize. The example does not work because a few value like topspace or 
height
are missing and this is why you get the error messages.

Wolfgang

   
Yes, it's true but I thought that because all is TeX based then there 
are similar in basic elements (like this). But definitely, they are very 
differents



Xan.
___
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
___


Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Wolfgang Schuster

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\relax345pt\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
___
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
___


Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread xancorreu

Al 31/08/10 12:22, En/na Wolfgang Schuster ha escrit:

\definelayout
   [latex10]
   [width=\ifdim\dimexpr\paperwidth-2in\relax345pt\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=,]

   

Thank you very much for your effort, but it does not work for me:

! Missing number, treated as zero.
to be read again
   \global
\dorecalculatelayout ...ter \c!leftmargin \global
  \rightmarginwidth 
\layoutp...


\dosetuplayout ...#1}}}\fi \fi \recalculatelayout
  \checkcurrentlayout 
\prese...

to be read again
   \par
l.36

? x
No pages of output.
Transcript written on arxiv.log.


For now, I use
% Margins
\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=middle,height=fit,backspace=4.4cm]

with approximate the latex in 10.

___
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
___


Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Wolfgang Schuster

Am 31.08.2010 um 18:33 schrieb xancorreu:

 Al 31/08/10 12:22, En/na Wolfgang Schuster ha escrit:
 \definelayout
   [latex10]
   [width=\ifdim\dimexpr\paperwidth-2in\relax345pt\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=,]
 
   
 Thank you very much for your effort, but it does not work for me:


This was just a example to show you how difficult it is to emulate latex’s 
layout
in context because the values depend on different paramaters like the fontsize 
and
the papersize. The example does not work because a few value like topspace or 
height
are missing and this is why you get the error messages.

Wolfgang

___
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
___


[NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-30 Thread Xan xan
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**?

Thanks,
Xan.
___
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
___


Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-30 Thread 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][...]

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
___