Changeset 12309 for trunk/documents/theses/dstn/numberparagraphs.sty
- Timestamp:
- 07/02/2009 06:21:32 PM (14 months ago)
- File:
-
- 1 edited
-
trunk/documents/theses/dstn/numberparagraphs.sty (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/documents/theses/dstn/numberparagraphs.sty
r12308 r12309 57 57 \usepackage{ifthen} 58 58 59 %\renewcommand{\section}[2]{\ifthenelse{\equal{#1}{*}}% 60 % {\mysectionstar{#2}}% 61 % {\mysection{#1}}% 62 %} 63 64 \renewenvironment{figure}{% 65 \nonumberparagraphs% 66 \@float{figure}}{% 67 \numberparagraphs% 68 \end@float} 69 70 71 %%% section 72 59 73 \let\mypkg@@section\section 60 74 61 \renewcommand{\section} [2]{\ifthenelse{\equal{#1}{*}}%62 {\mysectionstar{*}{#2}}%63 {\mysection{#1}}%75 \renewcommand{\section}{\@ifstar 76 \mysectionstar% 77 \mysection% 64 78 } 65 79 66 \newcommand{\mysectionstar}[ 2]{%80 \newcommand{\mysectionstar}[1]{% 67 81 \ifdonumberparagraphs% 68 82 \nonumberparagraphs% 69 \mypkg@@section*{# 2}%83 \mypkg@@section*{#1}% 70 84 \numberparagraphs% 71 85 \else% 72 \mypkg@@section*{# 2}%86 \mypkg@@section*{#1}% 73 87 \fi} 74 88 … … 82 96 \fi} 83 97 98 %%% subsection 99 100 \let\mypkg@@subsection\subsection 101 102 \renewcommand{\subsection}{\@ifstar 103 \mysubsectionstar% 104 \mysubsection% 105 } 106 107 \newcommand{\mysubsectionstar}[1]{% 108 \ifdonumberparagraphs% 109 \nonumberparagraphs% 110 \mypkg@@subsection*{#1}% 111 \numberparagraphs% 112 \else% 113 \mypkg@@subsection*{#1}% 114 \fi} 115 116 \newcommand{\mysubsection}[1]{% 117 \ifdonumberparagraphs% 118 \nonumberparagraphs% 119 \mypkg@@subsection{#1}% 120 \numberparagraphs% 121 \else% 122 \mypkg@@subsection{#1}% 123 \fi} 84 124 85 125 86 126 127 %%% chapter, chapter* 128 87 129 \let\mypkg@@chapter\chapter 88 \renewcommand{\chapter}[1]{\ifdonumberparagraphs% 130 131 %\renewcommand{\chapter}[2]{\ifthenelse{\equal{#1}{*}}% 132 % {\mychapterstar{#2}}% 133 % {\mychapter{#1}}% 134 %} 135 136 %\renewcommand\chapter{\@dblarg\@mychapter} 137 %\newcommand\@mychapter{% 138 % \@ifstar% 139 % \mychapterstar% 140 % \mychapter% 141 %} 142 143 \renewcommand{\chapter}{\@ifstar 144 \@dblarg\@mychapterstar% 145 \@dblarg\@mychapternostar% 146 } 147 148 %\def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}} 149 150 %\long\def\@dblarg#1{\kernel@ifnextchar[{#1}{\@xdblarg{#1}}} 151 %\long\def\@xdblarg#1#2{#1[{#2}]{#2}} 152 153 154 %\renewcommand{\chapter}{\@dblarg\@mychapterx} 155 %\newcommand{\@mychapterx}{\@ifstar 156 % \mychapterstar% 157 % \@mychapter% 158 %} 159 160 161 \comment{ 162 \newcommand{\mychapterstar}[1]{% 163 \ifdonumberparagraphs% 164 \nonumberparagraphs% 165 \mypkg@@chapter*{#1}% 166 \numberparagraphs% 167 \else% 168 \mypkg@@chapter*{#1}% 169 \fi} 170 171 \newcommand{\mychapter}[1]{% 172 \ifdonumberparagraphs% 89 173 \nonumberparagraphs% 90 174 \mypkg@@chapter{#1}% … … 93 177 \mypkg@@chapter{#1}% 94 178 \fi} 179 } 180 181 \def\@mychapterstar[#1]#2{% 182 \ifdonumberparagraphs% 183 \nonumberparagraphs% 184 \mypkg@@chapter*[#1]{#2}% 185 \numberparagraphs% 186 \else% 187 \mypkg@@chapter*[#1]{#2}% 188 \fi} 189 190 \def\@mychapternostar[#1]#2{% 191 \ifdonumberparagraphs% 192 \nonumberparagraphs% 193 \mypkg@@chapter[#1]{#2}% 194 \numberparagraphs% 195 \else% 196 \mypkg@@chapter[#1]{#2}% 197 \fi}
Note: See TracChangeset
for help on using the changeset viewer.
