summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/memoir/memsty.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-17 00:53:37 +0000
committerKarl Berry <karl@freefriends.org>2009-07-17 00:53:37 +0000
commit5371eca0a5672238a07a473483cdd4a7eeb4a31f (patch)
tree4ab78a8646631a30c982f95980393ec441c5224a /Master/texmf-dist/doc/latex/memoir/memsty.sty
parent0e0dcaa932cda9f19311a4858dc096916b1a2b0f (diff)
memoir 1.6180339f (15jul09)
git-svn-id: svn://tug.org/texlive/trunk@14286 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/memoir/memsty.sty')
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memsty.sty155
1 files changed, 144 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/memoir/memsty.sty b/Master/texmf-dist/doc/latex/memoir/memsty.sty
index a2208cba016..4057da7c53e 100644
--- a/Master/texmf-dist/doc/latex/memoir/memsty.sty
+++ b/Master/texmf-dist/doc/latex/memoir/memsty.sty
@@ -1,5 +1,7 @@
%% memsty.sty For memman
-\ProvidesPackage{memsty}[2007/11/01 for memman]
+\ProvidesPackage{memsty}[2009/07/08 for memman]
+
+%%%%\usepackage{desc}% temporary, until code added to memoir itself
%%\usepackage{layouts}[2001/04/29]
%%\usepackage{verbatim}
@@ -14,8 +16,10 @@
\usepackage{latexsym}
\usepackage{memfonts}
\usepackage{pifont}
+\usepackage{amsmath}
\usepackage[T1]{fontenc}
+
%%%%%%%%%%%%%%%%%%% kill scale change warning in layouts
\renewcommand*{\setlayoutscale}[1]{\setlength{\l@youtunitlength}{1pt}
\l@youtunitlength= #1\l@youtunitlength
@@ -51,16 +55,30 @@
\changeglossnumformat{|hyperpage}
\renewcommand*{\glossaryname}{Command summary}
\renewcommand{\glossitem}[4]{%
- \sbox\@tempboxa{#1 \space #2 #3 #4}%
+ \sbox\@tempboxa{#1 \space #2 #3 \makebox[2em]{#4}}%
\par\hangindent 2em
\ifdim\wd\@tempboxa<0.8\linewidth
- #1 \space #2 #3 \dotfill #4\relax
+ #1 \space #2 #3 \dotfill \makebox[2em][r]{#4}\relax
\else
- #1 \dotfill #4\\
+ #1 \dotfill \makebox[2em][r]{#4}\\
#2 #3
\fi}
\renewcommand*{\glossarymark}{\markboth{\glossaryname}{\glossaryname}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%% endnotes
+\makepagenote
+\notepageref% use page numbers
+\newcommand*{\notemark}{\markboth{\notesname}{\notesname}}
+\renewcommand*{\notedivision}{\chapter{\notesname}\notemark}
+\renewcommand*{\notenumintext}[1]{}% no number marks in main text
+\renewcommand*{\notenuminnotes}[1]{}% no number marks in listing
+\renewcommand*{\idtextinnotes}[1]{\vspace{-0.5\onelineskip}
+ \par [#1]\space}
+\renewcommand*{\notemark}{\markboth{{\scshape \notesname}}{{\scshape \notesname}}}
+\renewcommand*{\pagenotesubhead}[3]{%
+ \section{#1 #2 #3}}
+%%\renewcommand*{\notemark}{\markboth{\notesname}{\notesname}}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Short and long ToC
@@ -137,7 +155,9 @@
plainpages=false,
pdfpagelabels,
%%% hyperfootnotes=false,
- bookmarksnumbered
+ bookmarksnumbered,
+% colorlinks,
+% ocgcolorlinks, % this only works for pdflatex
]{hyperref}
\usepackage{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
@@ -145,13 +165,41 @@
\usepackage[plainpages=false,
pdfpagelabels,
%%% hyperfootnotes=false,
- bookmarksnumbered
+ bookmarksnumbered,
+% colorlinks,
]{hyperref}
\usepackage{graphicx}
\DeclareGraphicsRule{*}{eps}{*}{}
\fi
+
%%% \usepackage{memhfixc} %% now called by hyperref
+
+% this is a lillt special, using this one can change the link colors
+% in the manual to blacnmk without changing any file, just use
+%
+% pdflatex "\def\MEMOIRblacklinks{}\input{memman.tex}"
+%
+\@ifundefined{MEMOIRblacklinks}{%
+ \definecolor{linkcolour}{rgb}{0,0.2,0.6}
+ \definecolor{citecolour}{rgb}{0,0.6,0.2}
+ % \definecolor{filecolor}{rgb}{0,0.2,0.6}
+ \definecolor{urlcolour} {rgb}{0.8,0,0.8}
+}{%
+ typeout{Asked for black links, so that is what you are going to get}
+ \definecolor{linkcolour}{rgb}{0,0,0}
+ \definecolor{citecolour}{rgb}{0,0,0}
+ % \definecolor{filecolor}{rgb}{0,0,0}
+ \definecolor{urlcolour} {rgb}{0,0,0}
+ \hypersetup{colorlinks}
+}
+\hypersetup{
+ pdftitle={The memoir class},
+ pdfauthor={Peter Wilson},
+ linkcolor=linkcolour,citecolor=citecolour,
+ filecolor=urlcolour,urlcolor=urlcolour,
+ }
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Logos
@@ -234,12 +282,27 @@
% index marking
\newcommand{\idxmark}[1]{#1\markboth{#1}{#1}}
-
+%%%% index sup/sub and sub \indexsupsubmain{main}{sub}
+\newcommand*{\indexsupsubmain}[2]{\index{#1!#2}\index{#2}}
%%%% index pair of sup/sub items
\newcommand*{\indextwo}[2]{\index{#1!#2}\index{#2!#1}}
%%% index pair of sup/sub/sub
\newcommand*{\indexthree}[3]{\index{#1!#2!#3}\index{#2!#1!#3}}
+%%% \typesubidx{sub} -> \index{type!sub} Index a type subitem
+\newcommand*{\typesubidx}[1]{\index{type!#1}}
+%%% \seeonceidx{main}{sub} %% index main (see sub), and index sub
+\newcommand*{\seeonceidx}[2]{%
+ \@ifundefined{s1#2s1}%
+ {\global\@namedef{s1#2s1}{?!?}\index{#1!#2|see{#2}}\index{#2}}%
+ {\index{#2}}}
+%%% \facesubseeidx{sub} %% index typeface (see sub), and index sub
+\newcommand*{\facesubseeidx}[1]{\seeonceidx{typeface}{#1}}
+\newcommand*{\Pfontfam}[1]{\texttt{#1}} % print name of a fontfamily
+\newcommand*{\pfontfam}[1]{\Pfontfam{#1}%
+ \index{#1 fontfam?\Pfontfam{#1} (fontfamily)}%
+ \index{fontfamily!#1?\Pfontfam{#1}}} % print/index fontfamily
+
\newcommand*{\Ppstyle}[1]{\textsl{#1}}
\newcommand*{\pstyle}[1]{\Ppstyle{#1}%
\index{#1 pages?\Ppstyle{#1} (pagestyle)}%
@@ -330,8 +393,8 @@
% print and index \\!
\newcommand*{\pixslashbang}{\cmdprint{\\!}\index{"\"\"!?\string\cmdprint{\\}\texttt{"!}}}
-\newcommand*{\senv}[1]{\texttt{\bs begin\{#1\}}} % print \begin{env}
-\newcommand*{\eenv}[1]{\texttt{\bs end\{#1\}}} % print \end{env}
+\DeclareRobustCommand{\senv}[1]{\texttt{\bs begin\{#1\}}} % print \begin{env}
+\DeclareRobustCommand{\eenv}[1]{\texttt{\bs end\{#1\}}} % print \end{env}
\newcommand*{\listofx}{`List of\ldots'}
@@ -353,12 +416,51 @@
\DeclareRobustCommand*{\lb}{\texttt{\char`\{}} % prints {
\DeclareRobustCommand*{\rb}{\texttt{\char`\}}} % prints }
+%% A couple of shorthands
+\newcommand*{\tmri}{\mathrm{i}}
+\newcommand*{\tmrx}{\mathrm{x}}
+
\newcommand*{\foredge}{fore-edge}
\newlength{\pwlayi}\setlength{\pwlayi}{0.45\textwidth} %
\newlength{\pwlayii}\setlength{\pwlayii}{0.45\pwlayi}
\DeclareRobustCommand{\Vprint}[1]{\texttt{\string#1}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% stuff for demoing fonts
+\DeclareFontFamily{T1}{bodoni}{}
+\DeclareFontShape{T1}{bodoni}{m}{n}{ <-> bodonirg9a }{}
+%% \usethisfont[encoding]{size}{baselineskip}{family}{series}{shape}
+\newcommand*{\usethisfont}[6][T1]{%
+ \fontencoding{#1}\fontsize{#2}{#3}\fontfamily{#4}\fontseries{#5}%
+ \fontshape{#6}\selectfont}
+\newcommand*{\termfont}[3]{%
+ \usethisfont{25}{30}{#1}{#2}{#3}}
+\newcommand*{\UCalphabet}{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \&}
+\newcommand*{\LCalphabet}{a b c d e f g h i j k l m n o p q r s t u v w x y z
+ 1 2 3 4 5 6 7 8 9 0 ! ? fi fl}
+\newcommand*{\fox}{It was a dark and stormy night.
+ While all the good men were coming to the aid of the
+ party, the quick brown dog had jumped over the fast red fox
+ to its great surprise. The cattle had wound slowly
+ o'er the lea and I was in the dark.}
+\newcommand*{\Kafka}{`But aren't Kafka's Schlo{\ss} and {\AE}sop's
+{\OE}uvres often na{\"\i}ve vis-\`a-vis the d{\ae}monic ph{\oe}nix's
+official r\^ole in fluffy souffl\'es?' }
+\newcommand*{\namesAZ}{ {\AA}ngel\aa\ Beatrice Claire
+ Diana \'Erica Fran\c{c}oise Ginette H\'el\`ene Iris
+ Jackie K\=aren {\L}au\.ra Mar{\'\i}a N\H{a}ta{\l}{\u\i}e {\O}ctave
+ Pauline Qu\^eneau Roxanne Sabine
+%% T\~a{\'\j}a
+ T\~aja
+ Ur\v{s}ula Vivian Wendy Xanthippe Yv{\o}nne Z\"azilie }
+
+
+
+%% sans label for labelled list
+\newcommand*{\sflabel}[1]{\hspace\labelsep \normalfont\sffamily #1}
+%% italic label for labelled list
+\newcommand*{\itlabel}[1]{\hspace\labelsep \normalfont\itshape #1}
+
%%%%%% stuff for new LaTeX code environment
@@ -401,12 +503,16 @@ chapterstyle. It is one of several styles that come as part of the
\demochapcnt=0
%%\newcommand*{\theHc@demochapcnt}{\thefigure.\arabic{\c@demochapcnt}}
\newcount\savefigcnt
+\newcount\savetabcnt
+\newcount\saveftncnt
\newcommand*{\demochapcolor}{\definecolor{shadecolor}{gray}{0.75}}
\newenvironment{demochap}[2][\onelineskip]{%
\savechapcnt=\c@chapter
\saveseccnt=\c@section
\savesubseccnt=\c@subsection
+ \saveftncnt=\c@footnote
\c@chapter=\demochapcnt
+ \savetabcnt=\c@table
%% \stepcounter{demochapcnt}
\counterwithout*{figure}{chapter}
\begin{figure}
@@ -436,6 +542,7 @@ chapterstyle. It is one of several styles that come as part of the
\fi
\c@chapter=\savechapcnt
\advance\c@chapter\m@ne
+ \renewcommand{\theHchapter}{\thepage.\thechapter-\the\demochapcnt}
\refstepcounter{chapter}%
%% \stepcounter{chapter}
\begin{center}
@@ -448,7 +555,10 @@ chapterstyle. It is one of several styles that come as part of the
\end{figure}
\counterwithin{figure}{chapter}
\global\c@section=\saveseccnt
- \global\c@subsection=\savesubseccnt}
+ \global\c@subsection=\savesubseccnt
+ \global\c@footnote=\saveftncnt
+ \global\c@table=\savetabcnt
+}
%%% comma separated in-line items
\let\litemize\itemize \let\endlitemize\enditemize
@@ -822,8 +932,20 @@ chapterstyle. It is one of several styles that come as part of the
% from email from Lars Madsen
\providecommand{\doidxbookmark}[1]{{\def\@tempa{Symbols}\def\@tempb{#1}%
\centering\bfseries \ifx\@tempa\@tempb @ \else #1\fi\vskip\onelineskip\par}}
+% extended to add booksmarks for each letter group.
\renewcommand{\doidxbookmark}[1]{{\def\@tempa{Symbols}\def\@tempb{#1}%
- \centering\bfseries \ifx\@tempa\@tempb Analphabetics \else #1\fi\vskip\onelineskip\par}}
+ \centering\bfseries \ifx\@tempa\@tempb %
+ Analphabetics
+ \phantomsection%
+ \pdfbookmark[0]{Analphabetics}{Analphabetics-idx}%
+% \label{AnalphabeticsAnalphabeticsAnalphabetics-idx}%
+ \else
+ #1%
+ \phantomsection%
+ \pdfbookmark[0]{#1}{#1-idx}%
+% \label{#1#1#1-idx}%
+ \fi%
+ \vskip\onelineskip\par}}
\providecommand{\hyperpage}[1]{#1}
@@ -873,6 +995,17 @@ chapterstyle. It is one of several styles that come as part of the
\let\original@wrindexm@m\@wrindexm@m
\def\@wrindexm@m{\catcode`\ =10 \original@wrindexm@m}
+% for letter group bookmarks for glossary items
+\newcommand\doglobookmark[1]{%
+ \def\@tempa{Symbols}\def\@tempb{#1}%
+ \ifx\@tempa\@tempb %
+ \phantomsection\pdfbookmark[0]{Analphabetics}{Analphabetics-glo}%
+ \else%
+ \phantomsection\pdfbookmark[0]{#1}{#1-glo}%
+ \fi%
+}
+
+
\typeout{End memsty.sty}
\endinput