summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/canoniclayout
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-06 23:23:31 +0000
committerKarl Berry <karl@freefriends.org>2011-11-06 23:23:31 +0000
commit570faa64575114a193a756a944ac1300c0523288 (patch)
tree558b749a6d3f855e2bff1906d3319ef690cadfe2 /Master/texmf-dist/tex/latex/canoniclayout
parent088ee55192f2246a33905239efb4f1bda60c233b (diff)
canoniclayout 0.4 (6nov11)
git-svn-id: svn://tug.org/texlive/trunk@24523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/canoniclayout')
-rw-r--r--Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty47
1 files changed, 38 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty b/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty
index 19396c3f827..915dc3b0d5b 100644
--- a/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty
+++ b/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty
@@ -7,14 +7,14 @@
%% canoniclayout.dtx (with options: `package')
%% ______________________________________________________
%% The canoniclayout package for LaTeX
-%% Copyright (C) 2010 Claudio Beccari
+%% Copyright (C) 2010-2011 Claudio Beccari
%% All rights reserved
%%
%% License information appended
%%
\NeedsTeXFormat{LaTeX2e}[2009/01/01]
\ProvidesPackage{canoniclayout}%
- [2010/12/04 v.0.2 Canonic layout circumscribed to a circle]
+ [2011/11/05 v.0.3 Canonic layout circumscribed to a circle]
\expandafter\ifx\csname eTeXversion\endcsname\relax
\PackageWarning{canoniclayout}{%
@@ -29,6 +29,7 @@ The typesetting engine is not working in extended mode.\MessageBreak
This package is being skipped}
\expandaftter\endinput
\fi
+\@ifclassloaded{memoir}{% }% balancing brace
\dimen@=\dimexpr \p@ * \paperwidth / \paperheight\relax
\edef\CLshape{\strip@pt\dimen@}
\dimen@=\dimexpr \p@ * \p@ / \dimen@\relax
@@ -40,6 +41,34 @@ This package is being skipped}
\setmarginnotes{7pt}{\dimexpr \foremargin-3\marginparsep}{\onelineskip}
\checkandfixthelayout
+}{%
+\newlength\innermargin
+\newlength\outermargin
+\newlength\uppermargin
+\dimendef\CLpageratio=1256% x=b/h
+\dimendef\CLsmallratio=1258% z=x*y
+\dimendef\CLlargeratio=1260% y=(1-x)/(1+x)
+\CLpageratio=\dimexpr \p@*\paperwidth/\paperheight\relax % x
+\CLlargeratio=\dimexpr \p@*(\p@-\CLpageratio)/(\p@+\CLpageratio)\relax % y
+\CLsmallratio=\dimexpr \CLpageratio*\CLlargeratio/\p@\relax % z
+\edef\CL@pageratio{\strip@pt\CLpageratio}
+\edef\CL@smallratio{\strip@pt\CLsmallratio}
+\edef\CL@largeratio{\strip@pt\CLlargeratio}
+\textheight\paperwidth% altezza griglia
+\textwidth=\CL@pageratio\textheight
+\innermargin=\CL@smallratio\paperwidth
+\outermargin=\CL@largeratio\paperwidth
+\uppermargin=\CL@smallratio\paperheight
+\marginparwidth=\dimexpr0.8\outermargin-\marginparsep\relax
+\evensidemargin=\dimexpr\outermargin -1in\relax
+\oddsidemargin=\dimexpr\innermargin-1in\relax
+\topmargin=\dimexpr\uppermargin-1in-\headheight-\headsep\relax
+\normalfont
+\count256=\numexpr(\textheight-\topskip)/\baselineskip\relax
+\textheight=\count256\baselineskip\relax
+\textheight=\dimexpr\textheight+\topskip\relax
+\normalbaselineskip\baselineskip
+}
\newlength\abc@width
\newcommand*\currentfontletters{%
\settowidth\abc@width{abcdefghijklmnopqrstuvwxyz}\dimen0=26\p@
@@ -52,19 +81,19 @@ This package is being skipped}
\settowidth\abc@width{abcdefghijklmnopqrstuvwxyz}\dimen0=26\p@
\dimen0=\dimexpr \textwidth * \dimen0 / \abc@width \relax
\count254=\numexpr \dimen0 / \p@ \relax
-\count252=\numexpr \textheight / \onelineskip \relax
+\count252=\numexpr \textheight / \baselineskip \relax
\count250=\numexpr \count252 * \count254\relax
-\quote The number of characters in one text line with the current
- font is \the\count254;
+\begin{quote} The average number of characters in one text line
+ with the current font is \the\count254;
this text block contains \the\count252\ lines;
a rough estimate of the number of characters per page is
\the\count250.\par
- This can be used to evaluate the total number of pages of
- a document.
-\endquote}
+ This information may be useful to evaluate the total number
+ of pages in a document.
+\end{quote}}
-%% Copyright 2010 Claudio Beccari
+%% Copyright 2011 Claudio Beccari
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of