diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-18 18:05:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-18 18:05:20 +0000 |
commit | 37f1831f5559f99501eb0123e22795ae5300650b (patch) | |
tree | e6553a1abced92a0d91df26466c16f087ab60c6c /Master/texmf-dist/doc | |
parent | b26ee2030e017af00dee74ea37ca13189caa593c (diff) |
new latex package mdframed 0.3 (16apr10)
git-svn-id: svn://tug.org/texlive/trunk@17904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf | bin | 0 -> 526516 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex | 233 |
3 files changed, 239 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/README b/Master/texmf-dist/doc/latex/mdframed/README new file mode 100644 index 00000000000..95ffcb58d34 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/README @@ -0,0 +1,6 @@ +Working with the command \fbox or \fcolorbox, one has to +handle page breaks by hand. The present package defines the +environment mdframed which automatically deals with page breaks. + +Author's name: Marco Daniel +License type: lppl
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf Binary files differnew file mode 100644 index 00000000000..99208c55a69 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.pdf diff --git a/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex new file mode 100644 index 00000000000..515a577c2dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/mdframed/mdframed-doc.tex @@ -0,0 +1,233 @@ +%% Documentation of the package mdframed.sty +\def\mdversion{version 0.3} +\documentclass[american,11pt]{article} +\usepackage{geometry} +\geometry{left=3cm,right=3cm,top=2cm,bottom=2cm} +\usepackage{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\newif\ifmdframedcompile +\mdframedcompiletrue %% use lucida als default +\IfFileExists{lucidabr}{% + \usepackage{textcomp} + \ifmdframedcompile + \usepackage[de,T1,altbullet]{lucidabr} + \else + \usepackage[T1,altbullet]{lucidabr} + \fi + }{% + \usepackage[scaled]{libertine} +} +\usepackage{xcolor} +\usepackage[babel]{microtype} +\usepackage{array,tabularx} +%%Load the the package itselfs +\usepackage{mdframed} +\usepackage{amsmath,amsthm} +\newtheorem{mdtheorem}{Theorem}[section] +\newenvironment{theorem}{% + \begin{mdframed}[linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]% + \begin{mdtheorem}% + }{% + \end{mdtheorem}% + \end{mdframed}% +} +\definecolor{titleblue}{rgb}{0,0,0.9} + +\usepackage{listings} +\lstnewenvironment{mdexample}[1][] + {\lstset{% + basicstyle=\small, + xleftmargin=20pt, + xrightmargin=20pt, + frame=single, + rulecolor=\color{titleblue}, + framesep=5pt, + framerule=1pt, + language=[LaTeX]TeX,#1, + columns=fixed, fontadjust=true,basewidth=0.5em,breakatwhitespace=true + }} +% morekeywords={\usepackage,\end,\begin,\lipsum,\documentclass,\newtheorem,\newenvironment,\section,\label\mbox{ }}}} + {} + +\usepackage{hyperref} +\hypersetup{% + colorlinks=true, + linkcolor=titleblue, + urlcolor=titleblue, + pdfauthor=Marco Daniel, + pdftitle=Documentation of mdframed, +} +\usepackage{xspace} +\usepackage{multicol} +\columnseprule0.4pt +\makeatletter +\begingroup + \text@command\relax + \global\let\xspace@check@icr\check@icr +\endgroup +\xspaceaddexceptions{\xspace@check@icr} + +\renewcommand\tableofcontents{% + \begin{multicols}{2}[\centering\textbf{\sffamily\Large\contentsname}] + \@starttoc{toc} + \end{multicols} +} +\makeatother +\newcommand*\mdoption[1]{\textsf{\bfseries\color{titleblue}#1}} +\newcommand*\mdname{\textsf{mdframed}\xspace} +\newcommand*\mdpack[1]{\textsf{#1}\xspace} +\newcommand*\mdsetting[1]{\textsf{#1}\xspace} +\newcommand*\mdcommand[1]{\texttt{\textbackslash #1}\xspace} + +\begin{document} + \vspace*{\baselineskip} + + \begin{center} + \color{titleblue} + \Large\bfseries \sffamily The \mdname package\footnote{Extending the package \texttt{framed.sty}.} + + \vspace*{0.5\baselineskip} + \normalfont\large\normalcolor auto-split frame environment + +\vspace*{.5\baselineskip} + \href{mailto:marco.daniel@mada-nada.de}{Marco Daniel}\footnote{With thanks to Heiko Oberdiek, Rolf Niepraschk and Herbert Voss.} \qquad \mdversion\ \qquad \today + \end{center} +\begin{abstract} +Working with the command \mdcommand{fbox} or \mdcommand{fcolorbox}, one has to handle page breaks by hand, +meaning that you have to split up the \mdcommand{fbox} into two. The present package defines the environment \mdname which automatically deals with page +breaks, whence the name \glqq breakable\grqq. + +By using \mdcommand{newenvironment} the user may choose between several individual designs. +\end{abstract} + +\tableofcontents + +\section{Motivation} +Many users wish to (further) emphasize lemmata, definitions, proofs etc.. The package mdframed allows to +create environments with breakable frames. I think an example is the best way to demonstrate the properties. + +The following example gives an idea of how to use mdframed. (For the theorem environment we use the package \mdpack{amsthm}.) +\begin{mdexample} +\usepackage{mdframed,amsthm} +\newtheorem{mdtheorem}{Theorem}[section] +\newenvironment{theorem}{% + \begin{mdframed}% + [linewidth=2,margin=40,backgroundcolor=yellow,linecolor=blue]% + \begin{mdtheorem}}{\end{mdtheorem}\end{mdframed}} +... +\begin{theorem}[Pythagorean theorem] + In any right triangle, the area of the square whose side is the hypotenuse + is equal to the sum of the areas of the squares whose sides are the two legs. + \begin{equation} + a^2+b^2=c^2 + \end{equation} +\end{theorem} +\end{mdexample} +\begin{theorem}[Pythagorean theorem] + In any right triangle, the area of the square whose side is the hypotenuse + (the side opposite the right angle) is equal to the sum of the areas of the + squares whose sides are the two legs (the two sides that meet at a right angle). + \begin{equation} + a^2+b^2=c^2 + \end{equation} +\end{theorem} + +\section{Syntax} +Load the package as usual: +\begin{mdexample} + \usepackage[<GLOBAL OPTIONS>]{mdframed} +\end{mdexample} + +The package defines only one environment with the following syntax +\begin{mdexample} + \begin{mdframed}[<LOCAL OPTIONS>] + <CONTENT> + \end{mdframed} +\end{mdexample} + +\section{Options} +The package allows to set global and local options which are explained below. +\begin{center} +\renewcommand{\arraystretch}{1.5} +\begin{tabularx}{\linewidth}{@{}lXl@{}} + \mdoption{linecolor}=<COLOR> & Sets the color of the line around the environment to <COLOR>. + & default=\mdsetting{black} \\ + \mdoption{backgroundcolor}=<COLOR> & Sets the color of the background of the environment to <COLOR>. + & default=\mdsetting{white} \\ + \mdoption{fontcolor}=<COLOR> & Sets the color of the contents of the environment to <COLOR>. + & default=\mdsetting{black} \\ + \mdoption{margin}=<LENGTH> & Sets the length of the margin text frame of the environment. + The basic unit of the length is pt. So it is possible to set + length to 6 which is equal to 6pt. + & default=\mdsetting{2pt} \\ + \mdoption{linewidth}=<LENGTH>& Sets the width of the line around the environment. + The basic unit of the length is pt. So it is possible to set + length to 6 which is equal to 6pt. + & default=\mdsetting{20pt} \\ + \mdoption{skipabove}=<LENGTH>& Sets an additional skip above the frame. This is + \bfseries only a global option. + & default=\mdsetting{0pt} \\ + \mdoption{skipbelow}=<LENGTH>& Sets an additional skip below the frame. This is + \bfseries only a global option. + & default=\mdsetting{0pt} \\ + \mdoption{xcolor}=<VALUE(S)>& By setting this key the package \mdpack{xcolor} will + be loaded with the given value(s). Without any value \mbox{\mdname} loads + the package \mdpack{color} without any options. This is + \bfseries only a global option. + & default=\mdsetting{none} \\ +\end{tabularx} +\end{center} +\clearpage +\section{Example} + +\begin{mdexample} + \documentclass[10pt]{article} + \usepackage[linewidth=10,% + margin=40,% + backgroundcolor=yellow, + linecolor=blue, + skipbelow=0, + skipabove=0]{mdframed} + \usepackage{amsmath,amsthm} + \newtheorem{mdlemma}{Lemma}[section] + \newenvironment{lemma}{% + \begin{mdframed}[linewidth=2,margin=40,% + backgroundcolor=red,linecolor=black]% + \begin{mdlemma}% + }{% + \end{mdlemma}% + \end{mdframed}% + } + \usepackage{lipsum} + \usepackage{hyperref} + \begin{document} + \section{foo} + \lipsum[1] + \begin{mdframed} + \lipsum[5] + \end{mdframed} + + \lipsum[1] + + \begin{lemma}\label{lem:testA}\mbox{ } + \begin{itemize} + \item Some Text + \item $x^2+y^2=1$ + \item \lipsum[1] + \end{itemize} + \end{lemma} + \end{document}\end{mdexample} + +\section{Known problems} + In this section I will collect known problems. In case you encouter any further problems, please + drop me an email, \href{mailto:marco.daniel@mada-nada.de}{marco.daniel@mada-nada.de}. + + Do you have any ideas / wishes on further extensions to this package? Please let me know! + +\begin{enumerate} + \item So far it is not possible to extend a frame to more than two pages + \item So far there is no implementation that allows to set the left or right margin +\end{enumerate} + +\end{document} |