% reajmac.sty --- 日本信頼性学会・論文スタイル出力のためのマクロ % % $Id: reajmacUsage.tex,v 2.0 2004/02/09 20:19:39 tunenori Exp $ % % Copyright 1998-2004 by The National Center for University Entrance Examinations % % 使用例 % % latex ユーザはこちらを使う % \documentstyle[twocolumn,11pt,reajmac]{jarticle} % latex2e ユーザはこちらを使う % \documentclass[twocolumn,11pt]{jarticle} % \usepackage{reaj} % ここまで % % \jtitle{日本信頼性学会・論文スタイル出力のための\LaTeX{} マクロ} % \jauthor{石岡 恒憲 % \thanks{文部省\ 大学入試センター\ 研究開発部\ 情報処理研究部門\ % % 〒153-8501 東京都目黒区駒場2-19-23\ % % Phone: 03-3468-3311} } % % \title{A \LaTeX{} style macro for the journal of Reliability Engineering % Association of Japan} % \author{{\rm Tsunenori}~{\sc Ishioka}} % \jabstract{ % 標記スタイル・ファイルreajmac.styを試作した. % 可能な限り[j]article.styのコマンドを % そのままの形で利用できるようにした。 % {\bf キーワード:}スタイルファイル、日本信頼性学会、\LaTeX{}} % % \abstract{ % This paper presents `reajmac.sty' of a \LaTeX{} style file and its usage. % Commands in [j]article.sty can be availavle, if possible. % {\bf Keywords:} style file, % Reliability Engineering Association of Japan, \LaTeX{}} % % % \begin{document} % \maketitle % \section{はじめに} % ... % \cite{NAMEi} % \cite{NAMEii} % \section{おわりに} % ... % \section*{謝辞} % ... % \begin{thebibliography}{99} % \bibitem{NAMEi} ... % \bibitem{NAMEii} ... % \end{thebibliography} % \hfill{(いしおか つねのり)} % \end{document} % % page layout % \textwidth=171mm %% 209mm(A4) - 18mm - 10mm -18mm \textheight=242mm %% 296mm(A4) - 31mm - 23mm \columnsep=10mm %% column separation \oddsidemargin=-5mm %% side-margin to be 18mm \topmargin=0mm %% 0mm -> 10mm (Nov.7,2002) -> 0mm \headsep=0mm %% no head-separation \parindent=1em %% one kanji-character for paragraph indentation \renewcommand{\@afterindentfalse}{} %% indentation for first paragraph % % latex.tex % \def\class#1{\gdef\@class{#1}} \def\jtitle#1{\gdef\@jtitle{#1}} \def\title#1{\gdef\@title{#1}} \def\jauthor#1{\gdef\@jauthor{#1}} \def\author#1{\gdef\@author{#1}} \def\jkeywords#1{\gdef\@jkeywords{#1}} \def\keywords#1{\gdef\@keywords{#1}} % % redefine of fnsymbol % %\def\@fnsymbol#1{\ifcase#1\or *\or \dagger\or \ddagger\or % \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger % \or \ddagger\ddagger \else\@ctrerr\fi\relax} \def\@fnsymbol#1{\ifcase#1\or *\or **\or *3\or *4\or *5\or *6\or *7\or *8 \or *9 \else\@ctrerr\fi\relax} \renewcommand\thefootnote{\@fnsymbol\c@footnote}% % % \doublebox % The width of the inner frame is .75"\fboxrule", and the % width of the outer frame is 1.5"\fboxrule". The distance between the two % frames is 1.5"\fboxrule" plus .5pt. % \newbox\@tempfbox \long\def\doublebox#1{% \begingroup \setbox\@tempfbox\hbox{{#1}}% \fboxrule=.75\fboxrule \setbox\@tempfbox\hbox{\fbox{\box\@tempfbox}}% \fboxrule=2\fboxrule \fboxsep=\fboxrule \advance\fboxsep .5pt \fbox{\box\@tempfbox}% \endgroup} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1[column output ]-in-2[column document].sty % % by bear@hashi1.civil.tohoku.ac.jp (2/9/1993) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FUNCTIONS added in "twocolumn"-"article" documents : % % (1) footnotes by \thanks' are set in one-column % (2) abstract and keywords are set below title in one-column % (3) align bottom line of columns at the last page and put % abstract below them in one-column % (4) footnote of the \textwidth can be put at the left-column % of arbitrary page % % without using "multicol.sty" (Current version of the "multicol.sty" % does not support one-column float). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % A SAMPLE document is given below. % Cut out a portion after the line of \endinput. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SELECTION of these functions: (current status = all active) % \newif\if@thanksinonecolumn \@thanksinonecolumntrue % \@thanksinonecolumnfalse % if you do NOT need the function No.1 % \newif\if@abstractinonecolumn \@abstractinonecolumntrue % \@abstractinonecolumnfalse % if you do NOT need the function No.2 % \newif\if@lastpagecolumnalign \@lastpagecolumnaligntrue % \@lastpagecolumnalignfalse % if you do NOT need the function No.3 % \newif\if@widefootnote \@widefootnotetrue % \@widefootnotefalse % if you do NOT need the function No.4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % in order to check opened file \newif\if@fileforfootnote \@fileforfootnotefalse % for function No.1 % % defs, dimension and box used in functions No.1 and 4 \let\@origin@lfootnoterule\footnoterule % original def of \footnoterule \let\@origin@lpar\par % original definition of \par \newdimen\@fullwidthfootnote \newsavebox{\@fullwdp@gebox} \newdimen\@fullwidthfootnotepage % % definition change of \par used in functions No.1 and 4 \def\@pardefch@nge{\@setpar{% \if@firstcolumn\@origin@lpar % original in the leftcolumn \else \rightfootnotepage\@origin@lpar\fi}} % ^^^^^ make a blank footnote and restore the original % definition in the rightcolumn of the math-foot page % % change definition of \footnoterule used in functions No.1 and 4 \def\footnoterule{\ifdim\c@page pt=\@fullwidthfootnotepage \if@firstcolumn\kern-3\p@ \hrule width \textwidth \kern 2.6\p@ \else\null\fi % ^^^^^ leftcolumn of the specified page % rightcolumn of that page \else\@origin@lfootnoterule\fi % otherwise } % % force a blank footnote at the right-column used in functions No.1 and 4 \def\rightfootnotepage{\@setpar{\@origin@lpar}% restore original \ifdim\@fullwidthfootnote>\z@ \insert\footins{\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \vspace*{\@fullwidthfootnote}}\fi} % % insert a box in the footnote used in functions No.1 and 4 \def\@makebigfootnote{\insert\footins{% \footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\textwidth \@parboxrestore \usebox{\@fullwdp@gebox}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \if@thanksinonecolumn % ============ FUNCTION No.1 ============ % % change definition of \thanks to make a box % \def\thanks#1{\if@fileforfootnote\else \global\newwrite\@titlefile \gdef\@titlename{\jobname.1@2 }% % temporary file "\jobname.1@2" is used to store all the \thanks' \immediate\openout\@titlefile\@titlename \global\@fileforfootnotetrue\fi \footnotemark{\let\protect\string\immediate\write\@titlefile{% \string\item\string[\string\footnotemark\string]\space #1}}} % % making a footnote of the box of items by \thanks above % \@setthefirstpagefootnote is used in \def\maketitle below % ^^^^^^^^^^^^^^^^ \def\@setthefirstpagefootnote{\if@fileforfootnote \immediate\closeout\@titlefile \global\@fileforfootnotefalse \@pardefch@nge % change definition of \par \global\sbox{\@fullwdp@gebox}{% save them into a box \begin{minipage}{\textwidth}% \setcounter{footnote}{0} \def\thefootnote{\fnsymbol{footnote}}% \def\@makefnmark{\hbox to 0.65em{$\m@th^{\@thefnmark}$\hss}}% REAJ %%% \def\@{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}% \begin{list}{}{\leftmargin=0.05\textwidth \rightmargin\leftmargin \parsep=0pt \topsep=0pt \partopsep=0pt \itemindent=0pt \itemsep=0pt \labelwidth=2ex \footnotesize}% \input{\jobname.1@2}% \end{list}% \end{minipage}}\global\@fullwidthfootnotepage=\c@page pt% \global\@fullwidthfootnote\ht\@fullwdp@gebox % set dimension \global\advance\@fullwidthfootnote\dp\@fullwdp@gebox \@makebigfootnote\fi} % and output it into one-column footnote % % \maketitle modified in case function No.2 is inactive % \if@abstractinonecolumn\else % \maketitle copied from article.sty \def\maketitle{\par \begingroup \def\thefootnote{\fnsymbol{footnote}}% \c added for REAJ \def\@makefnmark{\hbox to 0.65em{$\m@th^{\@thefnmark}$\hss}}% REAJ %%% to\z@{$\m@th^{\@thefnmark}$\hss}}% \if@twocolumn \twocolumn[\@maketitle]% \else \newpage \global\@topnum\z@ \@maketitle \fi\thispagestyle{plain}\@thanks \endgroup % \@setthefirstpagefootnote % only for the footnote of the first page % \setcounter{footnote}{0}% \let\maketitle\relax \let\@maketitle\relax \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax \gdef\@jauthor{}\gdef\@jtitle{}\relax} %%% REAJ \fi % \fi % =========================================================== % \if@abstractinonecolumn % ============ FUNCTION No.2 ============ % % \@setthefirstpagefootnote defined above is used % % define \abstract and \keywords % \def\abstract#1{\gdef\@abstract{#1}} % does NOT allow paragraphs \def\jabstract#1{\gdef\@jabstract{#1}} \def\keywords#1{\gdef\@keywords{#1}} \def\jkeywords#1{\gdef\@jkeywords{#1}} % % \def\institution#1{\gdef\@institution{#1}} % if you need it % if \institution is defined, % uncomment corresponding lines of \maketitle and \@maketitle % % modify \maketitle % \def\maketitle{\par \begingroup \def\thefootnote{\fnsymbol{footnote}}% \def\@makefnmark{\hbox to 0.65em{$\m@th^{\@thefnmark}$\hss}}% REAJ %%% to\z@{$\m@th^{\@thefnmark}$\hss}}% \if@twocolumn \twocolumn[\@maketitle]% \else \newpage \global\@topnum\z@ \@maketitle \fi\thispagestyle{plain}\@thanks \endgroup % % only when the function no.1 is active % \if@thanksinonecolumn \@setthefirstpagefootnote \fi % \setcounter{footnote}{0}% \let\maketitle\relax \let\@maketitle\relax % added \gdef\@abstract{}\gdef\@keywords{} % \gdef\@institution{} % if defined % \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax \gdef\@jauthor{}\gdef\@jtitle{}\relax} %%% REAJ % % set layout of the actual \@maketitle suitable for one's need % \def\@maketitle{\newpage % {\doublebox{\@class}} % 投稿区分を左上に印字するならここを生かす \null \vskip -2em %%% for Japanese title and author \begin{center}% \vspace*{-2em}{\LARGE \@jtitle \par}% \vskip 1.5em {\large \lineskip .5em \begin{tabular}[t]{c}\@jauthor \end{tabular}\par}% % \vskip 1.5em % % \@institution % if you need it \end{center}% %%% for English title and author \begin{center}% {\LARGE \@title \par}% \vskip 1.5em {\large \lineskip .5em \begin{tabular}[t]{c}\@author \end{tabular}\par}% % \vskip 1.5em % % \@institution % if you need it \end{center}% %%% for Japanese abstract \@ifundefined{@jabstract}{}{% \vskip 1em %%% 1.5em \begin{list}{}{\setlength{\leftmargin}{0.05\textwidth}% \listparindent=10pt \topsep=0pt \partopsep=0pt \setlength{\rightmargin}{\leftmargin}}% \item {\small\bf 要~旨 : \rm\@jabstract}% \@ifundefined{@jkeywords}{}{% \item {\small\bf キーワード : \it\@keywords}}% \end{list}}% \par %%% \vskip 2.5em %%% for English abstract \@ifundefined{@abstract}{}{% \vskip 1.5em \begin{list}{}{\setlength{\leftmargin}{0.05\textwidth}% \listparindent=10pt \topsep=0pt \partopsep=0pt \setlength{\rightmargin}{\leftmargin}}% \item {\small\bf Abstract : \rm\@abstract}% \@ifundefined{@keywords}{}{% \item {\small\bf Key Words : \it\@keywords}}% \end{list}}% \par \vskip 2.5em} % \fi % =========================================================== % \if@lastpagecolumnalign % ============ FUNCTION No.3 ============ % \newdimen\lastp@geheight \lastp@geheight=10mm \newsavebox{\lastp@gebox} % % define \endabstract % \long\def\endabstract#1{\gdef\@endabstract{#1}} % permit paragraphs % % to create enough space of footnote to align columns of the last page % \def\lastpagecontrol{\@ifnextchar [{\l@stpagecontrol}% {\l@stpagecontrol[\z@]}} % \def\l@stpagecontrol[#1]#2{\global\lastp@geheight=#2% % \@ifundefined{maxsize}{}{\global\advance\maxsize-#2}% for supertab.sty % \@ifundefined{@endabstract}{}{% save \endabstract in a box \global\sbox{\lastp@gebox}{% \begin{minipage}{\textwidth}\vspace*{#1}% \hrule width \textwidth \vspace{1ex}% \begin{list}{}{\setlength{\leftmargin}{0.15\textwidth}% \listparindent=10pt \parsep=0pt \topsep=0pt \partopsep=0pt \setlength{\rightmargin}{\leftmargin}\small}% \item \ignorespaces\hspace*{\listparindent}\ignorespaces \@endabstract \end{list}% \vspace{1ex} \hrule width \textwidth \end{minipage}}}% % % insert footnote with abstract if enough room left % without abstract otherwise % \@tempdima\ht\lastp@gebox \advance\@tempdima\dp\lastp@gebox \ifdim\@tempdima>\lastp@geheight \@tempdima\lastp@geheight \global\lastp@geheight=0pt \else \global\advance\lastp@geheight -\@tempdima \@tempdima\lastp@geheight \global\lastp@geheight\textheight \fi \def\footnoterule{\null}% force it to \null at the last page \insert\footins{\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\textwidth \@parboxrestore \ifdim\lastp@geheight=\z@\else\usebox{\lastp@gebox}\fi% \vspace*{\@tempdima}}} % % set the layout of the last line of the document % \def\lastpagesettings{\@ifnextchar [{\l@stpagesettings}% {\l@stpagesettings[\z@]}} % \def\l@stpagesettings[#1]{% \begin{flushright}% {\footnotesize(`{\tt\jobname.tex}'~~@~\today)}% \end{flushright}% % % put \endabstract in the next page when no room left for it % \ifdim\lastp@geheight=\z@ \onecolumn\null\vspace*{#1}\noindent\usebox{\lastp@gebox}% \fi} % \fi % =========================================================== % \if@widefootnote % ================ FUNCTION No.4 =============== % \def\mathfootnote#1{% % left-column OK \if@firstcolumn \@pardefch@nge % change \par and save argument in a box \sbox{\@fullwdp@gebox}{\begin{minipage}{\textwidth} #1 \end{minipage}}% \global\@fullwidthfootnotepage=\c@page pt% \global\@fullwidthfootnote\ht\@fullwdp@gebox % set its width \global\advance\@fullwidthfootnote\dp\@fullwdp@gebox \@makebigfootnote % and output it into one-column footnote % right-column No good \else #1\ignorespaces \@warning{No `Wide-Footnote' in the right-column }\ignorespaces \fi} % \fi % =========================================================== % % % TeX for Windows shows ``Refernces'' instead of 参考文献 % \def\thebibliography#1{\section*{参考文献\markboth {参 考 文 献}{参 考 文 献}}\list {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}} \def\newblock{\hskip .11em plus .33em minus .07em} \sloppy \sfcode`\.=1000\relax} \let\endthebibliography=\endlist \endinput