[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Fancy LaTeX preamble
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] Fancy LaTeX preamble |
Date: |
Tue, 29 Nov 2005 10:26:15 +0100 |
User-agent: |
Thunderbird 1.4 (X11/20050908) |
Hi Clifford,
Here is the preamble I am currently using - for any more elaborate
posting I'll have to wait until I'm back home. I brought this one with
me but didn't have time to sort everything out.
\documentclass{article}
\usepackage{axiom}
\usepackage{ifthen}
\usepackage{fontenc}
The ifthen package is not so bad, ALLPROSE uses it implicitly and it is
a standard package that comes with any reasonable LaTeX distribution.
I am not sure about fontenc. Why would you need it?
% Here we will define some control logic for printing, in order
% to allow quick switching between using 1 inch margines and
% smaller margines, while also permitting the user to shrink
% specified equations in the different cases. By default we
% will use the standard pamphlet formatting.
\newboolean{usefullpage}
\setboolean{usefullpage}{false}
% Uncomment this line to use 1 inch page margins:
%\setboolean{usefullpage}{true}
Look at ALLPROSE under the target "laptop". I have added some way to
load a file local.sty into the preample in order to redefine things that
you would like to see differently. (Section "Local Modifications" in the
file allprose.sty)
You would then say
make fullpage dvi
where in the Makefile you'd have a rule:
fullpage:
@echo '\usepackage{geometry}' >> local.sty
@echo '\geometry{verbose,letterpaper,tmargin=1in,' >> local.sty
@echo 'bmargin=1in,lmargin=1in,rmargin=1in}' >> local.sty
@echo '\renewcommand\resizeequation[1]{#1}' >> local.sty
The non-fullpage stuff goes as the default into the .sty file.
The idea is that "fullpage" is your personal preference not something of
general interest.
% Here we define control logic for producing a pdf version of
% the document. TeTeX 3.0 and up seem to be semi-automatic, so
% using the old 2.x trick in the Maximabook didn't seem to work.
\newboolean{makepdf}
\setboolean{makepdf}{false}
% Uncomment this line to produce a properly formatted pdf
% document (the main difference is how hyperref is used).
%\setboolean{makepdf}{true}
% The actual ifthen control logic
\ifthenelse{\boolean{usefullpage}}{
\usepackage{geometry}
% For different paper sizes or margins adjust the
% settings here
\geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,
lmargin=1in,rmargin=1in}
% If we are using the full page, we want to have all
% equations full size
\newcommand\resizeequation[1]{#1}
}{
% If we are using the normal Axiom mode, we want some
% equations to use smaller fonts
\newcommand\resizeequation[1]{{\tiny #1}}
}
% These options will change options used for hyperref when
% pdflatex/pdftex is the generator
\ifthenelse{\boolean{makepdf}}{
\usepackage[pdftex=true, plainpages=false, colorlinks=true,
linkcolor=blue, breaklinks=true, pdfpagelabels,
pdftitle={Units and Dimensions in Axiom},
pdfauthor={Clifford Yapp}, pdfsubject={Axiom Units
and Dimensions}, pdfkeywords={Axiom, CAS, Computer
Algebra, Units, Dimensions, Dimensional, Analysis},
bookmarksopen=false, pdfnewwindow=true,
pdfstartview=FitH,
pdfpagemode=UseOutlines]{hyperref}
}{
% hyperref calls for dvi file production
\usepackage[backref=false, colorlinks=false,
breaklinks=true]{hyperref}
Hmm, that is a bit harder. But I have found this
%%% check whether we are running pdflatex
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse % we are not running pdflatex
\else
\pdfoutput=1 % we are running pdflatex
\pdfcompresslevel=9 % compression level for text and image;
\pdftrue
\fi
on http://www.db.informatik.uni-bremen.de/~mr/pdflatex.html.
So, it's not a big problem. At least you don't need to modify the .tex
source if you switch from dvi to pdf output.
Ralf
- [Axiom-developer] Re: allprose missing file, (continued)
- [Axiom-developer] Re: allprose missing file, Ralf Hemmecke, 2005/11/23
- Re: [Axiom-developer] Re: allprose missing file, C Y, 2005/11/23
- Re: [Axiom-developer] Re: allprose missing file, root, 2005/11/23
- Re: [Axiom-developer] Re: allprose missing file, C Y, 2005/11/23
- Re: [Axiom-developer] Re: allprose missing file, root, 2005/11/23
- RE: [Axiom-developer] Re: allprose missing file, Bill Page, 2005/11/23
- Re: [Axiom-developer] Re: allprose missing file, root, 2005/11/23
- RE: [Axiom-developer] Re: allprose missing file, Bill Page, 2005/11/24
- [Axiom-developer] Documentation of the Wiki, Martin Rubey, 2005/11/24
- [Axiom-developer] Fancy LaTeX preamble, C Y, 2005/11/25
- Re: [Axiom-developer] Fancy LaTeX preamble,
Ralf Hemmecke <=
- Re: [Axiom-developer] LaTeX preamble, Martin Rubey, 2005/11/30
- Re: [Axiom-developer] LaTeX preamble, Ralf Hemmecke, 2005/11/30
- [Axiom-developer] Re: allprose missing file, root, 2005/11/23
- [Axiom-developer] Re: allprose missing file, Ralf Hemmecke, 2005/11/23
- [Axiom-developer] Re: allprose missing file, root, 2005/11/23
- RE: [Axiom-developer] Re: allprose missing file, Bill Page, 2005/11/23