Royal Society Open Science
The Royal Society's own LaTeX template for Royal Society Open Science, with its class, bibliography style and author manuscript.
- Category
- Journal
- Document class
rsos(rsos.cls) — ships with TeX Live- Workflow
- Journal manuscript — submissions and revision rounds
- Author
- The Royal Society
- Source
- The Royal Society
- Licence
- rsos.cls: Creative Commons. The sample text is The Royal Society's, provided for authors preparing a submission.
These are the publisher’s own files. This project starts from The Royal Society’s package for this publication — their manuscript, their rsos.cls, their bibliography style — so what compiles here is what they would have given you.
The Royal Society serves this exact file to Royal Society Open Science. Check The Royal Society’s author pages for the current instructions.
What you get
Author_tex.tex— the file that is compiled · 6 KBOPENSCIENCE-eps-converted-to.pdf· 15 KBOPENSCIENCE.eps· 448 KBOPENSCIENCE.pdf· 15 KBOpenAccesslogo_bw-eps-converted-to.pdf· 13 KBOpenAccesslogo_bw.eps· 390 KBRS.bst· 20 KBRSOS_Pubs_Logo_Line_CMYK-eps-converted-to.pdf· 15 KBRSOS_Pubs_Logo_Line_CMYK.eps· 268 KBRSOS_Pubs_Logo_Line_CMYK.pdf· 15 KBRSPA_LOGO-color-eps-converted-to.pdf· 35 KBRSPA_LOGO-color.eps· 544 KBRSPA_LOGO-color.pdf· 76 KBRSTA_OpenAccesslogo_RGB-eps-converted-to.pdf· 15 KBRSTA_OpenAccesslogo_RGB.eps· 407 KBRSTA_OpenAccesslogo_RGB.pdf· 69 KBRS_crossmark_logo-eps-converted-to.pdf· 24 KBRS_crossmark_logo.eps· 282 KBRS_crossmark_logo.pdf· 34 KBbibpattern-rs.sty· 1 KBopenaccesslogo_bw.pdf· 13 KBpalatino.sty· 872 Brsos.cls· 50 KBvruler.sty· 17 KB
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Journals using this template
Source
Author_tex.tex — the file that is compiled · 6 KB
%% Author_tex.tex
%% V1.0
%% 2012/13/12
%% developed by Techset
%%
%% This file describes the coding for rsproca.cls
\documentclass[]{rsos}%%%%where rsos is the template name
%%%% *** Do not adjust lengths that control margins, column widths, etc. ***
%%%%%%%%%%% Defining Enunciations %%%%%%%%%%%
\newtheorem{theorem}{\bf Theorem}[section]
\newtheorem{condition}{\bf Condition}[section]
\newtheorem{corollary}{\bf Corollary}[section]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Please insert respective article type here %%%%
\titlehead{Research}
\begin{document}
%%%% Article title to be placed here
\title{Your paper}
\author{%%%% Author details
X. X. First author$^{1}$, X. Second author$^{2}$ and X. Third author$^{3}$}
%%%%%%%%% Insert author address here
\address{$^{1}$First author address\\
$^{2}$Second author address\\
$^{3}$Third author address}
%%%% Subject entries to be placed here %%%%
\subject{xxxxx, xxxxx, xxxx}
%%%% Keyword entries to be placed here %%%%
\keywords{xxxx, xxxx, xxxx}
%%%% Insert corresponding author and its email address}
\corres{Insert corresponding author name\\
\email{[email protected]}}
%%%% Abstract text to be placed here %%%%%%%%%%%%
\begin{abstract}
The abstract text goes here. The abstract text goes here. The abstract text goes here. The abstract text goes here.
The abstract text goes here. The abstract text goes here. The abstract text goes here. The abstract text goes here.
\end{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Insert the texts which can accomdate on firstpage in the tag "fmtext" %%%%%
\begin{fmtext}
\section{Insert A head here}
%%%% Insert A head here
This demo file is intended to serve as a ``starter file''
for rsproca journal papers produced under \LaTeX\ using
rsproca.cls v1.5e.
\subsection{Insert B head here}
%%%% Insert B head here
Subsection text here.
\subsubsection{Insert C head here}
%%%% Insert C head here
Subsubsection text here.
\section{Equations}
Sample equations. \cite{1}\cite{1,2} \cite{1,2,3}
%%% Numbered equation
\begin{align}\label{1.1}
\begin{split}
\frac{\partial u(t,x)}{\partial t} &= Au(t,x) \left(1-\frac{u(t,x)}{K}\right)-B\frac{u(t-\tau,x) w(t,x)}{1+Eu(t-\tau,x)},\\
\frac{\partial w(t,x)}{\partial t} &=\delta \frac{\partial^2w(t,x)}{\partial x^2}-Cw(t,x)+D\frac{u(t-\tau,x)w(t,x)}{1+Eu(t-\tau,x)},
\end{split}
\end{align}
\begin{align}\label{1.2}
\begin{split}
\frac{dU}{dt} &=\alpha U(t)(\gamma -U(t))-\frac{U(t-\tau)W(t)}{1+U(t-\tau)},\\
\frac{dW}{dt} &=-W(t)+\beta\frac{U(t-\tau)W(t)}{1+U(t-\tau)}.
\end{split}
\end{align}
%%%% Unnumbered equation
\begin{eqnarray}
\frac{\partial(F_1,F_2)}{\partial(c,\omega)}_{(c_0,\omega_0)} = \left|
\begin{array}{ll}
\frac{\partial F_1}{\partial c} &\frac{\partial F_1}{\partial \omega} \\\noalign{\vskip3pt}
\frac{\partial F_2}{\partial c}&\frac{\partial F_2}{\partial \omega}
\end{array}\right|_{(c_0,\omega_0)}\notag\\
=-4c_0q\omega_0 -4c_0\omega_0p^2 =-4c_0\omega_0(q+p^2)>0.
\end{eqnarray}
\end{fmtext}
%%%%%%%%%%%%%%% End of first page %%%%%%%%%%%%%%%%%%%%%
\maketitle
\section{Enunciations}
\begin{theorem}\label{T0.1}
Assume that $\alpha>0, \gamma>1, \beta>\frac{\gamma+1}{\gamma-1}$.
Then there exists a small $\tau_1>0$, such that for $\tau\in
[0,\tau_1)$, if $c$ crosses $c(\tau)$ from the direction of
to a small amplitude periodic traveling wave solution of
(2.1), and the period of $(\check{u}^p(s),\check{w}^p(s))$ is
\[
\check{T}(c)=c\cdot \left[\frac{2\pi}{\omega(\tau)}+O(c-c(\tau))\right].
\]
\end{theorem}
\begin{condition}\label{C2.2}
From (0.8) and (2.10), it holds
$\frac{d\omega}{d\tau}<0,\frac{dc}{d\tau}<0$ for $\tau\in
[0,\tau_1)$. This fact yields that the system (2.1) with delay
$\tau>0$ has the periodic traveling waves for smaller wave speed $c$
than that the system (2.1) with $\tau=0$ does. That is, the
delay perturbation stimulates an early occurrence of the traveling waves.
\end{condition}
\section{Figures \& Tables}
The output for figure is:\vspace*{-10pt}
\begin{figure}[!h]
%\centering\includegraphics[width=2.5in]{xxxxxx.eps}
%%% where xxxxxx name represents "figurename.eps"
\caption{Insert figure caption here}
\label{fig_sim}
\end{figure}
\vspace*{-15pt}
\noindent The output for table is:\vspace*{-10pt}
\begin{table}[!h]
\caption{An Example of a Table}%%%Table caption goes here
\label{table_example}
\begin{tabular}{llll}%%%The number of columns has to be defined here
\hline
date &Dutch policy &date &European policy \\
\hline
1988 &Memorandum Prevention &1985 &European Directive (85/339) \\
1991--1997 &{\bf Packaging Covenant I} & & \\
1994 &Law Environmental Management &1994 &European Directive (94/62) \\
1997 &Agreement Packaging and Packaging Waste & & \\
1998--2002 &{\bf Packaging Covenant II} & & \\
2003--2005 &{\bf Packaging Covenant III} & & \\
2006--2007 &{\bf Decree on Packaging and paper} & & \\\hline
\end{tabular}
\end{table}%%%End of the table
\section{Conclusion}
The conclusion text goes here.
\vskip.5pc
\enlargethispage{10pt}
\ack{Insert acknowledgment text here.}
%%%%%%%%%% Insert bibliography here %%%%%%%%%%%%%%
\noindent {\bf Please follow the coding for references as shown below.}
\begin{thebibliography}{9}
\bibitem{1} Allwood JM, Cullen JM. 2011 \textit{Sustainable materials: with both eyes open}.
Cambridge, UK: UIT Cambridge. See \href{http://www.withbotheyesopen.com}{http://www.withbotheyesopen.com}.
\bibitem{2} MacKay DJC. 2008 \textit{Sustainable energy: without the hot air}.
Cambridge, UK: UIT Cambridge. See \href{http://www.withouthotair.com}{http://www.withouthotair.com}.
\bibitem{3} Gallman PG. 2011 \textit{Green alternatives and national energy strategy: the facts
behind the headlines}. Baltimore,\ MD: Johns Hopkins University Press.
\bibitem{4} MacKay DJC. 2013. Solar energy in the context of energy use, energy transportation, and
energy storage. \textit{Proc. R. Soc. A} \textbf{371}.
\end{thebibliography}
\vskip.5pc
\noindent If maintaining .bib file for references, then please use "RS.bst" to generate the references.
\noindent Example:
\verb+\bibliographystyle{RS}+ %%%% .BST file
\verb+\bibliography{sample}+ %%%%% .Bib file
\end{document}
OPENSCIENCE-eps-converted-to.pdf — binary, 15 KB
OPENSCIENCE.eps — binary, 448 KB
OPENSCIENCE.pdf — binary, 15 KB
OpenAccesslogo_bw-eps-converted-to.pdf — binary, 13 KB
OpenAccesslogo_bw.eps — binary, 390 KB
RS.bst · 20 KB
%% This is file `RS.bst'
ENTRY
{ address
author
booktitle
chapter
edition
editor
howpublished
institution
journal
key
month
note
number
organization
pages
publisher
school
series
title
type
volume
year
}
{}
{ label extra.label sort.label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
INTEGERS { no.comma}
FUNCTION {init.state.consts}
{ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
#4 'no.comma :=
}
STRINGS { s t }
FUNCTION {output.nonnull}
{ 's :=
output.state no.comma =
{ " " * write$ before.all 'output.state := }
{ output.state mid.sentence =
{ " " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"" write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
FUNCTION {bookoutput.nonnull}
{ 's :=
output.state no.comma =
{ " " * write$ before.all 'output.state := }
{ output.state mid.sentence =
{ ": " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"" write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
FUNCTION {output}
{ duplicate$ empty$
'pop$
'output.nonnull
if$
}
FUNCTION {output.check}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'output.nonnull
if$
}
FUNCTION {bookoutput.check}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'bookoutput.nonnull
if$
}
FUNCTION {output.year.check}
{ year empty$
{ "empty year in " cite$ * warning$ }
{ write$
". " year * extra.label * " " *
before.all 'output.state :=
}
if$
}
FUNCTION {output.bibitem}
{ newline$
"\bibitem{" write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
FUNCTION {fin.entry}
{ add.period$
write$
newline$
}
FUNCTION {new.block}
{ output.state before.all =
'skip$
{ after.block 'output.state := }
if$
}
FUNCTION {new.sentence}
{ output.state after.block =
'skip$
{ output.state before.all =
'skip$
{ after.sentence 'output.state := }
if$
}
if$
}
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
FUNCTION {new.block.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.block
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {emphasize}
{ duplicate$ empty$
{ pop$ "" }
{ "{\em " swap$ * "}" * }
if$
}
FUNCTION {bold}
{ duplicate$ empty$
{ pop$ "" }
{ "\textbf{" swap$ * "}" * }
if$
}
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
{ s nameptr "{vv~}{ll}{, jj}{ f{}}" format.name$ 't := }
{ s nameptr "{vv~}{ll}{, jj}{ f{}}" format.name$ 't := }
if$
nameptr #1 >
{
namesleft #1 >
{ ", " * t * }
{
"" *
t "others" =
{ " et~al." * }
{ ", " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.authors}
{ author empty$
{ "" }
{ author format.names }
if$
}
FUNCTION {format.key}
{ empty$
{ key field.or.null }
{ "" }
if$
}
FUNCTION {format.editors}
{ editor empty$
{ "" }
{ editor format.names
editor num.names$ #1 >
{ ", editors" * }
{ ", editor" * }
if$
}
if$
}
FUNCTION {format.title}
{ title empty$
{ "" }
{ title
"" swap$ * ". " *
}
no.comma 'output.state :=
if$
}
FUNCTION {n.dashify}
{ 't :=
""
{ t empty$ not }
{ t #1 #1 substring$ "-" =
{ t #1 #2 substring$ "--" = not
{ "--" *
t #2 global.max$ substring$ 't :=
}
{ { t #1 #1 substring$ "-" = }
{ "-" *
t #2 global.max$ substring$ 't :=
}
while$
}
if$
}
{ t #1 #1 substring$ *
t #2 global.max$ substring$ 't :=
}
if$
}
while$
}
FUNCTION {format.btitle}
{ title emphasize
}
FUNCTION {format.bintitle}
{ "In " title emphasize * "," *
}
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$ * *
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
{ "vol." volume tie.or.space.connect
series empty$
'skip$
{ "" * series emphasize * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.binvolume}
{ volume empty$
{ "" }
{ "vol." volume tie.or.space.connect ", " *
series empty$
'skip$
{ "" * series emphasize * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.bincvolume}
{ volume empty$
{ ", " }
{series empty$
'skip$
{ ", " * series * ", " *
"vol." volume tie.or.space.connect ", " * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.number.series}
{ volume empty$
{ number empty$
{ series field.or.null }
{ output.state mid.sentence =
{ "number" }
{ "Number" }
if$
number tie.or.space.connect
series empty$
{ "there's a number but no series in " cite$ * warning$ }
{ " in " * series * }
if$
}
if$
}
{ "" }
if$
}
FUNCTION {format.edition}
{ edition empty$
{ "" }
{ output.state mid.sentence =
{ edition "l" change.case$ " edition" * }
{ edition "t" change.case$ " edition" * }
if$
}
if$
}
INTEGERS { multiresult }
FUNCTION {multi.page.check}
{ 't :=
#0 'multiresult :=
{ multiresult not
t empty$ not
and
}
{ t #1 #1 substring$
duplicate$ "-" =
swap$ duplicate$ "," =
swap$ "+" =
or or
{ #1 'multiresult := }
{ t #2 global.max$ substring$ 't := }
if$
}
while$
multiresult
}
FUNCTION {format.pages}
{ pages empty$
{ "" }
{ pages multi.page.check
{ "pp." pages n.dashify tie.or.space.connect }
{ "p." pages tie.or.space.connect }
if$
}
if$
}
FUNCTION {format.inpages}
{ pages empty$
{ "" }
{ pages multi.page.check
{ "pp." pages n.dashify tie.or.space.connect }
{ "p." pages tie.or.space.connect }
if$
}
if$
}
FUNCTION {format.vol.num.pages}
{ volume bold field.or.null
number empty$
'skip$
{ "" "" * *
volume empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
}
if$
pages empty$
'skip$
{ duplicate$ empty$
{ pop$ format.pages }
{ ", " * pages n.dashify * }
if$
}
if$
}
FUNCTION {format.chapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ "chapter" }
{ type "l" change.case$ }
if$
chapter tie.or.space.connect
pages empty$
'skip$
{ ", " * format.pages * }
if$
}
if$
}
FUNCTION {format.inchapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ "" }
{ type "l" change.case$ }
if$
chapter tie.or.space.connect
pages empty$
'skip$
{}
if$
}
if$
}
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
{ "" }
{ editor empty$
{ "In " booktitle emphasize * }
{ "In " format.editors * ", " * booktitle emphasize * }
if$
}
if$
}
FUNCTION {format.thesis.type}
{ type empty$
'skip$
{ pop$
type "t" change.case$
}
if$
}
FUNCTION {format.tr.number}
{ type empty$
{ "Technical Report" }
'type
if$
number empty$
{ "t" change.case$ }
{ number tie.or.space.connect }
if$
}
FUNCTION {format.article.crossref}
{ "In"
" \cite{" * crossref * "}" *
}
FUNCTION {format.book.crossref}
{ volume empty$
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
"In "
}
{ "Volume" volume tie.or.space.connect
" of " *
}
if$
"\cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{ "In"
" \cite{" * crossref * "}" *
}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
format.title "title" output.check
crossref missing$
{ journal emphasize "journal" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {book}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check
editor format.key output
}
{ format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
}
if$
output.year.check
new.block
format.btitle "title" output.check
crossref missing$
{ format.bvolume output
new.block
format.number.series output
new.sentence
address output
publisher "publisher" bookoutput.check
}
{ new.block
format.book.crossref output.nonnull
}
if$
format.edition output
new.block
note output
fin.entry
}
FUNCTION {booklet}
{ output.bibitem
format.authors output
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
howpublished output
address output
new.block
note output
fin.entry
}
FUNCTION {inbook}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check
editor format.key output
}
{ format.authors output.nonnull
crossref missing$
{"author and editor" editor either.or.check }
'skip$
if$
}
if$
output.year.check
new.block
format.inchapter.pages "chapter and pages" output.check
new.block
format.bintitle "title" output.check
crossref missing$
{ format.binvolume output
format.number.series output
format.inpages output
new.sentence
address output
publisher "publisher" bookoutput.check
}
{ format.chapter.pages "chapter and pages" output.check
new.block
format.book.crossref output.nonnull
}
if$
format.edition output
new.block
note output
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
format.bincvolume output
format.number.series output
format.inpages output
new.sentence
address output
publisher "publisher" bookoutput.check
format.edition output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
format.bvolume output
format.number.series output
format.pages output
address output
new.sentence
organization output
publisher output
}
{ format.incoll.inproc.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
format.authors output
author format.key output
output.year.check
new.block
format.btitle "title" output.check
organization address new.block.checkb
organization output
address output
format.edition output
new.block
note output
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
"Master's thesis" format.thesis.type output.nonnull
school "school" output.check
address output
new.block
note output
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors output
author format.key output
output.year.check
new.block
format.title output
new.block
howpublished output
new.block
note output
fin.entry
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.btitle "title" output.check
new.block
"PhD thesis" format.thesis.type output.nonnull
school "school" output.check
address output
new.block
note output
fin.entry
}
FUNCTION {proceedings}
{ output.bibitem
format.editors output
editor format.key output
output.year.check
new.block
format.btitle "title" output.check
format.bvolume output
format.number.series output
address output
new.sentence
organization output
publisher output
new.block
note output
fin.entry
}
FUNCTION {techreport}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
format.tr.number output.nonnull
institution "institution" output.check
address output
new.block
note output
fin.entry
}
FUNCTION {unpublished}
{ output.bibitem
format.authors "author" output.check
author format.key output
output.year.check
new.block
format.title "title" output.check
new.block
note "note" output.check
fin.entry
}
FUNCTION {default.type} { misc }
MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}
MACRO {acmcs} {"ACM Computing Surveys"}
MACRO {acta} {"Acta Informatica"}
MACRO {cacm} {"Communications of the ACM"}
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
MACRO {ibmsj} {"IBM Systems Journal"}
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
MACRO {ieeetc} {"IEEE Transactions on Computers"}
MACRO {ieeetcad}
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
MACRO {ipl} {"Information Processing Letters"}
MACRO {jacm} {"Journal of the ACM"}
MACRO {jcss} {"Journal of Computer and System Sciences"}
MACRO {scp} {"Science of Computer Programming"}
MACRO {sicomp} {"SIAM Journal on Computing"}
MACRO {tocs} {"ACM Transactions on Computer Systems"}
MACRO {tods} {"ACM Transactions on Database Systems"}
MACRO {tog} {"ACM Transactions on Graphics"}
MACRO {toms} {"ACM Transactions on Mathematical Software"}
MACRO {toois} {"ACM Transactions on Office Information Systems"}
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
MACRO {tcs} {"Theoretical Computer Science"}
READ
FUNCTION {sortify}
{ purify$
"l" change.case$
}
INTEGERS { len }
FUNCTION {chop.word}
{ 's :=
'len :=
s #1 len substring$ =
{ s len #1 + global.max$ substring$ }
's
if$
}
FUNCTION {format.lab.names}
{ 's :=
s #1 "{vv~}{ll}" format.name$
s num.names$ duplicate$
#2 >
{ pop$ " et~al." * }
{ #2 <
'skip$
{ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
{ " et~al." * }
{ " \& " * s #2 "{vv~}{ll}" format.name$ * }
if$
}
if$
}
if$
}
FUNCTION {author.key.label}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ author format.lab.names }
if$
}
FUNCTION {author.editor.key.label}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ editor format.lab.names }
if$
}
{ author format.lab.names }
if$
}
FUNCTION {editor.key.label}
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ editor format.lab.names }
if$
}
FUNCTION {calc.label}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
{ type$ "proceedings" =
'editor.key.label
'author.key.label
if$
}
if$
", "
*
year field.or.null purify$ #-1 #4 substring$
*
'label :=
}
FUNCTION {sort.format.names}
{ 's :=
#1 'nameptr :=
""
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
{ " " * }
'skip$
if$
s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
nameptr numnames = t "others" = and
{ "et al" * }
{ t sortify * }
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {sort.format.title}
{ 't :=
"A " #2
"An " #3
"The " #4 t chop.word
chop.word
chop.word
sortify
#1 global.max$ substring$
}
FUNCTION {author.sort}
{ author empty$
{ key empty$
{ "to sort, need author or key in " cite$ * warning$
""
}
{ key sortify }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {author.editor.sort}
{ author empty$
{ editor empty$
{ key empty$
{ "to sort, need author, editor, or key in " cite$ * warning$
""
}
{ key sortify }
if$
}
{ editor sort.format.names }
if$
}
{ author sort.format.names }
if$
}
FUNCTION {editor.sort}
{ editor empty$
{ key empty$
{ "to sort, need editor or key in " cite$ * warning$
""
}
{ key sortify }
if$
}
{ editor sort.format.names }
if$
}
FUNCTION {presort}
{ calc.label
label sortify
" "
*
type$ "book" =
type$ "inbook" =
or
'author.editor.sort
{ type$ "proceedings" =
'editor.sort
'author.sort
if$
}
if$
#1 entry.max$ substring$
'sort.label :=
sort.label
*
" "
*
title field.or.null
sort.format.title
*
#1 entry.max$ substring$
'sort.key$ :=
}
ITERATE {presort}
%SORT
STRINGS { last.label next.extra } %
INTEGERS { last.extra.num } %
FUNCTION {initialize.extra.label.stuff} %
{ #0 int.to.chr$ 'last.label :=
"" 'next.extra :=
#0 'last.extra.num :=
}
FUNCTION {forward.pass}
{ last.label label =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
label 'last.label :=
}
if$
}
FUNCTION {reverse.pass}
{ next.extra "b" =
{ "a" 'extra.label := }
'skip$
if$
label extra.label * 'label :=
extra.label 'next.extra :=
}
EXECUTE {initialize.extra.label.stuff}
ITERATE {forward.pass}
REVERSE {reverse.pass}
FUNCTION {bib.sort.order}
{ sort.label
" "
*
year field.or.null sortify
*
" "
*
title field.or.null
sort.format.title
*
#1 entry.max$ substring$
'sort.key$ :=
}
ITERATE {bib.sort.order}
%SORT %
FUNCTION {begin.bib}
{ preamble$ empty$ %
'skip$
{ preamble$ write$ newline$ }
if$
"\begin{thebibliography}{99}" write$ newline$ %
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
RSOS_Pubs_Logo_Line_CMYK-eps-converted-to.pdf — binary, 15 KB
RSOS_Pubs_Logo_Line_CMYK.eps — binary, 268 KB
RSOS_Pubs_Logo_Line_CMYK.pdf — binary, 15 KB
RSPA_LOGO-color-eps-converted-to.pdf — binary, 35 KB
RSPA_LOGO-color.eps — binary, 544 KB
RSPA_LOGO-color.pdf — binary, 76 KB
RSTA_OpenAccesslogo_RGB-eps-converted-to.pdf — binary, 15 KB
RSTA_OpenAccesslogo_RGB.eps — binary, 407 KB
RSTA_OpenAccesslogo_RGB.pdf — binary, 69 KB
RS_crossmark_logo-eps-converted-to.pdf — binary, 24 KB
RS_crossmark_logo.eps — binary, 282 KB
RS_crossmark_logo.pdf — binary, 34 KB
bibpattern-rs.sty · 1 KB
\newcommand\AUGRP[1]{{\let\INITS\FIRSTINITS#1}}
\def\FIRSTINITS#1#2\SNM#3{{{#3}} {#1}}
\newif\ifJournalBib%
\JournalBibfalse%
%\newcommand\JRNL[1]{\bgroup\JournalBibtrue#1\egroup}
\newcommand\JRNL[1]{\JournalBibtrue#1\JournalBibfalse}
\newcommand\BOOK[1]{#1}
\newcommand\OTHER[1]{#1}
\newcommand\OTHERINFO[1]{#1}
\newcommand\BKSERIES[1]{#1}
%\newcommand\AUGRP[1]{{#1}}
\newcommand\AUTHOR[1]{#1}
\newcommand\SNM[1]{{#1}}
\newcommand\INITS[1]{{#1}}
\newcommand\SEP[1]{#1\ignorespaces}
\newcommand\ATITLE[1]{{{#1}}}
\newcommand\JTITLE[1]{\textit{#1}}
\newcommand\VOLUME[1]{{\ifJournalBib\relax\textbf{#1}\else#1\fi}}%modified by Saravanan,M. on 29/1/2015
\newcommand\ISSUE[1]{{#1}}
\newcommand\YEAR[1]{{#1}}
\newcommand\FPAGE[1]{{#1}}
\newcommand\LPAGE[1]{{#1}}
\newcommand\BTITLE[1]{\textit{#1}}
\newcommand\SERIES[1]{{{#1}}}
\newcommand\CHAPTER[1]{{#1}}
\newcommand\EDITION[1]{{#1}}
\newcommand\PUBNAME[1]{{#1}}
\newcommand\PUBLOC[1]{{#1}}
\newcommand\REFCOMMENT[1]{{#1}}
\newcommand\REFDOI[1]{{#1}}
\newcommand\COLLAB[1]{{#1}}
openaccesslogo_bw.pdf — binary, 13 KB
palatino.sty · 872 B
%%
%% This is file `palatino.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% psfonts.dtx (with options: `palatino')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from palatino.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file psfonts.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesPackage{palatino}%
[2005/04/12 PSNFSS-v9.2a
(SPQR)
]
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
\endinput
%%
%% End of file `palatino.sty'.
rsos.cls · 50 KB
50 KB — too long to show here. It arrives with the project.
vruler.sty · 17 KB
% VERTICAL RULERS 2.3 Oct 1996 for Latex 2.09 or 2e, plain TeX, amsTeX
% by Zhuhan JIANG, University of New England, Australia NSW 2351.
% Email: [email protected]
%
% PURPOSE: Make a vertical ruler, numbering consecutively so that
% any part of an article can be pinpointed immediately.
% Move vruler freely up and down, left and right.
%
% There are no packages to my knowledge that number lines
% one by one without missing certain lines, particularly
% when there are many maths equations in the text. So vruler
% is a good alternative for people writing text of versatile
% format or lots of maths formulas.
% COMMANDS:
% \setvruler[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<MODE>]%
% [<ODD_HSHIFT]>][<EVEN_HSHIFT>][<VSHIFT>][<HEIGHT>]
% <general LaTeX material-01>
% \unsetvruler % optional
% <general LaTeX material-02>
%
% <SCALE> distance between two consecutive vruler markings
% <INITIAL_COUNT> first marking reading
% <STEP> is the line count increment
% <DIGITS> number of digits required for ruler markings
% <MODE> =0 if each page has same vruler marking, =1 if otherwise
% <ODD_HSHIFT> horizontal shift for odd pages
% from the default value for the vruler
% <EVEN_HSHIFT> horizontal shift for even pages
% from the default value for the vruler
% <VSHIFT> vertical shift from default value for vruler
% <HEIGHT> height of vertical ruler
%
% \vrulercount - next mark reading on the vertical ruler
%
% \setdefault{cmdname}{n}{default_1}{..}{default_n} (re)set macro
% \cmdname[#1][..][#n] to take default_1 to default_n respectively,
% so that \cmdname[][xy] is same as \cmdname[default_1][xy][default..].
% You don't need to use \setdefault unless you would like to change
% the default setting for macros in vruler.sty or elsewhere.
%
% DEFAULTS:
% The parameters of \setvruler admit defaults.
% Hence e.g. \setvruler alone is same as
% \setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight]
% and e.g. \setvruler[][20] is same as \setvruler[10pt][20]
%
% NOTES:
% 1. If you are using multicol.sty, then you might want to move
% the vruler into the center to separate the columns.
%
% 2. If you use \topskip other than the default value, then
% you will have to alter <VSHIFT> and <HEIGHT> parameters
% in \setvruler accordingly (which is simple).
%
% 3. It is best to choose baselineskip as <SCALE> so that line
% synchronisation is often optimal. Use e.g. 5+ to denote
% the line immediately after marking number 5 if necessary.
%
% 4. In twosided book style in LaTeX2e, the initial numbering
% of title page via \begin{titlepage} is actually onepage
% away. To overcome this, either do not include title page in
% the vruler environment, or set initial number #2
% to a number (a page ahead) so that the resulting
% initial number is what one needs.
%
% 5. Version 1.0 of VRULER.STY for LaTeX is released in
% July 1993.
%
% EXAMPLE: see end of this file.
% You may run the example by simply removing the line
% containing \endinput
%
%BEGINMACROS
%
\ifx\VrulerDefined\undefined\let\next\relax\else
\message{NOT reloaded}\let\next\endinput\fi\next
\xdef\VrulerDefined{}% avoid TeX output routine manipulated twice.
%
\message{2.3 <24/10/96>}%
%
{\catcode`\@=11\relax \def\temp@macro{\space\space\space\space}%
\wlog{\temp@macro VRULER version 2.3 Octorber 1996 By Z Jiang}%
\wlog{\temp@macro University of New England, Australia}%
\wlog{\temp@macro Email: [email protected]}}%
\xdef\EntryVruler{\the\catcode`\@}\catcode`\@=11\relax % SAVE @'s STATUS
\let\temp@@@macro=\wlog\def\wlog#1{}%
%
\newdimen\temp@dim \newdimen\b@xheight\newdimen\lineh@ight
\newbox\outputb@x\newbox\bufferbox\newbox\tempb@x
\newcount\refn@\newcount\tot@l\newcount\rulercount
\let\@outputpage@backup\@outputpage \let\plainoutput@backup\plainoutput
%
% NUMBER with left flushed zeros \fillzeros[<WIDTH>]<NUMBER>
\newcount\temp@@ \newcount\temp@
\def\fillzeros[#1]#2{\temp@@=#2\relax\ifnum\temp@@<0\temp@@=-\temp@@\fi
\temp@=1 %
\loop\ifnum\temp@@<10 \else \divide\temp@@ by 10 \advance\temp@ by 1 \fi
\ifnum\temp@@=10\relax\temp@@=11\relax\fi \ifnum\temp@@>10 \repeat
\ifnum#2<0\advance\temp@1\relax-\fi
\loop\ifnum\temp@<#1\relax0\advance\temp@1\relax\fi \ifnum\temp@<#1 \repeat
\temp@@=#2\relax\ifnum\temp@@<0\temp@@=-\temp@@\fi \relax\the\temp@@}%
%
% PLAIN TEX adjustment
\ifx\textheight\undefined
\newdimen \textheight \newdimen \textwidth \textheight=\vsize \textwidth=\hsize
\font\tiny=cmr5 \let\c@page\pageno \def\oddsidemargin{0pt}%
\let\evensidemargin\oddsidemargin \def\headsep{2\topskip}%
\fi
%
% \makevruler[<SCALE>][<INITIAL_COUNT>][<STEP>][<DIGITS>][<HEIGHT>]
\def\makevruler[#1][#2][#3][#4][#5]{\begingroup\offinterlineskip
\textheight=#5\vbadness=10000\vfuzz=120ex\overfullrule=0pt%
\global\setbox\bufferbox=\vbox to \textheight{%
{\parskip=0pt\hfuzz=150em\b@xheight=\textheight
\lineh@ight=#1\global\rulercount=#2%
\tot@l\b@xheight\divide\tot@l\lineh@ight\advance\tot@l2%
\refn@1\vskip-\lineh@ight\vskip1ex%
\loop\setbox\tempb@x=\hbox to0cm{{\tiny\hfil\fillzeros[#4]\rulercount}}%
\ht\tempb@x\lineh@ight\dp\tempb@x0pt\box\tempb@x\break
\advance\refn@1\global\advance\rulercount#3\relax
\ifnum\refn@<\tot@l\repeat}}\endgroup}%
%
% MAKE VRULER into \box\outputb@x
\def\SET[#1][#2][#3][#4][#5][#6][#7][#8][#9]{%
\ifRuler@Started\else\global\rulercount=#2\fi \global\Ruler@Startedtrue
\begingroup\hbadness=10000\hfuzz=150em
\ifnum#5=0\makevruler[#1][#2][#3][#4][#9]\else
\makevruler[#1][\rulercount][#3][#4][#9]\fi\endgroup
\begingroup\vfuzz=120ex\vbadness=10000%
\global\setbox\outputb@x=\vbox{\b@xheight=\ht\bufferbox
\hbox{\hskip-50pt % default initial adjustment
\advance\b@xheight#8\lower\b@xheight%
\hbox{\ifodd\c@page\hskip#6\else\hskip#7\fi \copy\bufferbox}\nobreak
\hskip50pt \nobreak \ifodd\c@page \hskip-#6 \else\hskip-#7 \fi \nobreak
\lower\ht\tempb@x\hbox{\box\tempb@x}}}\endgroup }%
%
\newtoks\toksone\newtoks\tokstwo\newtoks\toksthree
\newtoks\toksfour\newtoks\toksfive \newif\ifRuler@Started \Ruler@Startedfalse
\def\set@vruler[#1][#2][#3][#4][#5][#6][#7][#8][#9]{%
\ifx\pageno\undefined % this is considered as LaTeX
% we assume all LaTeX versions have \@outputpage in the form of
% \@outputpage= ...\vbox{ ... \vbox{...}...}... , where 2nd \vbox
% contains the true content.
\toksfive=\expandafter{\@outputpage\s@ftymark}%temp toks
\long\def\parse@macro ##1\vbox##2##3\s@ftymark{%
\def\part@@one{##1}\def\part@@two{##2}\def\part@@three{##3}}%
\expandafter\parse@macro\the\toksfive
\let\part@one\part@@one \let\part@five\part@@three
\toksfive=\expandafter{\part@@two\s@ftymark}%
\expandafter\parse@macro\the\toksfive
\let\part@two\part@@one \let\part@three\part@@two \let\part@four\part@@three
\toksone=\expandafter{\part@one}\tokstwo=\expandafter{\part@two}%
\toksthree=\expandafter{\part@three}\toksfour=\expandafter{\part@four}%
\toksfive=\expandafter{\part@five}%
%
\edef\@outputpage{\the\toksone \noexpand\vbox{\the\tokstwo \noexpand\vbox{%
\noexpand\SET[\noexpand#1][\noexpand#2][\noexpand#3][\noexpand#4][\noexpand#5][\noexpand#6][\noexpand#7][\noexpand#8][\noexpand#9]%
\noexpand\temp@dim=\noexpand\textheight
\noexpand\advance\noexpand\temp@dim by \noexpand\headsep
\noexpand\hbox{% box things together
\noexpand\rlap{\noexpand\raise\temp@dim\box\outputb@x}%
\noexpand\setbox\noexpand\tempb@x=\noexpand\vbox{\the\toksthree}%
\noexpand\box\noexpand\tempb@x}\the\toksfour}}\the\toksfive}%
%
\else % now for plain TeX
\def\plainoutput{\textheight=\vsize \SET[#1][#2][#3][#4][#5][#6][#7][#8][#9]%
\setbox\tempb@x\vbox{\makeheadline\pagebody\makefootline}%from plain.tex
\shipout \vbox {\hbox{\hskip 15pt
\rlap{\temp@dim=\textheight\advance\temp@dim by \headsep
\raise\temp@dim\box\outputb@x }\hskip-15pt \box\tempb@x }}%
\advancepageno \ifnum\outputpenalty>-\@MM \else\dosupereject\fi }%
\fi}%
%
\def\unsetvruler{\Ruler@Startedfalse \let\@outputpage\@outputpage@backup
\let\plainoutput\plainoutput@backup}%
%
\ifx\new@measures\undefined\let\setvruler\set@vruler\fi
%
% LEAVE MACROS
\let\wlog\temp@@@macro\let\temp@@@macro\undefined@
\catcode`\@=\EntryVruler\relax
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% if you delete everything below, the macros are still valid,
% except that you have to specify all the macro parameters for
% \setvruler explicitly and completely
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\xdef\EntryVruler{\the\catcode`\@}\catcode`\@=11\relax
%
% NEW MEASURES etc (parameter defaulting mechanism given by macros below)
\def\new@measures{%
\def\temp@@macro##1##2##3{\expandafter\ifx\csname ##3temp##2##1\endcsname
\relax\edef\next{\noexpand\csname new##1\noexpand\endcsname
\csname ##3temp##2##1\endcsname}%
\else\let\next\relax\fi\next}%
\def\temp@macro##1{%
\temp@@macro{##1}{@}{}\temp@@macro{##1}{@@}{}\temp@@macro{##1}{@@@}{}}%
\temp@macro{count}\temp@macro{toks}\temp@macro{box}\temp@macro{read}%
\temp@@macro{if}{@}{if}\temp@@macro{if}{@@}{if}\temp@@macro{if}{@@@}{if}%
\def\temp@@macro##1{\expandafter\ifx\csname temp##1dim\endcsname
\relax\edef\next{\noexpand\csname newdimen\noexpand\endcsname
\csname temp##1dim\endcsname}%
\else\let\next\relax\fi\next}%
\temp@@macro{@}\temp@@macro{@@}\temp@@macro{@@@}%
}%
\let\temp@@@macro=\wlog\def\wlog#1{}\new@measures
%
%%% GENERAL STACK
\def\make@STKcount{\csname newcount\endcsname
\STKcount\global\STKcount=0\relax}%
\ifx\STKcount\undefined@
\def\next{\make@STKcount}\else\def\next{}\fi
\next % ensures stack pointer not flushed if this piece of code
% is loaded again
%
\long\def\push#1{\global\advance\STKcount1\relax
\expandafter\gdef\csname STK\the\STKcount\string~\endcsname{#1}}%
%
\def\popnil{\expandafter\let\expandafter\temp@macro
\csname STK\the\STKcount\string~\endcsname
\ifnum\STKcount>0\global\expandafter\let
\csname STK\the\STKcount\string~\endcsname=\undefined@
\global\advance\STKcount-1%
\else
\def\temp@macro{}\global\STKcount=0%
\fi\relax % \temp@macro for pop
}%
%
\def\pop{\popnil\temp@macro}%
%
%% GET PARAMETERS
\long\def\get@nepara[#1][#2]{{\def\next@{#2}%
\ifx\next@\empty\push{#1}\else\push{#2}\fi}\ag@in}%
%
\long\def\get@para\left@#1\right@{%
\def\check@{%
\ifx[\next@ \def\full@####1{\get@nepara[#1]####1}%
\else \def\full@{\get@nepara[#1][#1]}\fi
\full@}%
\futurelet\next@\check@}%
%
\long\def\do@nepara\left@#1\right@#2\p@r@end{%
\gdef\p@r@data{#2}\global\advance\p@r@count1\get@para\left@#1\right@}%
%
\def\ag@in{\ifx\p@r@data\empty \def\next@{\relax
\getp@r@s\run@CMD}\else
\def\next@{\expandafter\do@nepara\p@r@data\p@r@end}\fi
\next@}%
%
\def\run@CMD{\csname STK\the\STKcount\string~\endcsname}%
%
\def\num@to@word#1{\ifcase #1 \or
\def\temp@macro{one}\or \def\temp@macro{two}\or
\def\temp@macro{three}\or \def\temp@macro{four}\or
\def\temp@macro{five}\or \def\temp@macro{six}\or
\def\temp@macro{seven}\or \def\temp@macro{eight}\or
\def\temp@macro{nine}\else \def\temp@macro{}\fi
\temp@toks=\expandafter{\temp@macro}}%
%
\temp@@count=1 % make nine newtoks, if they don't already exist
\loop \num@to@word{\temp@@count}%
\expandafter\ifx\csname p@r@\the\temp@toks\endcsname\relax
\temp@@toks={newtoks}\expandafter\csname\expandafter\the
\expandafter\temp@@toks\expandafter\endcsname
\csname p@r@\the\temp@toks\endcsname\fi
\advance\temp@@count by 1 \ifnum\temp@@count<10 \repeat
%
\ifx\p@r@count\undefined \newcount\p@r@count\fi
\long\def\st@ckparas#1\p@r@end{%
\global\p@r@count=0\gdef\p@r@data{#1}\ag@in}%
%
% PARAMETER ASSIGNMENT % use \temp@count
\def\getp@r@s{\temp@count=\p@r@count
{\loop
\ifnum\temp@count>0 %
\expandafter\let\expandafter
\temp@macro\csname STK\the\STKcount\string~\endcsname
\ifcase\temp@count
\or \global\p@r@one=\expandafter{\temp@macro}%
\or \global\p@r@two=\expandafter{\temp@macro}%
\or \global\p@r@three=\expandafter{\temp@macro}%
\or \global\p@r@four=\expandafter{\temp@macro}%
\or \global\p@r@five=\expandafter{\temp@macro}%
\or \global\p@r@six=\expandafter{\temp@macro}%
\or \global\p@r@seven=\expandafter{\temp@macro}%
\or \global\p@r@eight=\expandafter{\temp@macro}%
\or \global\p@r@nine=\expandafter{\temp@macro}%
\else \errmessage{Parameter capacity exceeded.}%
% this should never happen: TeX's max para no. is 9
\fi
\global\expandafter\let
\csname STK\the\STKcount\string~\endcsname=\undefined@%
\global\advance\STKcount-1%
\global\advance\temp@count-1\relax
\fi
\ifnum\temp@count>0 %
\repeat}}%
%
\def\clrp@r@s{%GLOBALLY clear
\global\p@r@one={}\global\p@r@two={}\global\p@r@three={}%
\global\p@r@four={}\global\p@r@five={}\global\p@r@six={}%
\global\p@r@seven={}\global\p@r@eight={}\global\p@r@nine={}}%
%
\def\read@paras#1{\temp@@@count=1 %use \temp@@@count and \temp@@count
\loop \num@to@word{\the\temp@@@count}\csname p@r@\the\temp@toks\endcsname={}%
\advance\temp@@@count by 1 \ifnum\temp@@@count<10 \repeat
\temp@@@count=1 \temp@@count=#1 %
\def\read@one@para##1{\num@to@word{\temp@@@count}%
\def\temp@macro{\left@ ##1\right@}%
\temp@@@toks=\expandafter{\temp@macro}%
\csname p@r@\the\temp@toks\endcsname\expandafter{\temp@macro}%
\advance\temp@@@count by 1 \read@continue}%
\def\read@continue{\num@to@word{\temp@@@count}% which uses \temp@macro
\ifnum\temp@@@count>\temp@@count \let\next@@\make@default
\edef\temp@@macro{\the\p@r@one\the\p@r@two\the\p@r@three\the\p@r@four
\the\p@r@five\the\p@r@six\the\p@r@seven\the\p@r@eight\the\p@r@nine}%
\else \let\next@@\read@one@para
\fi \next@@}\read@continue}%
%
\def\make@@default#1#2{\temp@count=#2\relax \temp@@count=1 %used \temp@@macro
\loop \num@to@word{\temp@@count}%
\ifnum\temp@@count>\temp@count \csname p@r@\the\temp@toks\endcsname={}%
\else \csname p@r@\the\temp@toks\endcsname
=\expandafter{\expandafter[\expandafter
\the\csname p@r@\the\temp@toks\endcsname]}\fi
\advance\temp@@count by 1 %
\ifnum\temp@@count<10 \repeat
\edef\temp@macro{\the\p@r@one\the\p@r@two\the\p@r@three\the\p@r@four
\the\p@r@five\the\p@r@six\the\p@r@seven\the\p@r@eight\the\p@r@nine}%
\temp@toks=\expandafter{\temp@macro}%
\temp@@toks=\expandafter{\temp@@macro}%
\expandafter\let\expandafter\temp@macro\csname #1\endcsname
\expandafter\ifx\csname #1@ raw\endcsname\relax
\expandafter\let\csname #1@ raw\endcsname\temp@macro\fi
\expandafter\edef\csname#1\endcsname{%
\noexpand\push{\noexpand\edef\noexpand\next@@{%
\noexpand\noexpand \noexpand \csname \noexpand#1@ raw\noexpand\endcsname
\the\temp@toks}%
\noexpand\popnil\noexpand\clrp@r@s\noexpand\next@@}\noexpand\st@ckparas
\the\temp@@toks \noexpand\p@r@end}}%
%
% \setdefalut{cmdname}{n}{default1}{..}{default_n}
% then \cmdname[#1][..][#n] can be defaulted.
\def\setdefault#1#2{\def\make@default{\make@@default{#1}{#2}}\read@paras{#2}}
%
% best strategy (e.g) to define \foo[#1][#2]{#3} so as to default #1 and #2
% while making #3 compulsory in brace bracket.
% 1. define \foo@[#1][#2]#3 as normal (what you wish)
% 2. define \foo[#1][#2]#{\foo@[#1][#2]} to make {#3} mandatory
% 3. use \setdefault{foo}{2}{one}{two} to default #1=one and #2 to two
%
% DEFAULT MECHANISM END: this piece of code can be included in any
% package and can be reloaded any times without overruning the resources.
%
%%%%%%% make defaults %%%%%%%%%%%
\setdefault{setvruler}{9}{12pt}{1}{1}{4}{1}{0pt}{0pt}{0pt}{\textheight}%
%
\let\wlog\temp@@@macro\let\temp@@@macro\undefined@
\catcode`\@=\EntryVruler\relax
\endinput
%
%ENDMACROS
%
% Application example
\documentstyle[vruler,twoside]{article}
\setlength{\textwidth}{2.5in}
\setlength{\oddsidemargin}{3cm}
\setlength{\evensidemargin}{6cm}
\overfullrule=0pt \parindent=0pt
\begin{document}
\advance\textwidth 3cm %2cm is better for plain TeX
\setvruler [][][][][][\textwidth]
This is a simple example, in which we have
placed vertical rulers on the left for
odd numbered pages and on the right for
even numbered pages. \newpage
This is the second page and is thus an even
numbered page. Please see that the vertical
ruler is now on the right, and is approximately
of the same distance from the text margin as
the vertical ruler on the first page from
the left margin there. \newpage
\unsetvruler
The following pages, in fact only this page, will
not be appended with the vertical rulers.\newpage
\setvruler[][\rulercount]
This page will be added with the vertical ruler again.
Here the numbering marking of the vertical ruler picks
up where it was left. Nevertheless, we may start with
any new number. \newpage
This is another page. Please see that both this and
the previous pages have vruler on the left side.
\end{document}
The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