From 8524fde36458c91ae6261e04a9ab4093514adff9 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 24 Sep 2013 22:26:11 +0000
Subject: upmethodology (24sep13)

git-svn-id: svn://tug.org/texlive/trunk@31742 c570f23f-e606-0410-a88d-b1316a301751
---
 .../doc/latex/upmethodology/upmethodology-doc.tex  | 247 ++++++++++++++++++---
 1 file changed, 219 insertions(+), 28 deletions(-)

(limited to 'Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex')

diff --git a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex
index 9cb76588f6e..8958008f9db 100644
--- a/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex
+++ b/Master/texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex
@@ -14,6 +14,11 @@
 \incsubversion{\makedate{06}{07}{2013}}{Add the macro \texttt{{\textbackslash}ifdocumentauthor}.}{\upmpublic}
 \incsubversion{\makedate{15}{08}{2013}}{Add the macros: \texttt{{\textbackslash}textup}, \texttt{{\textbackslash}textsubscript}, \texttt{{\textbackslash}textdown}, \texttt{{\textbackslash}textsubscript}, \texttt{{\textbackslash}Emph}. Add the environments \texttt{enumdescription}, \texttt{enumdescriptionx}.}{\upmpublic}
 \incsubversion{\makedate{17}{08}{2013}}{Update the second parameter of \texttt{{\textbackslash}mfigurewtex} to have the same semantic as for \texttt{{\textbackslash}mfigure}.}{\upmpublic}
