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

2010-08-31 Thread Taco Hoekwater

On 08/31/2010 09:39 AM, xancorreu wrote:


\setuplayout
[backspace=\dimexpr 1in+22pt\relax, % [1] + [3] = (1 inch +
\hoffset=0pt) + \oddsidemargin=22pt

Mojca

Thanks Mojca for trying it now you check that this was very
difficult for a newbee as me ;-)


You probably have to add another 1in to the backspace, for the \hoffset.


If the exact way is too complicated, is there any **approximate** way to
obtain the usually margins in LaTeX article in 10 pt?


Sure there is: print an article.cls output pdf and measure the distances
with a ruler (that is what I do when I need to mimic a layout).

Best wishes,
Taco

___
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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Mojca Miklavec
On Tue, Aug 31, 2010 at 09:42, Taco Hoekwater wrote:
 On 08/31/2010 09:39 AM, xancorreu wrote:

 \setuplayout
 [backspace=\dimexpr 1in+22pt\relax, % [1] + [3] = (1 inch +
 \hoffset=0pt) + \oddsidemargin=22pt

 Mojca

 Thanks Mojca for trying it now you check that this was very
 difficult for a newbee as me ;-)

 You probably have to add another 1in to the backspace, for the \hoffset.

 If the exact way is too complicated, is there any **approximate** way to
 obtain the usually margins in LaTeX article in 10 pt?

The exact way would be to read the LaTeX class and figure out what
dimensions are being used there. The approximate way would be to
visually compare the output of LaTeX and ConTeXt.

 Sure there is: print an article.cls output pdf and measure the distances
 with a ruler (that is what I do when I need to mimic a layout).

Or take Adobe Acrobat and use measuring tool, or compare visually
(aligning two documents in pdf viewer). If you print out the material
there's always a chance that printer won't align the edges properly.

The third option is to use the following in LaTeX to figure out what
dimensions are being used in LaTeX, compare that with figure in The
Not So Short Introduction to LaTeX and then use these numbers in
ConTeXt (properly adjusted for the differences):

hoffset=\the\hoffset\par
oddsidemargin=\the\oddsidemargin\par
marginparwidth=\the\marginparwidth\par
textwidth=\the\textwidth\par

But after I have managed to guess somehow that the horizontal
dimensions were matching
[backspace=\dimexpr 1in+31pt\relax
 width=\dimexpr 390pt\relax,
in latex,12pt (but for some unknow reason hyphenation in ConTeXt was
off, or at least at different penalty values, so I didn't manage to
compare the line breaks) ... I realized that margins change if you try
to use
\documentclass[10pt,a4paper]{article}
instead of 12pt, so one would need to account for that change as well.

Mojca
___
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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Yury G. Kudryashov
Mojca Miklavec wrote:

 On Tue, Aug 31, 2010 at 09:42, Taco Hoekwater wrote:
 to use
 \documentclass[10pt,a4paper]{article}
 instead of 12pt, so one would need to account for that change as well.

One more warning: AFAIR, [10pt,a4paper] != [a4paper,10pt].

___
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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Hans Hagen

On 31-8-2010 10:09, Mojca Miklavec wrote:


in latex,12pt (but for some unknow reason hyphenation in ConTeXt was
off, or at least at different penalty values, so I didn't manage to
compare the line breaks) ... I realized that margins change if you try
to use
 \documentclass[10pt,a4paper]{article}
instead of 12pt, so one would need to account for that change as well.


you can be pretty sure that defaults in context differe from those in 
latex, if only because latex never was the starting point


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
___


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

2010-08-31 Thread xancorreu

I follow your suggestion: rule but I'm in trouble: with

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=12cm,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm]

I obtained a non-centered layout!!! leftedge and rightedge are the 
margins between the final of the paper and the {left,right}margin, isn't?


How to center the layout with
topspace=3cm,
leftmargin=3cm,
rightmargin=3cm,
header=2cm,
footer=2cm,
width=12cm,
height=fit,
backspace=3cm

???

Thanks
___
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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Hans Hagen

On 31-8-2010 9:39, xancorreu wrote:


Thanks Mojca for trying it now you check that this was very
difficult for a newbee as me ;-)


Seems difficult for anyone so I think that Taco's approach: just 
measure is the safest. After all, you will never get 100% compatible 
output.


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
___


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

2010-08-31 Thread Hans Hagen

On 31-8-2010 11:20, xancorreu wrote:

I follow your suggestion: rule but I'm in trouble: with

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=12cm,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm]


I obtained a non-centered layout!!! leftedge and rightedge are the
margins between the final of the paper and the {left,right}margin, isn't?

