diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-23 19:18:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-23 19:18:04 +0000 |
commit | 1a7766f8eaec99aa55f9a73e855b0596935fd3a5 (patch) | |
tree | 4800bf709d65901ce578c6988f8b0beafd7baf95 /Master/texmf-dist/tex/latex | |
parent | 33f8f6326b732b79aa2fcb441f8079b909cedd23 (diff) |
new latex package canoniclayout (23jan11)
git-svn-id: svn://tug.org/texlive/trunk@21155 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty b/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty new file mode 100644 index 00000000000..19396c3f827 --- /dev/null +++ b/Master/texmf-dist/tex/latex/canoniclayout/canoniclayout.sty @@ -0,0 +1,79 @@ +%% +%% This is file `canoniclayout.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% canoniclayout.dtx (with options: `package') +%% ______________________________________________________ +%% The canoniclayout package for LaTeX +%% Copyright (C) 2010 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] + +\expandafter\ifx\csname eTeXversion\endcsname\relax +\PackageWarning{canoniclayout}{% +The typesetting engine is not suited\Messagebreak +for working in extended mode.\Messagebreak} +This package is being skipped} +\expandafter\endinput +\fi +\ifnum\eTeXversion>\z@\else +\PackageWarning{canoniclayout}{% +The typesetting engine is not working in extended mode.\MessageBreak +This package is being skipped} +\expandaftter\endinput +\fi +\dimen@=\dimexpr \p@ * \paperwidth / \paperheight\relax +\edef\CLshape{\strip@pt\dimen@} +\dimen@=\dimexpr \p@ * \p@ / \dimen@\relax +\edef\CLinvshape{\strip@pt\dimen@} +\textheight=\paperwidth +\settypeblocksize{\textheight}{*}{\CLshape} +\setlrmargins{*}{*}{\CLinvshape} +\setulmargins{*}{*}{\CLinvshape} +\setmarginnotes{7pt}{\dimexpr \foremargin-3\marginparsep}{\onelineskip} + +\checkandfixthelayout +\newlength\abc@width +\newcommand*\currentfontletters{% +\settowidth\abc@width{abcdefghijklmnopqrstuvwxyz}\dimen0=26\p@ +\dimen0=\dimexpr \textwidth * \dimen0 / \abc@width \relax +\count254=\numexpr \dimen0 / \p@ \relax +\par The number of characters in one text line with the current font is + \the\count254.\par} + +\newcommand*\charactersperpage{% +\settowidth\abc@width{abcdefghijklmnopqrstuvwxyz}\dimen0=26\p@ +\dimen0=\dimexpr \textwidth * \dimen0 / \abc@width \relax +\count254=\numexpr \dimen0 / \p@ \relax +\count252=\numexpr \textheight / \onelineskip \relax +\count250=\numexpr \count252 * \count254\relax +\quote The 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} + + +%% Copyright 2010 Claudio Beccari +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "author-maintained" +%% +%% This work consists of this file canoniclayout.dtx, a README file +%% and the derived files canoniclayout.sty and canoniclayout.pdf. +%% +%% +%% End of file `canoniclayout.sty'. |