summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-01 23:18:44 +0000
committerKarl Berry <karl@freefriends.org>2006-07-01 23:18:44 +0000
commitd6c7c85a6b1261a182a60431f6af860b855ec216 (patch)
tree794c53fc0f09ba53c39a272379fbf0004390c6eb /Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
parentd6dd1c3b1739f957dd0acc6f89e480825511c927 (diff)
mfpic 0.9 update
git-svn-id: svn://tug.org/texlive/trunk@1747 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty')
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty179
1 files changed, 128 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
index 674dc965061..46c2077ca96 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpdoc.sty
@@ -1,34 +1,48 @@
%%% File: mfpdoc.sty
-%%% A part of mfpic 0.7a beta 2004/04/16
+%%% A part of mfpic 0.9 2006/05/26
%%%
-\ProvidesPackage{mfpdoc}[2003/11/14 v0.5 macros for mfpic documentation]
-
-\RequirePackage{ifpdf}
-
-\newcommand\mfpversion{0.7a beta}
-\newcommand\mfpdate {2004/04/16}
-
-% Text size:
-
-\textwidth 5.4167 in
-\textheight 7.4166 in
-
-% Equal LR margins
-\oddsidemargin 0.5\paperwidth
- \advance\oddsidemargin-.5\textwidth
- \advance\oddsidemargin-1truein
+\ProvidesPackage{mfpdoc}[2006/05/26 v0.9 macros for mfpic documentation]
+
+\newif\if@chapters
+\@chaptersfalse
+\DeclareOption{chapters}{\@chapterstrue}
+
+\newif\if@stupidlogos
+\@stupidlogostrue
+\DeclareOption{nologos}{\@stupidlogosfalse}
+\ProcessOptions
+
+\IfFileExists{ifpdf.sty}{\RequirePackage{ifpdf}}
+ {\csname newif\expandafter\endcsname\csname ifpdf\endcsname \pdffalse
+ \ifx\pdfoutput\undefined
+ \else\ifx\pdfoutput\relax
+ \else\ifnum0=\pdfoutput
+ \else
+ \pdftrue
+ \fi\fi\fi}
+
+\newcommand\mfpversion{0.9}
+\newcommand\mfpdate {2006/05/26}
+
+%% Text size:
+
+\textwidth 5.5 in
+\textheight7.5 in
+\oddsidemargin .5in
\evensidemargin\oddsidemargin
-
-% "Equal" TB margins (if headings are ignored).
-\topmargin 0.5\paperheight
- \advance\topmargin-0.5\textheight
+\topmargin .75in
\advance\topmargin-\headheight
\advance\topmargin-\headsep
- \advance\topmargin-1truein
\ifpdf
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
+ \def\mfpHyOpts{%
+ pdftex,colorlinks,pdfpagemode=none,%
+ pdfstartview={XYZ null null null},%
+ plainpages=false,hypertexnames=true}
+ \def\mfpHyDisable{%
+ \def\cs##1{\otherbackslash##1}\let\opt\@firstofone\let\prog\@firstofone}
\else
\ifx\mfpdvipdfm\UndEfInEd
\special{papersize=\the\paperwidth,\the\paperheight}
@@ -36,8 +50,7 @@
\special{pdf: pagesize width \the\paperwidth\space height \the\paperheight}
\fi
\fi
-
-\renewcommand\section{\@startsection {section}{1}{\z@}%
+\renewcommand\section{\@startsection{section}{1}{\z@}%
{-2.4ex \@plus -.5ex \@minus -.1ex}%
{1.0ex \@plus.1ex}%
{\normalfont\large\bfseries}}
@@ -46,9 +59,20 @@
{.75ex \@plus .1ex}%
{\normalfont\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {-1.2ex\@plus -.3ex \@minus -.1ex}%
+ {-1.5ex\@plus -.3ex \@minus -.1ex}%
{.5ex \@plus .1ex}%
{\normalfont\scshape\raggedright}}
+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {-1ex\@plus -.2ex \@minus -.1ex}%
+ {.4ex \@plus .1ex}%
+ {\normalfont\itshape\raggedright}}
+
+\if@chapters
+ \let\chapter\section
+ \let\section\subsection
+ \let\subsection\subsubsection
+ \let\subsubsection\paragraph
+\fi
\def\mfpicversiontext{\prog{Mfpic} version: \mfpversion.}
@@ -75,6 +99,16 @@
\def\mfpindexheading{}
\def\mfpindexpagemarks{}
+\def\@listi{\leftmargin\leftmargini
+ \parsep \z@ \@plus\p@ \@minus\z@
+ \topsep 1ex \@plus.2ex \@minus 1ex
+ \itemsep\parsep}
+\let\@listI\@listi \@listi
+\renewcommand\labelitemi{\normalfont\bfseries \textendash}
+\renewcommand\labelitemii{\textasteriskcentered}
+\renewcommand\labelitemiii{\textperiodcentered}
+\leftmargini 1.5\parindent
+
\renewenvironment{theindex}
{%
\@restonecoltrue
@@ -89,31 +123,66 @@
}
{\clearpage}
-% command descriptions:
-\newenvironment{cd}
- {\def\ {\leavevmode\null\quad}% small space at beginning of line
- \par\addvspace{1.75ex plus .3ex minus .1ex}
- \vbox\bgroup\parindent0pt\ignorespaces}
- {\unskip\strut\egroup\nobreak\vspace{.75ex plus .3ex minus .1ex}%
- \@ignoretrue}
-% examples:
+%% Because \pageref doesn't link to the actual page:
+\newcommand\pagelabel{\ifpdf \phantomsection \fi\label}
+
+%% Displays %%%%%%%%%%%
+%% command descriptions:
+\newenvironment{cd}
+ {\par\addvspace{1.75ex plus .3ex minus .1ex}
+ \parindent0pt
+ \vbox\bgroup\hsize\textwidth
+ \def\ {\leavevmode\null\quad}% small space at beginning of line
+ }
+ {\unskip\strut\egroup\@ignoretrue
+ \aftergroup\@afterindenttrue\aftergroup\@afterheading
+ \nobreak\vskip.75ex plus .3ex minus .1ex}
+
+%% examples:
\newenvironment{ex}
- {\par\def\ {\leavevmode\null\quad}%
- \addvspace{1ex plus.2ex minus.1ex}\leftskip2\parindent\relax
- \vbox\bgroup\parindent0pt\ignorespaces}
- {\unskip\egroup\vskip 1ex plus.2ex minus.1ex \@ignoretrue\@endpetrue}
-
-\def\pdfTeX{pdf\kern.04em\TeX}
-\def\pdfLaTeX{pdf\kern.06em\LaTeX}
-\def\ConTeXt{Con\kern-.16em \TeX \kern-0.06em t}
-\def\eTeX{e\kern-.10em \TeX}
-\def\AmSTeX{$\cal A$\kern-.1667em\lower.5ex
- \hbox{$\cal M$}\kern-.125em$\cal S$-\TeX}
-\def\PiCTeX{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\kern-.11em\TeX}
+ {\par\addvspace{1ex plus.2ex minus.1ex}%
+ \parindent0pt
+ \vbox\bgroup\hsize\textwidth
+ \leftskip\leftmargini
+ \def\ {\leavevmode\null\quad}}
+ {\unskip \strut \egroup \vskip 1ex plus.2ex minus.1ex
+ \@ignoretrue\@endpetrue}
+
+%% verbatim:
+\RequirePackage{verbatim}
+\def\verbatim@processline{\hspace{\leftmargini}\the\verbatim@line\par}
+
+%% other:
+\newenvironment{display}{\list{}{}\item[]}{\endlist}
+%% end displays %%%%%%%
+
+%% Logos %%%%%%%%%%%%%%
+\if@stupidlogos
+ \def\TeX{T\kern-.1667em\lower.4ex\hbox{E}\kern-.125emX}
+ \def\pdfTeX{pdf\kern.04em\TeX}
+ \def\pdfLaTeX{pdf\kern.06em\LaTeX}
+ \def\ConTeXt{Con\kern-.16em \TeX \kern-0.06em t}
+ \def\eTeX{e\kern-.10em \TeX}
+ \def\CMcal{\fontencoding{OMS}\fontfamily{cmsy}\selectfont}
+ \def\AmSTeX{{\CMcal A\kern-.1667em\lower.5ex\hbox{M}\kern-.125em S}-\TeX}
+% \def\PiCTeX{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\kern-.11em\TeX}
+ \def\PiCTeX{P\kern-.06em\lower.4ex\hbox{I}\kern-.075emC\kern-.06em\TeX}
+\else
+ \def\TeX {\textsc{TeX}}
+ \def\LaTeX {\textsc{LaTeX}}
+ \def\pdfTeX {\textsc{pdfTeX}}
+ \def\pdfLaTeX{\textsc{pdfLaTeX}}
+ \def\ConTeXt {\textsc{ConTeXt}}
+ \def\eTeX {\textsc{eTeX}}
+ \def\AmSTeX {\textsc{$AMS$-TeX}}
+ \def\PiCTeX {\textsc{PiCTeX}}
+\fi
+%% end Logos %%%%%%%%%%
\hyphenation{meta-font meta-post Post-Script Ghost-script}
+%% Special words %%%%%%
\def\MF{\prog{metafont}}
\def\CMF{\prog{Metafont}}
\def\MP{\prog{metapost}}
@@ -126,12 +195,13 @@
\def\grafbase{\prog{grafbase}}
\def\Grafbase{\prog{Grafbase}}
+%% font commands
\def\mytt#1{\relax
\ifmmode \mathtt{#1}
- \else {\upshape\mdseries\ttfamily#1}\fi}
-\def\mfc{\begingroup\mdseries\ttfamily\catcode`\_=12 \grabit}
+ \else {\upshape\ttfamily#1}\fi}
+\def\mfc{\begingroup\ttfamily\catcode`\_=12 \grabit}
\def\grabit#1{#1\endgroup}
-\def\_{{\tt\char`\_}}
+\def\_{{\upshape\ttfamily\char`\_}}
\def\prog#1{{\mdseries\scshape#1}} % programs, packages
\let\file\mytt % filenames
\def\opt#1{{\upshape\sffamily#1}} % LaTeX option names
@@ -157,16 +227,23 @@
\let\@mkboth\markboth
\def\sectionmark##1{\thispagestyle{plain}}
\def\subsectionmark##1{%
- \markright {\thesubsection\quad##1}}%
+ \markright {\thesection\quad##1}}%
\def\subsubsectionmark##1{}}
+\if@chapters
\renewcommand\tableofcontents{\pagenumbering{roman}%
- \section*{\contentsname
+ \chapter*{\contentsname
\@mkboth{\scshape\contentsname}{\scshape\contentsname}}%
\@starttoc{toc}\clearpage\pagenumbering{arabic}}
+\fi
-% figures at top of float pages:
+%% figures:
\@fptop=-\@fpsep
+\@addtoreset{figure}{section}
+
+%% misc:
+\def\tallstrut{\vbox to 10pt{}}
+\def\deepstrut{\vtop to 5pt{}}
\frenchspacing
\endinput