summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/voss-mathcol
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-02-13 00:43:14 +0000
committerKarl Berry <karl@freefriends.org>2014-02-13 00:43:14 +0000
commitb5ed03e15bb0383f5767d025d52e9b84bbe2aa20 (patch)
treec70a7bd3fe3dc5debc61b4cbb19a9bedf95719b4 /Master/texmf-dist/doc/latex/voss-mathcol
parent6c76d108053732941431a176e9a29a74d96a8587 (diff)
voss-mathcol, now lppl (12feb14)
git-svn-id: svn://tug.org/texlive/trunk@32954 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/voss-mathcol')
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/Changes3
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/mathCol.bib35
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/mathCol.ltx68
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/mathCol.pdfbin0 -> 259908 bytes
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/mathCol.tex285
-rw-r--r--Master/texmf-dist/doc/latex/voss-mathcol/run.doc16
6 files changed, 407 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/Changes b/Master/texmf-dist/doc/latex/voss-mathcol/Changes
new file mode 100644
index 00000000000..9b0e545274e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/Changes
@@ -0,0 +1,3 @@
+..... mathCol.tex|pdf
+
+0.01 2004-04-01 first version
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.bib b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.bib
new file mode 100644
index 00000000000..103dac36339
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.bib
@@ -0,0 +1,35 @@
+@Manual{color,
+ Title = {\texttt{color.dtx}},
+ Author = {David Carlisle},
+ Organization = {},
+ Address = {CTAN: \url{macros/latex/required/graphics/color.dtx}},
+ Note = {},
+ year = 1999,
+}
+
+@Manual{empheq,
+ Title = {\texttt{empheq.dtx}},
+ Author = {Morten Høgholm},
+ Organization = {},
+ Address = {CTAN: \url{macros/latex/contrib/empheq/}},
+ Note = {},
+ year = 2003,
+}
+
+@Manual{framed,
+ Title = {\texttt{framed.sty}},
+ Author = {Donald Arseneau},
+ Organization = {},
+ Address = {CTAN: \url{macros/latex/contrib/misc/framed.sty}},
+ Note = {},
+ year = 2003,
+}
+
+@Manual{voss-Math,
+ Title = {Mathmode},
+ Author = {Herbert Vo{\ss}},
+ Organization = {},
+ Address = {\url{http://www.perce.de/LaTeX/math/Mathmode-TeX.pdf}},
+ Note = {},
+ year = 2004,
+}
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.ltx b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.ltx
new file mode 100644
index 00000000000..3b46b290caf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.ltx
@@ -0,0 +1,68 @@
+%% This file can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+\documentclass{dtk}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{lmodern}%
+\usepackage{url}
+\def\UrlFont{\small\ttfamily}
+\makeatletter
+\def\verbatim@font{\small\normalfont\ttfamily}
+\makeatother
+\usepackage{amscd}
+\usepackage{amsmath}
+\usepackage{calc}
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{empheq}
+\usepackage{framed}
+\definecolor{shadecolor}{rgb}{1,0.9,0.7}
+%
+\usepackage{esint}
+\def\Q#1#2{\frac{\partial #1}{\partial #2}}
+%
+\definecolor{hellmagenta}{rgb}{1,0.75,0.9}
+\definecolor{hellcyan}{rgb}{0.75,1,0.9}
+\definecolor{hellgelb}{rgb}{1,1,0.8}
+\definecolor{colKeys}{rgb}{0,0,1}
+\definecolor{colIdentifier}{rgb}{0,0,0}
+\definecolor{colComments}{rgb}{1,0,0}
+\definecolor{colString}{rgb}{0,0.5,0}
+\definecolor{darkyellow}{rgb}{1,0.9,0}
+%
+\usepackage{listings}
+\lstset{%
+ language=[AlLaTeX]TEX,%
+ float=hbp,%
+ basicstyle=\ttfamily\small, %
+ identifierstyle=\color{colIdentifier}, %
+ keywordstyle=\color{colKeys}, %
+ stringstyle=\color{colString}, %
+ commentstyle=\color{colComments}, %
+ columns=flexible, %
+ tabsize=3, %
+ frame=single, %
+ extendedchars=true, %
+ showspaces=false, %
+ showstringspaces=false, %
+ numbers=left, %
+ numberstyle=\tiny, %
+ breaklines=true, %
+ backgroundcolor=\color{hellgelb}, %
+ breakautoindent=true, %
+ captionpos=b,%
+ xleftmargin=18pt,%
+ xrightmargin=\fboxsep%
+}
+%\usepackage[colorlinks]{hyperref}
+%
+\newcommand*{\CMD}[1]{\small\texttt{\textbackslash #1}}
+\usepackage{dtk-pdf}
+\renewcommand\Volume{2/2004}
+\renewcommand\Pages{81-87}
+%
+\begin{document}
+ \input{mathCol.tex}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.pdf b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.pdf
new file mode 100644
index 00000000000..d24538f4b0b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.tex b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.tex
new file mode 100644
index 00000000000..dbb61953d70
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/mathCol.tex
@@ -0,0 +1,285 @@
+%% This file can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+\title{Farbige Mathematik}
+\author{Herbert Voß}
+\maketitle
+\begin{abstract}
+Die Zahl der Veröffentlichungen, die als PDF allgemein zur Verfügung gestellt
+werden, nimmt stetig zu. Da diese sehr häufig mit dem Acrobat Reader
+online betrachtet und gelesen werden, spielt die farbliche Darstellung
+eine nicht unbedeutende Rolle. Im folgenden soll daher gezeigt werden, wie man
+insbesondere für den Mathematikmodus farbige Darstellungen erreichen kann.
+\end{abstract}
+
+\section{Das Prinzip}
+Grundsätzlich wird nichts weiter als das allgemein bekannte Paket \verb+color+
+benötigt. \cite{color} Dieses stellt die vordefinierten Farben \textcolor{black}{black},
+\textcolor{red}{red}, \textcolor{green}{green}, \textcolor{blue}{blue},
+\textcolor{cyan}{cyan}, \textcolor{magenta}{magenta}, \textcolor{yellow}{yellow}
+und natürlich \colorbox[gray]{0.75}{\textcolor{white}{white}}
+bereit. Weitere lassen sich über den \verb+\definecolor+ Befehl neu definieren.
+
+\section{Partielles Einfärben}
+Für das Färben einzelner Wörter existiert das Makro \verb+\textcolor+., welches ebenfalls
+für das Einfärben einzelner Teile einer mathematischen Formel benutz werden kann.
+\begin{align}\label{eq:1}
+\int_1^2 \textcolor{red}{\frac{1}{x^2}}\,dx &= 0.5
+\end{align}
+
+\begin{lstlisting}
+\begin{align}
+\int_1^2 \textcolor{red}{\frac{1}{x^2}}\,dx &= 0.5
+\end{align}
+\end{lstlisting}
+Das entsprechende Makro mit der Syntax \verb+\textcolor{<Farbe>}{<Text>}+ ist zwar
+vom Namen her missverständlich,
+lässt sich jedoch im Mathematikmodus in der gleichen Weise anwenden, ohne dass dieser
+Modus verlassen werden muss. Gleichung~\ref{eq:1} zeigt, dass die Variable $x$
+kursiv gedruckt wird, was für den mathematischen Modus Standard ist.
+
+\begin{align}\label{eq:pqFormel}
+y &= 2x^2 -3x +5\\\nonumber
+ & \hphantom{= \ 2\left(x^2-\frac{3}{2}\,x\right. }%
+ \textcolor{blue}{%
+ \overbrace{\hphantom{+\left(\frac{3}{4}\right)^2- %
+ \left(\frac{3}{4}\right)^2}}^{=0}}\\[-11pt]
+ &= 2\left(\textcolor{red}{%
+ \underbrace{%
+ x^2-\frac{3}{2}\,x + \left(\frac{3}{4}\right)^2}%
+ }%
+ \underbrace{%
+ - \left(\frac{3}{4}\right)^2 + \frac{5}{2}}%
+ \right)\\
+ &= 2\left(\qquad\textcolor{red}{\left(x-\frac{3}{4}\right)^2}
+ \qquad + \ \frac{31}{16}\qquad\right)\\
+y\textcolor{blue}{-\frac{31}{8}}
+ &= 2\left(x\textcolor{cyan}{-\frac{3}{4}}\right)^2%
+\end{align}
+
+\medskip
+\begin{lstlisting}
+\begin{align}\label{eq:pqFormel}
+y &= 2x^2 -3x +5\\\nonumber
+ & \hphantom{= \ 2\left(x^2-\frac{3}{2}\,x\right. }%
+ \textcolor{blue}{%
+ \overbrace{\hphantom{+\left(\frac{3}{4}\right)^2- %
+ \left(\frac{3}{4}\right)^2}}^{=0}}\\[-11pt]
+ &= 2\left(\textcolor{red}{%
+ \underbrace{%
+ x^2-\frac{3}{2}\,x + \left(\frac{3}{4}\right)^2}%
+ }%
+ \underbrace{%
+ - \left(\frac{3}{4}\right)^2 + \frac{5}{2}}%
+ \right)\\
+ &= 2\left(\qquad\textcolor{red}{\left(x-\frac{3}{4}\right)^2}
+ \qquad + \ \frac{31}{16}\qquad\right)\\
+y\textcolor{blue}{-\frac{31}{8}}
+ &= 2\left(x\textcolor{cyan}{-\frac{3}{4}}\right)^2%
+\end{align}
+\end{lstlisting}
+
+Es ist offensichtlich, dass selbst für triviale mathematische Zusammenhänge, wie sie durch
+Gleichung~\ref{eq:pqFormel} gegeben sind, mit der Farbe eine übersichtlichere Darstellung
+möglich ist.
+
+
+\section{Komplettes Einfärben}
+Im sogenannten
+Inlinemodus können auf einfache Weise ganze mathematische Ausdrücke in Farbe
+gesetzt werden, beispielsweise bezieht sich \textcolor{blue}{$y=x^2+px+q$} auf die
+Gleichung~\ref{eq:pqFormel}. Hierbei spielt es keine Rolle, ob der mathematische
+Teil komplett als Argument erscheint \verb|\textcolor{blue}{$y=x^2+px+q$}| oder
+umgekehrt das \verb+\textcolor+ Makro innerhalb der Formel, wie bei diesem Ausdruck
+$\textcolor{magenta}{c^2=a^2+b^2}$ (\verb|$\textcolor{magenta}{c^2=a^2+b^2}$|).
+
+Im Gegensatz zum \verb+\textcolor+ Makro erwarten \verb+\colorbox+ und
+\verb+\fcolorbox+ den Parameter im
+Textmodus, sodass in diesem Fall der mathematische Modus erneut aktiviert werden muss,
+wenn diese Makros innerhalb einer mathematischen Umgebung angewendet werden (Gl.~\ref{eq:6}).
+\bgroup
+\def\xstrut{\vphantom{\dfrac{(A)^1}{(B)^1}}}
+\begin{equation}\label{eq:6}
+E = %
+ \colorbox{darkyellow}{$\xstrut a_vA$} -
+ \colorbox{hellmagenta}{$\xstrut a_fA^{2/3}$} -
+ \colorbox{green}{$\xstrut a_c\dfrac{Z(Z-1)}{A^{1/3}}$} -
+ \colorbox{cyan}{$\xstrut a_s\dfrac{(A-2Z)^2}{A}$} +
+ \colorbox{yellow}{$\xstrut E_p$}
+\end{equation}
+\egroup
+
+\medskip
+\begin{lstlisting}
+\def\xstrut{\vphantom{\frac{(A)^1}{(B)^1}}}
+\begin{equation}\label{eq:6}
+E = %
+ \colorbox{darkyellow}{$\xstrut a_vA$} +
+ \colorbox{hellmagenta}{$\xstrut -a_fA^{2/3}$} +
+ \colorbox{green}{$\xstrut -a_c\frac{Z(Z-1)}{A^{1/3}}$} +
+ \colorbox{cyan}{$\xstrut -a_s\frac{(A-2Z)^2}{A}$} +
+ \colorbox{yellow}{$\xstrut E_p$}
+\end{equation}
+\end{lstlisting}
+
+Abgesetzte Formeln können ebenso komplett eingefärbt werden, wobei gleichzeitig
+für Gleichung~\ref{eq:cd}
+noch eine partielle Rotfärbung vorgenommen wurde. Die globale Umschaltung auf eine
+andere Farbe geschieht mit dem \verb+color{<Farbe>}+ Befehl, der einfach an den
+Beginn der abgesetzten Gleichung gesetzt wird.
+
+\[\label{eq:5}\color{magenta}
+\left(\prod^n_{\, j=1}\hat{x}_j\right)H_c=%
+ \frac{1}{2}\hat{k}_{ij}\det\widehat{\mathbf{K}}(i|i)
+\]
+
+\begin{align}\label{eq:cd}\color{blue}
+\begin{CD}
+ R\times S\times T @>\text{restriction}>> S\times T \\
+ @VprojVV @VVprojV \\
+ R\times S @<<\text{\textcolor{red}{inclusion}}< S
+\end{CD}
+\end{align}
+
+\medskip
+\begin{lstlisting}
+\[\color{magenta}
+\left(\prod^n_{\, j=1}\hat{x}_j\right)H_c=%
+ \frac{1}{2}\hat{k}_{ij}\det\widehat{\mathbf{K}}(i|i)
+\]
+
+\begin{align}\label{eq:cd}\color{blue}
+\begin{CD}
+ R\times S\times T @>\text{restriction}>> S\times T \\
+ @VprojVV @VVprojV \\
+ R\times S @<<\text{\textcolor{red}{inclusion}}< S
+\end{CD}
+\end{align}
+\end{lstlisting}
+
+\section{Farbboxen}
+Hier sind aus dem Textmodus die Makros \verb+colorbox+ und \verb+fcolorbox+ bekannt,
+die sich ebenfalls auf den mathematischen Modus übertragen lassen:
+\colorbox{yellow}{$x_{n+1}\leftarrow x_n^2+c$} in der komplexen Zahlenmenge betrachtet,
+hat etwas mit Benoit Mandelbrot zu tun.
+
+\begin{lstlisting}
+\colorbox{yellow}{$x_{n+1}\leftarrow x_n^2+c$} in der komplexen Zahlenmenge betrachtet,
+hat etwas mit Benoit Mandelbrot zu tun.
+\end{lstlisting}
+
+Ebenso hätte man auch bei dieser im Inlinemodus geschriebenen Formel \verb+\fcolorbox+
+verwenden können, welches das Gegenstück zu \verb+\fbox+ darstellt:
+\fcolorbox{red}{yellow}{$x_{n+1}\leftarrow x_n^2+c$}. Für den Rahmen ist
+dann eine zusätzliche Farbe als Parameter zu übergeben \verb+\fcolorbox{red}{yellow}{$...$}+.
+
+Etwas schwieriger ist der Fall, wenn man abgesetzte Formeln einfärben will, die
+gleichzeitig eine Gleichungsnummer aufweisen, denn diese könnte sowohl innerhalb
+als auch außerhalb der farbigen Box erscheinen. Weiterhin
+muss die abgesetzte Formel zusätzlich in eine \verb+parbox+ gepackt werden, um dann
+beispielweise so etwas wie Gleichung~\ref{eq:3} zu erhalten.
+
+\colorbox{hellmagenta}{%
+\parbox{\linewidth-2\fboxsep}{%
+ \begin{align}\label{eq:3}
+ \frac{I(\alpha )}{I_{0}}=%
+ \begin{cases}
+ \sqrt{1-\frac{\alpha}{\pi}+\frac{1}{2\pi}\sin 2\alpha}
+ & \varphi =0\\[0.4cm]
+ \sqrt{2\left(1-\frac{\alpha}{\pi}\right)%
+ \left(2+\cos 2\alpha \right)+\frac{3}{\pi}\sin 2\alpha}
+ & \varphi =\frac{\pi}{2}
+ \end{cases}
+ \end{align}%
+}}
+
+\medskip
+\begin{lstlisting}
+\colorbox{hellmagenta}{%
+\parbox{\linewidth-2\fboxsep}{%
+ \begin{align}\label{eq:3}
+ \frac{I(\alpha )}{I_{0}}=%
+ \begin{cases}
+ \sqrt{1-\frac{\alpha}{\pi}+\frac{1}{2\pi}\sin 2\alpha}
+ & \varphi =0\\[0.4cm]
+ \sqrt{2\left(1-\frac{\alpha}{\pi}\right)\left(2+%
+ \cos 2\alpha \right)+\frac{3}{\pi}\sin 2\alpha}
+ & \varphi =\frac{\pi}{2}
+ \end{cases}
+ \end{align}%
+}}
+\end{lstlisting}
+
+Wenn man dagegen keine Gleichungsnummer hat und die Formel nur
+für den Bereich einfärben will, den sie auch tatsächlich benötigt, hat man das
+Problem, dass man schon bei der Definition der \verb+parbox+ ihre Breite kennen muss,
+was zu diesem Zeitpunkt jedoch noch nicht bekannt ist. Hierbei kann man sich mit dem Paket
+\verb+empheq+ \cite{empheq} helfen, welches die Aufgabe der Boxbreitenbestimmung vornimmt,
+wobei dieses Paket dies auch unabhängig davon kann, ob eine Gleichungsnummer erscheint
+oder nicht.
+
+\begin{empheq}[box=\fcolorbox{blue}{hellcyan}]{align*}
+ x(t) & =\frac{a\left(t^{2}-1\right)}{t^2+1}\\
+ y(t) & =\frac{at\left(t^{2}-1\right)}{t^2+1}
+\end{empheq}
+
+
+\medskip
+\begin{lstlisting}
+\begin{empheq}[box=\fcolorbox{blue}{hellcyan}]{align*}
+ x(t) & =\frac{a\left(t^{2}-1\right)}{\t^2+1}\\
+ y(t) & =\frac{at\left(t^{2}-1\right)}{t^2+1}
+\end{empheq}
+\end{lstlisting}
+
+
+Für komplett farbig hinterlegte Gleichungen kann noch das Paket \verb+framed+ benutzt werden.\cite{framed} Es definiert die Umgebung \verb+shaded+, welche die mathematischen
+Umgebungen einfach umschließen kann. \verb+framed+ hat den Vorteil, dass es auch ohne
+weiteres über Seitenumbrüche hinweg funktioniert und zu dem mehrere, auch verschiedene,
+mathematische Umgebungen umfassen kann.
+
+\begin{shaded}
+\begin{align}
+\underset{\mathcal{G}\quad}\iiint\!%
+ \left[u\nabla^{2}v+\left(\nabla u,\nabla v\right)\right]d^{3}V%
+ =\underset{\mathcal{S}\quad}\oiint u\Q{v}{n}d^{2}A
+\end{align}
+\begin{align}
+\underset{{\mathcal{G}\quad}}\iiint\!%
+ \left[u\nabla^{2}v-v\nabla^{2}u\right]d^{3}V%
+ =\underset{\mathcal{S}\quad}\oiint%
+ \left(u\Q{v}{n}-v\Q{u}{n}\right)d^{2}A
+\end{align}
+\end{shaded}
+
+\medskip
+\begin{lstlisting}
+\begin{shaded}
+\begin{align}
+\underset{\mathcal{G}\quad}\iiint\!%
+ \left[u\nabla^{2}v+\left(\nabla u,\nabla v\right)\right]d^{3}V%
+ =\underset{\mathcal{S}\quad}\oiint u\Q{v}{n}d^{2}A
+\]
+\[
+\underset{{\mathcal{G}\quad}}\iiint\!%
+ \left[u\nabla^{2}v-v\nabla^{2}u\right]d^{3}V%
+ =\underset{\mathcal{S}\quad}\oiint%
+ \left(u\Q{v}{n}-v\Q{u}{n}\right)d^{2}A
+\]
+\end{shaded}
+\end{lstlisting}
+
+
+\section{Zusammenfassung}
+Es wurde gezeigt, dass ebenfalls für den mathematischen Modus das Einfärben von Formeln
+oder Teilen davon mit den bestehenden Makros ohne weiteres möglich ist. Andere
+oder weitergehende Möglichkeiten kann man \cite{voss-Math} entnehmen.
+
+\begingroup
+ \renewcommand\refname{Literatur und Software}
+ \renewcommand\bibname{\refname}
+ \bibliography{mathCol}
+\endgroup
+
+\address{Herbert}{Voß}{Wasgenstr. 21\\14129 Berlin\\voss@perce.de}
diff --git a/Master/texmf-dist/doc/latex/voss-mathcol/run.doc b/Master/texmf-dist/doc/latex/voss-mathcol/run.doc
new file mode 100644
index 00000000000..55329374d87
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/voss-mathcol/run.doc
@@ -0,0 +1,16 @@
+mathCol.pdf : dtk Article about color in math mode (in german)
+
+mathCol.ltx : main source file (preamble)
+mathCol.tex : document source
+mathCol.bib : BibTeX data
+
+building the document:
+pdflatex mathCol.ltx
+bibtex mathCol
+pdflatex mathCol.ltx
+
+
+%% This file can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%