Debian Codegraph @

texmf-dist/doc/latex/fullwidth/fullwidth.tex

raw
1 %Documenation of the package fullwidth
2 \setcounter{errorcontextlines}{999}
3 \documentclass[parskip=false,english,11pt]{ltxmdf}
4 \makeatletter
5 \renewcommand\tableofcontents{%
6 \setcounter{tocdepth}{1}%
7 \begin{multicols}{2}[\centering\textbf{\sffamily\Large\contentsname}]
8 \@starttoc{toc}
9 \end{multicols}
10 }
11 \ifoot{}
12 \makeatother
13 \usepackage{babel}
14 \usepackage[utf8]{inputenc}
15 \usepackage[T1]{fontenc}
16 \usepackage{lipsum}
17 %\usepackage[T1,altbullet]{lucidabr}
18 \usepackage[scaled=0.82]{beramono}
19
20 \usepackage{fullwidth}
21 %\fullwidthsetup
22
23 \def\fwdname{\texttt{fullwidth}\xspace}
24 \title{The \fwdname package}
25 \subtitle{Environment with adjustable margins for onside and twoside documents}
26 \author{\href{mailto:[email protected]}{Marco Daniel}%
27 \footnote{Sorry for bad English.}}
28 \version{\fwdversion}
29 \date{\today}
30 \introduction{This package provides the environment \fwdname which allows to set the left and right margins in a very simple way. It also allows page breaks. If you are using the \texttt{twoside} mode you can set the inner and outer margins. \par
31 By defining new environments the user may choose between several individual designs.%
32 }
33
34
35 \begin{document}
36 \maketitle
37
38 \section{Motivation}
39 The package is inspired by many questions on \href{http://tex.stackexchange.com/}{tex stackexchange}. For example in the question \href{http://tex.stackexchange.com/questions/34368/how-to-switch-between-two-margin-sizes}{\emph{How to switch between two margin sizes?}} I solved the problem by using the package \mdname. However, since the package wasn't designed for such a environment, I decided to create a new package based on the algorithm of \mdname.
40
41
42
43 \section{Syntax}\label{sec:syntax}
44 The package itself loads the packages \mdpack{kvoptions} and \mdpack{etoolbox}.
45
46 Load the package as usual:
47 \begin{mdexample}
48 \usepackage[<GLOBAL OPTIONS>]{fullwidth}
49 \end{mdexample}
50
51 The package defines only one environment with the following syntax:
52 \begin{mdexample}
53 \begin{fullwidth}[<LOCAL OPTIONS>]
54 <CONTENT>
55 \end{fullwidth}
56 \end{mdexample}
57
58
59 \minisec{Autodetecting floats}
60 I added a detection of \mdpack{float} and \mdpack{minipage} environments. If \fwdname would be used within such an environment, \fwdname it would automatically use the option \mdoption{nobreak}.
61
62
63 %%%%%%%%%%%%%%%%%%%%%%%
64 \section{Options}
65 The package provides various options for manipulating frames. All options are listed in the following section. Some internal macros are not shown in this documentation, though they can be manipulated.
66 \mdDescribeCmd{fullwidthsetup}The listed option can also be set via \mdcommand{fullwidthsetup}.
67
68 \subsection{Options with lengths}
69
70 All lengths will be evaluated by the \eTeX-command \mdcommand{dimexpr}.
71
72 I know that the predefined lengths are not well prepared. Maybe I will change it later.
73
74
75 \mdDescribeMacro[0pt]{width} Sets the width of the whole \fwdname environment.
76
77 \mdDescribeMacro[\textbackslash topskip]{skipabove} Sets an additional skip above the frame.
78 \mdDescribeMacro[\textbackslash topskip]{skipbelow} Sets an additional skip below the frame.
79
80 \mdDescribeMacro[0pt]{leftmargin} Sets the length of the left margin of the environment.
81 \mdDescribeMacro[0pt]{rightmargin} Sets the length of the right margin of the environment.
82
83 \mdDescribeMacro[.4\textbackslash baselineskip]{innertopmargin} Sets the length of the inner top margin of the environment.
84 \mdDescribeMacro[.4\textbackslash baselineskip]{innerbottommargin} Sets the length of the inner bottom margin of the environment.
85
86 \mdDescribeMacro[0pt]{outermargin} Sets the length of the outer margin. This option is only avaidable in \texttt{twoside} mode.
87 \mdDescribeMacro[0pt]{innermargin} Sets the length of the inner margin. This option is only avaidable in \texttt{twoside} mode.
88
89
90 \mdDescribeMacro[\textbackslash topsep]{splittopskip} Sets the length of the skip above the split part of the environment.
91 \mdDescribeMacro[0pt]{splitbottomskip} Sets the length of the skip below the split part of the environment.
92
93
94 \subsection{General options}\label{genopt}
95
96 \mdDescribeMacro[true]{twosidemode} The package detects wether \mdcommand{twoside} mode is active and uses \mdoption{innermargin} and \mdoption{outermagin} by default. If you don't know this you can use this option.
97
98 \mdDescribeMacro[0pt]{needspace} Sometimes it is useful to set a minimum height before the environment should be splitted. For such cases you can use \mdoption{needspace}. The option requires a length which sets the minimum height before a frame will be splitted.
99
100 \subsection{Footnotes}
101 Inside the environment you can use the command \mdcommand{footnote} as usual. \mdname uses the syntax of the environment \mdpack{minipage} with the same counter.
102
103 Every footnote text will be collected inside a box and will be displayed at the end of the environment \fwdname.
104
105 \mdDescribeMacro[\mbox{} \mdcommand{bigskipamount}]{footnotedistance} The length is the distance between the end of the environment \fwdname and the displaying of the \mdcommand{footnoterule}.
106
107 %\mdDescribeMacro[true]{footnoteinside} The position of the footnotes can be changed with the option \mdoption{footnoteinside}. The footnotes will be displayed at the end of the environment but you can decide whether the output is inside \fwdname or after.
108 %
109 %\vskip\baselineskip
110 %\noindent\textbf{Note}\qquad The output of the footnotes with the option \mdoption{footnoteinside=false} are not in a splitted frame. I think it isn't useful because the first line of a new page shouldn't be a footnote.
111
112
113 \section{Known Problems}
114 In this section I will collect known problems. In case you encounter any further problems, please
115 drop me an email, \href{mailto:[email protected]}{marco.daniel at mada-nada.de}.
116
117 Do you have any ideas / wishes on further extensions to this package? Please let me know!
118
119 \section{Acknowledgements}
120 Thanks to the members of \href{http://tex.stackexchange.com/}{tex stackexchange}.
121
122 \subsection{Revision history}\label{rev}
123 \raggedright
124 \minisec{Version 0.1 submitted 26 Nov 2011}
125 \begin{itemize*}
126 \item first upload to \href{http://dante.ctan.org/upload}{CTAN}
127 \end{itemize*}
128 \end{document}