diff options
author | Karl Berry <karl@freefriends.org> | 2007-05-19 16:06:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-05-19 16:06:11 +0000 |
commit | c11a0850e29ea8d9ffdb5696efc582fad8e57793 (patch) | |
tree | 300bd861c8a6e10ac06031fd70f8abd1ba073efd /Master/texmf-dist | |
parent | 71199f0d5b9772184cc792bfe50790505a6180cb (diff) |
new latex bundle dlfltxb (17may07)
git-svn-id: svn://tug.org/texlive/trunk@4314 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
15 files changed, 2198 insertions, 0 deletions
diff --git a/Master/texmf-dist/bibtex/bib/dlfltxb/package_doc.bib b/Master/texmf-dist/bibtex/bib/dlfltxb/package_doc.bib new file mode 100644 index 00000000000..66a49bf5202 --- /dev/null +++ b/Master/texmf-dist/bibtex/bib/dlfltxb/package_doc.bib @@ -0,0 +1,31 @@ + +@Booklet{ltxb, + title = {Introduktion til {\LaTeX}}, + OPTkey = {}, + author = {Lars Madsen}, + howpublished = {\url{http://www.imf.au.dk/system/latex/bog/}}, + OPTaddress = {}, + OPTmonth = {}, + year = {2007}, + note = {The current version of the book is 3rd edition beta.}, + OPTannote = {} +} + +@Book{swanson, + author = {Swanson, Ellen}, + ALTeditor = {}, + title = {Mathematics into {T}ype}, + publisher = {American Mathematical Society}, + year = {1999}, + OPTkey = {}, + OPTvolume = {}, + OPTnumber = {}, + OPTseries = {}, + OPTaddress = {}, + OPTedition = {}, + OPTmonth = {}, + note = { + An set of old notes, updated in 1999 by + Arlene O'Sean og Antoinette Schleyer.}, + OPTannote = {} +} diff --git a/Master/texmf-dist/doc/latex/dlfltxb/README b/Master/texmf-dist/doc/latex/dlfltxb/README new file mode 100644 index 00000000000..14ff1617583 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/README @@ -0,0 +1,104 @@ +% (C) Lars Madsen, daleif@imf.au.dk, 2007/05/18 +% This material is subject to the LaTeX Project Public License. +% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html +% for the details of that license. + +The dlfltxb bundle consists of (currently) three packages used for my +book "Introduktion til LaTeX" (in Danish, available from +http://www.imf.au.dk/system/latex/bog/). + +One package consists of various home made macros (in the book +presented as code tips), which are also useful for other users. The +last two packages are used internally for writing the book. + +At least one more package (dlfltxbsc) will be added to the bundle +later (presumably Fall 2007). This is the package used for all the +examples in the book. + +Current file contents for the dlfltxb bundle: +============================================= + +dlfltxbcodetips (v0.1): +----------------------- + + * dlfltxbcodetips.sty + * dlfltxbcodetips.pdf (manual) + * dlfltxbcodetips.tex (source for the manual) + + The dlfltxbcodetips package contains macros: + + * \bigtimes (without the need for extra fonts) + * \nuparrow, \ndownarrow (using graphicx and \nrightarrow and \nleftarrow) + * \InsertTheoremBreak for inserting a 'linebreak' before the start of + a list, when that list is the first part of a theorem text + * a series of macros for helping with alignment in formulas + * \NewShadedTheorem for auto creating shaded theorems with the + ntheorem package (requires the user to load the (x)color and framed + packages and define the shadecolor, and of course using ntheorem) + * \SwapDeadSpace to be placed at the beginning of for example an align + to switch the spacing above from \abovedisplayskip to + \abovedisplayshortskip + + +dlfltxbmarkup (v0.6): +--------------------- + + * dlfltxbmarkup.sty + * dlfltxbmarkup.pdf (manual) + * dlfltxbmarkup.tex (source for the manual) + * dlfltxbmarkup-sample.cfg (sample configuration file, actually the + keys I currently use for the book) + * dlfltxbmarkup-showkeys.tex (a file that can be used to print a list + of category keys and their description) + * dlfltxbmarkup-showkeys.pdf (sample description file showing the + * contents of dlfltxbmarkup-sample.cfg) + + The dlfltxbmarkup package provides: + + * \markup for marking up words etc. in the text. The context is + controlled by user defined category keys. \markup can + automatically write in the text, in the (outer) margin and adding + the word to the index (in several places if so defined in the key + definition) + * \felineGenerateKey for generating category keys + + The dlfltxbmarkup package requires the use of the memoir + class. Currently I do not plan on creating a version the is not + dependant of memoir. + + +dlfltxbmisc (v0.1): +------------------- + + * dlfltxbmisc.sty + * dlfltxbmisc.pdf (manual) + * dlfltxbmics.tex (source for the manual) + + The dlfltxbmisc package provides + + * macros for writing sample LaTeX arguments + * two simple environments for displaying syntax + * the \addurl (bad name) that I use for specially wrapping URLs in + the bibliography + + +package_doc.bib: +---------------- + + Bibliographic information used by all three documentations. + + +INSTALLATION: +============= + +Place all *.sty and *.cfg files in + +tex/latex/dlfltxb + +All *.tex *.bib *.pdf and README in + +doc/latex/dlfltxb + + +/Lars Madsen +daleif@imf.au.dk diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf Binary files differnew file mode 100644 index 00000000000..5a234375f74 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex new file mode 100644 index 00000000000..78527b70039 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex @@ -0,0 +1,478 @@ +\RequirePackage{etex} +\documentclass[11pt,oneside,a4paper,oldfontcommands,danish,english,article]{memoir} +\usepackage[latin1]{inputenc} +\usepackage{babel} +\usepackage[T1]{fontenc} +\usepackage[widespace]{fourier} + +\setlxvchars[\normalfont] + +\settypeblocksize{*}{1.3\lxvchars}{1.618} + +\setlrmargins{*}{*}{0.7} +\setulmargins{*}{*}{1} +\setlength\marginparwidth{4cm} + +\checkandfixthelayout + + +\hfuzz=30pt + + +\usepackage{color} +\usepackage[colorlinks,breaklinks]{hyperref} +\definecolor{linkcolour}{rgb}{0,0.2,0.6} +\definecolor{citecolour}{rgb}{0,0.6,0.2} +\definecolor{urlcolour} {rgb}{0.8,0,0.8} + +\hypersetup{ + pdftitle={The dlfltxbcodetips package}, + pdfauthor={Copyright \textcopyright\ \number\year\ Lars Madsen}, + linkcolor=linkcolour,citecolor=citecolour, + filecolor=urlcolour,urlcolor=urlcolour, + plainpages=false, +} + +\ifpdf\else\usepackage{breakurl}\fi +\usepackage{memhfixc} + +\clubpenalty=300 +\widowpenalty=300 + +\usepackage{microtype} + +\usepackage{amsmath,amssymb} +\usepackage[amsmath,thmmarks]{ntheorem} +\usepackage[round]{natbib} + +\usepackage{dlfltxbcodetips} +\usepackage[loadsampleconfig]{dlfltxbmarkup} +\renewcommand\felineMarginAdjustment{\RaggedLeft} + + + +\usepackage{dlfltxbmisc} +\usepackage{graphicx} + +\chapterstyle{article} + +\setsecheadstyle{\normalfont\large\bfseries\raggedright} + + +\reversemarginpar +\reversesidepartrue + +\definecolor{shadecolor}{gray}{0.8} +\theorembodyfont{\normalfont} +\theoremseparator{.} +\NewShadedTheorem{caveat}{Caveat} + + +% until dlfltxbsd is released we will have to use the following +% construction + +\usepackage{fancyvrb} +\fvset{fontsize=\footnotesize} + +\newcommand\verbfile{\jobname.vrb} +\newenvironment{sourcedisplay}{% +\par\vskip0.5\baselineskip\noindent +\VerbatimOut{\verbfile}}{% +\endVerbatimOut% +\noindent +\begin{minipage}{0.48\linewidth} +\VerbatimInput{\verbfile} +\end{minipage} +\hfill +\begingroup% +\begin{minipage}{0.48\linewidth} +\begin{framed} +\input{\verbfile} +\end{framed} +\end{minipage} +\endgroup\vskip0.5\baselineskip} + + +\newenvironment{Sourcedisplay}{% +\par\vskip0.5\baselineskip\noindent +\VerbatimOut{\verbfile}}{% +\endVerbatimOut% +\noindent +\begin{minipage}{\linewidth} +\VerbatimInput{\verbfile} +\end{minipage} +\par\bigskip\noindent +\begin{minipage}{\linewidth} +\begin{framed} +\input{\verbfile} +\end{framed} +\end{minipage} +\vskip0.5\baselineskip} + + +\pagestyle{plain} + +\begin{document} + +\title{Code tips from ``Introduktion til \LaTeX''\\{\normalsize Or just the + \textsf{\jobname} package}} +\author{Lars Madsen\thanks{Web: + \url{http://home.imf.au.dk/daleif}\qquad Email: \url{daleif@imf.au.dk}}} +\maketitle + +\tableofcontents* + +\setsecnumdepth{part} + +\chapter{Introduction} +\label{cha:introduction} + +In my \LaTeX\ book \citep{ltxb} we present some macros that might be +helpful to the readers. Some of these extra macros might be useful to +others as well so these macros have been included in the +\markup[nomk,sty]{dlfltxbcodetips} package. The package is published on \textsc{ctan} and the +package is released under the normal lppl license. + +The >>\texttt{dlfltxb}<< part of the name simply stands for >>daleif<< +and \LaTeX\ book. The \markup[nomk,sty]{dlfltxbcodetips} package is the first +package in the >>\texttt{dlfltxb}<<-bundle which, over time, will +contain most of the home made packages that I use to create my book +(though not the book source itself). + +Some of the macros might be better of included in the +\markup[nomk,sty]{mathtools} package by Morten Høgholm, but he is quite busy +elsewhere at the moment. over time some of the macros might be +imcluded in + +\newpage +\noindent +\emph{Note:} The macro \verb+\dbx+ will often be used to simulate some +text or mathematical material. + +\setsecnumdepth{section} + +\chapter{Extra symbols} +\label{cha:extra-symbols} + +\section{\texorpdfstring{A big version of \cs{times}}{A big version of + \textbackslash times}} +\label{sec:big-version-cstimes} + + + +A few extra symbols have been created. First of is \markup{bigtimes} +which is a large operator version of \markup[nomk]{times}, but without +having to load special fonts. +\begin{sourcedisplay} +$\bigtimes_{n=1}^k A_n$ +\[ \bigtimes_{n=1}^k A_n \] +\end{sourcedisplay} + +\section{Negated up- and downarrows} +\label{sec:negat-up-down} + +The package creates \markup{nuparrow} and \markup{ndownarrow} by +rotating and reflecting \markup[nomk]{nrightarrow} and +\markup[nomk]{nleftarrow} +respectively. +\begin{sourcedisplay} +$ A \nuparrow B$ \qquad +$ B \ndownarrow C$ +\end{sourcedisplay} +The macros require the use of the \markup[nomk,sty]{graphicx} package, +which is not auto loaded. + +\chapter{Fun with theorems} +\label{cha:fun-with-theorems} + +\section{Shaded theorems with the ntheorem package} +\label{sec:shaded-theorems-with} + +Even though we have the \markup[nomk,sty]{shadedthm} package, we can +easily do better if we are already using the +\markup[nomk,sty]{ntheorem} package. Simply use +\begin{syntax} + \markup{NewShadedTheorem} +\end{syntax} +It has exactly the same syntax as the ordinary +\markup[nomk]{newtheorem}. Requirements: the +\markup[nomk,sty]{framed}, \markup[nomk,sty]{ntheorem}, +(\texttt{x})\markup[nomk,sty]{color} packages and the definition of +the >>\texttt{shadecolor}<< (required by the \markup[nomk,sty]{framed} package). +\begin{sourcedisplay} +\theoremheaderfont{\bfseries} +\theoremseparator{.} +\NewShadedTheorem{thm}{Theorem}[chapter] +\NewShadedTheorem{lemma}[thm]{Lemma} +\newtheorem{prop}[thm]{Proposition} +\begin{thm} + normal test. +\end{thm} +\begin{thm*} + un-numbered. +\end{thm*} +\begin{lemma} + a lemma. +\end{lemma} +\begin{prop} + a theorem with no background. +\end{prop} +\end{sourcedisplay} +In contrast to \markup[nomk,sty]{ntheorem}, the $*$-ed version created +by \markup[nomk]{NewShadedTheorem} is a version that does not print a +number. + +\section{Theorems that start with a list} +\label{sec:theorems-that-start} + +A theorem that starts with a list looks odd because the first item +comes directly after the heading.\footnote{Depends on the + configuration.} +\makeatletter +\let\thm\thm@inner +\let\endthm\endthm@inner +\makeatother +\begin{sourcedisplay} +\begin{thm} + \begin{enumerate} + \item \dbx[2cm] + \item \dbx[2cm] + \item \dbx[2cm] + \end{enumerate} +\end{thm} +\end{sourcedisplay} +The macro \markup{InsertTheoremBreak} helps. +\begin{sourcedisplay} +\begin{thm} + \InsertTheoremBreak + \begin{enumerate} + \item \dbx[2cm] + \item \dbx[2cm] + \item \dbx[2cm] + \end{enumerate} +\end{thm} +\begin{thm} + \InsertTheoremBreak* + \begin{enumerate} + \item \dbx[2cm] + \item \dbx[2cm] + \item \dbx[2cm] + \end{enumerate} +\end{thm} +\end{sourcedisplay} +\noindent The un-stared version remove the space above the list, the +stared version does not. + +\begin{caveat*} + If the theorem comes too close to a page break it is quite likely + that the page break will end up between the theorem header and the + start of the list. +\end{caveat*} + +\chapter{Various features regarding alignment} +\label{cha:vari-feat-regard} + +\section{Arrow between lines} +\label{sec:arrow-between-lines} + +Sometimes lines in an alignment are related in the sense of \emph{from +which it follows}, usually indicated by $\Rightarrow$. We would like +to place this between the lines in a nice way. The following macro is +due to Morten Høgholm. +\begin{syntax} + \markup{ArrowBetweenLines}\oarg{arrow} + \markup{ArrowBetweenLines*}\oarg{arrow} +\end{syntax} +Simply hold back one column of alignment for the arrow: +\begin{sourcedisplay} +\begin{alignat}{2} + && f(x) & = \dbx[2cm] \\ + \ArrowBetweenLines + && g(x) & = - \dbx[2cm] \\ + \ArrowBetweenLines[\Downarrow] + && h(x) & = 0 +\end{alignat} +\end{sourcedisplay} +Note the height of the arrow line and that the line automatically does +not contain equation numbers. The stared version can be used to place +the arrows on the right. Though several alignment columns on each line +might become a problem. +\begin{sourcedisplay} +\begin{alignat}{2} + f(x) & = \dbx[2cm] \\ + \ArrowBetweenLines* + g(x) & = - \dbx[2cm] \\ + \ArrowBetweenLines*[\Downarrow] + h(x) & = 0 +\end{alignat} +\end{sourcedisplay} + + +\section{Switch dead space} +\label{sec:switch-dead-space} + +The standard \markup[nomk,env]{equation} environment has the feature +that if the text before it is short and the formula likewise, then the +drop between the preceding text and the formula will be +\markup[length,nomk]{abovedisplayshortskip} instead of the usual +\markup[length,nomk]{abovedisplayskip}. The macros from the +\markup[nomk,sty]{amsmath} package does not have this feature (except +\markup[nomk,env]{equation*}). +\begin{sourcedisplay} +text +\[ a=b \] +text +\begin{align*} + a=b +\end{align*} +\end{sourcedisplay} +The macro \markup{SwapDeadSpace} can simulate this feature +\begin{sourcedisplay} +text +\[ a=b \] +text +\begin{align*} + \SwapDeadSpace + a=b +\end{align*} +\end{sourcedisplay} + +\section{Left alignment} +\label{sec:left-alignment} + +In \cite{swanson}, Ellen Swanson presents some recommendations +regarding how to arrange displayed formulas. One thing she recommends +is alignment to the left and with all subsequent lines indented by +2\,em. +\begin{align*} +\malign[-2pt]{2} + &\dbx[5cm]=\dbx[4cm]\\ + &\qquad{}=\dbx[6cm]\\ + &\qquad{}=\dbx[5cm]\,. +\end{align*} +or +\begin{align*} +\malign[-2pt]{2} + &\dbx[8cm]\\ + &\qquad{}=\dbx[4cm]\\ + &\qquad{}=\dbx[6cm]\,. +\end{align*} +or +\begin{align*} +\malign[-2pt]{2} + &\dbx[5cm]=\dbx[4cm]\\ + &\qquad{}+\dbx[6cm]\\ + &\qquad{}\times\dbx[5cm]\,. +\end{align*} +and +\begin{align*} +\malign[-2pt]{2} + &\dbx[8cm]\\ + &\qquad{}-\dbx[4cm]\\ + &\qquad{}\otimes\dbx[6cm]\,. +\end{align*} +But having to do all those indentations by hand quickly becomes quite +dull. Instead, align everything to the left, and pull back the first +line. This is what the following macro does. +\begin{syntax} + \markup{PullBack}\oarg{number} +\end{syntax} +The optional argument is a number (without unit, em will be used) +indicating the amount of indentation. 2\,em is the default. Now simply +use \markup[nomk]{PullBack} instead of the >>\texttt{\&}<< on the +first line. +\begin{sourcedisplay} +\begin{align*} + \PullBack f(x) + g(x) + \dbx[4cm] \\ + & = \dbx[5cm] \\ + & = \dbx[5cm] +\end{align*} +\end{sourcedisplay} +The optional argument is usually used whenever the alignment is moved +to the right of the equal signs. +\begin{sourcedisplay} +\begin{align*} + \PullBack[3] f(x) + g(x) + \dbx[4cm] \\ + ={} & \dbx[5cm] \\ + & + \dbx[5cm] +\end{align*} +\end{sourcedisplay} + +\section{Alignment with material encased in delimiters on different lines} +\label{sec:alignm-with-mater} + +Swanson also recommends that if one has material encased with +delimiters and the delimiters are on different lines, then if space +permits, the material should be indented such that the relationship is +evident. Usually we would use a \markup[nomk]{phantom} to do this, +such as in the next example. +\begin{sourcedisplay} +\begin{align*} + \dbx[5mm]&= \dbx[5mm]\bigl[{} \dbx[3cm]\\ + &\phantom{=\dbx[5mm]\bigl[{}} + \times \dbx[3cm]{}\\ + &\phantom{=\dbx[5mm]\bigl[{}} + - \dbx[3cm]{}\bigr]\\ + &=\dbx[3cm] +\end{align*} +\end{sourcedisplay} +The problem with this is that it gets tedious and prone to human +error. How about instead maintaining a stack of material determining +the indentation together with tools to reset, add to and pop the +stack. For this you can use the following macros +\begin{syntax} + \markup{MathIndent} + \markup{SetMathIndent}\marg{math code} + \markup{AddtoMathIndent}\marg{math code} + \markup{PopMathIndent} + \markup{PopMathIndent*} +\end{syntax} +\markup[nomk]{MathIndent} is used to set a space corresponding to the +current indentation saved on the stack. \markup[nomk]{SetMthIndent} +takes its argument and saves it on the stack, calculates the current +math indent length and ends by typesetting the given argument, i.e. no +need to copy anything. Similarly the \markup[nomk]{AddtoMathIndent} +adds it argument to the stack and adds the length of it to the saved +math indent. So instead of copying code, now we simply encase it with +either \markup[nomk]{SetMathIndent} (for the initialisation) or +\markup[nomk]{AddtoMathIndent}. \markup[nomk]{PopMathIndent} is +similar to \markup[nomk]{MathIndent}, in that it sets a blank space +corresponding to the contents of the stack after we have popped off +the top item. \markup[nomk]{PopMathIndent*} pops the stack but does +\emph{not} set any space. + + +Now, an illustrative example might be in order: +\begin{Sourcedisplay} +\begin{align*} +\dbx ={} & \SetMathIndent{\dbx[1cm] \Bigl[} \dbx[6cm] \\ + & \MathIndent + \dbx[7cm] \\ + & \MathIndent + \AddtoMathIndent{{} + \dbx \Bigl\{} + \AddtoMathIndent{\dbx[2cm] + \Bigl(} \dbx[4cm] \\ + & + \MathIndent + \dbx[4cm] \Bigr) \\ + & \PopMathIndent + \dbx[6cm] \Bigr\} \\ + & \PopMathIndent + \dbx[6cm] \Bigr] +\end{align*} +\end{Sourcedisplay} +Notice the dual use of \markup[nomk]{AddtoMathIndent} such that we can +return to the indentation set by the >>\texttt{\{}<<. + +Of course, non-balanced \markup[nomk]{left}--\markup[nomk]{right} +constructions may not be used. + +\bibliographystyle{plainnat} +\bibliography{package_doc} + + + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% TeX-source-specials-mode: t +%%% TeX-PDF-mode: nil +%%% End: + diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf Binary files differnew file mode 100644 index 00000000000..d3b75ec63b5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.tex b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.tex new file mode 100644 index 00000000000..7449c59615b --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.tex @@ -0,0 +1,29 @@ +\documentclass[a4paper,twocolumn]{memoir} +\setlrmarginsandblock{2.5cm}*1 +\checkandfixthelayout +\newoutputstream{showkeys} +\openoutputfile{\jobname.keys}{showkeys} +\addtostream{showkeys}{\protect\begin{description}} +\newcommand\felineMarkupDescription[5]{% + \addtostream{showkeys}{\protect\item[#1] #2 }% +} +\usepackage[loadsampleconfig]{dlfltxbmarkup} +%\usepackage{dlfltxbmarkup} +\usepackage{calc,enumitem} +\setdescription{style=nextline,font=\ttfamily} +\addtostream{showkeys}{\protect\end{description}} +\closeoutputstream{showkeys} +\pagestyle{plain} +\addtolength\columnsep{1cm} +\setlength\columnseprule{0.4pt} +\begin{document} +\raggedright +\twocolumn[\section*{Key descriptions for the current setting of the + \texttt{dlfltxbmarkup} package}] +\input{\jobname.keys} +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf Binary files differnew file mode 100644 index 00000000000..ee48cf7de99 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.tex b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.tex new file mode 100644 index 00000000000..faf1260fca2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.tex @@ -0,0 +1,335 @@ +\RequirePackage{etex} +\documentclass[11pt,oneside,a4paper,oldfontcommands,danish,english,article]{memoir} +\usepackage[T1]{fontenc} +\usepackage[widespace]{fourier} +\usepackage{babel} +\usepackage{calc} +\usepackage[round]{natbib} + +\makeatletter +\DeclareRobustCommand{\LaTeX}{L\kern-.28em% + {\sbox\z@ T% + \vbox to\ht\z@{\hbox{\check@mathfonts + \fontsize\sf@size\z@ + \math@fontsfalse\selectfont + A}% + \vss}% + }% + \kern-.15em% + \TeX} +\makeatother + +\setlxvchars[\normalfont] + +\settypeblocksize{*}{1.3\lxvchars}{1.618} + +% for print +\setlrmargins{*}{*}{1.6} +\setulmargins{*}{*}{1.3} + +% for online +\setlrmargins{*}{*}{0.7} +\setulmargins{*}{*}{1} +\setlength\marginparwidth{4cm} + +\checkandfixthelayout + + +\hfuzz=30pt + +\newif\ifhyperlinks +\hyperlinksfalse +\hyperlinkstrue + +\ifhyperlinks +\usepackage{nameref} +\fi + +\ifhyperlinks + \usepackage{color} + \usepackage[colorlinks,breaklinks]{hyperref} + \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} + + \hypersetup{ + pdftitle={The dlfltxbmarkup package}, + pdfauthor={Copyright \textcopyright\ number\year\ Lars Madsen}, + linkcolor=linkcolour,citecolor=citecolour, + filecolor=urlcolour,urlcolor=urlcolour, + plainpages=false, + } + + \ifpdf\else\usepackage{breakurl}\fi + \usepackage{memhfixc} +\fi + +\clubpenalty=300 +\widowpenalty=300 + + +\ifpdf +\usepackage[protrusion=true,expansion=true]{microtype} +\else +\usepackage[protrusion=true]{microtype} +\fi + +\makeatother + + +\usepackage[loadsampleconfig]{dlfltxbmarkup} +\usepackage{dlfltxbmisc} + +\renewcommand\felineMarginAdjustment{\RaggedLeft} + +\setlength\marginparsep{2em} +\setlength\marginparwidth{3cm} + +\chapterstyle{article} + +\setsecheadstyle{\normalfont\large\bfseries\raggedright} + + +\reversemarginpar +\reversesidepartrue +\twocolumnfootnotes + +\setsecnumdepth{part} + +\pagestyle{plain} + +\hyphenation{felineWrite-InMargin felineMargin-Adjustment} + +\begin{document} + +\title{The \textsf{dlfltxbmarkup} package\thanks{Version: 0.6}} +\author{Lars Madsen\thanks{Email: daleif@imf.au.dk}} +\maketitle + +\noindent +This package implements the \markup[nomk]{markup} features that are +used extensively in \cite{ltxb}. + + +\section{Requirements} +\label{sec:requirements} + +This package depends on several \markup[nomk,cls]{memoir} internals so +it can only be used together with the \markup[nomk,cls]{memoir} +class. Further requirements are \markup[nomk,sty]{keyval} and +\markup[nomk,sty]{ragged2e}. + + +\section{Usage} +\label{sec:usage} + +The \markup[nomk]{markup} macro is intended to be used for +categorising various types of keywords. These can then be +automatically written in the text as well as in the (outer) margin and +added to the index. +\begin{syntax} + \markup{markup}\oarg{keys}\marg{text} +\end{syntax} +The key list is a mix of control keys and user defined category +keys. How to created the user defined keys are explained later. +The control keys are listed below. +\begingroup +\renewcommand\descriptionlabel[1]{% + \hspace\labelsep% + \settowidth\unitlength{\texttt{#1}}% + \addtolength\unitlength{\labelsep}% + \ifdim\unitlength>\leftmargin% + \parbox[t]{\textwidth}{\normalsize\texttt{#1}}% + \else% + \parbox[t]{\leftmargin-\labelsep}{\normalsize\texttt{#1}}% + \fi% +} +\begin{description}\firmlist\firmlist +\small +%\define@key{FelineIndex}{notxt} []{\@feline@txtfalse} % = nowr +\item[notxt] do not write anything in the text + +%\define@key{FelineIndex}{nowr} []{\@feline@txtfalse} % no writing in text +\item[nowr] alias for \texttt{notxt} +%\define@key{FelineIndex}{nomk} []{\@feline@mrgnfalse} % no mark in margin +\item[nomk] do not write anything in the margin +%\define@key{FelineIndex}{noidx} []{\@feline@idxfalse} % no adding index +\item[noidx] do not add anything to the index +%\define@key{FelineIndex}{hsp} []{\@feline@hsptrue} +%\item[hsp] secret +% locally use a different index command +%\define@key{FelineIndex}{idxit} []{\renewcommand\feline@index@cmd{\itindex}} +\item[idxit] index entry in italic (i.e. page number in italic) +%\define@key{FelineIndex}{idxbf} []{\renewcommand\feline@index@cmd{\bfindex}} +\item[idxbf] index entry in bold face +%\define@key{FelineIndex}{idxn} []{\renewcommand\feline@index@cmd{\index}} +\item[idxn] normal index entry + +%\define@key{FelineIndex}{addtospvrt}{\addtolength{\feline@spvs@addto}{#1\onelineskip}} +\item[addtospvrt=\Arg{number}] to be used in situations where we use + \markup[nomk]{sidepar} instead of \markup[nomk]{marginpar}. This key + will move the text further down in the margin. It is a unit-less + number (\markup[length,nomk]{onelineskip} is the unit). + +%\define@key{FelineIndex}{vaddtosp} {\addtolength{\feline@spvs@addto}{#1\onelineskip}} + +\item[vaddtosp=\Arg{number}] alias for \texttt{addtospvrt} + +% force the use of \sidepar, don't think I've ever used this +%\define@key{FelineIndex}{forcesidepar}[true]{\dlf@M@setbool{#1}{@feline@forcesidepar}} + \item[forcesidepar] forces the use of \markup[nomk]{sidepar} instead + of \markup[nomk]{marginpar} + +\end{description} +\endgroup +\noindent +The package has one option >>\texttt{loadsampleconfig}<< which +will auto load the\linebreak >>\path{dlfltxbmarkup-sample.cfg}<< sample file (which +actually contains the categories that I use for the creation of +\cite{ltxb}). + + +\section{Defining your own categories} +\label{sec:defining-your-own} + +The main macro for defining your own category keys are +\begin{syntax*} + \markup{felineKeyGenerator}\marg{key}\marg{description}\marg{margin + code}\marg{index code}\marg{text code} +\end{syntax*} +In each of the last three arguments >>\texttt{\#1}<< will refer to the +mandatory argument given to \markup[nomk]{markup}. The reason for +adding the \Arg{description} part will be explained later. For the +code to be used in the three last arguments we have a few helper +macros that might be useful +\begin{syntax} + \markup{cs}\marg{text} +\end{syntax} +for writing the name of \LaTeX\ macros. +\begin{syntax} + \markup{css}\marg{text} +\end{syntax} +like \markup[nomk]{cs} but to be used in the index, it will typeset +the >>\verb+\+<< in the left margin. +\begin{syntax} + \markup{felineWriteInMargin}\marg{text} +\end{syntax} +Depending on whether \markup{NoMarginparAvail} is true or not, +it will use \markup[nomk]{sidepar} (when \markup[nomk]{marginpar} is +unavailable) and \markup[nomk]{marginpar} otherwise (unless of course the +>>\texttt{forcesidepar}<< key is in effect). A +\markup[nomk]{marginpar} can for example not be used from inside a +\markup[nomk,env]{framed} or \markup[nomk,env]{shaded} environment. So +in such an environment one can just make sure that +\markup[nomk]{NoMarginparAvail} is set to true and then we will still +have some thing in the margin. It is recommended to use the two +\markup[nomk,cls]{memoir} macros +\begin{syntax} + \markup{strictpagechecktrue} + \markup{reversesideparfalse} +\end{syntax} +in order to get more rigorous side checking. Internally we use +\markup[nomk]{checkoddpage} and \markup[nomk]{ifodd} to test whether +we are in the left or right margin. We also use +\begin{syntax} + \markup{felineMarginAdjustment} +\end{syntax} +to ensure that the margin text has the correct adjustment. The default +setting is +\begin{verbatim} +\newcommand\felineMarginAdjustment{% + \ifoddpage\RaggedRight\else\RaggedLeft\fi} +\end{verbatim} +In this documentation which is not twosided, it has been redefined to +be \markup[nomk]{RaggedLeft}. + + +For index entries we recommend the use of +\begin{syntax} + \markup{felineIndexCmd} +\end{syntax} +which initially is defined to be \markup[nomk]{index}. The +>>\texttt{idxit}<< control key redefines it to be +\markup[nomk]{itindex}, which is +\begin{verbatim} +\newcommand\itindex[1]{\index{#1|textitindex}} +\end{verbatim} +where \markup[nomk]{textitindex} is just +\markup[nomk]{textit}. Similar for >>\texttt{idxbf}<<. + +Let us now create a category key for \LaTeX\ packages. +\begin{verbatim} +\felineKeyGenerator{sty}% + {for registering package names}% + {\felineWriteInMargin{\foreignlanguage{english}{#1}}}% + {\felineIndexCmd{#1 (package)@#1 (package)}% + \felineIndexCmd{packages!#1}}% + {\foreignlanguage{english}{\texttt{\hyphenchar\font=`\-#1}}} +\end{verbatim} +The rather odd last line is to ensure that the package name is written +under English hyphenation rules, and the +>>\verb+\hyphenchar\font=`\-+<< is to ensure that we can get +hyphenation in the typewriter font. As you can see we create two index +entries, one for the name it self (marking it as the name of a +package) and one as a sub item to a list of mentioned packages. + +Here is another key for mathematical symbols +\begin{verbatim} +\def\felinenameuse#1{\@nameuse{#1}} +\felineKeyGenerator{msym}% + {mathematical symbols} + {\felineWriteInMargin{\cs{#1} \textnormal{($\@nameuse{#1}$)}}}% + {\felineIndexCmd{#1@\protect\css{#1} ($\protect\felinenameuse{#1}$)}}% + {\cs{#1}} +\end{verbatim} +\verb+\@nameuse+ is used to transform the name of the macro into the +macro it self (for those that didn't already know +\verb+\@nameuse+). The shortcut \markup[nomk]{felinenameuse} is used +here because \verb+\@nameuse+ might not be permissible in the index +(because of the >>\texttt{@}<<. + +You can place these keys either in your preamble or in +>>\path{dlfltxbmarkup.cfg}<< which will be auto loaded if found. If +you have used the package option >>\texttt{loadsampleconfig}<< +then >>\texttt{dlfltxbmarkup-sample.cfg}<< will be loaded at the very end of +the package, i.e. \emph{after} >>\texttt{dlfltxbmarkup-sample.cfg}<<. + +The default category key to be used by \markup[nomk]{markup} is +controlled by +\begin{syntax} + \markup{felineStandardKey} +\end{syntax} +Just redefine it to be the key you want. Notice that by using +>>\texttt{loadsampleconfig}<< the default key is set to +>>\texttt{macro}<<. + +\section{The descriptions} +\label{sec:descriptions} + +For a long project like \cite{ltxb} the list of category keys may grow +quite big, and one might loose track of the keys and what they should +be used for. Under normal use of the this package, the description is +ignored. But internally in \markup[nomk]{felineKeyGenerator} we call +the macro \markup{felineMarkupDescription} with all five arguments. By +default it does nothing. But the user can define it to do something +before loading the package. + +Located with this manual you should find the file +>>dlfltxbmarkup-showkeys.tex<< which will print a new document showing +they keys and their description. If you move a \texttt{\%} in that +file you will get a list of the keys used for \cite{ltxb}. + + +\bibliographystyle{plainnat} +\bibliography{package_doc} + + +\end{document} + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf Binary files differnew file mode 100644 index 00000000000..da0682b2b74 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf diff --git a/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.tex b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.tex new file mode 100644 index 00000000000..23139c92d9b --- /dev/null +++ b/Master/texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.tex @@ -0,0 +1,199 @@ +\RequirePackage{etex} +\documentclass[11pt,oneside,a4paper,oldfontcommands,danish,english,article]{memoir} +\usepackage[T1]{fontenc} +\usepackage[widespace]{fourier} +\usepackage{babel} +\usepackage{calc,amsmath} +\usepackage[round]{natbib} + +\makeatletter +\DeclareRobustCommand{\LaTeX}{L\kern-.28em% + {\sbox\z@ T% + \vbox to\ht\z@{\hbox{\check@mathfonts + \fontsize\sf@size\z@ + \math@fontsfalse\selectfont + A}% + \vss}% + }% + \kern-.15em% + \TeX} +\makeatother + +\setlxvchars[\normalfont] + +\settypeblocksize{*}{1.3\lxvchars}{1.618} + +\setlrmargins{*}{*}{0.7} +\setulmargins{*}{*}{1} +\setlength\marginparwidth{4cm} + +\checkandfixthelayout + +\hfuzz=30pt + +\usepackage{color} +\usepackage[colorlinks,breaklinks]{hyperref} +\definecolor{linkcolour}{rgb}{0,0.2,0.6} +\definecolor{citecolour}{rgb}{0,0.6,0.2} +\definecolor{urlcolour} {rgb}{0.8,0,0.8} + +\hypersetup{ + pdftitle={The dlfltxbmisc package}, + pdfauthor={Copyright \textcopyright\ \number\year\ Lars Madsen}, + linkcolor=linkcolour,citecolor=citecolour, + filecolor=urlcolour,urlcolor=urlcolour, + plainpages=false, +} + +\ifpdf\else\usepackage{breakurl}\fi +\usepackage{memhfixc} + +\clubpenalty=300 +\widowpenalty=300 + +\usepackage{microtype} + + +\usepackage[loadsampleconfig]{dlfltxbmarkup} +\usepackage{dlfltxbmisc} + +\renewcommand\felineMarginAdjustment{\RaggedLeft} + +\setlength\marginparsep{2em} +\setlength\marginparwidth{3cm} + +\chapterstyle{article} + +\setsecheadstyle{\normalfont\large\bfseries\raggedright} + +\reversemarginpar +\reversesidepartrue +\twocolumnfootnotes + +\setsecnumdepth{part} + +\pagestyle{plain} + + +\begin{document} + +\title{The \textsf{dlfltxbmisc} package\thanks{Version: 0.1}} +\author{Lars Madsen\thanks{Email: daleif@imf.au.dk}} +\maketitle + +\noindent +This package provides a variety of macros that are used for +\cite{ltxb}. + +\section{For typesetting arguments} + +\begin{flushleft} + \NoMarginparAvailtrue + \begin{tabularx}{\textwidth}{XX} + \markup{Arg}\marg{text} & \Arg{text} \\ + \markup{Arg*}\marg{text} & \Arg*{text} \\ + \markup{marg}\marg{text} & \marg{text} \\ + \markup{marg*}\marg{text} & \marg*{text} \\ + \markup{oarg}\marg{text} & \oarg{text} \\ + \markup{oarg*}\marg{text} & \oarg*{text} \\ + \markup{parg}\marg{text} & \parg{text} \\ + \markup{parg*}\marg{text} & \parg*{text} \\ + \end{tabularx} +\end{flushleft} + +\section{Syntax} +\label{sec:syntax} + + + +Environments \markup[env]{syntax} and \markup[env]{syntax*} for +explaining syntax. In the unstared version \markup[nomk]{obeylines} is +in effect and \cs{}\cs{} is disabled. In the stared version we are in +a normal situation and \cs{}\cs{} has its normal line changing +behavior. Text contents of the two environments are indented by +\markup[nomk,length]{parindent}. + +\section{Special wrapping urls in bibliographies} +\label{sec:spec-wrapp-urls} + +In the bibliography of \cite{ltxb} we refer to a lot of \LaTeX\ +packages and their URLs on \textsc{ctan}. In order to make those URLs +look nice and space some space the URL wraps it self up into the +bibliography item above. The effect can be seen here: +\medskip +\noindent +\begin{adjustwidth}{\bibhang}{0pt} + text text text text text text + text text text text text\qquad + \addurl{http://www.imf.au.dk/system/latex/bog/}{} +\end{adjustwidth} + +The effect is achieved with the macro +\begin{syntax} + \markup{addurl}\oarg{pre text}\marg{url}\marg{see below} +\end{syntax} +\markup[nomk]{addurl} is only intended to be used in bibliographies, +i.e. inside the \markup[nomk]{thebibliography} environment (it uses +\markup[nomk,length]{bibhang} internally). The macro was created to +be used with Bib\TeX, where one adds it as the very last item in the +>>\texttt{note}<< field. As most Bib\TeX\ styles add a >>\texttt{.}<< +at the end of the entry we simply let \markup[nomk]{addurl} `eat' that +>>\texttt{.}<< by just specifying the first argument. So if you use +this macro by hand (i.e.\ not using Bib\TeX), you will need to specify +the last argument as an empty argument. By default \oarg{pre text} is +set to >>\verb+\textsc{url}:+<<. + +\markup[nomk]{addurl} works this way: +\begin{enumerate}[(i)] +\item \label{item:1} We start a new paragraph and measure the length + of the last line in the preceding paragraph. +\item In the new paragraph we set everything + \markup[nomk]{RaggedLeft}, and start the text by setting a + phantom-like width corresponding to the measured length found + in~\eqref{item:1}. If the measured length is larger than + 0.6\markup[nomk]{linewidth}, then we do not activate the wrapping, + instead the URL is just typeset ragged left below the bibliographic + entry. +\item Then we simply typeset the URL using \markup[nomk]{url}. +\end{enumerate} + +There is one small problem with \markup[nomk]{addurl}: If we get close +to a page break the wrapping URL may be moved to the next page. One +method for fixing this is to make \markup[nomk,length]{itemsep} more +flexible inside the \markup[nomk,env]{thebibliography}, for example +using +\begin{verbatim} +\let\oldthebibliography\thebibliography +\renewcommand\thebibliography[1]{% + \oldthebibliography{#1}% + \setlength\itemsep{10pt plus 3pt minus 5pt} +} +\end{verbatim} + +\section{Example text in math} +\label{sec:example-text-math} + +In \cite{ltxb} we use the macro \markup{dbx}\oarg{width} to illustrate +some math instead of writing random formulas. It just typesets \dbx\ +where the width is adjustable using the optional argument. + + +\section{Acknowledgement} +\label{sec:acknodlegement} + +Special thanks to Morten H\o gholm and Dan Luecking for their help +with various parts of \markup[nomk]{addurl}. + + +\bibliographystyle{plainnat} +\bibliography{package_doc} + + +\end{document} + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty new file mode 100644 index 00000000000..752777feaa3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty @@ -0,0 +1,174 @@ +\ProvidesPackage{dlfltxbcodetips}[2007/05/07 v0.1 by Lars 'daleif' Madsen] + +% this pacakge collects some macros presented as code tips in my LaTeX +% book: "Introduktion til LaTeX". As the macros might be useful for +% other than the normal readers of my book, the longer macros are +% collected in this package. + +% This package be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Lars Madsen (daleif@imf.au.dk). +%% + + + + +\RequirePackage{amsmath,amssymb} + +% \InsertTheoremBreak removes the spacing above the first item, +% \InsertTheoremBreak* does not +\newcommand\InsertTheoremBreak{% + \@ifstar{\item[\vbox{\null}]}{% + \begingroup % keep changes local + \setlength\itemsep{0pt}% + \setlength\parsep{0pt}% + \item[\vbox{\null}]% + \endgroup% + }} + +% macro made on request by Morten H\o gholm +% \ArrowBetweenLines adds arrow on the left +% \ArrowBetweenLines* on the right +% more information is needed +% requires the amsmath package +\def\ArrowBetweenLines{\relax + \iffalse{\fi\ifnum0=`}\fi + \@ifstar{\ArrowBetweenLines@auxI{00}}{\ArrowBetweenLines@auxI{01}}} +\def\ArrowBetweenLines@auxI#1{% + \@ifnextchar[% + {\ArrowBetweenLines@auxII{#1}}% + {\ArrowBetweenLines@auxII{#1}[\Updownarrow]}} +\def\ArrowBetweenLines@auxII#1[#2]{% + \ifnum0=`{\fi \iffalse}\fi + \crcr + \noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}% + \noalign{\expandafter\in@\expandafter{\@currenvir}% + {alignedat,aligned,gathered}}% + \if#1 &&\quad #2\else #2\quad\fi + \ifin@ \else\notag\fi + \\\noalign{\nobreak\vskip-\lineskip}} + + +% for making theorems with shaded background +% requires the use of ntheorem, (x)color and framed +% currently only ntheorem is supported (perhaps support for amsthm or +% theorem will be added later) +% has the same syntax as \newtheorem +\newcommand\NewShadedTheorem[1]{% + \@ifnextchar[{\NST@levelii{#1}}{\NST@levelii{#1}[]}} +\def\NST@levelii#1[#2]#3{% + \@ifnextchar[{\NST@leveliii{#1}[#2]{#3}}{\NST@leveliii{#1}[#2]{#3}[]}} +\newcommand\NST@helper[1]{% + \edef\@tempa{c@#1}\edef\@tempb{c@#1@inner}% + \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% + \edef\@tempa{the#1}\edef\@tempb{the#1@inner}% + \expandafter\let\csname\@tempa\expandafter\endcsname\csname\@tempb\endcsname% +} +\def\NST@leveliii#1[#2]#3[#4]{% + \ifx\\#2\\% i.e. no common counter + \ifx\\#4\\% i.e. no dominant counter + \newtheorem{#1@inner}{#3}% + \NST@helper{#1}% + \else% i.e. dominant counter + \newtheorem{#1@inner}{#3}[#4]% + \NST@helper{#1}% + \fi% + \else% i.e. common counter + \newtheorem{#1@inner}[#2]{#3}% + \fi% + \newenvironment{#1}{% + \begin{shaded}% + \setlength\theorempreskipamount{0pt}% + \setlength\theorempostskipamount{0pt}% + \begin{#1@inner}}{\end{#1@inner}\end{shaded}\@endparenv}% + \newtheorem*{#1@innerstr}{#3} + \newenvironment{#1*}{% + \begin{shaded}% + \setlength\theorempreskipamount{0pt}% + \setlength\theorempostskipamount{0pt}% + \begin{#1@innerstr}}{\end{#1@innerstr}\end{shaded}\@endparenv}% + } + +% Mathematics into Type by Ellen Swanson recommends that line-broken +% displayed alignments should be indented by 2em (and other rules) +% instead of aligning ti the left and indenting all subsequent lines, +% it is easier to just pull back the first line. Just align all lines +% to the left and replace the & on the fist line with \PullBack +% The indentation amount can be changed by \PullBack[3], i.e. no unit, +% 'em will be used automatically +\newlength\PullBackLength +\newcommand\PullBack[1][2]{% + \setlength{\global\PullBackLength}{#1em}% + \kern\PullBackLength% + & + \kern-\PullBackLength} + + +% this implements a stack that holds a user build mathindent +% not easy to explain in words see the documentation +\newtoks\dlf@STACK +\def\dlf@Prepend#1(to:)#2{\toks0={#1}% + \global\edef\act{\global\noexpand#2={\the\toks0 \the#2}}% + \act} +\def\dlf@PopOff#1{\global\edef\act{\global\noexpand\dlf@SplitOff\the#1% + (tail:)\noexpand#1}\act} +\def\dlf@SplitOff#1#2(tail:)#3{#3={#2}} +\newlength\MathIndentLength +\newcommand\MathIndent{\kern\MathIndentLength} +\newcommand\PopMathIndent{% + \@ifstar{\@PopMathIndent\relax}{\@PopMathIndent\MathIndent}} +\newcommand\@PopMathIndent[1]{\dlf@PopOff\dlf@STACK + \settowidth\@tempdimc{\ensuremath{\displaystyle\phantom{\the\dlf@STACK}}} + \setlength{\global\MathIndentLength}{\@tempdimc}#1} +\newcommand\SetMathIndent[1]{\dlf@STACK={}\dlf@Prepend{{#1}}(to:)\dlf@STACK + \settowidth\@tempdimc{\ensuremath{\displaystyle\phantom{\the\dlf@STACK}}} + \setlength{\global\MathIndentLength}{\@tempdimc}#1} +\newcommand\AddtoMathIndent[1]{\dlf@Prepend{{#1}}(to:)\dlf@STACK + \settowidth\@tempdimc{\ensuremath{\displaystyle\phantom{\the\dlf@STACK}}} + \setlength{\global\MathIndentLength}{\@tempdimc}#1} + + +% constructs a \bigtimes symbol, in the same category as e.g. \sum +% etc. Since we are using \DeclareMathOperator, the amsmath package is +% required, thus autoloaded by this pacakge +\newcommand\SNYDINTERN[1]{\vcenter{{\hbox{#1\ensuremath\times}}}} +\newcommand\SNYD{% + \mathchoice{\SNYDINTERN\huge\displaystyle}% display style + {\SNYDINTERN\LARGE\textstyle\mkern-3.5mu} % text style + {\SNYDINTERN{}\scriptstyle\mkern-2mu} % script style + {\SNYDINTERN\footnotesize\scriptscriptstyle\mkern-2mu}% script script style +} +\DeclareMathOperator*\bigtimes{\SNYD} + + +% constructor for creating negated \up/downarrow +% requires graphicx +\newcommand*\nrotarrowconstructor[2]{% + \mathrel{\m@th\sbox\z@{$ #1 $}% + \raisebox{1.3\dp\z@}{% + \makebox[\wd\z@][c]{% + \reflectbox{\rotatebox[origin=cB]{90}{$ #2 $}}% + \kern0.32\wd\z@% + }}}% +} +\newcommand\nuparrow{\nrotarrowconstructor\uparrow\nrightarrow} +\newcommand\ndownarrow{\nrotarrowconstructor\downarrow\nleftarrow} + + +% this can be used as the first thing in an amsmath alignment +% environments for displayed math. It switches \abovedisplayskip and +% \abovedisplayshortskip before the display, usefull in some cases to +% save some space +\newcommand\SwapDeadSpace{% + \noalign{\vskip-\abovedisplayskip\vskip\abovedisplayshortskip} +} + + diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup-sample.cfg b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup-sample.cfg new file mode 100644 index 00000000000..ce7910635fc --- /dev/null +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup-sample.cfg @@ -0,0 +1,440 @@ +\ProvidesFile{felinemarkup.cfg}[2007/05/15 by Lars madsen] + +% the original name for the dlfltxbmarkup package was 'felinemarkup', +% and in my book I use the following generated keys + +% This file be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Lars Madsen (daleif@imf.au.dk). +%% + + + +% default key +\def\felineStandardKey{macro} +% +% til makroer +\felineKeyGenerator{macro} + {for normal macros (this is the default key)}% + {\felineWriteInMargin{{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}}}% + {\felineIndexCmd{#1@\protect\css{#1}}}% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + + +\felineKeyGenerator{m}% + {just an alias for macro}% + {\felineWriteInMargin{{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}}}% + {\felineIndexCmd{#1@\protect\css{#1}}}% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + + + +% pakker, sty nemt at huske +\felineKeyGenerator{sty}% + {for registering package names}% + {\felineWriteInMargin{\foreignlanguage{english}{#1}}}% + {\felineIndexCmd{#1 (pakke)@#1 (pakke)}\felineIndexCmd{pakker!#1}}% + {\foreignlanguage{english}{\texttt{\hyphenchar\font=`\-#1}}} + + +% dokumentklasser +\felineKeyGenerator{cls}% + {for registering class names}% + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (klasse)@#1 (klasse)}\felineIndexCmd{dokumentklasser!#1}}% + {\textsf{\textit{#1}}} + +% pagestyles +\felineKeyGenerator{ps}% + {for the names of page styles}% + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (pagestyle)}\felineIndexCmd{pagestyles!#1}}% + {\textsf{\textbf{#1}}} + +% environments +\felineKeyGenerator{env}% + {registering the name of environments} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (environment)@#1 (environment)}% + \felineIndexCmd{environments!#1}}% + {\foreignlanguage{english}{\textit{\textbf{#1}}}} + + +% lister +\felineKeyGenerator{list}% + {names of lists} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (liste)}\felineIndexCmd{lister!#1}\felineIndexCmd{environments!#1}}% + {\textit{\textbf{#1}}} + +% almindelige ord og fraser +\felineKeyGenerator{w}% + {normal words and frases} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1}} + {#1} + +% programmer +\felineKeyGenerator{prog}% + {for commandline programs} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (program)@\texttt{#1} (program)}\felineIndexCmd{programmer!#1@\texttt{#1}}}% + {\texttt{#1}} + +% matematiske symboler +\def\felinenameuse#1{\@nameuse{#1}} +\felineKeyGenerator{msym}% + {mathematical symbols} + {\felineWriteInMargin{\cs{#1} \textnormal{($\@nameuse{#1}$)}}}% + {\felineIndexCmd{#1@\protect\css{#1} ($\protect\felinenameuse{#1}$)}% + }% + {\cs{#1}} + +% store matematiske symboler +\felineKeyGenerator{bigmsym}% + {operator symbols, like sum etc.} + {\felineWriteInMargin{\cs{#1} \textnormal{($\@nameuse{#1}$)}}}% + {\felineIndexCmd{#1@\protect\css{#1} ($\protect\felinenameuse{#1}$)}% + \felineIndexCmd{store symboler!#1@\protect\css{#1} ($\protect\felinenameuse{#1}$)}% + % + }% + {\cs{#1}} + +% log-like konstruktioner +\felineKeyGenerator{mlog}% + {log-like functions} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1@\protect\css{#1} (mat. operator)}% + \felineIndexCmd{navngivne operatorer!#1@\protect\css{#1}}% + % + }% + {\cs{#1}} + + + +% almindelige symboler +\felineKeyGenerator{sym}% + {text symbols} + {\felineWriteInMargin{\cs{#1} \textnormal{(\@nameuse{#1})}}}% + {\felineIndexCmd{#1@\protect\css{#1} (\@nameuse{#1})}}% + {\cs{#1}} + +% delimiters/hegn +\felineKeyGenerator{delim}% + {delimiters / fences} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1@#1 (delimiter)}\felineIndexCmd{delimiters!#1}}% + {\ensuremath{#1}} + +% delimiters speciel +\felineKeyGenerator{delims}% + {special delimiters (no idea what this is used for)} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1@\protect\css{#1}}}% + {\ensuremath{\cs{#1}}} + +% ntheorem makroer +\felineKeyGenerator{nthm}% + {ntheorem macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{ntheorem (pakke)@ntheorem (pakke)!\protect\css{#1}}% + \felineIndexCmd{#1 (ntheorem)@\protect\css{#1} + (ntheorem)}}% + {\cs{#1}} + +% ntheorem theoremstyles +\felineKeyGenerator{nthmstl}% + {ntheorem theorem styles} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{ntheorem (pakke)!theoremstyle!#1}% + \felineIndexCmd{#1 (theoremstyle, nthm)}% + \felineIndexCmd{theoremstyle (ntheorem)@\protect\css{theoremstyle} (ntheorem)!#1}% + }% + {\textbf{#1}} + +% XY pic makroer +\felineKeyGenerator{xym}% + {Xy-pic macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1@\protect\css{#1}}\felineIndexCmd{XY-pic@\protect\Xy-pic!#1@\protect\css{#1}}}% + {\cs{#1}} + +% Xy-pic pile +\felineKeyGenerator{xymar}% + {Xy-pic arrows} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{ar@\protect\css{ar}!#1}\felineIndexCmd{XY-pic@\protect\Xy-pic!ar@\protect\css{ar}!#1}}% + {#1} + +% mathtool environments +\felineKeyGenerator{mtoolsenv}% + {mathtools environments} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (environment)}\felineIndexCmd{environments!#1}% + \felineIndexCmd{mathtools (pakke)@mathtools (pakke)!#1}}% + {\textit{\textbf{#1}}} + +% figur/billed formater +\felineKeyGenerator{ftype}% + {figure formats} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1}\felineIndexCmd{figur format!#1}}% + {\textsc{#1}} + +% fejlmeddelelser, dette er vist ikke avendet til noget +\felineKeyGenerator{err}% + {for error messages, currently un-used} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1}\felineIndexCmd{fejlmeddelelser!#1}}% + {\textsf{#1}} + +% natbib makroer +\felineKeyGenerator{nb}% + {natbib macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1 (natbib)@\protect\css{#1} (natbib)}\felineIndexCmd{natbib (pakke)@natbib (pakke)!#1@\protect\css{#1}}}% + {\cs{#1}} + +% natbib options +\felineKeyGenerator{nbop}% + {natbib package options} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (natbib option)}% + \felineIndexCmd{natbib (pakke)@natbib (pakke)!pakke options!#1}}% + {\texttt{#1}} + + +% bibtex felt +\felineKeyGenerator{bibfelt}% + {BibTeX fields} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (bibtex felt)@#1 (\protect\BibTeX{} felt)}\felineIndexCmd{bibtex@\protect\BibTeX!felter!#1}}% + {\texttt{#1}} + +% bibtex type +\felineKeyGenerator{bibtype}% + {BibTeX types} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (bibtex type)@#1 (\protect\BibTeX{} type)}\felineIndexCmd{bibtex@\protect\BibTeX!typer!#1}}% + {#1} + +% bibtex stil +\felineKeyGenerator{bibstyle}% + {BibTeX style} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (bibtex stil)@#1 (\protect\BibTeX{} stil)}\felineIndexCmd{bibtex@\protect\BibTeX!stile!#1}}% + {\texttt{#1}} + +% memoir specifik makro +\felineKeyGenerator{mem}% + {memoir specific macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1 (memoir)@\protect\css{#1} (memoir)}% + \felineIndexCmd{memoir (klasse)!#1@\protect\css{#1}}% + }% + {\cs{#1}} + +% memoir specifik environment +\felineKeyGenerator{menv}% + {memoir specific environments} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (env, memoir)@#1 (env, memoir)}% + \felineIndexCmd{environments!#1}\felineIndexCmd{memoir@memoir (klasse)!#1}}% + {\textit{\textbf{#1}}} + +% memoir chapterstyle +\felineKeyGenerator{chapstyle}% + {memoir chapter styles} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (chapter style)}% + \felineIndexCmd{chapterstyle@\protect\css{chapterstyle} (memoir)!#1} + \felineIndexCmd{memoir (klasse)!chapterstyle@\protect\css{chapterstyle}!#1}}% + {\textsf{#1}} + +% booktabs makroer +\felineKeyGenerator{bt}% + {booktabs macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1@\protect\css{#1} (booktabs)}% + \felineIndexCmd{booktabs (pakke)@booktabs (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{memoir (klasse)!#1@\protect\css{#1}}% + }% + {\cs{#1}} + +% longtable makroer +\felineKeyGenerator{lt}% + {longtable macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1 (longtable)@\protect\css{#1} (longtable)}% + \felineIndexCmd{longtable@longtable (pakke)!#1@\protect\css{#1}}% + }% + {\cs{#1}} + +% colortbl makroer +\felineKeyGenerator{ctbl}% + {colortbl macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1 (colortabl)@\protect\css{#1} (colortbl)}% + \felineIndexCmd{colortbl@colortbl (pakke)!#1@\protect\css{#1}}% + }% + {\cs{#1}} + +% dokumentklasse options +\felineKeyGenerator{dop}% + {document class options} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (klasse option)}\felineIndexCmd{dokumentklasse!options!#1}% + }% + {\textsf{\textit{#1}}} + +\felineKeyGenerator{mdop}% + {memoir class options} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (memoir klasse option)}% + \felineIndexCmd{dokumentklasse!options!#1 (memoir)}% + }% + {\textsf{\textit{#1}}} + + +% fixme makroer +\felineKeyGenerator{fixme}% + {fixme macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{fixme (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (fixme)@\protect\css{#1} (fixme)}% + }% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + +% varioref makroer +\felineKeyGenerator{vario}% + {varioref macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{varioref (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (varioref)@\protect\css{#1} (varioref)}% + }% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + + +% fancyhdr pakke makroer +\felineKeyGenerator{fnchdr}% + {fancyhdr macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{fancyhdr (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (fancyhdr)@\protect\css{#1} (fancyhdr)}% + }% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + + +% memoir specifikke pagestyles +\felineKeyGenerator{memps}% + {memoir specific page styles} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (pagestyle, memoir)}% + \felineIndexCmd{pagestyles!#1 (memoir)}}% + {\textsf{\textbf{#1}}} + +% options til \includegraphics +\felineKeyGenerator{inclgrfopt}% + {options for includegraphics} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (graphicx)}% + \felineIndexCmd{graphicx (pakke)!includegraphics@\protect\css{includegraphics}!#1}% + \felineIndexCmd{includegraphics@\protect\css{includegraphics}!#1}}% + {\textsf{#1}} + +% caption pakke makroer +\felineKeyGenerator{cap}% + {caption pacakge macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{caption (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (caption)@\protect\css{#1} (caption)}% + }% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + +% subfig makroer +\felineKeyGenerator{subfig}% + {subfig macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{subfig (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (subfig)@\protect\css{#1} (subfig)}% + }% + {{\foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}} + +% KOMA-script kalsser +\felineKeyGenerator{clskoma}% + {KOMA script classes} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (klasse)}% + \felineIndexCmd{dokumentklasser!KOMA-script@\textsf{KOMA}-script!#1}}% + {\textsf{\textit{\mbox{#1}}}} + +% grafik format (hmm, dem er det så to af????) +\felineKeyGenerator{grffmt}% + {graphics format (hmm, two of these???)} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (grafik format)}% + \felineIndexCmd{grafik format!#1}}% + {\textsc{#1}} + +% enumitem makroer +\felineKeyGenerator{ei}% + {enumitem macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{enumitem (pakke)!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (enumitem)@\protect\css{#1} (enumitem)}}% + {\cs{#1}} + +% enumitem options +\felineKeyGenerator{eio}% + {enumimte options} + {\felineWriteInMargin{#1}}% enumitem option + {\felineIndexCmd{enumitem (pakke)!#1}% + \felineIndexCmd{#1 (enumitem)}}% + {\texttt{#1}} + +% input encoding options +\felineKeyGenerator{inputenc}% + {inputencodings} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{inputencoding!#1}% + \felineIndexCmd{#1 (inputencoding)}}% + {\texttt{#1}} + +% tæller options +\felineKeyGenerator{counter}% + {name of counters} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{tæller!#1}% + \felineIndexCmd{#1 (tæller)}}% + {\texttt{#1}} + +% længde options +\felineKeyGenerator{length}% + {name of lengths} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{længde!#1@\protect\css{#1}}% + \felineIndexCmd{#1 (længde)@\protect\css{#1} (længde)}}% + {\cs{#1}} + +\felineKeyGenerator{gauss}% + {gauss package macros} + {\felineWriteInMargin{\cs{#1}}}% + {\felineIndexCmd{#1@\protect\css{#1} (gauss)}% + \felineIndexCmd{gauss (pakke)@gauss (pakke)!#1@\protect\css{#1}}}% + {\cs{#1}} + +\felineKeyGenerator{tabs}% + {column specifiers for tabular etc.} + {\felineWriteInMargin{#1}}% + {\felineIndexCmd{#1 (søjle specifier)}% + \felineIndexCmd{søjle specifier!#1}}% + {\texttt{#1}} + diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty new file mode 100644 index 00000000000..30daa71f5f7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty @@ -0,0 +1,262 @@ +\ProvidesPackage{dlfltxbmarkup}[2007/05/16 v0.6 by daleif] + +\@ifclassloaded{memoir}{}{% + \PackageError{felinemarkup}{This package depends on several internal + components of the memoir class and therefore need the memoir + class}{Use the memoir class} +} + + + +\RequirePackage{keyval} +\RequirePackage{ragged2e} + + +\DeclareOption{loadsampleconfig}{\AtEndOfPackage{\InputIfFileExists{dlfltxbmarkup-sample.cfg}{}{}}} + +\ProcessOptions\relax + + + +% HISTORY +% <2007 this package dates back to at least 2004 +% 2007/03/20 added \color{black} to the margin writing devices, since +% color at a line boundary may extend out into the margin +% 2007/03/21 added inputenc keyword +% 2007/03/21 added counter keyword +% 2007/03/21 added length keyword +% 2007/03/22 added gauss keyword +% 2007/03/23 added tabs keyword +% 2007/03/23 added nbop keyword +% 2007/03/24 fixed a bug in tabs +% 2007/03/24 fixed loads more index errors +% 2007/04/27 added \hspace{0pt} to \MarkWMargin to activate automatic hyphenation +% 2007/04/30 added \feline@MWM@inner to get better source re-use +% 2007/05/05 fixed a margin placement problem by adding \leavevmode +% in front of \checkoddpage in \feline@MWM@inner, fix +% supplied by Peter Wilson, after I submitted a bug report +% about it. +% 2007/05/10 started adding support for key explanations, planning to +% make it possible to print a generated overview of the +% regisered keys +% 2007/05/14 all keys for my book project have now been moved to +% felinemarkup.cfg, which wil be loaded at the end of the +% package, if the 'loadfelinemarkupconfig' package option +% is given +% 2007/05/15 \feline@index@cmd renamed to \felineIndexCmd +% 2007/05/16 package renamed to dlfltxbmarkup + + +% this boolean is meant to be used for example inside constructions +% that will not permit the use of \marginpar, for example the +% environments 'framed' and 'shaded', then \MarkWMargin will use +% \sidepar instead of \marginpar + +\@ifundefined{ifNoMarginparAvail}{% + \newif\ifNoMarginparAvail + \NoMarginparAvailfalse +}{} + + +\newcommand\felineMarginAdjustment{% + \ifoddpage\RaggedRight\else\RaggedLeft\fi} + + +% typesets the material in the margin +% we use \checkoddpage (assuming the use of \strictpagechecktrue) to +% perform a rigid test on whether or not we are on an odd page +% \RaggedRight \RaggedLeft is used to get the test 'mashed' up against +% the text, and to permit hyphenation. If the material in #1 is using +% typewriter font, then it is #1's responsability to ensure that +% hyphenation is possible in that font +\newcommand\feline@MWM@inner[1]{% + \parbox[t]{\marginparwidth}{% + \leavevmode\checkoddpage% needs \leavevmode since \checkoddpage + % leaves a whatsit +% \ifoddpage\RaggedRight\else\RaggedLeft\fi% + \felineMarginAdjustment% + {\slshape\footnotesize\hspace{0pt}\color{black}#1\par}}} + +% this might not belong here, but we will leave it for now +\strictpagechecktrue% +\reversesideparfalse% + +% the main macro to write in the margin with +\newcommand\felineWriteInMargin[1]{% + \ifNoMarginparAvail% + \sidepar{\feline@MWM@inner{#1}}% + \else% + \if@feline@forcesidepar% + \sidepar{\feline@MWM@inner{#1}}% + \else% + \marginpar{\feline@MWM@inner{#1}}% + \fi% + \fi% +}% + + +% because of a possible babel use, and its active charecters (in +% danish, " is an active character, it seems that we cannot directly +% add automatic english hyphenation to \cs and \css, in most cases it +% can be added by hand to the macros specified in \FelineKeyGenerator +% see felinemarkup.cfg +\DeclareRobustCommand\cs[1]{% + \textnormal{\texttt{\symbol{'134}#1}}} + +\@ifpackagewith{babel}{english}{ + \DeclareRobustCommand\css[1]{% + \textnormal{\texttt{% + \protect\makebox[0pt][r]{\symbol{'134}}% + \foreignlanguage{english}{\cs{\hyphenchar\font=`\-#1}}}}} +}{ + \DeclareRobustCommand\css[1]{% + \textnormal{\texttt{% + \protect\makebox[0pt][r]{\symbol{'134}}% + {#1}}}} +} + +% indexing commands, first just two alias macros +\newcommand\textitindex[1]{\textit{#1}} +\newcommand\textbfindex[1]{\textbf{#1}} +% then two different indexing macros, one for italic index entries and +% one for bold. we use them like this to avoid expansion problems (or +% at least try to) +\newcommand\itindex[1]{\index{#1|textitindex}} +\newcommand\bfindex[1]{\index{#1|textbfindex}} +% default indexing command, we change this using the idxit, idxbf keys +\newcommand\felineIndexCmd{\index} + + +% --------------------------------------------------------------------------- + + + +% just initial definitions +\newcommand*\feline@margin[1]{\par margin: #1\par} +\newcommand*\feline@index[1]{\par index: #1\par} +\newcommand*\feline@text[1]{\par text: #1\par} + +% just a shortcut, amsmath makes the same one +\let\@xp\expandafter + +\define@key{FelineIndex}{empty}[]{% + \renewcommand*\feline@margin[1]{\par margin: ##1\par}% + \renewcommand*\feline@index[1]{\par index: ##1\par}% + \renewcommand*\feline@text[1]{\par text: ##1\par}% +} + +% whether or not to write the text part +\newif\if@feline@txt \@feline@txttrue +% whether or not to write in the margin +\newif\if@feline@mrgn \@feline@mrgntrue +% whether or not to add to the index +\newif\if@feline@idx \@feline@idxtrue +% force the use of sidepar instead of the usual marginpar +\newif\if@feline@forcesidepar +% whether or not to let \markup add a \hspace{0pt} in the text +% don't know it this is still needed +\newif\if@feline@hsp + +% basically stolen from another package +\newcommand*\dlf@M@setbool[2]{% + \csname #2\ifx\relax#1\relax true \else #1\fi\endcsname} + +% switch off keys +\define@key{FelineIndex}{notxt} []{\@feline@txtfalse} % = nowr +\define@key{FelineIndex}{nowr} []{\@feline@txtfalse} % no writing in text +\define@key{FelineIndex}{nomk} []{\@feline@mrgnfalse} % no mark in margin +\define@key{FelineIndex}{noidx} []{\@feline@idxfalse} % no adding index + +\define@key{FelineIndex}{hsp} []{\@feline@hsptrue} + +% locally use a different index command +\define@key{FelineIndex}{idxit} []{\renewcommand\felineIndexCmd{\itindex}} +\define@key{FelineIndex}{idxbf} []{\renewcommand\felineIndexCmd{\bfindex}} +\define@key{FelineIndex}{idxn} []{\renewcommand\felineIndexCmd{\index}} + +% \sidepar's are non-floating objects so they does not move by them +% self, we need to help if needed, the argument should be a number +% (the unit will be \onelineskip) +\newlength\feline@spvs@addto +\setlength\feline@spvs@addto{0pt} +\define@key{FelineIndex}{addtospvrt}{\addtolength{\feline@spvs@addto}{#1\onelineskip}} +\define@key{FelineIndex}{vaddtosp} {\addtolength{\feline@spvs@addto}{#1\onelineskip}} + +% force the use of \sidepar, don't think I've ever used this +\define@key{FelineIndex}{forcesidepar}[true]{\dlf@M@setbool{#1}{@feline@forcesidepar}} + +% by default this macro does nothing, the idea behind it is to use +% this in an external document to generate a list of key names and +% descriptions (using the first two arguments) +\providecommand\felineMarkupDescription[5]{} + +% key generator macro, has the following arguments +% #1: name of the key +% #2: description of what this key is for +% #3: code for margin command +% #4: code for index command +% #5: code for text command +% and does the following: +% * creates \feline@margin@<key>, \feline@index@<key> and +% \feline@text@<key> +% * the \define@key part then performs three \let's: +% \let\feline@margin\feline@margin@<key> etc. +% when using \FelineKeyGenerator, #1 refers to the main argument given +% to \markup +\newcommand\felineKeyGenerator[5]{% + \felineMarkupDescription{#1}{#2}{#3}{#4}{#5}% + \global\define@key{FelineIndex}{#1}[]{% + \global\@xp\@xp\@xp\let\@xp\@xp\@xp\feline@margin\@xp\csname feline@margin@#1\endcsname% + \global\@xp\@xp\@xp\let\@xp\@xp\@xp\feline@index\@xp\csname feline@index@#1\endcsname% + \global\@xp\@xp\@xp\let\@xp\@xp\@xp\feline@text\@xp\csname feline@text@#1\endcsname% + }% + \@namedef{feline@margin@#1}##1{#3}% + \@namedef{feline@index@#1}##1{#4}% + \@namedef{feline@text@#1}##1{#5}% +} + +% standard key er lavet ned i \setkeys, da \markup[notxt]{...} ellers ikke vil +% være det samme som \markup[macro,notxt]{...} + +% this is the main macro, take two arguments, a optional argument for +% key controls and the mandatory arguments for the think we want to +% markup +% note the it starts by setting the \feline@std@key which will be the +% stadard key used if the optional argument is empty or the other keys +% does not alter the \feline@margin, \feline@text and \feline@index +\newcommand\markup[2][]{% +% \@bsphack + \begingroup% + \setkeys{FelineIndex}{\felineStandardKey}% + \setkeys{FelineIndex}{#1}% + \ifdim\feline@spvs@addto>0pt% + \addtolength\sideparvshift{\feline@spvs@addto}% + \fi% + \if@feline@txt\feline@text{#2}\fi% + \if@feline@idx\feline@index{#2}\fi% + \if@feline@mrgn\if@feline@hsp\hspace{0pt}\fi\feline@margin{#2}\fi% + \@feline@txttrue% + \@feline@mrgntrue% + \@feline@idxtrue% + \endgroup% +% \@esphack +} + +% default generated key used by \markup, in the example setup 'macro' +% is used +\def\felineStandardKey{test} + +% test key +\felineKeyGenerator{test} + {test key, does not do anything useful}% + {\MarkWMargin{#1}}% + {\felineIndexCmd{#1}}% + {\emph{#1}} + + + +\InputIfFileExists{dlfltxbmarkup.cfg}{}{} + + + + diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty new file mode 100644 index 00000000000..80878531cb2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty @@ -0,0 +1,109 @@ +\ProvidesPackage{dlfltxbmisc}[2007/05/15 v0.1 by Lars Madsen] + +% if memoir is not loaded we will need the chngpage to get adjustwidth +\@ifclassloaded{memoir}{}{ + \RequirePackage{chngpage} +} + +\RequirePackage{ragged2e} +\RequirePackage{url} +\RequirePackage{calc} + +\newcommand*\Arg@s[1]{\textnormal{\texttt{#1}}}% +\newcommand*\Arg@n[1]{\textnormal{$\langle$\textit{#1}$\rangle$}}% +\newcommand*\Arg{\@ifstar{\Arg@s}{\Arg@n}}% + +\newcommand*\marg@s[1]{\textnormal{\texttt{\{#1\}}}} +\newcommand*\marg@n[1]{% + \textnormal{\texttt{\{}$\langle$\textit{#1}$\rangle$\texttt{\}}}% +} +\newcommand*\marg{\@ifstar{\marg@s}{\marg@n}} + +\newcommand*\oarg@s[1]{\textnormal{\texttt{[#1]}}} +\newcommand*\oarg@n[1]{% + \textnormal{\texttt{[}$\langle$\textit{#1}$\rangle$\texttt{]}}% +} +\newcommand*\oarg{\@ifstar{\oarg@s}{\oarg@n}} + +\newcommand*\parg@s[1]{\textnormal{\texttt{(#1)}}} +\newcommand*\parg@n[1]{% + \textnormal{\texttt{(}$\langle$\textit{#1}$\rangle$\texttt{)}}% +} +\newcommand*\parg{\@ifstar{\parg@s}{\parg@n}} + +\newcommand\malign[2][2pt]{% + \makebox[0pt][l]{\kern#1\smash{\rule[-1.5mm-#2\baselineskip]{0.01pt}{5mm+#2\baselineskip}}}% +} + + +\newenvironment{syntax}{% + \vskip.5\baselineskip\allowbreak% + \begin{adjustwidth}{\parindent}{0pt} + \parindent=0pt% + \obeylines% + \let\\=\relax% + }{% + \end{adjustwidth}% + \vskip.5\baselineskip% +} +\newenvironment{syntax*}{% + \vskip.5\baselineskip% + \begin{adjustwidth}{\parindent}{0pt} + \parindent=0pt% + }{% + \end{adjustwidth}% + \vskip.5\baselineskip% +} + +\let\syntaks=\syntax +\let\endsyntaks=\endsyntax + +% macro used in several math examples to show the structure. It acts +% like some text but only displays a box. +\newcommand\@dbx[1]{{\fboxsep=0pt\fboxrule=0.4pt\,\fbox{\phantom{\rule[-0.6mm]{#1}{3mm}}}\,}} +\newcommand\dbx[1][5mm]{\ifmmode\mathord{\@dbx{#1}}\else\@dbx{#1}\fi} + + +% powerfull macro by Morten Høgholm, this enables you to measure the +% length of the previous paragraf. +\newdimen\lastlinedim +\def\getlastlinesize{% + \begingroup\frozen@everydisplay{}% + $$ + \abovedisplayskip=\z@skip \abovedisplayshortskip=\z@skip + \belowdisplayskip=\z@skip \belowdisplayshortskip=\z@skip + \global\lastlinedim=\dimexpr\predisplaysize-2em\relax + \halign{##\cr}% + $$ + \mbox{}% + \endgroup% +} + +% this is a very special little macro to be used in the 'note' field +% of bibtex entries. It eats up the added '.' and typesets the main +% argument (an URL) in a raggedright manner, wrapped up into the +% previous paragraph. It looks pretty cool. +\newcommand\addurl[3][\textsc{url}:]{% + \getlastlinesize{}% + \vskip-2\baselineskip% + \begingroup% + \def\UrlNoBreaks{\do\(\do\[\do\{\do\<\do\:\do\.}%\] + \RaggedLeft% + \fussy% + \addtolength\lastlinedim{-\bibhang}% + \fboxsep=0pt% + \fboxrule=0pt% + \fbox{\hbox to \lastlinedim{\hfill \footnotesize \strut \hfill}}% + \ifdim \lastlinedim > 0.6\linewidth\relax% we break + \nopagebreak\vskip-3pt% + \else% + % special thanks to Dan Luecking for this, since my original + % \hspace{\fill} failed miserably + \hskip1em plus 5em minus .5em + \fi% + {\footnotesize #1~~{\url{#2}}} % + \par% + \endgroup% +} + + diff --git a/Master/texmf-dist/tpm/dlfltxb.tpm b/Master/texmf-dist/tpm/dlfltxb.tpm new file mode 100644 index 00000000000..d03eb86e866 --- /dev/null +++ b/Master/texmf-dist/tpm/dlfltxb.tpm @@ -0,0 +1,37 @@ +<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd"> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/"> + <rdf:Description about="http://texlive.dante.de/texlive/Package/dlfltxb.zip"> + <TPM:Name>dlfltxb</TPM:Name> + <TPM:Type>Package</TPM:Type> + <TPM:Date>2007/05/17 18:53:00</TPM:Date> + <TPM:Version></TPM:Version> + <TPM:Creator>karl</TPM:Creator> + <TPM:Title>The dlfltxb package.</TPM:Title> + <TPM:Description></TPM:Description> + <TPM:Author></TPM:Author> + <TPM:Size>646232</TPM:Size> + <TPM:License></TPM:License> + <TPM:Build/> + <TPM:RunFiles size="34286"> +texmf-dist/bibtex/bib/dlfltxb/package_doc.bib +texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty +texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup-sample.cfg +texmf-dist/tex/latex/dlfltxb/dlfltxbmarkup.sty +texmf-dist/tex/latex/dlfltxb/dlfltxbmisc.sty +texmf-dist/tpm/dlfltxb.tpm + </TPM:RunFiles> + <TPM:DocFiles size="613412"> +texmf-dist/doc/latex/dlfltxb/README +texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.pdf +texmf-dist/doc/latex/dlfltxb/dlfltxbcodetips.tex +texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.pdf +texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup-showkeys.tex +texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.pdf +texmf-dist/doc/latex/dlfltxb/dlfltxbmarkup.tex +texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.pdf +texmf-dist/doc/latex/dlfltxb/dlfltxbmisc.tex + </TPM:DocFiles> + <TPM:Provides>Package/dlfltxb</TPM:Provides> + </rdf:Description> +</rdf:RDF> + |