How to center the layout with
topspace=3cm,
leftmargin=3cm,
rightmargin=3cm,
header=2cm,
footer=2cm,
width=12cm,
height=fit,
backspace=3cm


width=middle

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


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

2010-08-31 Thread xancorreu

Al 31/08/10 11:16, En/na Hans Hagen ha escrit:

On 31-8-2010 9:39, xancorreu wrote:


Thanks Mojca for trying it now you check that this was very
difficult for a newbee as me ;-)


Seems difficult for anyone so I think that Taco's approach: just 
measure is the safest. After all, you will never get 100% compatible 
output.


Hans


Yeah but it's a little bit chapucero (spanish) ;-)

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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread xancorreu

Al 31/08/10 11:23, En/na Hans Hagen ha escrit:

On 31-8-2010 11:20, xancorreu wrote:

I follow your suggestion: rule but I'm in trouble: with

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=12cm,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm] 




I obtained a non-centered layout!!! leftedge and rightedge are the
margins between the final of the paper and the {left,right}margin, 
isn't?


How to center the layout with
topspace=3cm,
leftmargin=3cm,
rightmargin=3cm,
header=2cm,
footer=2cm,
width=12cm,
height=fit,
backspace=3cm


width=middle

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



WIth

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=middle,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm]


leftedge and rightedge are ignored. Arg!!!


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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread xancorreu

Simple case:

% Margins
\setuplayout[topspace=3cm,leftmargin=5cm,rightmargin=5cm,header=2cm,footer=2cm,width=middle,height=fit,backspace=3cm]

the left and rightmargin values are ignored: 5cm, 2cm no matter... 
always the same.

___
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] Fwd: Migrations: exactly LaTeX margins -- ConTeXt margins

2010-08-31 Thread Hans Hagen

On 31-8-2010 11:33, xancorreu wrote:

Al 31/08/10 11:23, En/na Hans Hagen ha escrit:

On 31-8-2010 11:20, xancorreu wrote:

I follow your suggestion: rule but I'm in trouble: with

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=12cm,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm]



I obtained a non-centered layout!!! leftedge and rightedge are the
margins between the final of the paper and the {left,right}margin,
isn't?

How to center the layout with
topspace=3cm,
leftmargin=3cm,
rightmargin=3cm,
header=2cm,
footer=2cm,
width=12cm,
height=fit,
backspace=3cm


width=middle

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



WIth

\setuplayout[topspace=3cm,leftmargin=3cm,rightmargin=3cm,header=2cm,footer=2cm,width=middle,height=fit,backspace=3cm,rightedge=5cm,leftedge=5cm]



leftedge and rightedge are ignored. Arg!!!


margins and edges are sort of virtual; they only are used for putting 
stuff into (and then the dimensions determins the width etc) ... 
backspace and cutspace are the ones to use


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
___


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

2010-08-30 Thread Xan xan
-- Forwarded message --
From: Xan xan xancor...@gmail.com
Date: 2010/8/30
Subject: Re: [NTG-context] Migrations: exactly LaTeX margins -- ConTeXt margins
To: Hans Hagen pra...@wxs.nl


There is a technical explanation in The Not so Short Introduction to
LaTeX [tobi.oetiker.ch/lshort/lshort.pdf]
(page 129)

It's too much for me. I supose there are equivalencies in ConTeXt but
too bit tech for me.

Thanks,
Xan.

2010/8/30 Hans Hagen pra...@wxs.nl

 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
___


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

2010-08-30 Thread Hans Hagen

On 30-8-2010 11:23, Xan xan wrote:


There is a technical explanation in The Not so Short Introduction to
LaTeX [tobi.oetiker.ch/lshort/lshort.pdf]
(page 129)

It's too much for me. I supose there are equivalencies in ConTeXt but
too bit tech for me.


sure, setuplayout can be used to define any layout I guess but I'm not 
going to read latex manuals (not even short ones) and reverse latex 
dimensions myself so it's up to other users then


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
___


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

2010-08-30 Thread Hans Hagen

On 30-8-2010 5:03, Mojca Miklavec wrote:


it is possible to reverse-engineer the dimensions, but I crossed
against something I don't understand straight away. The distance
between paper border and text is [1]+[3]=1 inch + 0pt + 22pt (but that
doesn't seem to be the case in A4 paper setting anyway), while width
of left margin in [10] = 106pt which makes the margin stick out of
paper, right?


That drawing on p 129 is somewhat puzzling.

I get the impression that somehow these old-time 1in built-in dvi 
offsets are being used; in context these have been zeroed out right from 
the start



but the drawing in TNSS is lying a bit (or maybe ConTeXt is wrong ... :).


how can you doubt !

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
___