ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
Subject: Re: LaTeX emulation
Date: Wed, 18 May 2005 19:17:30 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0505181809170.31226@gaston.free.fr> (raw)
In-Reply-To: <A15DE770-5C6B-4D13-B29E-4D546A279CAB@ensta.fr>

On Wed, 18 May 2005, Maurice Diamantini wrote:

> What kind of stuff do we need for, say, an "article" LaTeX class?

Hello,
I like the LaTeX-KOMA-classes. Here some setups, that I used for my
brother's thesis:

\doifmodeelse{A4}{%
  \setuppapersize[A4]\setupbodyfont[12pt]}{%
  \setuppapersize[A5]\setupbodyfont[9pt]}
\setupheader[style=\it]
\setuphead[chapter,title][header=nomarking]
\setupindenting[small]
\define[1]\LeftAligned{\startalignment[right,broad]#1\stopalignment}
\setuphead[title,chapter,section,subsection,subsubsection][%
  textcommand=\LeftAligned,textstyle=bold,numberstyle=bold]
\setuplist[chapter][style=bold,before=\blank]
\setupcombinedlist[content][alternative=c]
\setuppagenumbering[location=footer]
\definemakeup[title][standard,align=middle]
\setupbodyfontenvironment[default][em=italic]
\doifmodeelse{oneside}{\setupheadertexts[chapter]}{%
  \setupheadertexts[][section][chapter][]
  \setuppagenumbering[alternative=doublesided]}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This is an emulation of \usepackage[DIVcalc]{typearea} in LaTeX.
\def\BCOR{3mm}% eventual binding correction
 newdimen\PageWidth \PageWidth=\paperwidth
\doifmode{BCOR}{\PageWidth=\dimexpr(\PageWidth-\BCOR)}
\edef\Ratio{\withoutpt{\the\dimexpr(2\paperheight/(\PageWidth/32768))}}
\setbox\scratchbox\hbox{\dorecurse{26}{\character\recurselevel}}
\newdimen\Width \newdimen\Height \newdimen\Back
\Width=\dimexpr(2.6\wd\scratchbox) \Height=\dimexpr(\Ratio\Width)
\doifmodeelse{oneside}{\Back=\dimexpr((\PageWidth - \Width) / 2)}%
  {\Back=\dimexpr((\PageWidth - \Width) / 3)}
\doifmode{BCOR}{\Back=\dimexpr(\Back + \BCOR)}
\edef\Top{\the\dimexpr((\paperheight - \Height) / 3 - 3\lineheight)}
\Height=\dimexpr(\Height + 8\lineheight)
\setuplayout[backspace=\the\Back,height=\the\Height,width=\the\Width,
  header=2\lineheight,headerdistance=\lineheight,
  footer=2\lineheight,footerdistance=3\lineheight,topspace=\Top]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setupalign[line]
\def\upperrightdoublesixquote{\kern-.125em``}% german quotes
\def\emph#1{{\em#1}}
\def\texttwosuperior{$^2$}
\setupcaptions[width=\makeupwidth,
  style={\switchtobodyfont[small]\setupinterlinespace}]

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

      parent reply	other threads:[~2005-05-18 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 18:35 Context, Latex, or an XML for acaddemic writing? David Waller
2005-05-17 20:07 ` Hans Hagen
2005-05-17 22:13   ` Mojca Miklavec
2005-05-18  5:50     ` LaTeX emulation (was: Context, Latex, or an XML for acaddemic writing?) Maurice Diamantini
2005-05-18 14:10       ` LaTeX emulation Taco Hoekwater
2005-05-18 16:23         ` Brooks Moses
2005-05-18 16:40           ` Adam Lindsay
2005-05-18 17:17       ` Peter Münster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0505181809170.31226@gaston.free.fr \
    --to=pmlists@free.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).