1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
|
% \iffalse meta-comment
%
% Copyright (C) 2011 by Dag Langmyhr
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, see
% http://www.latex-project.org/lppl.txt
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{elbioimp.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{elbioimp}
%<*class>
[2011/03/02 v1.2 Document class for Journal of Electrical Bioimpedance]
%</class>
%
%<*driver>
\documentclass{elbioimp}
\usepackage[T1]{fontenc}
\usepackage{doc,textcomp,varioref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\keywords{\LaTeX{} document class, journal document style}
\begin{document}
\DocInput{elbioimp.dtx}
\end{document}
%</driver>
% \fi
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
% % \CheckSum{224}
%
% \newcommand{\cmd}[1]{\texttt{\textbackslash #1}}
% \newcommand{\Cname}{\textsf{elbioimp}}
% \newcommand{\Jname}{\emph{Journal of Electrical Bioimpedance}}
%
% \changes{v1.0}{2010/01/20}{Initial version}
% \changes{v1.1}{2010/11/02}{Line spacing modified}
% \changes{v1.2}{2011/03/01}{Added \cmd{subsection},
% \cmd{affiliation}, and \cmd{sameaffiliation}}
%
% \GetFileInfo{elbioimp.dtx}
%
% \DoNotIndex{\,}
% \DoNotIndex{\abstractname,\addtocounter,\arabic,\AtBeginDocument,\@author}
% \DoNotIndex{\baselineskip,\begin,\bf,\bibliographystyle}
% \DoNotIndex{\captionsetup,\ClassWarningNoLine,\columnwidth,\CurrentOption}
% \DoNotIndex{\DeclareCaptionLabelFormat,\DeclareMathSizes,\DeclareOption,\def}
% \DoNotIndex{\end,\equal}
% \DoNotIndex{\footnote,\footnoterule}
% \DoNotIndex{\ifthenelse,\@ifundefined,\ignorespaces,\it,\itemsep}
% \DoNotIndex{\leftmargin,\leftmargini,\let,\@listi,\@listI,\LoadClass}
% \DoNotIndex{\@makefnmark,\@makefntext}
% \DoNotIndex{\newcommand,\newenvironment,\noindent,\normalfont}
% \DoNotIndex{\pagestyle,\par,\parindent,\parsep,\ProcessOptions}
% \DoNotIndex{\relax,\renewcommand,\renewenvironment,\RequirePackage,\rule}
% \DoNotIndex{\setcounter,\@setfontsize,\setlength,\space,\@startsection}
% \DoNotIndex{\textbf,\@textsuperscript,\textwidth,\@thefnmark,%
% \thempfootnote,\@title,\topsep,\twocolumn}
% \DoNotIndex{\urlstyle}
% \DoNotIndex{\vspace}
%
% \title{The \Cname{} class}
% \author{Dag Langmyhr\affiliation{Department of Informatics,
% University of Oslo, \textsf{dag@ifi.uio.no}}}
%
% \maketitle
%
% \begin{abstract}
% \noindent
% This paper describes the implementation of the document class
% \Cname{} which has been designed for writing articles in the \Jname.
% It corresponds to \Cname{}~\fileversion, dated \filedate.
% \end{abstract}
%
%
% \section{Introduction}
% The \Jname{} (see its web page at
% \url{https://www.journals.uio.no/index.php/bioimpedance}) has
% defined a typographic style for its publication, to some extent
% based on recommendations from the \emph{US National institute of
% health}\cite{NIH}. The \LaTeX{} document class \Cname{} implements
% this style.
% As an example, this documentation uses the \Cname{} class.
%
% This \LaTeX{} code is published with a \textbf{\LaTeX{} project
% public license}, as described in
% \url{http://www.latex-project.org/lppl/}.
%
%
% \section{Usage}
% To use this document class, you must first put the
% \url{elbioimp.cls} file somewhere that \LaTeX{} can find
% it.\footnote{If you are not very familiar with your \LaTeX{}
% installation or your system administrator, you can put the
% \url{elbioimp.cls} file in the same folder as your \LaTeX{} source
% files.}
% Then you can write your \LaTeX{} document starting with
% \begin{verbatim}
%\documentclass{elbioimp}
% \end{verbatim}
% The document class is based on the standard \emph{article} class and
% is used just like that class, with three exceptions:
% \begin{enumerate}
% \item The authors' affiliations (to companies or academic institutions)
% are given with the \verb:\affiliation: command:
% \begin{verbatim}
%\author{My name\affiliation{My univerisity,
% My city, My country}}
% \end{verbatim}
% If there is more than one author, their names should be separated
% by an \verb:\and: command.
%
% If two authors have the same affiliation, the latter one may use the
% \verb:\sameaffiliation: command, as in
% \begin{verbatim}
%\author{First Author\affiliation{My university,
% My city, My country}\and
% Second Author\sameaffiliation}
% \end{verbatim}
%
% In case there should be three or more authors and some have identical
% affiliations, \verb:\sameaffiliation: may be given a
% numeric option referencing a previous author; for example, if the
% first and the third author belong to the same institution, you may
% write:
% \begin{verbatim}
%\author{A Bee\affiliation{Uni A}\and
% C Dee\affiliation{Uni B}\and
% E Eff\sameaffiliation[1]}
% \end{verbatim}
%
% \item The author may indicate keywords by empoying the
% \verb:\keyword: command.
%
% \item The document class will function poorly unless there is an
% \verb:abstract: environment and a \verb:\maketitle: command.
% \end{enumerate}
%
% \StopEventually{\bibliography{elbioimp}%
% \onecolumn\PrintChanges\PrintIndex}
%
%
% \section{Class headers}
% All \LaTeXe{} class files contain a header with a set of standard
% specifications.
%
% \subsection{Class options}
% This document class has no options.
% \begin{macrocode}
\DeclareOption*{\ClassWarningNoLine
{elbioimp}{Class option \CurrentOption
\space is illegal in this document class}}
\ProcessOptions \relax
% \end{macrocode}
%
% \subsection{Base class}
% This document class is based on the standard \emph{article} class.
%
% \begin{macrocode}
\LoadClass[twocolumn]{article}
% \end{macrocode}
%
% \section{Required packages}
% A couple of standard packages are necessary to implement this class.
%
% \subsection{The \textsf{ifthen} package}
% The \textsf{ifthen} package makes testing easier.
% \begin{macrocode}
\RequirePackage{ifthen}
% \end{macrocode}
%
% \subsection{The \textsf{url} package}
% URLs should be typeset in a \textsf{Sans serif font} rather than a
% \texttt{Teletype font}.
% \begin{macrocode}
\RequirePackage[T1]{url}
\urlstyle{sf}
% \end{macrocode}
%
%
% \section{Document title area}
% The title area has its own particular design.
% It is implemented by redefining the \verb:\maketitle: command.
% \begin{macrocode}
\AtBeginDocument{\renewcommand{\maketitle}{%
\twocolumn[\begin{minipage}{\textwidth}
\renewcommand{\and}{, }
\let \thanks = \affiliation
\let \samethanks = \sameaffiliation
\renewcommand{\footnoterule}{}
\def \@makefntext ##1{\noindent
\small \@thefnmark. \it ##1}
\renewcommand{\thempfootnote}%
{\arabic{mpfootnote}}
\parindent = 0pt
{\huge \@title}\par\vspace{16pt}
{\large \@author}
\end{minipage}\par\vspace{14pt}\noindent
\elb@rule{\textwidth}\vspace{11pt}]}}
\newcommand{\elb@rule}[1]{\rule{#1}{0.6pt}}
% \end{macrocode}
% (The names \verb:\thanks: and \verb:\samethanks: are kept for
% historic reasons.)
%
% \subsection{Affiliations}
% Affiliations are specified using the \verb:\affiliation: and
% \verb:\sameaffiliation: commands.
% \begin{macrocode}
\newcommand{\affiliation}[1]{\footnote{#1}}
\newcommand{\sameaffiliation}[1][0]{%
\addtocounter{mpfootnote}{-1}%
\ifthenelse{#1<1}
{\@makefnmark}
{\@textsuperscript{\normalfont#1}}%
\addtocounter{mpfootnote}{1}}
% \end{macrocode}
%
% \subsection{Keywords}
% An additional command \verb:\keywords: makes it possible to specify
% keywords that apply to the document.
% \begin{macrocode}
\newcommand{\keywords}[1]{\def\elb@keywords{#1}}
% \end{macrocode}
%
% \subsection{Abstract}
% The abstract is typeset in \verb:\small:, and includes the keywords (if
% any).
% \begin{macrocode}
\renewenvironment{abstract}
{\small\noindent
\textbf{\abstractname}\par\vspace{1pt}
\noindent\ignorespaces}
{\par
\@ifundefined{elb@keywords}{}{%
\vspace{\baselineskip}\noindent
\textbf{Keywords:} \elb@keywords\par}
\vspace{\baselineskip}\noindent
\elb@rule{\columnwidth}}
% \end{macrocode}
%
%
% \section{Body text}
%
% \subsection{Text area}
% The text area should be in two columns and fill an A4 paper with
% margins 1.5\,cm (except the top margin, which should be 2.5\,cm).
% The gutter space should be 1\,cm.
% \begin{macrocode}
\RequirePackage[a4paper,
margin=1.5cm,top=2.5cm]{geometry}
\setlength{\columnsep}{1cm}
% \end{macrocode}
% Since the layout uses double columns, I will increase the tolerance
% for line-breaking.
% \begin{macrocode}
\pretolerance = 1000
\tolerance = 2000 \hbadness = \tolerance
% \end{macrocode}
%
%
% \subsection{Headers and footers}
% This document class has neither headers nor footers, presumably
% because the publisher will add them later.
% \begin{macrocode}
\AtBeginDocument{\pagestyle{empty}}
% \end{macrocode}
%
%
% \subsection{Text font}
% The specified journal font is \emph{Times Roman}. The
% \emph{mathptmx} packages is one of several packages that can handle this,
% but this particular package has the advantage that it also uses
% \emph{Times Roman} for the math fonts (as much as possible).
% \begin{macrocode}
\RequirePackage{mathptmx}
% \end{macrocode}
% The \emph{mathptmx} package retains the \textsf{Computer Modern Sans
% Serif} and \texttt{Computer Modern Teletype} fonts, but they blend
% reasonably well with \emph{Times Roman} (at least in my opinion) so
% I will keep them.
%
% \subsection{Text sizes}
% The specified text sizes are shown in Table\vref{tab:sizes}.
% The leading should be 30\%.
% \begin{table}
% \centering
% \begin{tabular}{cr}
% \Huge \strut\verb:\Huge:& 20\,pt\\
% \huge \strut\verb:\huge:& 16\,pt\\
% \LARGE \strut\verb:\LARGE:& 14\,pt\\
% \Large \strut\verb:\Large:& 12\,pt\\
% \large \strut\verb:\large:& 11\,pt\\
% \normalsize \strut\verb:\normalsize:& 10\,pt\\
% \small \strut\verb:\small:& 9\,pt\\
% \footnotesize \strut\verb:\footnotesize:& 8\,pt\\
% \scriptsize \strut\verb:\scriptsize:& 7\,pt\\
% \tiny \strut\verb:\tiny:& 5\,pt\\
% \end{tabular}
% \caption{Text sizes in \Cname\label{tab:sizes}}
% \end{table}
% \begin{macrocode}
\renewcommand{\Huge}{\@setfontsize
\Huge {20}{26}}
\renewcommand{\huge}{\@setfontsize
\huge {16}{20.8}}
\renewcommand{\LARGE}{\@setfontsize
\LARGE {14}{18.2}}
\renewcommand{\Large}{\@setfontsize
\Large {12}{15.6}}
\renewcommand{\large}{\@setfontsize
\large {11}{14.3}}
\renewcommand{\normalsize}{%
\@setfontsize \normalsize {10}{13}%
\abovedisplayskip =
10pt plus 2pt minus 5pt
\abovedisplayshortskip =
0pt plus 3pt
\belowdisplayshortskip =
6pt plus 3pt minus 3pt
\belowdisplayskip = \abovedisplayskip
\def\@listi{\leftmargin = \leftmargini
\topsep = 5pt plus 2pt minus 2pt
\parsep = 3pt plus 1pt minus 1pt
\itemsep = \topsep}}
\renewcommand{\small}{%
\@setfontsize \small {9}{11.7}%
\abovedisplayskip =
8.5pt plus 3pt minus 4pt
\abovedisplayshortskip =
0pt plus 2pt
\belowdisplayshortskip =
4pt plus 2pt minus 2pt
\def\@listi{\leftmargin = \leftmargini
\topsep = 4pt plus 2pt minus 2pt
\parsep = 2pt plus 1pt minus 1pt
\itemsep = \topsep}%
\belowdisplayskip = \abovedisplayskip}
\renewcommand{\footnotesize}{%
\@setfontsize \footnotesize {8}{10.4}%
\abovedisplayskip =
6pt plus 2pt minus 4pt
\abovedisplayshortskip =
0pt plus 1pt
\belowdisplayshortskip =
3pt plus 1pt minus 2pt
\def\@listi{\leftmargin = \leftmargini
\topsep = 3pt plus 1pt minus 1pt
\parsep = 1.5pt plus 1pt minus 1pt
\itemsep = \topsep}%
\belowdisplayskip = \abovedisplayskip}
\renewcommand{\scriptsize}{\@setfontsize
\scriptsize {7}{9.1}}
\renewcommand{\tiny}{\@setfontsize
\tiny {5}{6.5}}
% \end{macrocode}
% As expected, \verb:\normalsize: is the default.
% \begin{macrocode}
\normalsize
% \end{macrocode}
% Since the class uses some non-standard sizes (i.e., not in the
% $1{.}2^n$-series) it must signal \LaTeX{} that font
% scaling may be used.\footnote{These days, all decent \LaTeX{} installations
% should provide scalable fonts.}
% \begin{macrocode}
\RequirePackage{type1cm,type1ec}
% \end{macrocode}
% The class must also define some math sizes.
% \begin{macrocode}
\DeclareMathSizes{11}{11}{8}{6}
\DeclareMathSizes{14}{14}{11}{8}
\DeclareMathSizes{16}{16}{12}{10}
\DeclareMathSizes{20}{20}{14}{12}
% \end{macrocode}
%
%
% \section{Sectioning}
% The section headers in this class have a different look from the
% standard \LaTeX{} classes.
% \begin{macrocode}
\renewcommand{\section}{\@startsection
{section}{1}{0pt}%
{-11pt plus -6pt minus -2pt}%
{11pt plus 6pt minus 2pt}%
{\normalfont\normalsize\bf}}
\renewcommand{\subsection}{\@startsection
{subsection}{2}{0pt}%
{-11pt plus -6pt minus -2pt}%
{11pt plus 6pt minus 2pt}%
{\normalfont\normalsize\it}}
\renewcommand{\subsubsection}{\@startsection
{subsubsection}{3}{0pt}%
{-11pt plus -6pt minus -2pt}%
{11pt plus 6pt minus 2pt}%
{\normalfont\normalsize}}
% \end{macrocode}
% The default definitions of \verb:\paragraph: and
% \verb:\subparagraph: are retained.
%
% \subsection{Section numbering}
% No sections should be numbered.
% \begin{macrocode}
\setcounter{secnumdepth}{-2}
% \end{macrocode}
%
%
% \section{Floats}
% Formating of float captions is best handled using the
% \textsf{caption} package. This style wants them
% \begin{itemize}
% \item indentend 0.5\,cm on each side
% \item 8\,pt type size
% \item numbering should use ``Fig.~1'' or ``Tab.~1''.
% \end{itemize}
% \begin{macrocode}
\RequirePackage[margin=0.5cm,font=footnotesize,
aboveskip=5pt]{caption}
\DeclareCaptionLabelFormat{fig}
{\ifthenelse{\equal{#1}%
{Figure}}{Fig}{Tab}.~#2}
\captionsetup{labelformat=fig}
% \end{macrocode}
% We also adjust the spacing around the floats, and we do not want
% half-empty float-columns.
% \begin{macrocode}
\setlength{\floatsep}{6pt plus 3pt}
\setlength{\textfloatsep}{\floatsep}
\renewcommand{\floatpagefraction}{0.8}
% \end{macrocode}
%
%
% \section{Document reference list}
% The reference list should be according to the Vancouver style:
% \begin{macrocode}
\bibliographystyle{vancouver}
% \end{macrocode}
% but the bibliography should be set in 9\,pt type size with 3\,pt vertical
% space.
% \begin{macrocode}
\renewcommand{\@openbib@code}{\small
\setlength{\itemsep}{3pt}%
\setlength{\parsep}{1pt plus 1pt}}
% \end{macrocode}
% In the bibliography, citations will be indicated as ``1.''
% rather than as ``[1]''.
% \begin{macrocode}
\renewcommand\@biblabel[1]{#1.}
% \end{macrocode}
%
% \Finale
\endinput
|