+\incsubversion{\makedate{26}{08}{2013}}{Major bug fixes in the environments \texttt{mtabular} and \texttt{mtable}. \newline Add the macro \texttt{{\textbackslash}tabulartitlespec}. \newline Add the macro \texttt{{\textbackslash}makenamespacing}.}{\upmpublic}
+\incsubversion{\makedate{27}{08}{2013}}{Add the environment \texttt{framedcolorminipage}. Add the \texttt{definition} environment.}{\upmpublic}
+\incsubversion{\makedate{02}{09}{2013}}{Change the specification of the optional parameter of \texttt{mtable}. Add the macro \texttt{{\textbackslash}makelastname}}{\upmpublic}
+\incsubversion{\makedate{05}{09}{2013}}{Add the macro \texttt{{\textbackslash}declareupmtheorem}}{\upmpublic}
+\incsubversion{\makedate{19}{09}{2013}}{Add the mathematic symbols}{\upmpublic}
 
 \addauthorvalidator*[galland@arakhne.org]{St{\'e}phane}{Galland}{Original Author}
 
@@ -42,6 +47,8 @@
 %\tracingmacros=2
 %\tracingcommands=1
 
+\declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}
+
 \begin{document}
 
 \tableofcontents
@@ -176,11 +183,14 @@ This section contains the list of all the package dependencies for the \texttt{u
 \item \texttt{colortbl}
 \item \texttt{picinpar}
 \item \texttt{amsmath}
+\item \texttt{amsthm}
+\item \texttt{thmtools}
 \item \texttt{pifont}
 \item \texttt{setspace}
 \item \texttt{txfonts}
 \item \texttt{xkeyval}
 \item \texttt{hyphenat}
+\item \texttt{mathbb}
 \end{itemize}
 
 \subsection{upmethdology-frontpage.sty}
@@ -258,8 +268,6 @@ Table~\tabref{documentclassoptions} contains the options supported by \texttt{up
 \captionastitle
 \tabularheader{Option}{Explanation}
 
-\hline
-
 book & see section~\ref{section:documentclass:doctype}. \\
 \hline
 report & see section~\ref{section:documentclass:doctype}. \\
@@ -566,23 +574,50 @@ This tabular is an extension of the \texttt{tabularx} environment which provides
 
 \end{itemize}
 
+
+\begin{upmcaution}
+	You must note put any text nor \TeX\ macro before the first use of \texttt{{\textbackslash}tabulartitle} or \texttt{{\textbackslash}tabularheader}. Otherwhise, you will obtain an \TeX\ error.
+\end{upmcaution}
+
+
 The \texttt{mtabular} environment provides:
 \begin{itemize}
 \item \texttt{{\textbackslash}tabulartitle\{title\}} \\
-	this macro permits to define the title of the tabular. It uses the colors \texttt{backtableheader} and \texttt{fronttableheader} for the background and the foreground respectively;
+	This macro permits to define the title of the tabular. It uses the colors \texttt{backtableheader} and \texttt{fronttableheader} for the background and the foreground respectively. The title has a single line at the top, and a single line below;
+
+\item \texttt{{\textbackslash}tabulartitleinside\{title\}} \\
+	This macro permits to define the title of the tabular. It uses the colors \texttt{backtableheader} and \texttt{fronttableheader} for the background and the foreground respectively. The title has two lines at the top, and a single line below;
 
 \item \texttt{{\textbackslash}tabularheader\{$header_1$\}...\{$header_n$\}} \\
-	this macro permits to define the titles of the columns. It uses the colors \texttt{backtableheader} and \texttt{fronttableheader} for the background and the foreground respectively. Because the count of columns was given to the environment this function takes the same count of parameters as the count of columns.
+	This macro permits to define the titles of the columns. It uses the colors \texttt{backtableheader} and \texttt{fronttableheader} for the background and the foreground respectively. Because the count of columns was given to the environment this function takes the same count of parameters as the count of columns. This macro adds a line after the header, \emph{BUT NOT BEFORE}.
+\begin{upmcaution}
+	Because \texttt{{\textbackslash}tabularheader} is adding a \texttt{{\textbackslash}hline} at the end of its expansion. You must put a \texttt{{\textbackslash}tabularheader} just after \texttt{{\textbackslash}tabularheader}. Otherwise you may obtain a \TeX\ error.
+\end{upmcaution}
+
+\item \texttt{{\textbackslash}tabularrowheader\{title\}} \\
+	This macro is designed to be used in the first cell of a row. It is rendering the cell as a row's header.
+
+\item \texttt{{\textbackslash}tabulartitlespec\{column\_spec\}} \\
+	This macro defines the specification of the column used to render the title of the table.
+	The default value of the column specification is $|$\texttt{c}$|$.
+
 \end{itemize}
 
 The following example of table is obtained by: \\
-\texttt{{\textbackslash}begin\{mtabular\}[{\textbackslash}linewidth]\{4\}\{lXrX\}} \\
-\texttt{{\textbackslash}tabulartitle\{Example of {\textbackslash}texttt\{mtabular\}\}} \\
-\texttt{{\textbackslash}tabularheader\{Col1\}\{Col2\}\{Col3\}\{Col4\}} \\
-\texttt{a \& b \& c \& d {\textbackslash}{\textbackslash}} \\
-\texttt{{\textbackslash}hline} \\
-\texttt{e \& f \& g \& h {\textbackslash}{\textbackslash}} \\
-\texttt{{\textbackslash}end\{mtabular\}}
+\begin{verbatim}
+\begin{mtabular}[\linewidth]{4}{lXrX}
+	\tabulartitle{Example of \texttt{mtabular}}
+	\tabularheader{Col1}{Col2}{Col3}{Col4}
+	a & b & c & d \\
+	\hline
+	e & f & g & h \\
+	\tabulartitleinside{Example of second title in the table}
+	\hline
+	\tabularrowheader{i} & j & k & l \\
+	\tabularheader{Col1-2}{Col2-2}{Col3-2}{Col4-2}
+	m & n & o & p \\
+\end{mtabular}
+\end{verbatim}
 
 \begin{mtabular}[\linewidth]{4}{lXrX}
 	\tabulartitle{Example of \texttt{mtabular}}
@@ -590,16 +625,27 @@ The following example of table is obtained by: \\
 	a & b & c & d \\
 	\hline
 	e & f & g & h \\
+	\tabulartitleinside{Example of second title in the table}
+	\hline
+	\tabularrowheader{i} & j & k & l \\
+	\tabularheader{Col1-2}{Col2-2}{Col3-2}{Col4-2}
+	m & n & o & p \\
 \end{mtabular}
 
 \section{Tables}
 
 You could include a table inside your document with the following environment: \\
-\texttt{{\textbackslash}begin\{mtable\}[position]\{width\}\{ncolumns\}\{columns\}\{caption\}\{label\}...{\textbackslash}end\{mtable\}} \\
+\texttt{{\textbackslash}begin\{mtable\}[options]\{width\}\{ncolumns\}\{columns\}\{caption\}\{label\}...{\textbackslash}end\{mtable\}} \\
 
 This environment is based on the \texttt{mtabular} environment. The parameters are:
 \begin{itemize}
-\item \texttt{position}: is the desired position of the table according to the \LaTeX's \texttt{table} definition;
+\item \texttt{options}: are the options to pass to the \texttt{mtable} environment: \begin{itemize}
+			\item \texttt{h}: put the table ``here'' (similar to the option \texttt{h} for the \LaTeX's \texttt{table}),
+			\item \texttt{H}: put the table ``absolutely here'' (similar to the option \texttt{H} for the \LaTeX's \texttt{table}),
+			\item \texttt{t}: put the table ``at the top of the page'' (similar to the option \texttt{t} for the \LaTeX's \texttt{table}),
+			\item \texttt{b}: put the table ``at bottom of the page'' (similar to the option \texttt{b} for the \LaTeX's \texttt{table}),
+			\item \texttt{size=\string<macro\string>}: specify the size of the text in the table (by default, \texttt{{\textbackslash}normalsize});
+		\end{itemize}
 \item \texttt{width}: is the desired width of the table (ie., the tabular inside the table);
 \item \texttt{ncolumns}: is the count of columns in the table (ie., the tabular inside the table). It must be consistent with the column description;
 \item \texttt{columns}: is the description of the columns according to the \texttt{tabular} and \texttt{tabularx} packages;
@@ -643,7 +689,10 @@ The package \texttt{upmethodology-fmt} provides a set of macros dedicated to enu
 
 Sometimes it is usefull to start an enumeration list from a specifical given number. This package provides several macros for saving and restoring the counter use by the enumeration lists.
 
-Caution: only once counter could be saved at a given time.
+\begin{upmcaution}
+Only once counter could be saved at a given time.
+It means that you cannot save the counters for an enumeration and for an enclosing enumeration at the same time.
+\end{upmcaution}
 
 \begin{itemize}
 \item \texttt{{\textbackslash}savecounter\{name\}} \\
@@ -897,6 +946,14 @@ The package \texttt{upmethodology-fmt} provides a set of macros to format the te
 	format the specified people name components according to the document standards. By default, the format \texttt{first von last} is used. \\
 	Example: \texttt{{\textbackslash}upmmakename[von]\{Ludwig Otto Frederik Wilhelm\}\{Wittelsbach\}\{/\}}, \\
 		``\upmmakename[von]{Ludwig Otto Frederik Wilhelm}{Wittelsbach}{/}'';
+\item \texttt{{\textbackslash}makenamespacing\{name\}} \\
+	format the specified name to be sure that the spaces after the points of the initials are demi-spaces. \\
+	Example: \texttt{{\textbackslash}makenamespacing\{S\string.G\string.\}Galland}, \\
+		``\makenamespacing{S.G.}Galland'';
+\item \texttt{{\textbackslash}makelastname\{name\}} \\
+	format the specified last/family name. \\
+	Example: \texttt{{\textbackslash}makelastname\{Galland\}}, \\
+		``\makelastname{Galland}'';
 \item \texttt{{\textbackslash}prname[von]\{first name\}\{last name\}} \\
       \texttt{{\textbackslash}prname*[von]\{first name\}\{last name\}} \\
 	format the specified people name components according to the document standards for \emph{Professor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
@@ -933,9 +990,13 @@ The package \texttt{upmethodology-fmt} provides a set of macros to format the te
 	Example 1: \texttt{{\textbackslash}iengname\{Pierre\}\{Martin\}}, ``\iengname{Pierre}{Martin}''; \\
 	Example 2: \texttt{{\textbackslash}iengname*\{Pierre\}\{Martin\}}, ``\iengname*{Pierre}{Martin}''.
 \end{itemize}
+
+
 \section{Symbols}
 
-The package \texttt{upmethodology-fmt} provides several symbols described inside the table~\ref{tab:symbols}.
+\subsection{Symbols in Text Mode}
+
+The package \texttt{upmethodology-fmt} provides several symbols in text mode, and described inside the table~\ref{tab:symbols:text}.
 
 \begin{table}[Hht]
 	\begin{center}
@@ -956,7 +1017,34 @@ The package \texttt{upmethodology-fmt} provides several symbols described inside
 		\end{tabular}
 	\end{center}
 	\caption{List of symbols}
-	\label{tab:symbols}
+	\label{tab:symbols:text}
+\end{table}
+
+\subsection{Symbols in Math Mode}
+
+The package \texttt{upmethodology-fmt} provides several symbols in math mode, and described inside the table~\ref{tab:symbols:math}.
+
+\begin{table}[Hht]
+	\begin{center}
+		\begin{tabular}{|>{\ttfamily}l|l|}
+		\hline
+		\multicolumn{2}{|c|}{Sets} \\
+		\hline
+		{\textbackslash}R & \R \\
+		{\textbackslash}N & \N \\
+		{\textbackslash}Z & \Z \\
+		{\textbackslash}Q & \Q \\
+		{\textbackslash}C & \C \\
+		{\textbackslash}powerset p & $\powerset p$ \\
+		\hline
+		\multicolumn{2}{|c|}{Operators} \\
+		\hline
+		{\textbackslash}sgn expr & $\sgn expr$ \\
+		\hline
+		\end{tabular}
+	\end{center}
+	\caption{List of symbols}
+	\label{tab:symbols:math}
 \end{table}
 
 \section{Bibliography}
@@ -975,18 +1063,121 @@ The package \texttt{upmethodology-fmt} provides a set of macros allowing to mana
 	Example: \texttt{{\textbackslash}bibsize\{{\textbackslash}Huge\}};
 \end{itemize}
 
-\section{Framed Mini Pages}
+\section{Theorems and Mathematic Environments}
 
-Standard \LaTeX\ distribution provides the \texttt{minipage} environment. This environment permits to put a small piece of page inside your document. Package \texttt{upmethodology-fmt} provides a framed extension of the original \texttt{minipage} environment:
-\par
-\begin{tabularx}{\linewidth}{XX}
-\texttt{{\textbackslash}begin\{framedminipage\}{[}{\textbackslash}linewidth{]}} \newline
-\texttt{This is an example of a framed minipage.} \newline
-\texttt{{\textbackslash}end\{framedminipage\}}
-&
-\begin{framedminipage}{\linewidth}This is an example of a framed minipage.\end{framedminipage}
-\\
-\end{tabularx}
+The package \texttt{upmethodology-fmt} defines several environments and macros that are based on the \texttt{theorem} or the math API of \LaTeX.
+
+\subsection{Definition of a new theorem environment}
+
+If you want to create a new theorem environment based on the style provided by this package, you could invoke \texttt{{\textbackslash}declareupmtheorem}: \\
+\texttt{{\textbackslash}declareupmtheorem[name of the style]\{name\}\{label\}\{title of the list\}}
+
+This macro defines:
+\begin{itemize}
+\item the environment with the given name, and
+\item the macro \texttt{{\textbackslash}listof$\langle$name$\rangle$s}.
+\end{itemize}
+
+The \texttt{name of the style} is the name of the theorem style to be used. This style is defined by \texttt{{\textbackslash}newtheoremstyle}. By default, it is \texttt{upmdefinition}.
+The \texttt{label} is the text to put in the theorem header.
+The \texttt{title of the list} is used by the macro \texttt{{\textbackslash}listof$\langle$name$\rangle$s} as the title of the chapter.
+
+\begin{upmcaution}
+	Some features provided by this package depend on the version of the package \texttt{thmtools}. We recommend to use and install the version 2012/05/04, or later.
+\end{upmcaution}
+
+\begin{upmcaution}
+	The macro \texttt{{\textbackslash}declareupmtheorem} can be used only inside the preamble of your document.
+\end{upmcaution}
+
+\paragraph{Example:} The following code define the environment \texttt{mytheorem}:
+\begin{verbatim}
+\documentclass{upmethodology-document}
+\declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}
+\begin{document}
+\begin{mytheorem}[Theorem of Everything]
+This is the theorem of Evereything.
+\end{mytheorem}
+\end{document}
+\end{verbatim}
+gives the result:
+\begin{mytheorem}[Theorem of Everything]
+This is the theorem of Evereything.
+\end{mytheorem}
+
+\subsection{\texttt{definition}}
+
+The package \texttt{upmethodology-fmt} defines the environment \texttt{definition}, which permits to put a definition in your document. This environment is based on the standard \texttt{theorem} environment. The \texttt{definition} takes one optional parameter: the name of the definition.
+
+\paragraph{Example:} The following \LaTeX\ code:
+\begin{verbatim}
+\begin{definition}[Name of the definition]
+Text of the definition.
+\end{definition}
+\end{verbatim}
+produces:
+
+\begin{definition}[Name of the definition]
+Text of the definition.
+\end{definition}
+
+\paragraph{Change the colors of the definition:} You could change the colors of the \texttt{definition} environment by redefining the colors below with one of the macros \texttt{{\textbackslash}definecolor} or \texttt{{\textbackslash}colorlet}:
+\begin{itemize}
+\item \texttt{definitionbackground} is the color of the background of the definition;
+\item \texttt{definitionborder} is the color of the frame;
+\item \texttt{definitionheaderforeground} is the color of the text in the header of the definition;
+\item \texttt{definitiontextforeground} is the color of the text in the body of the definition.
+\end{itemize}
+
+\paragraph{Example of color redefinition:} The following \LaTeX\ code:
+\begin{verbatim}
+\definecolor{definitionheaderforeground}{rgb}{.3,.5,.8}
+\colorlet{definitionbackground}{gray!20}
+\colorlet{definitionborder}{red}
+\begin{definition}[Name of the definition]
+Text of the definition.
+\end{definition}
+\end{verbatim}
+produces:
+
+\definecolor{definitionheaderforeground}{rgb}{.3,.5,.8}
+\colorlet{definitionbackground}{gray!20}
+\colorlet{definitionborder}{red}
+\begin{definition}[Name of the definition]
+Text of the definition.
+\end{definition}
+
+\section{Framed Boxes or Mini Pages}
+
+Standard \LaTeX\ distribution provides the \texttt{minipage} environment. This environment permits to put a small piece of page inside your document. The package \texttt{upmethodology-fmt} provides two framed extensions of the original \texttt{minipage} environment: \texttt{framedminipage} and \texttt{framedcolorminipage}.
+
+The prototypes of there two new environments are, respectively:
+\begin{itemize}
+\item \texttt{{\textbackslash}begin\{framedminipage\}\{width\} \dots {\textbackslash}end\{framedminipage\}}
+\item \texttt{{\textbackslash}begin\{framedcolorminipage\}\{width\}\{border\string_color\}\{background\string_color\} \dots {\textbackslash}end\{framedcolorminipage\}}
+\end{itemize}
+
+\paragraph{Example of \texttt{framedminipage}} The following \LaTeX\ code:
+\begin{verbatim}
+\begin{framedminipage}{.75\linewidth}
+This is a text inside a framed minipage.
+\end{framedminipage}
+\end{verbatim}
+produces:
+\begin{framedminipage}{.75\linewidth}
+This is a text inside a framed minipage.
+\end{framedminipage}
+
+\paragraph{Example of \texttt{framedcolorminipage}} The following \LaTeX\ code:
+\begin{verbatim}
+\begin{framedcolorminipage}{.75\linewidth}{red}{yellow}
+This is a text inside a framed minipage with colors.
+\end{framedcolorminipage}
+\end{verbatim}
+produces:
+\begin{framedcolorminipage}{.75\linewidth}{red}{yellow}
+This is a text inside a framed minipage with colors.
+\end{framedcolorminipage}
 
 \section{Message Boxes}
 
@@ -1387,8 +1578,8 @@ Additional macros are provided to redefine the \texttt{upmethodology-document} c
 The \texttt{variable\_name} is the name of the value to override. It must be taken in one of the names listed in table~\tabref{documentextension:names:set}. The \texttt{lang} parameter is a language identifier. It is used to restrict the definition to a specific language. If not given, the default language is used insteed. The \texttt{image\_name} and \texttt{image\_scale} are the name of the image file and the scaling factor respectively.
 
 \begin{mtable}{\linewidth}{2}{lX}{List of overiddable value names}{documentextension:names:set}
-	\tabularheader{Value Name}{Description}
 	\hline
+	\tabularheader{Value Name}{Description}
 	logo & the filename of the picutre which must be used as a large logo. \\
 	\hline
 	smalllogo & the filename of the picutre which must be used as a small logo. \\
-- 
cgit v1.2.3

