/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb>
local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on bmc_article.pdf (8 pages, 195395 bytes).
PDF statistics:
91 PDF objects out of 1000 (max. 8388607)
65 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
diff --git a/bmc_template/bmc_article.pdf b/bmc_template/bmc_article.pdf
new file mode 100644
index 0000000..5073e63
Binary files /dev/null and b/bmc_template/bmc_article.pdf differ
diff --git a/bmc_template/bmc_article.synctex.gz b/bmc_template/bmc_article.synctex.gz
new file mode 100644
index 0000000..7a982ff
Binary files /dev/null and b/bmc_template/bmc_article.synctex.gz differ
diff --git a/bmc_template/bmc_article.tex b/bmc_template/bmc_article.tex
new file mode 100644
index 0000000..49cafbe
--- /dev/null
+++ b/bmc_template/bmc_article.tex
...
%% BioMed_Central_Tex_Template_v1.06
%% %
% bmc_article.tex ver: 1.06 %
% %
%%IMPORTANT: do not delete the first line of this template
%%It must be present to enable the BMC Submission system to
%%recognise this template!!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% LaTeX template for BioMed Central %%
%% journal article submissions %%
%% %%
%% <8 June 2012> %%
%% %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% For instructions on how to fill out this Tex template %%
%% document please refer to Readme.html and the instructions for %%
%% authors page on the biomed central website %%
%% http://www.biomedcentral.com/info/authors/ %%
%% %%
%% Please do not use \input{...} to include other tex files. %%
%% Submit your LaTeX manuscript as one .tex document. %%
%% %%
%% All additional figures and files should be attached %%
%% separately and not embedded in the \TeX\ document itself. %%
%% %%
%% BioMed Central currently use the MikTex distribution of %%
%% TeX for Windows) of TeX and LaTeX. This is available from %%
%% http://www.miktex.org %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% additional documentclass options:
% [doublespacing]
% [linenumbers] - put the line numbers on margins
%%% loading packages, author definitions
%\documentclass[twocolumn]{bmcart}% uncomment this for twocolumn layout and comment line below
\documentclass{bmcart}
%%% Load packages
%\usepackage{amsthm,amsmath}
%\RequirePackage{natbib}
%\RequirePackage[authoryear]{natbib}% uncomment this for author-year bibliography
%\RequirePackage{hyperref}
\usepackage[utf8]{inputenc} %unicode support
%\usepackage[applemac]{inputenc} %applemac support if unicode package fails
%\usepackage[latin1]{inputenc} %UNIX support if unicode package fails
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% If you wish to display your graphics for %%
%% your own use using includegraphic or %%
%% includegraphics, then comment out the %%
%% following two lines of code. %%
%% NB: These line *must* be included when %%
%% submitting to BMC. %%
%% All figure files must be submitted as %%
%% separate graphics through the BMC %%
%% submission process, not included in the %%
%% submitted article. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\includegraphic{}
\def\includegraphics{}
%%% Put your definitions there:
\startlocaldefs
\endlocaldefs
%%% Begin ...
\begin{document}
%%% Start of article front matter
\begin{frontmatter}
\begin{fmbox}
\dochead{Research}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Enter the title of your article here %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Fasta-O-Matic: a tool to sanity check and if needed reformat FASTA files}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Enter the authors here %%
%% %%
%% Specify information, if available, %%
%% in the form: %%
%% ={,} %%
%% = %%
%% Comment or delete the keys which are %%
%% not used. Repeat \author command as much %%
%% as required. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\author[
addressref={aff1}, % id's of addresses, e.g. {aff1,aff2}
corref={aff1},
email={[email protected]} % email address
]{\inits{JM}\fnm{Jennifer M} \snm{Shelton}}
\author[
addressref={aff1},
email={[email protected]} % email address
]{\inits{SJ}\fnm{Susan J} \snm{Brown}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Enter the authors' addresses here %%
%% %%
%% Repeat \address commands as much as %%
%% required. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\address[id=aff1]{% % unique id
\orgname{KSU/K-INBRE Bioinformatics Center, Division of Biology, Kansas State University}, % university, etc
%\street{}, %
%\postcode{66506}, % post or zip code
\city{Manhattan}, % city
\cny{KS, USA} % country
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Enter short notes here %%
%% %%
%% Short notes will be after addresses %%
%% on first page. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{artnotes}
%\note{Sample of title note} % note to the article
%\note[id=n1]{Equal contributor} % note, connected to author
%\end{artnotes}
%%\end{fmbox}% comment this for two column layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% The Abstract begins here %%
%% %%
%% Please refer to the Instructions for %%
%% authors on http://www.biomedcentral.com %%
%% and include the section headings %%
%% accordingly for your article type. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstractbox}
\begin{abstract} % abstract
As the sheer volume of bioinformatic sequence data increases, the only
way to take advantage of this content is to more completely automate
robust analysis workflows. Analysis bottlenecks are often mundane and
overlooked processing steps. Idiosyncrasies in reading and/or writing
bioinformatics file formats can halt or impair analysis workflows by
interfering with the transfer of data from one informatics tools to
another. Fasta-O-Matic automates handling of common but minor format
issues that otherwise may halt pipelines. The need for automation must
be balanced by the need for manual confirmation that any formatting
error is actually minor rather than indicative of a corrupt data file.
To that end Fasta-O-Matic reports any issues detected to the user with
optionally color coded and quiet or verbose logs.
Fasta-O-Matic can be used as a general pre-processing tool in
bioinformatics workflows (e.g. to automatically wrap FASTA files so that
they can be read by BioPerl). It was also developed as a sanity check
for bioinformatic core facilities that tend to repeat common analysis
steps on FASTA files received from disparate sources. Fasta-O-Matic can
be set with format requirements specific to downstream tools as a first
step in a larger analysis workflow.
Fasta-O-Matic is available free of charge to academic and non-profit
institutions at
\url{https://github.com/i5K-KINBRE-script-share/read-cleaning-format-conversion/tree/master/KSU\_bioinfo\_lab/fasta-o-matic}.
\end{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% The keywords begin here %%
%% %%
%% Put each keyword in separate \kwd{}. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{keyword}
\kwd{FASTA}
\kwd{sequence data}
\kwd{bioinformatics file format}
\end{keyword}
% MSC classifications codes, if any
%\begin{keyword}[class=AMS]
%\kwd[Primary ]{}
%\kwd{}
%\kwd[; secondary ]{}
%\end{keyword}
\end{abstractbox}
%
%\end{fmbox}% uncomment this for twcolumn layout
\end{frontmatter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% The Main Body begins here %%
%% %%
%% Please refer to the instructions for %%
%% authors on: %%
%% http://www.biomedcentral.com/info/authors%%
%% and include the section headings %%
%% accordingly for your article type. %%
%% %%
%% See the Results and Discussion section %%
%% for details on how to create sub-sections%%
%% %%
%% use \cite{...} to cite references %%
%% \cite{koon} and %%
%% \cite{oreg,khar,zvai,xjon,schn,pond} %%
%% \nocite{smith,marg,hunn,advi,koha,mouse}%%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%% start of article main body
%
%%%%%%%%%%%%%%%%
%% Background %%
%%
\section{Introduction}
Sequence data can be stored as text with each letter representing a nucleic acid (DNA and RNA) or amino acid (protein). The linear nature of these molecules makes it natural to represent them as strings, finite sequences of characters. Although it has been argued that a graph, a network of edges connected by vertices, is a more accurate way to store genomic sequences because graphs allow the inclusion of alternate alleles and alternate possible assemblies \cite{jaffe2012fastg} all of the most common methods for storing sequences (FASTA, FASTQ, SAM/BAM) use a linear strings.
Other decisions about how to represent sequence data can be more arbitrary. For example, any character that is not used as a base or an amino acid can be used to indicate the beginning of a new sequence. Additionally text can be wrapped to limit the information content in any one line of a file. The advantage of wrapping text is that some programs can then be designed to work one line at time limiting the burden of each step (e.g. the program would never have to process an entire chromosome of sequence data in a single step). The disadvantage is that code must be slightly more complex to load an entire sequence record into the working memory.
\subsection{FASTA file format specifications versus recommendations}
FASTA file format requirements are very minimal \cite{FASTAformat}. Each sequence is preceded by a header/description line that begins with a \verb|>| symbol. Sequence lines can include any standard International Union of Pure and Applied Chemistry (IUPAC) single character symbols for nucleic acids or amino acids or the ambiguous codes that indicate possible residues or bases \cite{comm1970abbreviations}. They can also include \verb|-| to indicate alignment gaps and \verb|*| to indicate stop codons.
NCBI recommends wrapping FASTA file sequences lines \cite{FASTAformat}. It is also common practice to use the first `word' in a header (i.e. any character string to the left of the first space in the header) as the unique sequence id. Although these features are common they are not required leading to format compatibility issues with tools that treat these conventions as required.
\subsection{Customizing FASTA files to ensure that information is properly interpreted by downstream tools}
Regardless of whether a FASTA file is technically improperly formatted or it's format merely violates a popular convention, it is critical to quality analysis workflows that data is converted into a format that will be correctly interpreted by downstream tools. Formatting issues can fall into multiple categories including actual format errors and formats that are not technically wrong but are non-standard, causing some tools to throw an error.
Some format errors indicate a major problem like an attempt to use the wrong data format (e.g. the first line is not a FASTA header because it does not begin with a \verb|>| character). These types of errors will be subsequently referred to as fatal. Alternately, some formatting issues occur commonly without indicating the FASTA file is corrupt (e.g. improperly wrapped/unwrapped sequence lines, missing final new line characters, unusual new line characters like \verb|\r|). These issues will be referred to as non-fatal. Fatal formatting issues should cause processing to stop. Non-fatal formatting issues should be automatically corrected according to the most common resolution for this type of error. While downstream processing continues, the analyst can double check the automated decision to reformat non-fatal issues. This way workflow would not be slowed for trivial reformatting steps and the more rare problems (e.g. when a missing last new line was caused by incomplete file transfer) could still be caught.
\subsection{Existing tools}
Existing bioinformatics tools address FASTA format inconsistencies. However many tools either halt and exit with an error (e.g. BioPerl \cite{bioperl}, \cite{bioperl2}, \cite{bioperl3}) or can produce reformatted output FASTA but cannot determine if there is a formatting issue to begin with (e.g. EMBOSS Seqret \cite{PMID:10827456}).
The BioPerl module \verb|DB::Fasta| will halt if a FASTA is inconsistently wrapped or if a line of sequence is too long (as in an unwrapped genome FASTA). This has the disadvantage of requiring human intervention to wrap and restart analysis.
Code:
\begin{verbatim}
#!/usr/bin/perl
use Bio::Seq;
use Bio::SeqIO;
use Bio::DB::Fasta; #makes a searchable db from FASTA file
my $out_file_temp = '/home/bionano/test_db/all.fa';
#Create new FASTA outfile object
my $seq_out = Bio::SeqIO->new('-file' => ">$out_file_temp",'-format' => 'fasta');
#Load FASTA file as DB
my $db = Bio::DB::Fasta->new("/home/bionano/test_db/miswrapped.fa");
my $seq_obj = $db->get_Seq_by_id('seq'); # get FASTA records using headers
#(where header = first 'word' so really header whitespace should also be
#removed for this file)
$seq_out->write_seq($seq_obj);
\end{verbatim}
Input:
\begin{verbatim}
>seq 1
ACTGTGTGCAATCGCTGNNNNCTCTCATCGGATCTTGCAATCGCTNNNCTCTCATCGGATTGCAATCGCTNNNCTtcatcCGGAT
CGCTGNNNNCTGTGTGCAATCGCTGNNNNCTCCTGATCGCTGNNNNCTGTGTGCAATCGCTGNNNNCTCCTGCAATCGCTGNNNN
CTCCTGTTCGNATCGatcctctgtttatgcttatagctagctgatcgtagnnntcaacgt
CTAGAGCGCAGCTCTGGGGGATTACTACTCACTACATCATTAGATCAGATacgactcann
>seq 2
cttatagctagctgatAATCGCTGNNTCATCGGATCTTGCCTTGCAATCGtcatcCGtcC
CGCTGNNNNCTGTGTGCAnnnnnnnnnnncgtaaaacgcctcctccgactcgTCTCTAGG
CTAGAGCGCAGCTCTGGGGGATTACTACTCACTACATCATTAGATCAGATacgactcann
nnnctacgCTATCAGGTCTCGAG
>seq 3
ATCAGCGCTCTATATGGCTCTGATTATAGTTTGCATTCATATGCTGATCTTctcagnntc
cttgacgctcgctATCTGTAGATCTGTACTtcagacagctcTCAGCAGNNNCTCAGCAGC
CTACGACAGTcatgcagactagcagt
\end{verbatim}
Output:
\begin{verbatim}
------------- EXCEPTION -------------
MSG: Each line of the fasta entry must be the same length except the last.
Line above #5 'CTAGAGCGCAGCTCTGGGGG..' is 61 != 86 chars...
\end{verbatim}
EMBOSS seqret was designed as a very flexible tool to convert from one properly formatted file to another properly but distinctly formatted file. It also was designed to accept poorly formatted data (e.g. a FASTA missing the final new line that is improperly wrapped) and export a reformatted file (e.g. wrapped after 60 bases with a final newline).
Code:
\begin{verbatim}
seqret -stdout -sequence test.fa -outseq test_reformat.fa
\end{verbatim}
Input:
\begin{verbatim}
>my header
AAAAAAAAAAAATTTTTTCCCCGGCGCGCGCGCTATAGCGCTATANNNNNNNNNNNNNNN
ATATATATATAT
ATTATTATATATATATTCTCTCTGGGCTCGCGTCTCGCTATTTATATATATATATATATTGCGCTCTCGTCTCCT\end{verbatim}
Output:
\begin{verbatim}
>my header
AAAAAAAAAAAATTTTTTCCCCGGCGCGCGCGCTATAGCGCTATANNNNNNNNNNNNNNN
ATATATATATATATTATTATATATATATTCTCTCTGGGCTCGCGTCTCGCTATTTATATA
TATATATATATTGCGCTCTCGTCTCCT
\end{verbatim}
However, seqret does not log the detected errors in the format. Another feature of Seqret is that an output file is created even if the output is identical to the input. Storing two identical files is an inefficient use of disk space. Seqtk \cite{Li2013} is another example of a tool that can automate FASTA reformatting but does not first check original format or report format issues.
Another case to note is when an improperly formatted FASTA file is actually distributed as a component of a bioinformatics tool. Trimmomatic adapter sequences \cite{bolger2014trimmomatic}, for example, are distributed versions of the proprietary Illumina sequencing adapters but the FASTA files are missing final new lines. This can cause issues downstream if a workflow includes common analysis techniques like FASTA file concatenation.
The process of restarting analysis manually after wrapping a FASTA file may only take minutes. The time consuming aspect of this interruption is the time it takes the analyst to become available and the number of jobs this step must be repeated for. Likewise, storage of one extra FASTA file is trivial unless the FASTA file in question stores a whole genome in which case the burden can add up for a bioinformatics core. Efficiency and automation are crucial as bioinformatic analysis projects become more numerous and time consuming. Many tools can either detect a format issue or repair a format issue. No existing tool was found that both validates FASTA format and reformats automatically only where required for a user defined list of non-fatal FASTA format issues.
\section{Implementation}
Fasta-O-Matic was designed to fit seamlessly into an analysis workflow. It detects which format issues are actually present in the FASTA file and then only produces a reformatted file if the current file violates the user defined format requirements.
\subsection{Portability}
Where possible Fasta-O-Matic was designed to be easy to distribute and use. Fasta-O-Matic is distributed on GitHub under the MIT license to allow for easy access to or customization of the code. The tool was also built and tested on both Python2.7 and and Python3.3 to minimize incompatibility with existing linux environments. The script generates complete help menus when called from the command line with the \verb|--help| command and from within python with \verb|help(fasta_o_matic)|. Additionally, Fasta-O-Matic includes a sample FASTA file with missing newlines, inconsistent wrapping and spaces in headers along with a tutorial which describes how to reformat the sample. These features ensure that Fasta-O-Matic is easy to incorporate into existing workflows.
\subsection{Automate where appropriate}
The script was designed to efficiently execute the most likely solution given the presence or absence of format issues. Fasta-O-Matic returns a filename for the output FASTA file that conforms to the user defined format. If the original file already conforms, then Fasta-O-Matic returns the original filename rather than outputting a redundant FASTA file under a new name.
Fasta-O-Matic will exit and report an error if the FASTA file cannot be read, the default or defined output directory cannot be written to, the input FASTA file does not begin with a \verb|>| or if any sequence line includes a non-IUPAC character. The last two errors are considered to be fatal FASTA format errors.
Inconsistent or unwrapped sequence lines, spaces in headers and missing or non-standard new lines are considered non-fatal errors. Testing for these issues is optional. If they are detected, the decision is made to reformat as requested, report the issue to the analyst and continue the workflow.
Testing the uniqueness of the header/description line can return a non-fatal warning and a reformatted file or a fatal error. Testing for uniqueness is optional. If the first word in each header/description line is unique then it follows that all description lines are unique. If the first words are not unique then it is possible that is because the header ids include whitespace \verb|>seq 1| or \verb|> seq 1|. In this case a resolution is to replace the whitespace with a character. Fasta-O-Matic replaces the whitespace with \verb|_| and retests for the uniqueness of the first words in the headers. If this version passes than the user is warned that whitespace effected header uniqueness and was removed from headers. If removing whitespace also fails to resolve the issue the lack of uniqueness is considered a fatal error. The fatal error is reported and the program halts.
The script also automatically adjusts to run the minimal number of steps sufficient to fix and report format issues. If it is included in the set of quality control (QC) steps then wrapping is the first format issue tested because while repairing FASTA wrapping both headers and new lines can be corrected. New lines are given priority after wrapping because while repairing new lines it is also trivial to repair headers. Next, uniqueness of the header lines is tested. Finally, headers are evaluated for white space. If an early test returns a format issue and launches a reformatting that automatically repairs any remaining format issues then Fasta-O-Matic still tests for any additional format errors in the original file.
All format issues are reported in the programs logs in case they indicate an unexpected issue with the data. Logs can be optionally color coded so that red indicates errors, yellow indicates warnings (e.g. a non-fatal issue was found and automatically reformatted) and green indicates status information. This method of logging is designed to draw the attention of the bioinformatics analyst to relevant warnings or errors even if they have grown accustomed to seeing Fasta-O-Matic output frequently.
\subsection{Workflow integration}
Sequence FASTA files are often passed as arguments to commandline tools. For example FASTA files can be passed as an argument to bowtie2-build to be indexed as an alignment reference \cite{langmead2012fast} or passed to trimmomatic as adapters to detect sequencing artifacts. The output filename used by Fast-O-Matic varies to reflect the reformatting performed. For seamless integration into automated workflows Fasta-O-Matic returns the full path of the new properly formatted FASTA file or the original file (if it is already formatted properly). This can be captured as a variable and used as an argument in subsequent commands. The Bash commands below show and example of capturing the FASTA file name as a variable.
Code (backslashes are used to indicate a new line that is for display in the article rather than the new lines being included in the actual code):
\begin{verbatim}
filename="$(python fasta_o_matic.py -f NC_010473_mock_scaffolds.fna \
-o ~/out_fasta_o_matic -c)"
echo $filename
\end{verbatim}
\section{Results}
\subsection{Data}
FASTA format tools were tested on the Vicugna\_pacos-2.0.1 whole genome shotgun sequence scaffolds because the 2.17 Gb \textit{Vicugna pacos} genome is large ($>$ 1 Gb) and has many scaffolds (276727) \cite{Lindblad_Toh_2011}. The large genome size and high number of individual sequences should approximate a typical large FASTA file. The FASTA file was downloaded from the National Center for Biotechnology Information (NCBI) FTP as NW\_005882702.1 \textit{Vicugna pacos} isolate Carlotta (AHFN-0088) Vicugna\_pacos-2.0.1 assembly scaffolds.
An additional unwrapped sequence was added to the end of the file. This sequence was also missing a newline. Each FASTA record in the file also had spaces within the text of the headers.
The additional simulated FASTA record is available on \href{https://github.com/kstatebioinfo/Fasta-O-Matic-a-tool-to-sanity-check-and-if-needed-reformat-FASTA-files/blob/master/simulated_unwrapped.fa}{Github}.
\subsection{Reformatting tests}
No tool was found with all of Fasta-O-Matic's functions. Therefore sequence line wrapping was compared between Fasta-O-Matic and two other common reformatting tools, seqtk and seqret. Fasta-O-Matic was run with the \verb|--qc_steps| flag set to either \verb|wrap new_line header_whitespace unique | (all), \verb|wrap| (W) \verb|new_line| (NL), \verb|unique| (U) or \verb|header_whitespace| (HW). Seqtk was run with the arguments \verb|seq -l 60|. Seqret was run using only the \verb|-sequence| and \verb|-outseq| arguments. Code used in tests or to produce figures can be found on \href{https://github.com/kstatebioinfo/Fasta-O-Matic-a-tool-to-sanity-check-and-if-needed-reformat-FASTA-files/tree/master/figures}{github}. Run time and max memory was reported for each tool. Tests were run on a Xeon Phi server with 48x12-core Intel Xeon CPUs, 256GB of RAM, Linux CentOS 7 and Python2.7.
\subsection{Comparison between results}
All tools could reformat the improperly wrapped FASTA file. Fasta-O-Matic had the lowest maximum memory requirements (Figure 1, Table 1). This may be useful if working on a large genome on a local machine or cluster headnode where memory usage is restricted. Fasta-O-Matic took several minutes rather than seconds (seqtk and seqret took $<$ 13 s) (Figure 2, Table 1).
Fully re-formatted simulated FASTA record (backslashes are used to indicate a new line that is for display in the article rather than the new lines being included in the actual FASTA record):
\begin{verbatim}
>NW_000000000.0_Vicugna_pacos_isolate_Carlotta_(AHFN-0088)_FAKE_genomic_scaffold,_Vicugna_pacos-2.1_Scaffold-,_\
whole_genome_shotgun_sequence
ATACAACCATAAAGGTGCTATTCAGTCCATGGTTACAGGACATAACTACAACACACACCC
ACGTACACATGCGCATGCGCATGCACACACCCACGTACACGTACACGTACGCATACACAC
CCACGTACACGTACACGTACGCATACACACCCACGTACACGTACACGTACGCATACACAC
CCACGTACACGTACACGTACGCATACACACCCACGTACACGTACACGTACGCATACACAC
CCACGTACGCACACACGTACACGTGTAGGCACGCATTTAGCAAGTATTTAGCTTGCTTAA
ACAAACCCCCCCTACCCCCCACGAGCCCCACCTTATATACCAGACAGTCTTGCCAAACCC
CAAAAACAAGACATAGCGCATAAGCTATAGAACCCGGACAAACCTTTGCCCACAAACCCA
ACTTCTTAAATAATCACATGGCCAAATCGTACCAATGTGTTACTCTAGTATATTAAAAAT
ATACAGACAGCTATCTCCCTAGATCCGCCAAAATTTTTAAAACAGAATTCAACAACCTTT
TTAATGGCACCCCCCCCCCCCATAAATGACC
\end{verbatim}
\section{Conclusions}
Overall, both memory and run time requirements were small for all three programs. However, the extra minutes taken by Fasta-O-Matic to test for fatal and non-fatal format issues may prevent hours lost waiting for an analyst to manually restart analysis or worse discover that a file was corrupt only after analysis is complete. Fasta-O-Matic was also the only tool identified that skips reformatting if none is required balancing the need to prepare data to be properly interpreted by bioinformatics tools with the practical need to conserve disk space. Fasta-O-Matic is a portable and easy to use tool to facilitate bioinformatics analysis by automating FASTA file inspection in busy bioinformatics cores.
\section{Availability and requirements}
\textbf{Project name:} Fasta-O-Matic tool
\textbf{Project home page:} The Fasta-O-Matic script and tutorial are available at \url{https://github.com/i5K-KINBRE-script-share/read-cleaning-format-conversion/tree/master/KSU\_bioinfo\_lab/fasta-o-matic}.
\textbf{Operating system(s):} Linux (tested on CentOS 7, Gentoo and Ubuntu).
\textbf{Programming language:} Python2.7+, Python3.3+
\textbf{License}: Tool and tutorial are available free of charge to academic and non-profit institutions.
\textbf{Any restrictions to use by non-academics:} Please contact authors for commercial use.
\textbf{Dependencies:} Fasta-O-Matic requires the python modules Colorer and general which are distributed in the same git repository.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Backmatter begins here %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{backmatter}
\section*{Abbreviations}
IUPAC - International Union of Pure and Applied Chemistry
QC - quality control
NCBI - National Center for Biotechnology Information
W - wrap
NL - new\_line
HW - header\_whitespace
U - unique
\section*{Competing interests}
The authors declare that they have no competing interests.
\section*{Author's contributions}
JMS wrote most of the code for Fasta-O-Matic. JMS and SJB did the writing. Both authors read and approved the final manuscript.
\section*{Acknowledgements}
Thanks to Sheldon McKay https://github.com/mckays630 for contributing to the editing of the Fast-O-Matic program.
This project was supported by an Institutional Development Award (IDeA) from the National Institute of General Medical Sciences of the National Institutes of Health under grant number P20 GM103418. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute of General Medical Sciences or the National Institutes of Health.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The Bibliography %%
%% %%
%% Bmc_mathpys.bst will be used to %%
%% create a .BBL file for submission. %%
%% After submission of the .TEX file, %%
%% you will be prompted to submit your .BBL file. %%
%% %%
%% %%
%% Note that the displayed Bibliography will not %%
%% necessarily be rendered by Latex exactly as specified %%
%% in the online Instructions for Authors. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% if your bibliography is in bibtex format, use those commands:
\bibliographystyle{bmc-mathphys} % Style BST file (bmc-mathphys, vancouver, spbasic).
\bibliography{bmc_article} % Bibliography file (usually '*.bib' )
% for author-year bibliography (bmc-mathphys or spbasic)
% a) write to bib file (bmc-mathphys only)
% @settings{label, options="nameyear"}
% b) uncomment next line
%\nocite{label}
% or include bibliography directly:
% \begin{thebibliography}
% \bibitem{b1}
% \end{thebibliography}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Figures %%
%% %%
%% NB: this is for captions and %%
%% Titles. All graphics must be %%
%% submitted separately and NOT %%
%% included in the Tex document %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Do not use \listoffigures as most will included as separate files
\section*{Figures}
\begin{figure}[h!]
\caption{\csentence{Max memory used by various FASTA tools.}
Tools were run on the \textit{Vicugna pacos} isolate Carlotta (AHFN-0088) Vicugna\_pacos-2.0.1 whole genome shotgun sequence NW\_005882702.1 with additional unwrapped FASTA sequence record.}
\end{figure}
\begin{figure}[h!]
\caption{\csentence{Run time for various FASTA tools.}
Tools were run on the \textit{Vicugna pacos} isolate Carlotta (AHFN-0088) Vicugna\_pacos-2.0.1 whole genome shotgun sequence NW\_005882702.1 with additional unwrapped FASTA sequence record.}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Tables %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Use of \listoftables is discouraged.
%%
\section*{Tables}
\begin{table}[h!]
\caption{Runtime and max memory used by various FASTA tools. Tools were run on the Vicugna pacos isolate Carlotta (AHFN-0088) Vicugna_pacos-2.0.1 whole genome shotgun sequence NW_005882702.1.}
\begin{tabular}{ cccc }
Program & Max mem (kbytes) & Run time (s) \\ \hline
Fasta-O-Matic (HW) & 7084 & 112.02 \\
Fasta-O-Matic (NL) & 7084 & 93.21 \\
Fasta-O-Matic (W) & 10996 & 141.41 \\
Fasta-O-Matic (U) & 30800 & 105.65 \\
seqtk & 38352 & 3.17 \\
Fasta-O-Matic (all) & 69452 & 162.86 \\
seqret & 137840 & 12.50 \\
\end{tabular}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Additional Files %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section*{Additional Files}
% \subsection*{Additional file 1 --- Sample additional file title}
% Additional file descriptions text (including details of how to
% view the file, if it is in a non-standard format or the file extension). This might
% refer to a multi-page table or a figure.
% \subsection*{Additional file 2 --- Sample additional file title}
% Additional file descriptions text.
\end{backmatter}
\end{document}
diff --git a/bmc_template/bmc_article_2col.pdf b/bmc_template/bmc_article_2col.pdf
new file mode 100644
index 0000000..e1a8f67
Binary files /dev/null and b/bmc_template/bmc_article_2col.pdf differ
diff --git a/bmc_template/bmcart-biblio.sty b/bmc_template/bmcart-biblio.sty
new file mode 100644
index 0000000..babc94d
--- /dev/null
+++ b/bmc_template/bmcart-biblio.sty
...
%%
%% LaTeX 2e packagee for the processing of LaTeX2e files
%% for the BioMed Central
%% Additional commands for the processing of structured reference list
%%
%% Macros written by Vytas Statulevicius, VTeX, Lithuania
%% for the BioMed Central
%% Please submit bugs or your comments to [email protected]
%%
%% The original distribution is located at:
%% http://support.e-publications.org/bmc
%%
%% This class file loads standart "article.cls" with appropriate
%% settings and then redefines layout according to BMC style
%% A lot of efforts are done for the possibility of extraction of
%% information from the LaTeX file
%%
%% You are free to use this style class as you see fit, provided
%% that you do not make changes to the file.
%% If you DO make changes, you are required to rename this file.
%%
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% \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 \~}
%%
%%
%% Bug fixes and changes:
%% at end of file
\def\bmc@common@bibl@date{2012/03/06}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bmcart-biblio}[\bmc@common@bibl@date
additional macros for the bibliography tagging A++ XML DTD (VS)]
% Default bibliography style:
\def\bibliography@style{10}
\def\bibliography@style@name{BMC Reference Style}
\def\bibliography@key{bmc}
% vykdoma tik pirma opcija (t.y. tai leidzia "permusti" opcija per
% \documentclass[foo,..]
\def\only@first#1{\@ifundefined{o@f@}{\def\o@f@{}#1}{}}
\DeclareOption{undef} {\only@first{\def\bibliography@style{0}\def\bibliography@key{undef}
\def\bibliography@style@name{undefined}}}
\DeclareOption{basic} {\only@first{\def\bibliography@style{1}\def\bibliography@key{basic}
\def\bibliography@style@name{Basic Springer}}}
\DeclareOption{chemistry}{\only@first{\def\bibliography@style{2}\def\bibliography@key{chemistry}
\def\bibliography@style@name{Chemistry}}}
\DeclareOption{mathphys} {\only@first{\def\bibliography@style{3}\def\bibliography@key{mathphys}
\def\bibliography@style@name{Math and Physical Sciences}}}
\DeclareOption{aps} {\only@first{\def\bibliography@style{4}\def\bibliography@key{aps}
\def\bibliography@style@name{American Physical Society}}}
\DeclareOption{cs} {\only@first{\def\bibliography@style{5}\def\bibliography@key{cs}
\def\bibliography@style@name{Computer Science}}}
\DeclareOption{vancouver}{\only@first{\def\bibliography@style{6}\def\bibliography@key{vancouver}
\def\bibliography@style@name{Vancouver}}}
\DeclareOption{apa} {\only@first{\def\bibliography@style{7}\def\bibliography@key{apa}
\def\bibliography@style@name{APA}}}
\DeclareOption{chicago} {\only@first{\def\bibliography@style{8}\def\bibliography@key{chicago}
\def\bibliography@style@name{Chicago}}}
\DeclareOption{ams} {\only@first{\def\bibliography@style{9}\def\bibliography@key{ams}
\def\bibliography@style@name{AMS}}}
\DeclareOption{bmc} {\only@first{\def\bibliography@style{10}\def\bibliography@key{bmc}
\def\bibliography@style@name{BMC Reference Style}}}
\ProcessOptions*
%%% Common macros:
\def\xml@attr{\@ifnextchar[{\get@attr}{\get@attr[]}}
\def\get@attr[#1]#2{#2}
\let\betal@style\relax
\def\common@pub@types{%
\let\binstitute\@firstofone%
\def\betal{{\betal@style et al.}}%
\let\byear\@firstofone%
\let\bfpage\@firstofone%
\let\blpage\@firstofone%
\let\binterref\xml@attr%
\def\burl##1{{\csname burl@style\endcsname\surl{##1}}}
\let\bcomment\@firstofone%
\let\oauthor\@firstofone%
\csname common@pub@types@hook\endcsname%
}
% Setting a "style" for a command:
% \set@bibl@cmd{bvolume} == \def\bvolume#1{{\bvolume@style #1}}
\def\set@bibl@cmd#1{\expandafter\def\csname #1\endcsname##1{{\csname #1@style\endcsname##1}}}
\AtBeginDocument{\let\doiurlchapter\doiurl}
%%% BibEditorName
\def\xml@beditor#1{%
\let\bprefix\@firstofone%
\let\binits\@firstofone%
\let\bsnm\@firstofone%
\let\bparticle\@firstofone%
\let\bsuffix\@firstofone%
\let\bdegs\@firstofone%
#1}
%%% BibAuthorName
\def\xml@bauthor#1{%
\let\bprefix\@firstofone%
\let\binits\@firstofone%
% \let\bsnm\@firstofone%
\def\bsnm##1{{\csname bsnm@style\endcsname##1}}%
\let\bparticle\@firstofone%
\let\bsuffix\@firstofone%
\let\bdegs\@firstofone%
#1}
%%% bsertitle
\def\xml@bsertitle{\@ifnextchar[{\@xml@bsertitle}{\@xml@bsertitle[]}}
\def\@xml@bsertitle[#1]#2{{\csname bsertitle@style\endcsname #2}}%
\def\xml@batitle{\@ifnextchar[{\@xml@batitle}{\@xml@batitle[]}}
\def\@xml@batitle[#1]#2{{\csname batitle@style\endcsname #2}}%
\def\xml@bctitle{\@ifnextchar[{\@xml@bctitle}{\@xml@bctitle[]}}
\def\@xml@bctitle[#1]#2{{\csname bctitle@style\endcsname #2}}%
\def\xml@bbtitle{\@ifnextchar[{\@xml@bbtitle}{\@xml@bbtitle[]}}
\def\@xml@bbtitle[#1]#2{{\csname bbtitle@style\endcsname #2}}%
%%% BibArticle
% \begin{barticle}
% ...
% \end{barticle}
\def\barticle{%
\common@pub@types%
\let\bauthor\xml@bauthor%
\let\batitle\xml@attr%
\set@bibl@cmd{bjtitle}%
\set@bibl@cmd{bvolume}%
\set@bibl@cmd{bissue}%
\let\bnumber\@firstofone%
}
\def\endbarticle{}
%%% BibIssue
% \begin{bissue}
% ...
% \end{bissue}
\def\bissue{%
\common@pub@types%
\let\bauthor\xml@bauthor%
\set@bibl@cmd{bjtitle}%
\set@bibl@cmd{bvolume}%
\set@bibl@cmd{bissue}%
\set@bibl@cmd{bmonth}%
}
\def\endbissue{}
%%% BibChapter
% \begin{bchapter}
% ...
% \end{bchapter}
\def\bchapter{%
\common@pub@types%
\let\bauthor\xml@bauthor%
\let\bctitle\xml@attr%
\let\beditor\xml@beditor%
\let\binstitutionaled\@firstofone%
\def\beds{eds.}%
\let\bbtitle\xml@bbtitle
\let\bedition\xml@attr%
\set@bibl@cmd{bconfname}%
\set@bibl@cmd{bconflocation}%
\set@bibl@cmd{bconfdate}%
\let\bsertitle\xml@bsertitle%
\set@bibl@cmd{bseriesno}%
\let\bpublisher\@firstofone%
\let\blocation\@firstofone%
\let\bisbn\@firstofone%
}
\def\endbchapter{}
%%% BibUnstructured
% \begin{botherref}
% ...
% \end{botherref}
\def\botherref{\let\binterref\xml@attr\let\oauthor\xml@bauthor\let\bauthor\xml@bauthor}
\def\endbotherref{}
%%% BibBook
% \begin{bbook}
% ...
% \end{bbook}
\def\bbook{%
\common@pub@types%
\let\bauthor\xml@bauthor%
\let\beditor\xml@beditor%
\let\binstitutionaled\@firstofone%
\def\beds{eds.}%
\let\bbtitle\xml@bbtitle
\let\bedition\xml@attr%
\let\bconfname\@firstofone%
\let\bconflocation\@firstofone%
\let\bconfdate\@firstofone%
\let\bsertitle\xml@bsertitle%
\set@bibl@cmd{bseriesno}%
\let\bpublisher\@firstofone%
\let\blocation\@firstofone%
\let\bisbn\@firstofone%
}%
\def\endbbook{}
%%%
\let\endbibitem\relax
%%%%%% vancouver puslapi nr. formavimas
%% 17-19 -> 17-9
%% 17-21 -> 17-21
%% 1234-1345 -> 345
\def\vcr@bfpage#1{%
#1\nobreak%
\test@if@number{#1}%
\let\blpage\@firstofone%
\if@page@isnumber\ifnum#1>9\def\@vcr@bfpage{#1}\let\blpage\fmt@blpage\fi\fi}
\def\fmt@blpage#1{%
\test@if@number{#1}%
\if@page@isnumber%
\ifnum\@vcr@bfpage<#1%
\vcr@blpage{#1}%
\else%
#1\@latex@error{sprbibl: [\cur@bibitem] \string\bfpage\space > \string\blpage!}{??}%
\fi%
\else%
#1%
\fi}
% algoritmas
% a) bfpage ir blpage daliname is 10
% b) if bfpage=blpage goto d
% c) if bfpage<10 end else goto a
% d) x:= blpage - int(blpage/10^i)*10^1
\def\vcr@blpage#1{%
\@tempcnta=\@vcr@bfpage%
\@tempcntb=#1%
\@tempcntc=1%
\def\control@cnt{1}%
\@whilenum\control@cnt>0\do{%
\divide\@tempcnta by10%
\divide\@tempcntb by10%
\multiply\@tempcntc by10%
\ifnum\@tempcnta=\@tempcntb\def\control@cnt{0}\@tempswatrue%
\else%
\ifnum\@tempcnta<10\relax\def\control@cnt{0}\@tempswafalse\fi%
\fi}%
\if@tempswa%
\@tempcnta=#1%
\@tempcntb=#1%
\divide\@tempcntb by\@tempcntc%
\multiply\@tempcntb by\@tempcntc%
\advance\@tempcnta by-\@tempcntb%
\the\@tempcnta%
\else%
#1%
\fi}%
\newif\if@page@isnumber
\def\test@if@number#1{%
\@page@isnumberfalse%
\setbox\@tempboxa=\hbox{\@tempcnta=0#1\relax\ignorespaces}%
\ifdim\wd\@tempboxa>\z@\else\@page@isnumbertrue\fi}
%%%%%% Set bibliography styles:
\ifcase\bibliography@style\relax
\message{^^J Reference style: \bibliography@style@name^^J}%
\or % basic
\message{^^J Reference style: \bibliography@style@name^^J}%
\def\common@pub@types@hook{\def\betal{{\betal@style et al}}}%
\or % chemistry
\message{^^J Reference style: \bibliography@style@name^^J}%
\or % mathphys
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bvolume}{style}{\bfseries}
\or % aps
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bvolume}{style}{\bfseries}
\setattribute{bbtitle}{style}{\itshape}
\or % cs
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bvolume}{style}{\bfseries}
\or % vancouver
\message{^^J Reference style: \bibliography@style@name^^J}%
\def\common@pub@types@hook{\let\bfpage\vcr@bfpage}
\or % apa
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bjtitle}{style}{\itshape}
\setattribute{bvolume}{style}{\itshape}
\setattribute{bbtitle}{style}{\itshape}
\setattribute{bsertitle}{style}{\itshape}
\setattribute{bseriesno}{style}{\itshape}
\or % chicago
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bbtitle} {style}{\itshape}
\setattribute{bjtitle} {style}{\itshape}
\setattribute{bsertitle}{style}{\itshape}
\or % ams
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{batitle}{style}{\itshape}%
\setattribute{bctitle}{style}{\itshape}%
\g@addto@macro\barticle{\let\batitle\xml@batitle}%
\setattribute{bvolume}{style}{\bfseries}%
\setattribute{bseriesno}{style}{\bfseries}%
\g@addto@macro\bbook{\setattribute{bbtitle}{style}{\itshape}}%
\g@addto@macro\bchapter{\let\bctitle\xml@bctitle%
\setattribute{bbtitle}{style}{\upshape}%
}%
\or % bmc
\message{^^J Reference style: \bibliography@style@name^^J}%
\setattribute{bvolume}{style}{\bfseries}%
\setattribute{batitle}{style}{\bfseries\mathversion{bold}}%
\g@addto@macro\barticle{\let\batitle\xml@batitle}%
\setattribute{bjtitle}{style}{\itshape}%
\setattribute{bbtitle}{style}{\itshape}%
\setattribute{bsertitle}{style}{\itshape}
\setattribute{bctitle}{style}{\bfseries\mathversion{bold}}%
\g@addto@macro\bchapter{\let\bctitle\xml@bctitle}%
\fi
\endinput
diff --git a/bmc_template/bmcart.cls b/bmc_template/bmcart.cls
new file mode 100644
index 0000000..0b1fa09
--- /dev/null
+++ b/bmc_template/bmcart.cls
...
%%
%% LaTeX 2e class file for the processing of LaTeX2e files
%% for the BioMed Central
%%
%% Macros written by Vytas Statulevicius, VTeX, Lithuania
%% for the BioMed Central
%% Please submit bugs or your comments to [email protected]
%%
%% The original distribution is located at:
%% http://www.biomedcentral.com/authors/tex
%%
%% This class file loads standart "article.cls" with appropriate
%% settings and then redefines layout according to BMC style
%% A lot of efforts are done for the possibility of extraction of
%% information from the LaTeX file
%%
%% You are free to use this style class as you see fit, provided
%% that you do not make changes to the file.
%% If you DO make changes, you are required to rename this file.
%%
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% \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 \~}
%%
%%
%% Bug fixes and changes:
%% at end of file
\def\bmcart@name{bmcart.cls}
\def\bmcart@version{2014/01/24}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{bmcart}
[\bmcart@version BioMed Central class (VS)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% General options:
% Print id line at bottom of the page:
\DeclareOption{noinfoline}{\AtBeginDocument{\let\info@line\@empty}}
\DeclareOption{infoline} {\AtBeginDocument{\let\info@line\infoline@text}}
% Put lines numbers in margins
\newif\ifnumberlines@ \numberlines@false
\DeclareOption{linenumbers}{\numberlines@true}
\DeclareOption{nolinenumbers}{\numberlines@false}
% Spacing
\DeclareOption{doublespacing}{\AtBeginDocument{\renewcommand{\baselinestretch}{1.4}\large\normalsize}}
\DeclareOption{singlespacing}{\AtBeginDocument{\renewcommand{\baselinestretch}{1.0}\large\normalsize}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Loading standart "article" class
\PassOptionsToClass{twoside}{article}
\PassOptionsToPackage{fleqn}{amsmath}
\PassOptionsToPackage{sort&compress,numbers}{natbib}
\PassOptionsToPackage{colorlinks,citecolor=blue,urlcolor=blue,linkcolor=blue,pagecolor=blue}{hyperref}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions*
\LoadClass{article}
%%% start of "vsfleqn2.sty"
\newdimen\mathindent
\AtEndOfClass{\mathindent\leftmargini}
%
\def\mathtrivlist{\parsep\parskip\topsep\abovedisplayskip
\ifnum\@listdepth>0 \advance\mathindent by-\leftmargin\fi%
\@trivlist \labelwidth\z@ \leftmargin\z@
\itemindent\z@ \def\makelabel##1{##1}}
\def\endmathtrivlist{\endtrivlist}
% \[ \]
\renewcommand\[{\relax
\ifmmode\@badmath
\else
\begin{mathtrivlist}%
\@beginparpenalty\predisplaypenalty
\@endparpenalty\postdisplaypenalty
\item[]\leavevmode
\hb@xt@\linewidth\bgroup $\m@th\displaystyle %$
\hskip\mathindent\bgroup
\fi}
\renewcommand\]{\relax
\ifmmode
\egroup $\hfil% $
\egroup
\end{mathtrivlist}%
\else \@badmath
\fi}
% EQUATION
\renewenvironment{equation}%
{\@beginparpenalty\predisplaypenalty
\@endparpenalty\postdisplaypenalty
\refstepcounter{equation}%
\mathtrivlist \item[]\leavevmode
\hb@xt@\linewidth\bgroup $\m@th% $
\displaystyle
\hskip\mathindent}%
{$\hfil % $
\displaywidth\linewidth\hbox{\@eqnnum}%
\egroup
\endmathtrivlist}
% EQNARRAY
\renewenvironment{eqnarray}{%
\stepcounter{equation}%
\def\@currentlabel{\p@equation\theequation}%
\global\@eqnswtrue\m@th
\global\@eqcnt\z@
\tabskip\mathindent
\let\\=\@eqncr
% \setlength\abovedisplayskip{\topsep}%
% \ifvmode
% \addtolength\abovedisplayskip{\partopsep}%
% \fi
% \addtolength\abovedisplayskip{\parskip}%
% \setlength\belowdisplayskip{\abovedisplayskip}%
\setlength\belowdisplayshortskip{\abovedisplayskip}%
\setlength\abovedisplayshortskip{\abovedisplayskip}%
$$\everycr{}\halign to\linewidth% $$
\bgroup
\hskip\@centering
$\displaystyle\tabskip\z@skip{##}$\@eqnsel&%
\global\@eqcnt\@ne \hskip \tw@\arraycolsep \hfil${##}$\hfil&%
\global\@eqcnt\tw@ \hskip \tw@\arraycolsep
$\displaystyle{##}$\hfil \tabskip\@centering&%
\global\@eqcnt\thr@@
\hb@xt@\z@\bgroup\hss##\egroup\tabskip\z@skip\cr}%
{\@@eqncr
\egroup
\global\advance\c@equation\m@ne$$% $$
\@ignoretrue
}
%%% end of "vsfleqn2.sty"
\RequirePackage{keyval}
\RequirePackage{xcolor}
\definecolor{bmcblue}{rgb}{0,0.2,0.4}
\RequirePackage{lastpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Modifications and "add-on" for article.cls starts:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Initiate some info:
%\def\journal@name{Submitted to BioMed Central}
\let\journal@name\@empty
\def\journal@url{http://www.biomedcentral.com/}
\def\journal@id{-bmc}
\def\paper@url{}
\def\info@line{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Page dimensions
%% dimensions: text
\setlength\parindent {8\p@}
\def\true@parindent {8\p@}
\if@twocolumn
\setlength\textheight {651\p@}% 648bp
\setlength\textwidth {484\p@}% 170mm
\else
\setlength\textheight {653\p@}% 650.9bp
\setlength\textwidth {361\p@}% 127mm
\fi
\setlength\columnsep {5mm}
\@settopoint\columnsep
\@tempdima=\textwidth
\advance\@tempdima by-\columnsep
\divide\@tempdima by2
\setlength\columnwidth {\@tempdima}
\@settopoint\columnwidth
\setlength\columnseprule{0\p@}
\mathindent20\p@
%% dimensions: heads
\setlength\headheight{12\p@}
\setlength\headsep {44\p@}
\setlength\topskip {14\p@}
\setlength\footskip {2\p@}
\setlength\maxdepth {.5\topskip}
%% dimensions: side margins
\setlength\topmargin {27\p@} % 12mm
\if@twocolumn
\setlength\oddsidemargin {57\p@}% 20mm gutter margin
\setlength\evensidemargin {57\p@}% 20mm outer margin
\else
\setlength\oddsidemargin {118\p@}% 41.5mm gutter margin
\setlength\evensidemargin {118\p@}% 41.5mm outer margin
\fi
\advance\oddsidemargin by-1in
\advance\evensidemargin by-1in
\advance\topmargin by-1in
\def\set@fp@margins{%
\setlength\oddsidemargin {179\p@}% 63mm first page gutter margin
\setlength\evensidemargin {57\p@}% 20mm outer first page margin
\advance\oddsidemargin by-1in
\advance\evensidemargin by-1in
}
\if@twocolumn\else
\let\set@fp@margin@hook\set@fp@margins
\fi
%% dimensions: skips
\if@twocolumn
\setlength\smallskipamount{6\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\medskipamount {12\p@ \@plus 3\p@ \@minus 3\p@}
\setlength\bigskipamount {18\p@ \@plus 6\p@ \@minus 3\p@}
\else
\setlength\smallskipamount{7\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\medskipamount {14\p@ \@plus 3\p@ \@minus 3\p@}
\setlength\bigskipamount {22\p@ \@plus 6\p@ \@minus 3\p@}
\fi
%% dimensions: page-breaking penalties
\clubpenalty=10000
\widowpenalty=10000
\if@twocolumn
\displaywidowpenalty=50
\fi
\predisplaypenalty=10000 % Breaking before a math display.
\pretolerance=100 % Badness tolerance for the first pass (before hyphenation)
\tolerance=800 % Badness tolerance after hyphenation
\hbadness=800 % Badness above which bad hboxes will be shown
\emergencystretch=3\p@
\hfuzz=1\p@ % do not be to critical about boxes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fontsizes
\if@twocolumn
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt{12\p@ \@plus.25\p@ \@minus.4\p@}%
\abovedisplayskip 12\p@ \@plus2\p@ \@minus2\p@
\abovedisplayshortskip 7\p@ \@plus2\p@
\belowdisplayshortskip 7\p@ \@plus2\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\else
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt{14.2\p@ \@plus.3\p@ \@minus.5\p@}%
\abovedisplayskip 14.15\p@ \@plus2\p@ \@minus2\p@
\abovedisplayshortskip 7\p@ \@plus2\p@
\belowdisplayshortskip 7\p@ \@plus2\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\fi
\renewcommand\small{%
\@setfontsize\small\@ixpt{11\p@ plus .2\p@ minus .2\p@}%
\abovedisplayskip 7.5\p@ \@plus4\p@ \@minus1\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \abovedisplayskip
\belowdisplayshortskip \abovedisplayskip}
\renewcommand\footnotesize{%
\@setfontsize\footnotesize\@viiipt{9\p@ plus .1pt minus .1pt}%%
\abovedisplayskip 6\p@ \@plus4\p@ \@minus1\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \abovedisplayskip
\belowdisplayshortskip \abovedisplayskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setattribute, getattribute, do@option@list
\def\setattribute{\@ifnextchar[\@setattribute{\@setattribute[]}}
\def\@setattribute[#1]#2#3#4{\expandafter\gdef\csname #2@#3\endcsname{#4}}
\def\getattribute#1#2{\csname #1@#2\endcsname}
\def\sep@key@value#1=#2/?/#3{\setattribute{#3}{#1}{#2}}
\def\do@option@list#1#2{%
\@for\curr@option:={#2}\do{%
\expandafter\sep@key@value\curr@option/?/{#1}\relax
}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% newpseudoenvironment
% same as \newenvironment, but new environment do not have additional groups \bgroup \egroup
% (i.e. all definitions are not local
\let\org@begin\begin
\let\org@end\end
\def\begin#1{%
\@ifundefined{pseudo@#1}%
{\org@begin{#1}}{\csname pseudo@#1\endcsname[0]\relax}%
}
\def\end#1{%
\@ifundefined{pseudo@#1}%
{\org@end{#1}}{\csname pseudo@#1\endcsname[1]\relax}%
}
\def\newpseudoenvironment#1#2#3{%
\expandafter\gdef\csname pseudo@#1\endcsname[##1]{%
\relax\ifcase##1\relax\def\@@next@@{#2}\or\def\@@next@@{#3}\else\let\@@next@@\relax\fi\@@next@@}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% startlocaldefs, endlocaldefs
\def\startlocaldefs{\makeatletter}
\def\endlocaldefs{\makeatother}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% thanksref, thanksmark, thankslabel, thankstext
% to be safe with hyperref we will use original LaTeX definitions:
%
\def\saferef#1{\expandafter\safe@setref\csname r@#1\endcsname\@firstoftwo{#1}}
\let\safe@setref\@setref
\def\safelabel#1{%
\@ifundefined{thanksnewlabel@#1}%
{\@bsphack\protected@write\@auxout{}{\string\thanksnewlabel{#1}{{\@currentlabel}{\thepage}}}\@esphack}
{}%
\@namedef{thanksnewlabel@#1}{}}
\let\thanksnewlabel\newlabel
% we want to use various counters:
\def\usethankscounter#1{%
\@ifundefined{current@thankscounter}{\gdef\previous@thankscounter{#1}}{\xdef\previous@thankscounter{\current@thankscounter}}%
\def\current@thankscounter{#1}}
\def\restorethankscounter{\xdef\current@thankscounter{\previous@thankscounter}}
\newcounter{thanks}
%\def\thethanks{\@fnsymbol\c@thanks}
\def\thethanks{\@arabic\c@thanks}
\usethankscounter{thanks}
\def\thanksmark@fmt#1{\hbox{$^{#1}$}}
\def\thanksref@sep{,}
% hooks for the hyperref:
\def\thankref@hyperlink#1{\saferef{#1thanks}}
\def\thanks@hypertarget#1{}
% Isvedame zymes
\def\thanksref{\@ifnextchar[{\@tempswatrue\@thanksref}{\@tempswafalse\@thanksref[]}}
\def\@thanksref[#1]#2{%
\if@tempswa% []
\thanksmark@fmt{#1}%
\else%
\let\@tempa\@empty%
\thanksmark@fmt{\@for\@tempb:=#2\do{%
\@tempa\let\@tempa\thanksref@sep%
\edef\@tempb{\expandafter\@firstofone\@tempb\@empty}%
\thankref@hyperlink{\@tempb}}}%
\fi}
% Suformuojame ir isvedame zyme
\def\thanksmark{\@ifnextchar[{\@tempswatrue\@thanksmark}{\@tempswafalse\@thanksmark[]}}
\def\@thanksmark[#1]#2{%
\@thankslabel[#1]{#2}%
\safelabel{#2thanks}%
\thanksmark@fmt{\expandafter\saferef{#2thanks}\thanks@hypertarget{#2}}}
% Suformuojame tik zyme
\def\thankslabel{\@ifnextchar[{\@tempswatrue\@thankslabel}{\@tempswafalse\@thankslabel[]}}
\def\@thankslabel[#1]#2{%
\if@tempswa% []
\protected@edef\@currentlabel{#1}%
\else%
\refstepcounter{\current@thankscounter}%
\fi%
\safelabel{#2thanks}}%
% Suformuojame zyme ir idedame teksta i \@thanks:
\def\thankstext{\@ifnextchar[{\@tempswatrue\@thankstext}{\@tempswafalse\@thankstext[]}}
\def\@thankstext[#1]#2#3{%
\@thankslabel[#1]{#2}%
\protected@xdef\@thanks{\@thanks\protect\thanks@thefnmark{#2thanks}%
\protect\@footnotetext{\thanks@hypertarget{#2}#3}}}%
\def\thanks@thefnmark#1{\begingroup\unrestored@protected@xdef\@thefnmark{\saferef{#1}}\endgroup}%
% ST makrosas savo numeracijos sistemos sukurimui
\def\setvaluelist#1#2{\@tempcnta=0\relax
\@for\@curr@val:=#2\do{%
\advance\@tempcnta by1\relax
\expandafter\protected@xdef\csname #1@item@\the\@tempcnta\endcsname{\@curr@val}%
}%
\expandafter\protected@xdef\csname #1@item@0\endcsname{\the\@tempcnta}%
}
\xdef\getitemvalue#1#2{\noexpand\csname #1@item@#2\endcsname}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ead, \printead
\def\email@text{}
\def\url@text{http://}
\def\ead@sep{;~}
% naudojame keyval paketa
\define@key{ead}{email}[true]{\def\ead@type{email}}
\define@key{ead}{url}[true]{\def\ead@type{url}}
\define@key{ead}{label}{\def\ead@label{#1}}
\DeclareRobustCommand\ead[2][label= ,email]{{%
\def\ead@type{email}% default
\setkeys{ead}{#1}%
\def\texttildelow{\noexpand\texttildelow}%
\protected@edef\@currentlabel{#2}%
\safelabel{\ead@label @\ead@type}}}
\newif\ifnot@ead@star
\DeclareRobustCommand{\printead}{\@ifstar{\not@ead@starfalse\@printead}{\not@ead@startrue\@printead}}
\def\@printead{\@ifnextchar[{\@tempswatrue\@@printead}{\@tempswafalse\@@printead[]}}
\def\@@printead[#1]#2{%
\if@tempswa% []
{\ead@size #1}%
\else%
\def\ead@type{email}%
\def\ead@prefix{mailto:}%
\let\ead@text\email@text%
\let\@ead@sep\relax%
\@for\ead@ref:=#2\do{%
\@ead@sep\let\@ead@sep\ead@sep%
\@ifundefined{r@\ead@ref @url}{}{\let\ead@text\url@text\def\ead@type{url}\def\ead@prefix{http://}}%
\ifnot@ead@star\ead@text\fi{\ead@size\def\null{}\ims@href{\ead@prefix\saferef{\ead@ref @\ead@type}}{\saferef{\ead@ref @\ead@type}}}%
\let\ead@text\relax}%
\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% normaltext, nohyphen, no@harm
% normalus tekstas (justify)
\def\normaltext{\let\\=\@normalcr%
\leftskip\z@ \@rightskip\z@ \rightskip\@rightskip%
\parfillskip\@flushglue}
% skiemenavimo isjungimas
\def\nohyphen{\pretolerance=\@M \tolerance=\@M \hyphenpenalty=\@M \exhyphenpenalty=\@M}
\def\no@harm{\let\thanks=\@gobble\let\thanksref=\@gobble\let~\space\def\ead[##1]##2{}\let\\=\@empty \def\protect{\noexpand\protect\noexpand}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% url@fmt
\def\journalurl#1{\def\journal@url{#1}}
\def\paperurl#1{\def\paper@url{#1}}
\def\doi#1{%
\gdef\@doi{#1}%
\gdef\doi@text{\url@fmt{DOI: }{\ttfamily}{#1}{\doi@base\@doi}}%
}
\def\@doi{}
\def\doi@base{http://dx.doi.org/}
% {url}{text}
\def\ims@href#1#2{#2}
% {prefix}{font}{text}{url}
\def\url@fmt#1#2#3#4{%
\edef\@tempa{#3}%
\ifx\@tempa\@empty%
\else%
#1{#2\ims@href{#4}{#3}}%
\fi}
%%%%%%%%%%%%%%%%%%% doiurl
\@ifundefined{doi@base}{\def\doi@base{http://dx.doi.org/}}{}
\DeclareRobustCommand\doiurl[1]{{%
\def\\{}%
\check@doiurl@prefix#1http://\end%
\check@doiurl@break#1\\\end\relax%
\if@doiurlbreak%
\@ifundefined{doi@url}{%
\ims@href{\doi@base\@tempx\@tempy}{\csname doi@size\endcsname\@tempx}%
\break%
\ims@href{\doi@base\@tempx\@tempy}{\csname doi@size\endcsname\@tempy}}%
{%
\expandafter\ims@href{\@tempx\@tempy}{\csname doi@size\endcsname\@tempx}%
\break%
\ims@href{\@tempx\@tempy}{\csname doi@size\endcsname\@tempy}}%
\else%
\@ifundefined{doi@url}%
{\ims@href{\doi@base#1}{\csname doi@size\endcsname #1}}%
{\ims@href{#1}{\csname doi@size\endcsname #1}}%
\fi}}
\def\check@doiurl@prefix#1http://#2\end{\ifx.#2.\else\def\doi@url{fullurl}\fi}
\newif\if@doiurlbreak \@doiurlbreakfalse
\def\check@doiurl@break#1\\#2\end{%
\ifx.#2.\@doiurlbreakfalse%
\else%
\@doiurlbreaktrue%
\def\@tempx{#1}%
\def\@tempy{#2}%
\fi}
%%%%%%%%%%%%%%%%%%% arxivurl
%% \arxivurl{http://arxiv.org/abs/math.PR/0603300}
%% \arxivurl{math.PR/0603300}
%% \arxivurl{http://\\arxiv.org/abs/math.PR/0603300}
%% \arxivurl{math.PR/\\0603300}
\@ifundefined{arxiv@base}{\def\arxiv@base{http://arxiv.org/abs/}}{}
\DeclareRobustCommand\arxivurl[1]{{%
\def\\{}%
\check@arxivurl@prefix#1http://\end%
\check@arxivurl@break#1\\\end\relax%
\if@arxivurlbreak%
\@ifundefined{arxiv@url}{%
\ims@href{\arxiv@base\@tempx\@tempy}{\csname arxivurl@size\endcsname\@tempx}%
\break%
\ims@href{\arxiv@base\@tempx\@tempy}{\csname arxivurl@size\endcsname\@tempy}}%
{%
\expandafter\ims@href{\@tempx\@tempy}{\csname arxivurl@size\endcsname\@tempx}%
\break%
\ims@href{\@tempx\@tempy}{\csname arxivurl@size\endcsname\@tempy}}%
\else%
\@ifundefined{arxiv@url}%
{\ims@href{\arxiv@base#1}{\csname arxivurl@size\endcsname #1}}%
{\ims@href{#1}{\csname arxivurl@size\endcsname #1}}%
\fi}}
\def\check@arxivurl@prefix#1http://#2\end{\ifx.#2.\else\def\arxiv@url{fullurl}\fi}
\newif\if@arxivurlbreak \@arxivurlbreakfalse
\def\check@arxivurl@break#1\\#2\end{%
\ifx.#2.\@arxivurlbreakfalse%
\else%
\@arxivurlbreaktrue%
\def\@tempx{#1}%
\def\@tempy{#2}%
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RUNNING HEADS
\def\runtitle#1{\gdef\@runtitle{#1}}
\def\runauthor#1{\gdef\@runauthor{#1}\global\let\copauthor\@runauthor}
\def\@runauthor{}
\def\@lastpage{0}
\def\thepage@fmt#1{Page #1 of \@lastpage}
\def\thepage@fmt#1{Page #1 of \pageref{LastPage}}
\def\headline@hook{}
\let\ps@copyright@hook\relax
% normal RH
\def\ps@bmcheadings{%
\def\etal{\textit{et al.}}%
\let\@mkboth\@gobbletwo%
\def\@evenfoot{\csname footline@hook\endcsname\hfill}%
\let\@oddfoot\@evenfoot
\def\@oddhead{\headline@hook\hskip-\rhindent@width\hbox to\z@{\parbox[t]{\textarea@width}{\runninghead@size\runninghead@text}\hss}\hfill}%
\let\@evenhead\@oddhead%
}%
% First page RH
\def\ps@copyright{\csname set@fp@margin@hook\endcsname%
\def\etal{\textit{et al.}}%
\let\@mkboth\@gobbletwo%
\def\@evenhead{\ps@copyright@hook\headline@hook\hskip-\leftarea@width\parbox[t]{\textarea@width}{\copyright@size\copyright@text}\hfill}%
\let\@oddhead\@evenhead%
\def\@oddfoot{\csname footline@hook\endcsname\hfill\hfill}%
\let\@evenfoot\@oddfoot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LIST ENVIRONMENTS
\parsep\z@
\topsep\z@
\partopsep\z@
\itemsep\z@
\labelsep.5em
\def\@listI{\leftmargin\leftmargini
\parsep\z@
\topsep\z@
\itemsep\z@}
\def\list@parindent{8\p@}
\def\labelenumi{\theenumi\hskip6\p@}
% quotation
\let\quotation@size\normalsize
\def\quotation@itemindent{\list@parindent}
\def\quotation@parindent{\list@parindent}
\def\quotation@leftmargin{\list@parindent}
\let\quotation@rightmargin\z@
\let\quotation@topsep\smallskipamount
\def\quotation{%
\list{}{\quotation@size%
\listparindent\quotation@parindent%
\itemindent \quotation@itemindent%
\rightmargin\quotation@rightmargin \leftmargin\quotation@leftmargin%
\partopsep\z@ \topsep\quotation@topsep \parsep\z@%
}%
\item[\Q@strut]\relax}
\def\endquotation{\endlist}
\def\Q@strut{\leavevmode\hbox{\vrule height9pt depth1pt width0pt}}
% quote
\let\quote@size\normalsize
\def\quote@indent{\z@}
\def\quote@leftmargin{2pc}
\def\quote@rightmargin{\z@}
\let\quote@topsep\smallskipamount
\def\quote{%
\list{}{\quote@size%
\listparindent\quote@indent%
\itemindent \listparindent%
\rightmargin\quote@rightmargin \leftmargin\quote@leftmargin%
\partopsep\z@ \topsep\quote@topsep \parsep\z@%
}%
\item\relax}
\def\endquote{\endlist}
\def\@listii {\leftmargin\leftmarginii
\labelwidth\leftmarginii
\advance\labelwidth-\labelsep
\topsep\z@
\parsep\z@
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii
\advance\labelwidth-\labelsep
\topsep\z@
\parsep z@
\partopsep\z@
\itemsep\topsep}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TABLE, FIGURE
% settings for table caption
\setattribute{floatcaption} {size}{\footnotesize\bfseries\mathversion{bold}\raggedright}
\setattribute{floatcaptionname}{size}{\bfseries}
\setlength\abovecaptionskip{0\p@}
\setlength\belowcaptionskip{4\p@}
\long\def\@makecaption#1#2{
\vskip\abovecaptionskip
\parbox[t]{\hsize}{\floatcaption@size{\floatcaptionname@size #1}\hskip.5em #2\par}%
\vskip\belowcaptionskip}
\def\@floatboxreset{%
\reset@font
\footnotesize
\sffamily
\@setminipage
\centering
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FIGURE - in box
\newbox\bmcfloat@box
\newif\if@figurestar
\setattribute{figure}{sep}{6.25\p@}
\def\figure{\@figurestarfalse\@ifnextchar[{\@figure}{\@figure[t]}}
\def\@figure[#1]{\def\figure@pars{#1}%
\def\@captype{figure}%
\def\csentence##1{{\mathversion{bold}\bfseries ##1}}%
% \csname @figure@hook\endcsname%
% \let\@makecaption\@makefigurecaption%
% \let\@floatboxreset\figure@boxreset%
\setbox\bmcfloat@box=\vbox\bgroup\figure@settings}
\def\endfigure{%
\par%
\egroup%
\edef\reserved@a{\noexpand\@xfloat{figure}[\figure@pars]}
\reserved@a\makefigure@float\end@float
}
\DeclareRobustCommand\fig@textbf[1]{{\floatcaptionname@size #1}}%
\def\figure@settings{%
\let\textbf\fig@textbf%
\setattribute{floatcaption}{size}{\footnotesize\sffamily\raggedright}
\if@figurestar\hsize=\textwidth\fi%
\@tempdima\hsize%
\advance\@tempdima by-\figure@sep%
\advance\@tempdima by-\figure@sep%
\hsize\@tempdima%
\parindent\z@%
\centering%
\setlength\abovecaptionskip{6\p@}%
\setlength\belowcaptionskip{0\p@}%
}
\def\makefigure@float{
\setlength{\fboxsep}{\figure@sep}%
\setlength{\fboxrule}{0.25\p@}%
\fcolorbox{bmcblue}{white}{\box\bmcfloat@box}}
\@namedef{figure*}{\@figurestartrue\@ifnextchar[{\@figure}{\@figure[t]}}
\@namedef{endfigure*}{%
\egroup%
\edef\reserved@a{\noexpand\@xdblfloat{figure}[\figure@pars]}
\reserved@a\makefigure@float\end@dblfloat
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FOOTNOTE
\def\footnoterule{\kern-3\p@ \hrule \@width \footnoterule@width \kern 2.6\p@} % the \hrule is .4pt high
\let\orig@footnoterule\footnoterule
\renewcommand\@makefntext[1]{\noindent\parindent8\p@\@makefnmark #1}
\def\@makefnmark{\csname makefnmark@hook\endcsname\@textsuperscript{\normalfont[\@thefnmark]}}%
% hook for hyperref
\def\@makefntext@fmt#1{\@makefnmark}
\def\freefootnotetext[#1]{%
\begingroup\unrestored@protected@xdef\@thefnmark{#1}\endgroup\@footnotetext}
\def\footnote@size{\fontsize{7}{8}\raggedright}
\long\def\@footnotetext#1{\insert\footins{%
\reset@font\footnote@size
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark
}%
\color@begingroup
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MAIN SETTINGS - COMMON FOR 1 and 2 col's layouts
\setattribute{frontmatter} {style} {\raggedright}
\setattribute{address} {style} {\raggedright}
\setattribute{affiliation} {style} {\raggedright}
\setattribute{abstract} {style} {\raggedright}
\setattribute{keyword} {style} {\normaltext\raggedright}
\setattribute{backmatter} {style} {\raggedright}
% FRONT MATTER SKIPS
%\setattribute{dochead} {skip} {-\topskip}
\setattribute{title} {skip} {\z@}
\setattribute{subtitle} {skip} {5\p@}
\setattribute{authors} {skip} {10\p@}
\setattribute{note} {skip} {8\p@}
\setattribute{copyright} {skip} {23\p@}
\setattribute{address} {skip} {4\p@ plus 2\p@}
\setattribute{history} {skip} {\Smallskipamount}
\setattribute{abstract} {skip} {0\p@}
\setattribute{keyword} {skip} {5\p@}
\setattribute{abbr} {skip} {\medskipamount}
\setattribute{frontmatter} {skip} {\bigskip}
\setattribute{copyrightlogo}{cmd}{}
% FRONT MATTER FONTS
\setattribute{dochead} {size} {\sffamily\fontsize{13pt}{13pt}\bfseries\selectfont\color{white}}
\setattribute{title} {size} {\sffamily\fontsize{24pt}{26pt}\selectfont\raggedright}
\setattribute{subtitle} {size} {\sffamily\fontsize{20pt}{22pt}\selectfont\raggedright}
\setattribute{author} {size} {\sffamily\fontsize{11pt}{14pt}\selectfont\raggedright}
\setattribute{address} {size} {}
\setattribute{note} {size} {\sffamily\fontsize{10pt}{13pt}\selectfont\raggedright}
\setattribute{thanksbox} {size} {\sffamily\fontsize{7pt}{9pt}\selectfont\raggedright}
\setattribute{history} {size} {\mdseries}
\setattribute{abstract} {size} {\sffamily\fontsize{10}{12}\selectfont}
\setattribute{abstractname}{size} {\bfseries}
\setattribute{keyword} {size} {\sffamily\fontsize{10}{12}\selectfont}
\setattribute{keywordname} {size} {\bfseries}
\setattribute{runninghead} {size} {\sffamily\fontsize{8}{10}\selectfont}
\setattribute{footline} {size} {\sffamily\fontsize{7}{8}\selectfont}
\setattribute{copyright} {size} {\sffamily\fontsize{8}{10}\selectfont}
\setattribute{backmatter} {size} {\sffamily\fontsize{7}{9}\selectfont\raggedright}
\setattribute{ead} {size} {}
% COPYRIGHT TEXT, etc.
\setattribute{address} {text} {Author details}
\setattribute{corref} {text} {Correspondence: }
\setattribute{authorinfo} {text} {Full list of author information is available at the end of the article\endgraf}
\setattribute{presentaddress} {text} {\textit{Present address: }}
\setattribute{copyright} {text} {\@runauthor\ \textit{\journal@name}}
\setattribute{runninghead} {text} {\@runauthor\ \textit{\journal@name} \hfill \thepage@fmt{\thepage}}
\setattribute{footline} {text} {\textcopyright\ \@copyrt\ \copyrightowner@text}
\setattribute{pdfsubject} {text} {\journal@name}
% URL
\setattribute{article} {url} {}
% SEPARATIONS
\setattribute{author} {sep} {, }
\setattribute{authorand} {sep} {~and }
\setattribute{address} {sep} {. }
% KEYWORDS
\setattribute{keyword} {AMS} {AMS Subject Classification}
\setattribute{keyword} {MSC} {Mathematics Subject Classification}
\setattribute{keyword} {MSC2010} {Mathematics Subject Classification (2010)}
\setattribute{keyword} {MSCnoyear}{Mathematics Subject Classification}
\setattribute{keyword} {KWD} {Keywords}
\setattribute{keyword} {JEL} {JEL Classification}
\setattribute{keyword} {PACS} {PACS Codes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FRONT MATTER FORMATTING PARAMETERS
% FRONT MATTER SKIPS
\if@twocolumn
\setattribute{abstractbox} {skip} {24\p@}
\else
\setattribute{abstractbox} {skip} {-1\p@}
\fi
\setattribute{frontmatter} {cmd} {%
\frontmatter@skip%
\global\@afterindentfalse%
\@afterheading}
% FRONT MATTER DIMENSIONS
\setattribute{textarea} {width} {484\p@} %170mm 1 puslapio maksimalus plotis
\if@twocolumn
\setattribute{leftarea} {width} {\z@}
\setattribute{rhindent} {width} {\z@}
\else
\setattribute{leftarea} {width} {122\p@} %38mm+5mm=43mm
\setattribute{rhindent} {width} {61\p@} %21.5mm = 41.5-20 rh issikisimas normaliuose puslapiuose
\fi
\setattribute{leftcol} {width} {108\p@} %38mm 1 puslapio isnasu dezutes plotis
\setattribute{colsep} {width} {14\p@} %5mm
\if@twocolumn
\setattribute{footnoterule}{width} {\columnwidth}%
\else
\setattribute{footnoterule}{width} {\textwidth}%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FRONTMATTER
% COUNTERS, ETC
\newcounter{author}
\newcounter{address}
\newdimen\sv@mathsurround
\let\hy@frontmatter\relax
\let\hy@endfrontmatter\relax
\def\frontmatter{%
\global\c@author\z@
\global\c@address\z@
%
\thispagestyle{copyright}%
%
\csname frontmatter@hook \endcsname%
\sv@mathsurround\mathsurround%
\m@th
\set@frontmatter@cmd
\set@frontmatter@keys
\parindent\z@
\frontmatter@style
\hy@frontmatter
\ignorespaces}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ENDFRONTMATTER
\def\endfrontmatter{%
\global\@topnum\z@
%
\@thanks%
%
\write@pdfinfo{\hy@fauthor}{\csname fauthor@\firstauthor@id\endcsname}
\write@pdfinfo{\hy@author}{\the\authors@list}
\write@pdfinfo{\hy@subject}{\pdfsubject@text}
\write@pdfinfo{\hy@keywords}{\the\keywords@list}
%
\hy@endfrontmatter
%
\immediate\write\@mainaux{\string\global\string\@namedef{num@address}{\the\c@address}}%
\immediate\write\@mainaux{\string\global\string\@namedef{num@author}{\the\c@author}}%
\set@authorcorref@notset%
%
\global\mathsurround\sv@mathsurround
\global\let\@thanks\@empty
%
\set@runauthor
%
\csname frontmatter@hook\endcsname%
\aftergroup\frontmatter@cmd
\aftergroup\insert@thanksbox
}
\if@twocolumn
\def\insert@thanksbox{\insert\footins{\unvbox\thanks@box}}
\else
\let\insert@thanksbox\relax
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \set@frontmatter@cmd
\def\set@frontmatter@cmd{%
\let\maketitle\relax
\let\fmbox\bmc@fmbox
\let\endfmbox\bmc@endfmbox
\let\dochead\bmc@dochead
\let\title\bmc@title
\let\subtitle\bmc@subtitle
\let\author\bmc@author
\let\address\bmc@address
\let\artnotes\bmc@artnotes
\let\endartnotes\bmc@endartnotes
\let\abstractbox\bmc@abstractbox
\let\endabstractbox\bmc@endabstractbox
\let\abstract\bmc@abstract
\let\endabstract\bmc@endabstract
\let\keyword\bmc@keyword
\let\endkeyword\bmc@endkeyword
\let\thanksbox\bmc@thanksbox
\let\endthanksbox\bmc@endthanksbox
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FMBOX
\newif\if@fmbox \@fmboxfalse
\newbox\fm@box
\def\bmc@fmbox{%
\setbox\fm@box=\vbox\bgroup
\@fmboxtrue
\hsize=\textarea@width
}
\def\bmc@endfmbox{%
\par
\auto@set@thanksbox%
\csname endfmbox@hook\endcsname%
\egroup%
\if@twocolumn
\emergencystretch=1pc \twocolumn[\box\fm@box\medskip]
\else
\hbox to\textwidth{\hss\box\fm@box}
\vskip\abstract@skip
\vbox to\z@{\llap{\box\thanks@box\hskip\colsep@width}\vss}
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOCHEAD
\let\dochead@hook\relax
\def\bmc@dochead{\@ifnextchar[{\dochead@fmt}{\dochead@fmt[]}}
\def\dochead@fmt[#1]#2{%
\bgroup%
\@tempdima=\hsize%
\advance\@tempdima by-8\p@%
\setlength{\fboxsep}{4\p@}%
\setlength{\fboxrule}{\z@}%
\fcolorbox{bmcblue}{bmcblue}{\hbox to\@tempdima{\dochead@size\MakeUppercase{#2}\hfill\fontshape{n}\selectfont\smash{\dochead@hook}}}
\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TITLE
\let\PREHOOK@title@fmt\@gobble
\def\bmc@title{\@ifnextchar[{\title@fmt}{\title@fmt[]}}
\def\title@fmt[#1]#2{%
\vskip\title@skip%
\setkeys{title}{#1}%
\bgroup%
\no@harm%
\let\protect\relax%
\xdef\@runtitle{#2}%
\egroup%
\bgroup%
\no@harm%
\let\protect\relax%
\xdef\@argi{#2}%
\egroup%
\write@pdfinfo{\hy@title}{\@argi}%
\bgroup
\PREHOOK@title@fmt{#2}%
\title@size\csname pretitle@text\endcsname #2\par%
\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SUBTITLE
\def\bmc@subtitle{\@ifnextchar[{\subtitle@fmt}{\subtitle@fmt[]}}
\def\subtitle@fmt[#1]#2{%
\vskip\subtitle@skip
\setkeys{title}{#1}%
\bgroup%
\subtitle@size #2\par%
\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set@frontmatter@keys
\def\set@frontmatter@keys{%
\@tempcnta=0\relax%
\@ifundefined{num@address}{}{\@tempcnta=\num@address\relax}%
\ifnum\@tempcnta=1\relax%
% \define@key{author}{addressref}{}%
% \define@key{author}{presentaddressref}{}%
\define@key{author}{corref}{}%
\global\let\address@thanksref\@gobble
\global\let\printaddresses\relax
\fi%
\@tempcnta=0\relax%
\@ifundefined{num@author}{}{\@tempcnta=\num@author\relax}%
\ifnum\@tempcnta=1\relax%
\global\@namedef{num@address}{1}
% \define@key{author}{addressref}{}%
% \define@key{author}{presentaddressref}{\expandafter\gdef\csname presentaddressref@##1\endcsname{}}%
% \gdef\printauthor##1{\unskip}%
\global\let\address@thanksref\@gobble
\global\let\printaddresses\relax
\global\let\corref@thanksmark\@gobble
\global\let\corref@thanksref\@gobble
\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \thanksmark etc
\def\thanksmark@fmt#1{{\textsuperscript{#1}}}
\def\thethanks{\getitemvalue{bmcsymbol}{\@arabic\c@thanks}}
\setvaluelist{bmcsymbol}{*,\textdagger,\^{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AUTHOR - keys
% \author[id=au1,addressref={aff1,aff2},presentaddressref=aff3,corref={aff1,aff2},thanksref={t1}]{\inits{}\fnm{} \snm{} \suffix{}\ead{}}
% \author@au1 =\inits \snm \suffix
% \fauthor@au1=\fnm \snm \suffix
% \corref@au1 =\corref@text
%
% automatiniam formatavimui:
% \def\addressref@aff1{}
% \emaillist@au1 ={e1,e2}
% \authorslist@aff1 ={au1,au2}
% \authorslist@present@aff1 ={au1,au2}
% \correflist@au1 ={aff1,aff2}
% \authors@id@list ={au1,au2,au3...}
%
% tikriname ar nebuvo panaudotas id:
\def\check@xx@id#1#2{\@ifundefined{#1@#2}{}{\@latex@error{Command <#1>: id=#2 was allready used!}{}}}
\newif\ifauthor@corref
\newif\ifauthor@email
\define@key{author}{id}{%
\def\author@id{#1}%
\check@xx@id{author}{#1}%
\@ifundefined{authors@id@list}{\xdef\authors@id@list{#1}}{\xdef\authors@id@list{\authors@id@list,#1}}}
\define@key{author}{email}{%
\author@emailtrue%
\ead[label=\author@id]{#1}}
\define@key{author}{thanksref}{%
% \current@thanksref@list={aff1,aff2}
% \def\thanksref@aff1{}
\edef\current@thanksref@list{#1}%
\@for\thanksref@id:=#1\do{\expandafter\gdef\csname thanksref@\thanksref@id\endcsname{}}}
% alias for thanksref
\define@key{author}{noteref}{%
% \current@thanksref@list={aff1,aff2}
% \def\thanksref@aff1{}
\edef\current@thanksref@list{#1}%
\@for\thanksref@id:=#1\do{\expandafter\gdef\csname thanksref@\thanksref@id\endcsname{}}}
\define@key{author}{addressref}{%
% \current@address@list={aff1,aff2}
% \def\addressref@aff1{}
\edef\current@address@list{#1}%
\@for\addressref@id:=#1\do{\expandafter\gdef\csname addressref@\addressref@id\endcsname{}}}
\define@key{author}{presentaddressref}{%
% \current@address@list={aff1,aff2}%
% \def\presentaddressref@aff1{}%
\@ifundefined{addressref@#1}{\edef\current@paddress@list{#1}}{}%
\@for\addressref@id:=#1\do{\expandafter\gdef\csname presentaddressref@\addressref@id\endcsname{}}%
\@for\addressref@id:=#1\do{\expandafter\gdef\csname addressref@\addressref@id\endcsname{}}}
\define@key{author}{corref}[]{%
% \corref@list={aff1,aff2}%
\global\let\set@authorcorref@notset\relax%
\global\author@correftrue%
\ifx.#1.\else\xdef\corref@list{#1}\fi%
}
\def\add@to@addressref@list#1{\@ifundefined{addressref@list}{\edef\addressref@list{#1}}{\edef\addressref@list{\addressref@list, #1}}}
\def\add@to@thanksref@list#1{\@ifundefined{thanksref@list}{\edef\thanksref@list{#1}}{\edef\thanksref@list{\thanksref@list, #1}}}
\def\set@authorcorref@notset{\immediate\write\@mainaux{\string\global\string\authorcorref@notsettrue}}
\def\set@author@lists{%
\let\thanksref@list\relax%
\let\addressref@list\relax%
\@ifundefined{current@address@list}{}{\add@to@addressref@list{\current@address@list}}%
\@ifundefined{current@paddress@list}{}{\add@to@addressref@list{\current@paddress@list}}%
\@ifundefined{current@thanksref@list}{}{\add@to@thanksref@list{\current@thanksref@list}}%
}
\def\print@author@lists{%
\@ifundefined{addressref@list}{}{\address@thanksref{\addressref@list}}%
\ifauthor@corref\def\thanksref@sep{}\corref@thanksref{\corr@author@id}\fi%
\@ifundefined{thanksref@list}{}{\def\thanksref@sep{}\thanksref{\thanksref@list}}%
}
\let\address@thanksref\thanksref
\let\corref@thanksref\thanksref
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AUTHOR
% if corref is not set, we will use first author with an email as a corresponding author
% \corr@author@id -> {au1}
% \corref@list -> {aff1,aff2}
\newif\ifauthorcorref@notset \authorcorref@notsetfalse
\def\bmc@author{\@ifnextchar[{\author@fmt}{\author@fmt[]}}
\def\author@fmt[#1]#2{%
\stepcounter{author}{%
\csname author@cmd\endcsname%
\author@correffalse%
\xdef\author@id{au\the\c@author}%
\setkeys{author}{#1}%
\@ifundefined{num@author}{\@tempcnta=10\relax}{\@tempcnta=\num@author\relax}%
\def\a@sep{, }%
\ifnum\@tempcnta>1\relax%
\ifnum\c@author=\@tempcnta%
\let\a@sep\authorand@sep%
\else%
\let\a@sep\author@sep%
\fi%
\fi%
%
\ifauthorcorref@notset%
\ifauthor@email% email is set
\author@correftrue%
\global\authorcorref@notsetfalse%
\fi%
\fi%
\ifauthor@corref%
\xdef\corr@author@id{\author@id}%
\@ifundefined{corref@list}%
{\@ifundefined{current@address@list}{}{\xdef\corref@list{\current@address@list}}}%
{}%
\fi%
%
\ifnum\c@author=1 \author@fmt@init \let\a@sep\relax \xdef\first@author@id{\author@id}\fi%
\bgroup% F. Author
\def\inits##1{##1}\def\fnm##1{}\def\snm##1{##1}\def\particle##1{##1}\def\suffix##1{##1}%
\no@harm%
\xdef\author@arg{#2}%
\egroup%
\expandafter\protected@xdef\csname author@\author@id\endcsname{\author@arg}%
\bgroup% First Author
\def\inits##1{}\def\fnm##1{##1}\def\particle##1{##1}\def\snm##1{##1}\def\suffix##1{##1}%
\no@harm%
\xdef\author@arg{#2}%
\ifnum\c@author=1\addto@authors@list{#2}\xdef\firstauthor@id{\author@id}\else\addto@authors@list{, #2}\fi%
\egroup%
\expandafter\protected@xdef\csname fauthor@\author@id\endcsname{\author@arg}%
\bgroup% Author
\def\inits##1{}\def\fnm##1{\ignorespaces}\def\particle##1{}\def\snm##1{##1}\def\suffix##1{}%
\no@harm%
\expandafter\xdef\csname runauthor@\the\c@author @snm\endcsname{#2}%
\egroup%
\bgroup%
\author@size%
\def\inits##1{}\def\fnm##1{##1}\def\snm##1{##1}\def\particle##1{##1}\def\suffix##1{##1}%
\set@author@lists%
\a@sep\authorname@fmt{#2}\print@author@lists%
\egroup}%
\ignorespaces}
\def\author@fmt@init{%
\vskip\authors@skip%
\author@size%
\leavevmode}
\def\authorname@fmt#1{#1}
\def\set@runauthor{%
\ifnum\c@author=1\relax
\gdef\@runauthor{\@nameuse{runauthor@1@snm}}%
\else
\ifnum\c@author=2\relax
\gdef\@runauthor{\@nameuse{runauthor@1@snm} and \@nameuse{runauthor@2@snm}}%
\else
\@ifundefined{runauthor@1@snm}{}{\gdef\@runauthor{\@nameuse{runauthor@1@snm} \etal}}%
\fi
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ADDRESS
% \address[id=aff1]{}
\define@key{address}{id}{%
\def\address@id{#1}%
\check@xx@id{address}{#1}%
}
\def\bmc@address{\@ifnextchar[{\address@fmt}{\address@fmt[]}}
\def\address@fmt[#1]#2{%
\stepcounter{address}%
\xdef\address@id{aff\the\c@address}%
\setkeys{address}{#1}%
\@ifundefined{address@id@list}{\xdef\address@id@list{\address@id}}{\xdef\address@id@list{\address@id@list,\address@id}}%
\expandafter\newtoks\csname address@\address@id\endcsname%
\global\csname address@\address@id\endcsname={#2}%
}
\def\address@definitions{
\def\\{\break}%
\def\orgdiv##1{##1}\def\orgname##1{##1}%
\def\street##1{##1}\def\postcode##1{##1}%
\def\postbox##1{##1}\def\city##1{##1}\def\state##1{##1}\def\cny##1{##1}%
\let\interref\surl%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% printaddress{aff1}
\newcounter{addressref}
\def\theaddressref{\arabic{addressref}}
\newif\if@address@mark \@address@marktrue
\define@key{printaddress}{nomark}[true]{
\let\thanksmark\@gobble%
\let\thanksref\@gobble}%
\define@key{printaddress}{addrprefix}{\def\addr@prefix{#1}}%
\let\addr@prefix\relax
\DeclareRobustCommand{\printaddress}{\@ifnextchar[{\printaddress@fmt}{\printaddress@fmt[]}}
\def\printaddress@fmt[#1]#2{%
\bgroup%
\setkeys{printaddress}{#1}%
\address@size%
\parindent\z@%
\address@definitions%
\set@address@mark%
\usethankscounter{addressref}\thanksmark{#2}\restorethankscounter%
\addr@prefix%
\@ifundefined{presentaddressref@#2}{}{\presentaddress@text}%
\expandafter\the\@nameuse{address@#2}\unskip\address@sep%
\egroup}
\def\thanksbox@printaddress@fmt[#1]#2{%
\bgroup%
\setkeys{printaddress}{#1}%
\address@size%
\parindent\z@%
\address@definitions%
\set@address@mark%
\thanksref{#2}%
\addr@prefix%
\expandafter\the\@nameuse{address@#2}\par%
\egroup}
\def\set@address@mark{%
\ifnum\c@author=1\relax \@address@markfalse\fi%
\ifnum\c@address=1\relax \@address@markfalse \fi%
\if@address@mark\else\let\thanksmark\@gobble\let\thanksref\@gobble\fi%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% printaddresses{}
\def\printaddresses{
\heading*{\address@text}
\bgroup
\backmatter@style\backmatter@size
\@ifundefined{address@id@list}{}{\@for\address@id:=\address@id@list\do{\printaddress{\address@id}}}%
\csname contributing@text\endcsname%
\par
\egroup
\global\let\printaddresses\relax}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ARTNOTES
\newif\if@firstnote \@firstnotetrue
\newenvironment{bmc@artnotes}{%
\def\note{\@ifnextchar[{\@bmcartnote}{\note@nopars}}%
\def\contributionnote##1{\gdef\contributing@text{##1}}%
\note@size%
}{}
\def\note@nopars#1{\if@firstnote\vskip\note@skip\@firstnotefalse\fi #1\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \artnote
\def\bmcartnote{\@ifnextchar[{\@bmcartnote}{\@bmcartnote[]}}
\define@key{bmcartnote}{id}{%
\def\bmcartnote@id{#1}%
\@ifundefined{bmcartnote@id@list}{\xdef\bmcartnote@id@list{#1}}{\xdef\bmcartnote@id@list{\bmcartnote@id@list,#1}}}
\define@key{bmcartnote}{symbol}{\def\bmcartnote@symbol{#1}}
\def\@bmcartnote[#1]#2{{%
\setkeys{bmcartnote}{#1}%
\expandafter\protected@xdef\csname bmcartnote@\bmcartnote@id\endcsname{#2}%
\@ifundefined{bmcartnote@symbol}{}{\expandafter\protected@xdef\csname bmcartnote@symbol@\bmcartnote@id\endcsname{\bmcartnote@symbol}}
}}
\def\printartnote#1{%
\bgroup
\@ifundefined{bmcartnote@symbol@#1}%
{\leavevmode\thanksmark{#1}}%
{\edef\@tempa{\csname bmcartnote@symbol@#1\endcsname}\leavevmode\thanksmark[\@tempa]{#1}}%
\@nameuse{bmcartnote@#1}%
\egroup}
\def\printartnotes{%
\@ifundefined{bmcartnote@id@list}{}{\@for\bmcnote@id:=\bmcartnote@id@list\do{\printartnote{\bmcnote@id}}}%
\global\let\printartnotes\relax%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THANKSBOX
\newbox\thanks@box
\def\bmc@thanksbox{\@ifnextchar[{\@thanksbox}{\@thanksbox[]}}
\def\@thanksbox[#1]{%
\global\let\auto@set@thanksbox\relax%
\global\setbox\thanks@box=\vtop\bgroup
\if@twocolumn%
\hsize=\columnwidth%
\else%
\hsize=\leftcol@width%
\hrule width\leftcol@width height0.15\p@%
\vskip2\p@%
\fi%
\thanksbox@size%
\let\printaddress@fmt\thanksbox@printaddress@fmt%
\setkeys{thanksbox}{#1}%
\parindent\z@%
\if@twocolumn\rule\z@\footnotesep\fi%
\ignorespaces%
}
\def\bmc@endthanksbox{\par\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \auto@set@thanksbox
\def\auto@set@thanksbox{%
\@thanksbox[]{%
\@ifundefined{corr@author@id}{}{\printcorrtext{\corr@author@id}}%
\@ifundefined{corref@list}{}{\@for\address@id:=\corref@list\do{\printaddress{\address@id}}\par}%
\authorinfo@text
\printartnotes%
\par
\egroup}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \printcorremail
% \printcorremail{}{}
\def\printcorremail#1#2{%
\@ifundefined{num@author}{\@tempcnta=0}{\@tempcnta=\num@author}
\ifnum\@tempcnta=1\relax\else\thanksmark{#1}\fi%
\corref@text\printead*{#2}\par
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \printcorrtext
%\printcorrtext{}
\def\printcorrtext#1{%
\corref@thanksmark{#1}%
\corref@text%
\@ifundefined{r@#1@email}{}{\printead*{#1}}%
\par
}
\let\corref@thanksmark\thanksmark
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ABSTRACTBOX
\setattribute{absboxsep} {width} {10.25\p@}
\newbox\abstract@box
\def\bmc@abstractbox{\@ifnextchar[{\@abstractbox}{\@abstractbox[]}}
\def\@abstractbox[#1]{%
\@tempdima=\hsize%
\advance\@tempdima by-\absboxsep@width%
\advance\@tempdima by-\absboxsep@width%
\setkeys{abstractbox}{#1}%
\setbox\abstract@box=\vbox\bgroup%
\hsize=\@tempdima%
\ignorespaces%
}
\def\bmc@endabstractbox{%
\par%
\egroup%
\vglue\abstractbox@skip
\setlength{\fboxsep}{10\p@}%
\setlength{\fboxrule}{0.5\p@}%
\fcolorbox{bmcblue}{white}{\box\abstract@box}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ABSTRACT
\def\abstractname@skip{\par\vskip3\p@}
\newif\if@first@abstract \@first@abstracttrue
\define@key{abstract}{title}{\def\abstractname{#1}}
\gdef\bmc@abstract{\@ifnextchar[{\abstract@fmt}{\abstract@fmt[]}}
\def\abstract@fmt[#1]{%
\if@first@abstract\csname firstabstract@cmd\endcsname\else \vskip\abstract@skip\fi%
\global\@first@abstractfalse%
\def\parttitle##1{%
\vskip3\p@
\noindent{\bfseries ##1:}}
\setkeys{abstract}{#1}%
\abstract@style%
\abstract@size%
\parindent\true@parindent%
\phantomsection\addcontentsline{toc}{section}{\abstractname}%
\noindent{\abstractname@size\abstractname}\abstractname@skip\ignorespaces\noindent}
\def\bmc@endabstract{\par}
\let\phantomsection\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% KEYWORD
% raktas=class
\setattribute[default]{keyword}{class}{KWD}
\setattribute[default]{keyword}{language}{english}
% \keyword@class-> KWD
% \keyword@KWD -> AMS 2000...
%\setattribute{keyword}{language}{french}
\gdef\bmc@keyword{\@ifnextchar[{\bmc@@keyword}{\bmc@@keyword[class=KWD]}}
\gdef\bmc@@keyword[#1]{%
%
\do@option@list{keyword}{#1}%
\long\def\@tempa{MSC}%
\ifx\keyword@class\@tempa%
\def\keyword@skip{\z@}%
\fi%
%
\def\sep{\unskip; }%
\vskip\keyword@skip
%
\def\keyword@name{\csname keyword@\keyword@class\endcsname}%
\let\kwd@sep\relax
%
\keyword@style%
\keyword@size%
\parindent\true@parindent%
\def\\{\hfill\break}%
\noindent{\keywordname@size\keyword@name:}\enspace}
\def\bmc@endkeyword{\par}
% \kwd[; ]{foo}
\newif\if@firstkeywordinlist \@firstkeywordinlisttrue
\DeclareRobustCommand*\kwd{\@ifnextchar[\@kwd{\@kwd[\kwd@sep]}}%
\def\@kwd[#1]#2{%
\ifx.#2.\else\expandafter\gdef\csname @\keyword@class\endcsname{}\fi%
\unskip#1{#2}\if@firstkeywordinlist\addto@keywords@list{#2}\@firstkeywordinlistfalse\else\addto@keywords@list{, #2}\fi\let\kwd@sep\sep}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BACKMATTER
\newenvironment{backmatter}
{\medskip\backmatter@style\backmatter@size\let\section\heading}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% interaction with hyperref
\def\test@hyperref{\@ifundefined{Hy@SetCatcodes}{}{\bmcart@hyperref@settings}}
\AtBeginDocument{\test@hyperref}
\def\bmcart@hyperref@settings{%
% from hyperref maketitle
\def\hy@frontmatter{%
\let\H@@origfootnotemark\@footnotemark
\let\H@@origfootnotetext\@footnotetext
\let\@footnotemark\H@@footnotemark
\let\@footnotetext\H@@footnotetext}
\def\hy@endfrontmatter{
\ifx\@footnotemark\H@@footnotemark
\let\@footnotemark\H@@origfootnotemark
\fi
\ifx\@footnotetext\H@@footnotetext
\let\@footnotetext\H@@origfootnotetext
\fi}
% hooks for the \thanksref, \thankstext:
\def\thankref@hyperlink##1{%
\edef\@tempx{##1thanks}%
\hbox{\hyperlink{##1}{\saferef{\@tempx}}}}
\def\thanks@hypertarget##1{\smash{\raise\baselineskip\hbox{\protect\hypertarget{##1}{}}}}
% redefine pagenumbering
% \let\pagenumbering\ims@pagenumbering
% activate href
\let\ims@href\href%
\let\safe@phantomsection\phantomsection
% put document info
\def\write@pdfinfo##1##2{\protected@write\@auxout{\no@harm}{\string\gdef\string##1{##2}}}
\@ifundefined{hy@title}{}{\pdfstringdef\@pdftitle{\hy@title}}
\@ifundefined{hy@author}{}{\pdfstringdef\@pdfauthor{\hy@author}}
\@ifundefined{hy@subject}{}{\pdfstringdef\@pdfsubject{\hy@subject}}
\@ifundefined{hy@keywords}{}{\pdfstringdef\@pdfkeywords{\hy@keywords}}
% MathSciNet:
\def\MR##1{\href{http://www.ams.org/mathscinet-getitem?mr=##1}{MR##1}}
}
\def\write@pdfinfo#1#2{}
\newtoks\authors@list
\def\addto@authors@list#1{%
\begingroup%
\no@harm%
\xdef\@act{\global\noexpand\authors@list{\the\authors@list#1}}\@act%
\endgroup}
\newtoks\keywords@list
\def\addto@keywords@list#1{%
\begingroup%
\no@harm%
\xdef\@act{\global\noexpand\keywords@list{\the\keywords@list#1}}\@act%
\endgroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% section, subsection etc.
% we do not like article appearance:
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-\medskipamount}%
{0.001\p@}%
{\sffamily\large\bfseries\raggedright\nohyphen}}
\renewcommand\subsection{\@startsection {subsection}{2}{\z@}%
{-\medskipamount}%
{0.001\p@}%
{\sffamily\raggedright\nohyphen}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-\medskipamount}%
{0.001\p@}%
{\itshape\raggedright}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{\medskipamount}%
{-10pt}%
{\itshape}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{0.1pt}%
{-1em}%
{\itshape}}
% Format for the counter:
\def\section@numbersep{}
\def\subsection@numbersep{}
\def\subsubsection@numbersep{}
\def\paragraph@numbersep{}
\def\subparagraph@numbersep{}
% Format for the counter:
\def\@seccntformat#1{{\csname #1@prefix\endcsname\csname the#1\endcsname\csname#1@numbersep\endcsname\enspace}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HEADING
\newcommand\heading{\@startsection{section}{1}{\z@}%
{\smallskipamount}%
{0.001\p@}%
{\backmatter@size\bfseries}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% APPENDIX
\renewcommand\appendix{\par
\let\section@cnt@size\appendix@size%
\let\old@section\section%
\def\section{\@ifnextchar*{\@appsectionstar}{\@appsectionnostar}}%
\def\section@prefix{\appendixname\ }%
\def\section@numbersep{:}%
\setcounter{section}{0}%
\setcounter{subsection}{0}%
\gdef\thesection{\@Alph\c@section}
}
\def\@appsectionstar*#1{%
\old@section*{#1}%
\setcounter{section}{1}%
\addcontentsline{toc}{section}{#1}
}
\def\@appsectionnostar#1{%
\ifx.#1.%
\def\section@numbersep{}\old@section[\appendixname\ \thesection]{}%
\else%
\def\section@numbersep{:}\old@section{#1}%
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% thebibliography
\let\saved@thebibliography\thebibliography
\def\thebibliography{%
\printaddresses%
\backmatter@style\backmatter@size
\let\section\heading\saved@thebibliography}
\def\@biblabel#1{#1.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fix if natbib is loaded:
\def\bmcfix@natbib{%
\def\bibfont{\backmatter@style\backmatter@size}
\def\bibsection{%
\printaddresses%
\heading*{\refname}}
\def\bibnumfmt##1{##1.}
\setlength\bibsep{0pt}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fix if amsmath is loaded:
\def\bmcfix@amsmath{%
\allowdisplaybreaks
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fix if amsthm is loaded:
\def\bmcfix@amsthm{%
\thm@notefont{\upshape}
\newtheoremstyle{plain} {\medskipamount}{\medskipamount}{\itshape}{\z@}{\bfseries}{}{1em}{}
\newtheoremstyle{definition}{\medskipamount}{\medskipamount}{\normalfont}{\z@}{\bfseries}{}{1em}{}
\newtheoremstyle{remark} {\medskipamount}{\medskipamount}{\normalfont}{\z@}{\itshape}{}{1em}{}
%
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep\medskipamount%
\trivlist
\labelsep.5em%
\item[\hskip\labelsep
\itshape ##1\@addpunct{}]\ignorespaces
}{\popQED\endtrivlist\@endpefalse}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check for the loaded classes:
\AtBeginDocument{%
\@ifpackageloaded{natbib}{\bmcfix@natbib}{}%
\@ifpackageloaded{amsthm}{\bmcfix@amsthm}{}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% number lines
\ifnumberlines@
\long\def\l@addto@macro#1#2{%
\toks@\expandafter{#1#2}%
\edef#1{\the\toks@}}
\setattribute{numberlines}{size}{\scriptsize\ttfamily}
\setattribute{numberlines}{skip}{0\p@}
\def\numberlines@hook{%
\l@addto@macro\@evenhead\put@numberlines@box%
\l@addto@macro\@oddhead\put@numberlines@box}
\g@addto@macro\ps@bmcheadings\numberlines@hook
\g@addto@macro\ps@copyright\numberlines@hook
\newbox\numberlines@box
\newskip\numberlines@box@skip
\def\set@numberlines@box{%
\setlength\numberlines@box@skip\headsep
\addtolength\numberlines@box@skip{5\p@}
%
\setbox\numberlines@box\vtop to\textheight{%
\parindent\z@
\vskip\z@
\@tempcnta=0
\@tempdima=\z@
\loop
\advance\@tempcnta by1
\advance\@tempdima by\baselineskip
\hbox to\textwidth{%
\llap{\numberlines@size\the\@tempcnta\kern\numberlines@skip}
\hfill
\rlap{\numberlines@size\kern\numberlines@skip\the\@tempcnta}}
\ifdim\@tempdima<\textheight\repeat
\vss
}%
%
\ht\numberlines@box\z@
\dp\numberlines@box\z@
}
\def\put@numberlines@box{\lower\numberlines@box@skip\hbox to\z@{\hss\copy\numberlines@box}}
\AtBeginDocument{\set@numberlines@box}
\fi
%**************** INICIALIZATION
\@twosidetrue
\pagenumbering{arabic}
\frenchspacing
%\init@settings
\pagestyle{bmcheadings}
\endinput
%%
%% History:
%% 2014.01.24 - \href in \doiurl replaced with \ims@href
%% End of file `bmcart.cls'.
diff --git a/bmc_template/readme.html b/bmc_template/readme.html
new file mode 100644
index 0000000..b57c226
--- /dev/null
+++ b/bmc_template/readme.html
...
BioMed Central TeX template files
BioMed Central TeX template - Version 0.6 (April 15th 2015)
1 BioMed Central LaTeX template distribution
bmc_article.tex
|
The BioMed Central manuscript template. Edit a copy of this file.
|
bmc_article.pdf
|
PDF created from The BioMed Central manuscript template.
|
bmc_article_2col.pdf
|
Two column layout PDF created from The BioMed Central manuscript template.
|
bmc_article.bib
|
A sample BibTeX bibliography file used to create a .bbl by BibTeX
using the bmc-mathphys.bst file.
|
bmc_article.bbl
|
A sample bibliography file created by BibTeX using the bmc-mathphys.bst file.
|
bmc-mathphys.bst
|
The BibTeX bibliography style file for the BioMed Central reference format
|
spbasic.bst
|
The BibTeX bibliography style file for the Springer Basic reference format
|
vancouver.bst
|
The BibTeX bibliography style file for the Vancouver reference format
|
|
|
bmcart.cls
|
Page layout style class for for manuscripts.
|
bmcart-biblio.sty
|
Style for bibliography tags.
|
readme.html
|
This document.
|
2 Requirements
2.1
The BioMed Central TeX template
should work with TeX distributions on any platform - it has been tested with
TeXShop on Mac OS
X and MiKTeX for Windows.
2.2
In order to submit a manuscript
as a .tex file to BioMed Central, you must
- use the BioMed Central template
- format your references with BibTeX using
the bmc-mathphys.bst style file
- not rely on any non-standard macros,
classes or files
If your TeX manuscript does not
meet the criteria above it will need to be converted to DVI format prior to
submission.
3 Guidelines for creating your manuscript using TeX
3.1
Follow the guidelines in the BioMed Central instructions
for authors given at http://www.biomedcentral.com/authors/.
3.2
Make sure your manuscript is compiled with LaTeX2e by using \documentclass{...} and not \documentstyle{...}
in the preamble at the top of your .tex document.
A template manuscript is supplied entitled bmc_article.tex which
sets up the preferred page layout based on the standard article.cls. Additional styles can be achieved by
\documenclass options: doublespacing - for double spaced text, linenumbers - for the line numbers on margins,
twocolumn - for twocolumn layout. Please note that for twocolumn layout \end{fmbox} position is different,
comment one after \end{artnotes} environment and uncomment one after \end{abstractbox} environment.
3.3
Make sure that you only a single .tex document
for the entire manuscript, as you will need to upload it as a single file (together
with its associated formatted bibliography file). Do not use the \input command
to include other .tex files.
3.4
Additional packages can be used in The BioMed Central template: amsthm and amsmath for
theorems and mathematics respectively, natbib for citation style, hyperref for url references.
See
http://www.ctan.org/pkg/amsthm
http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsmath.sty
http://www.ctan.org/tex-archive/macros/latex/contrib/natbib
http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref
for these style files if they are not in your local archive.
natbib.sty with sort&compress option turns [1,2,3,4] into [1-4].
hyperref.sty formats urls so they can be broken down
cleanly when overflowing the right text boundary.
4 BibTeX
References must be formatted with BibTeX using
the BioMed Central style file.
I.e. when using the template, choose one of the following: \bibliographystyle{bmc-mathphys},
\bibliographystyle{vancouver} or \bibliographystyle{spbasic} depending on the reference
style that your journal is using.
The bibliography datafile is referred to with \bibliography{datafile1, ..., ...}.
The template makes use of a sample bibliography called bmc_article.bib -
you should update the \bibliography tag to refer to your own bibliography.
For author-year bibliography (bmc-mathphys or spbasic):
- write to bib file (bmc-mathphys only):
@settings{label, options="nameyear"}
- write to tex file:
\nocite{label}
5 Notes on uploading your manuscript
5.1
Make sure you are submitting only one .tex document. Please note that figures,
large tables and any other reference material should be submitted as separate files, not embedded in the
manuscript.
5.2
A .bbl file is generated when you use BibTeX
to format your article's reference list. It contains formatted details of all
references used in the manuscript. After uploading a TeX file to BioMed Central,
you will then be prompted to upload the .bbl file which goes with it.
6 The TeX article layout
This is the sectioning for a BMC-series Research Article l
manuscript submission . . .
For other types of articles or for non-BMC series journals, see the relevant section headings at
href="http://www.biomedcentral.com/authors/">http://www.biomedcentral.com/authors/.
• Abstract
• Background
• Results
• Conclusions
• Background
• Methods
• Results and Discussion
• Conclusions
• Authors contributions
• Acknowledgements
• References
• Figures
• Tables
• Additional files
7 Further information
The latest version of the BioMed Central TeX
template distribution, and full instructions on its use, are available here:
http://www.biomedcentral.com/ifora/tex/
diff --git a/bmc_template/spbasic.bst b/bmc_template/spbasic.bst
new file mode 100644
index 0000000..4b879b2
--- /dev/null
+++ b/bmc_template/spbasic.bst
...
%%
%% This is file `spbasic.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% merlin.mbs (with options: `ay,nat,seq-lab,vonx,nm-rvx,ed-rev,jnrlst,dt-beg,yr-par,yrp-x,yrpp-xsp,note-yr,jxper,jttl-rm,thtit-a,pgsep-c,num-xser,ser-vol,jnm-x,btit-rm,bt-rm,pre-pub,doi,edparxc,blk-tit,in-col,fin-bare,pp,ed,abr,mth-bare,ord,jabr,xand,eprint,url,url-blk,em-x,nfss,')
%% ----------------------------------------
%%
%%********************************************************************************%%
%% %%
%% For Springer medical, life sciences, chemistry, geology, engineering and %%
%% computer science publications. %%
%% For use with the natbib package (see below). Default is author-year citations. %%
%% When citations are numbered, please use \usepackage[numbers]{natbib}. %%
%% A lack of punctuation is the key feature. Springer-Verlag 2004/10/15 %%
%% Report bugs and improvements to: Joylene Vette-Guillaume or Frank Holzwarth %%
%% %%
%%********************************************************************************%%
%%
%% Copyright 1994-2004 Patrick W Daly
% ===============================================================
% IMPORTANT NOTICE:
% This bibliographic style (bst) file has been generated from one or
% more master bibliographic style (mbs) files, listed above.
%
% This generated file can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.
% ===============================================================
% Name and version information of the main mbs file:
% \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
% For use with BibTeX version 0.99a or later
%-------------------------------------------------------------------
% This bibliography style file is intended for texts in ENGLISH
% This is an author-year citation style bibliography. As such, it is
% non-standard LaTeX, and requires a special package file to function properly.
% Such a package is natbib.sty by Patrick W. Daly
% The form of the \bibitem entries is
% \bibitem[Jones et al.(1990)]{key}...
% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
% The essential feature is that the label (the part in brackets) consists
% of the author names, as they should appear in the citation, with the year
% in parentheses following. There must be no space before the opening
% parenthesis!
% With natbib v5.3, a full list of authors may also follow the year.
% In natbib.sty, it is possible to define the type of enclosures that is
% really wanted (brackets or parentheses), but in either case, there must
% be parentheses in the label.
% The \cite command functions as follows:
% \citet{key} ==>> Jones et al. (1990)
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
% \citep{key} ==>> (Jones et al., 1990)
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
% \citeauthor{key} ==>> Jones et al.
% \citeauthor*{key} ==>> Jones, Baker, and Smith
% \citeyear{key} ==>> 1990
%---------------------------------------------------------------------
ENTRY
{ address
archive
author
booktitle
chapter
doi
edition
editor
eid
eprint
howpublished
institution
journal
key
month
note
number
organization
pages
publisher
school
series
title
type
url
volume
year
}
{}
{ label extra.label sort.label short.list }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
}
STRINGS { s t}
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ ", " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
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 {fin.entry}
{ duplicate$ empty$
'pop$
'write$
if$
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 {add.blank}
{ " " * before.all 'output.state :=
}
FUNCTION {no.blank.or.punct}
{ "\hspace{0pt}" * before.all 'output.state :=
}
FUNCTION {date.block}
{
add.blank
}
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
STRINGS {z}
FUNCTION {remove.dots}
{ 'z :=
""
{ z empty$ not }
{ z #1 #1 substring$
z #2 global.max$ substring$ 'z :=
duplicate$ "." = 'pop$
{ * }
if$
}
while$
}
FUNCTION {new.block.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.block
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {emphasize}
{ skip$ }
FUNCTION {tie.or.space.prefix}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$
}
FUNCTION {capitalize}
{ "u" change.case$ "t" change.case$ }
FUNCTION {space.word}
{ " " swap$ * " " * }
% Here are the language-specific definitions for explicit words.
% Each function has a name bbl.xxx where xxx is the English word.
% The language selected here is ENGLISH
FUNCTION {bbl.and}
{ "and"}
FUNCTION {bbl.etal}
{ "et~al" }
FUNCTION {bbl.editors}
{ "eds" }
FUNCTION {bbl.editor}
{ "ed" }
FUNCTION {bbl.edby}
{ "edited by" }
FUNCTION {bbl.edition}
{ "edn" }
FUNCTION {bbl.volume}
{ "vol" }
FUNCTION {bbl.of}
{ "of" }
FUNCTION {bbl.number}
{ "no." }
FUNCTION {bbl.nr}
{ "no." }
FUNCTION {bbl.in}
{ "in" }
FUNCTION {bbl.pages}
{ "pp" }
FUNCTION {bbl.page}
{ "p" }
FUNCTION {bbl.chapter}
{ "chap" }
FUNCTION {bbl.techrep}
{ "Tech. Rep." }
FUNCTION {bbl.mthesis}
{ "Master's thesis" }
FUNCTION {bbl.phdthesis}
{ "PhD thesis" }
FUNCTION {bbl.first}
{ "1st" }
FUNCTION {bbl.second}
{ "2nd" }
FUNCTION {bbl.third}
{ "3rd" }
FUNCTION {bbl.fourth}
{ "4th" }
FUNCTION {bbl.fifth}
{ "5th" }
FUNCTION {bbl.st}
{ "st" }
FUNCTION {bbl.nd}
{ "nd" }
FUNCTION {bbl.rd}
{ "rd" }
FUNCTION {bbl.th}
{ "th" }
MACRO {jan} {"Jan."}
MACRO {feb} {"Feb."}
MACRO {mar} {"Mar."}
MACRO {apr} {"Apr."}
MACRO {may} {"May"}
MACRO {jun} {"Jun."}
MACRO {jul} {"Jul."}
MACRO {aug} {"Aug."}
MACRO {sep} {"Sep."}
MACRO {oct} {"Oct."}
MACRO {nov} {"Nov."}
MACRO {dec} {"Dec."}
FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
#-2 #1 substring$ "1" =
{ bbl.th * }
{ duplicate$ #-1 #1 substring$
duplicate$ "1" =
{ pop$ bbl.st * }
{ duplicate$ "2" =
{ pop$ bbl.nd * }
{ "3" =
{ bbl.rd * }
{ bbl.th * }
if$
}
if$
}
if$
}
if$
}
MACRO {acmcs} {"ACM Comput Surv"}
MACRO {acta} {"Acta Inf"}
MACRO {cacm} {"Commun ACM"}
MACRO {ibmjrd} {"IBM~J~Res Dev"}
MACRO {ibmsj} {"IBM Syst~J"}
MACRO {ieeese} {"IEEE Trans Softw Eng"}
MACRO {ieeetc} {"IEEE Trans Comput"}
MACRO {ieeetcad}
{"IEEE Trans Comput Aid Des"}
MACRO {ipl} {"Inf Process Lett"}
MACRO {jacm} {"J~ACM"}
MACRO {jcss} {"J~Comput Syst Sci"}
MACRO {scp} {"Sci Comput Program"}
MACRO {sicomp} {"SIAM J~Comput"}
MACRO {tocs} {"ACM Trans Comput Syst"}
MACRO {tods} {"ACM Trans Database Syst"}
MACRO {tog} {"ACM Trans Graphic"}
MACRO {toms} {"ACM Trans Math Softw"}
MACRO {toois} {"ACM Trans Office Inf Syst"}
MACRO {toplas} {"ACM Trans Program Lang Syst"}
MACRO {tcs} {"Theor Comput Sci"}
FUNCTION {bibinfo.check}
{ swap$
duplicate$ missing$
{
pop$ pop$
""
}
{ duplicate$ empty$
{
swap$ pop$
}
{ swap$
pop$
}
if$
}
if$
}
FUNCTION {bibinfo.warn}
{ swap$
duplicate$ missing$
{
swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
""
}
{ duplicate$ empty$
{
swap$ "empty " swap$ * " in " * cite$ * warning$
}
{ swap$
pop$
}
if$
}
if$
}
FUNCTION {format.eprint}
{ eprint duplicate$ empty$
'skip$
{ "\eprint"
archive empty$
'skip$
{ "[" * archive * "]" * }
if$
"{" * swap$ * "}" *
}
if$
}
FUNCTION {format.url}
{ url empty$
{ "" }
{ "\urlprefix\url{" url * "}" * }
if$
}
STRINGS { bibinfo}
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 'bibinfo :=
duplicate$ empty$ 'skip$ {
's :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}{ f{}}{ jj}"
format.name$
remove.dots
bibinfo bibinfo.check
't :=
nameptr #1 >
{
namesleft #1 >
{ ", " * t * }
{
"," *
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal *
}
{ " " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
} if$
}
FUNCTION {format.names.ed}
{
format.names
}
FUNCTION {format.key}
{ empty$
{ key field.or.null }
{ "" }
if$
}
FUNCTION {format.authors}
{ author "author" format.names
}
FUNCTION {get.bbl.editor}
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
FUNCTION {format.editors}
{ editor "editor" format.names duplicate$ empty$ 'skip$
{
" " *
get.bbl.editor
"(" swap$ * ")" *
*
}
if$
}
FUNCTION {format.doi}
{ doi "doi" bibinfo.check
duplicate$ empty$ 'skip$
{
"\doi{" swap$ * "}" *
}
if$
}
FUNCTION {format.note}
{
note empty$
{ "" }
{ note #1 #1 substring$
duplicate$ "{" =
'skip$
{ output.state mid.sentence =
{ "l" }
{ "u" }
if$
change.case$
}
if$
note #2 global.max$ substring$ * "note" bibinfo.check
}
if$
}
FUNCTION {format.title}
{ title
duplicate$ empty$ 'skip$
{ "t" change.case$ }
if$
"title" bibinfo.check
}
FUNCTION {format.full.names}
{'s :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}" format.name$
't :=
nameptr #1 >
{
namesleft #1 >
{ ", " * t * }
{
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal *
}
{
numnames #2 >
{ "," * }
'skip$
if$
bbl.and
space.word * t *
}
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {author.editor.key.full}
{ author empty$
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ editor format.full.names }
if$
}
{ author format.full.names }
if$
}
FUNCTION {author.key.full}
{ author empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ author format.full.names }
if$
}
FUNCTION {editor.key.full}
{ editor empty$
{ key empty$
{ cite$ #1 #3 substring$ }
'key
if$
}
{ editor format.full.names }
if$
}
FUNCTION {make.full.names}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.full
{ type$ "proceedings" =
'editor.key.full
'author.key.full
if$
}
if$
}
FUNCTION {output.bibitem}
{ newline$
"\bibitem[{" write$
label write$
")" make.full.names duplicate$ short.list =
{ pop$ }
{ * }
if$
"}]{" * write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
FUNCTION {add.period}
{ duplicate$ empty$
'skip$
{ "." * add.blank }
if$
}
FUNCTION {if.digit}
{ duplicate$ "0" =
swap$ duplicate$ "1" =
swap$ duplicate$ "2" =
swap$ duplicate$ "3" =
swap$ duplicate$ "4" =
swap$ duplicate$ "5" =
swap$ duplicate$ "6" =
swap$ duplicate$ "7" =
swap$ duplicate$ "8" =
swap$ "9" = or or or or or or or or or
}
FUNCTION {n.separate}
{ 't :=
""
#0 'numnames :=
{ t empty$ not }
{ t #-1 #1 substring$ if.digit
{ numnames #1 + 'numnames := }
{ #0 'numnames := }
if$
t #-1 #1 substring$ swap$ *
t #-2 global.max$ substring$ 't :=
numnames #5 =
{ duplicate$ #1 #2 substring$ swap$
#3 global.max$ substring$
"," swap$ * *
}
'skip$
if$
}
while$
}
FUNCTION {n.dashify}
{
n.separate
'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 {word.in}
{ bbl.in capitalize
":" *
" " * }
FUNCTION {format.date}
{ year "year" bibinfo.check duplicate$ empty$
{
"empty year in " cite$ * "; set to ????" * warning$
pop$ "????"
}
'skip$
if$
extra.label *
before.all 'output.state :=
" (" swap$ * ")" *
}
FUNCTION {format.btitle}
{ title "title" bibinfo.check
duplicate$ empty$ 'skip$
{
}
if$
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
{ bbl.volume volume tie.or.space.prefix
"volume" bibinfo.check * *
series "series" bibinfo.check
duplicate$ empty$ 'pop$
{ emphasize ", " * swap$ * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.number.series}
{ volume empty$
{ number empty$
{ series field.or.null }
{ series empty$
{ number "number" bibinfo.check }
{ output.state mid.sentence =
{ bbl.number }
{ bbl.number capitalize }
if$
number tie.or.space.prefix "number" bibinfo.check * *
bbl.in space.word *
series "series" bibinfo.check *
}
if$
}
if$
}
{ "" }
if$
}
FUNCTION {is.num}
{ chr.to.int$
duplicate$ "0" chr.to.int$ < not
swap$ "9" chr.to.int$ > not and
}
FUNCTION {extract.num}
{ duplicate$ 't :=
"" 's :=
{ t empty$ not }
{ t #1 #1 substring$
t #2 global.max$ substring$ 't :=
duplicate$ is.num
{ s swap$ * 's := }
{ pop$ "" 't := }
if$
}
while$
s empty$
'skip$
{ pop$ s }
if$
}
FUNCTION {convert.edition}
{ extract.num "l" change.case$ 's :=
s "first" = s "1" = or
{ bbl.first 't := }
{ s "second" = s "2" = or
{ bbl.second 't := }
{ s "third" = s "3" = or
{ bbl.third 't := }
{ s "fourth" = s "4" = or
{ bbl.fourth 't := }
{ s "fifth" = s "5" = or
{ bbl.fifth 't := }
{ s #1 #1 substring$ is.num
{ s eng.ord 't := }
{ edition 't := }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
t
}
FUNCTION {format.edition}
{ edition duplicate$ empty$ 'skip$
{
convert.edition
output.state mid.sentence =
{ "l" }
{ "t" }
if$ change.case$
"edition" bibinfo.check
" " * bbl.edition *
}
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 duplicate$ empty$ 'skip$
{ duplicate$ multi.page.check
{
bbl.pages swap$
n.dashify
}
{
bbl.page swap$
}
if$
tie.or.space.prefix
"pages" bibinfo.check
* *
}
if$
}
FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
{ swap$ duplicate$ empty$
{ pop$ pop$ format.pages }
{
":" *
swap$
n.dashify
"pages" bibinfo.check
*
}
if$
}
if$
}
FUNCTION {format.journal.eid}
{ eid "eid" bibinfo.check
duplicate$ empty$ 'pop$
{ swap$ duplicate$ empty$ 'skip$
{
":" *
}
if$
swap$ *
}
if$
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
duplicate$ empty$ 'skip$
{
"volume" bibinfo.check
}
if$
number "number" bibinfo.check duplicate$ empty$ 'skip$
{
swap$ duplicate$ empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
swap$
"(" swap$ * ")" *
}
if$ *
eid empty$
{ format.journal.pages }
{ format.journal.eid }
if$
}
FUNCTION {format.chapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ bbl.chapter }
{ type "l" change.case$
"type" bibinfo.check
}
if$
chapter tie.or.space.prefix
"chapter" bibinfo.check
* *
pages empty$
'skip$
{ ", " * format.pages * }
if$
}
if$
}
FUNCTION {format.booktitle}
{
booktitle "booktitle" bibinfo.check
}
FUNCTION {format.in.ed.booktitle}
{ format.booktitle duplicate$ empty$ 'skip$
{
editor "editor" format.names.ed duplicate$ empty$ 'pop$
{
" " *
get.bbl.editor
"(" swap$ * ") " *
* swap$
* }
if$
word.in swap$ *
}
if$
}
FUNCTION {format.thesis.type}
{ type duplicate$ empty$
'pop$
{ swap$ pop$
"t" change.case$ "type" bibinfo.check
}
if$
}
FUNCTION {format.tr.number}
{ number "number" bibinfo.check
type duplicate$ empty$
{ pop$ bbl.techrep }
'skip$
if$
"type" bibinfo.check
swap$ duplicate$ empty$
{ pop$ "t" change.case$ }
{ tie.or.space.prefix * * }
if$
}
FUNCTION {format.article.crossref}
{
word.in
" \cite{" * crossref * "}" *
}
FUNCTION {format.book.crossref}
{ volume duplicate$ empty$
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
pop$ word.in
}
{ bbl.volume
capitalize
swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
}
if$
" \cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{
word.in
" \cite{" * crossref * "}" *
}
FUNCTION {format.org.or.pub}
{ 't :=
""
address empty$ t empty$ and
'skip$
{
t empty$
{ address "address" bibinfo.check *
}
{ t *
address empty$
'skip$
{ ", " * address "address" bibinfo.check * }
if$
}
if$
}
if$
}
FUNCTION {format.publisher.address}
{ publisher "publisher" bibinfo.warn format.org.or.pub
}
FUNCTION {format.organization.address}
{ organization "organization" bibinfo.check format.org.or.pub
}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{
journal
remove.dots
"journal" bibinfo.check
"journal" output.check
add.blank
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {book}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check
editor format.key output
add.blank
}
{ format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
}
if$
format.date "year" output.check
date.block
format.btitle "title" output.check
crossref missing$
{ format.bvolume output
format.edition output
new.sentence
format.number.series output
format.publisher.address output
}
{
new.sentence
format.book.crossref output.nonnull
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {booklet}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
howpublished "howpublished" bibinfo.check output
address "address" bibinfo.check output
format.doi output
format.url output
format.note output
format.eprint 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$
format.date "year" output.check
date.block
format.btitle "title" output.check
crossref missing$
{
format.bvolume output
format.edition output
format.publisher.address output
format.chapter.pages "chapter and pages" output.check
new.sentence
format.number.series output
}
{
format.chapter.pages "chapter and pages" output.check
new.sentence
format.book.crossref output.nonnull
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
format.bvolume output
format.edition output
format.number.series output
format.publisher.address output
format.chapter.pages output
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
new.sentence
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
publisher empty$
{ format.organization.address output }
{ organization "organization" bibinfo.check output
format.publisher.address output
}
if$
format.bvolume output
format.number.series output
format.pages output
}
{ format.incoll.inproc.crossref output.nonnull
format.pages output
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.btitle "title" output.check
new.sentence
organization "organization" bibinfo.check output
address "address" bibinfo.check output
format.edition output
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title
"title" output.check
new.sentence
bbl.mthesis format.thesis.type output.nonnull
school "school" bibinfo.warn output
address "address" bibinfo.check output
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors output
author format.key output
format.date "year" output.check
date.block
format.title output
new.sentence
howpublished "howpublished" bibinfo.check output
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title
"title" output.check
new.sentence
bbl.phdthesis format.thesis.type output.nonnull
school "school" bibinfo.warn output
address "address" bibinfo.check output
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {proceedings}
{ output.bibitem
format.editors output
editor format.key output
format.date "year" output.check
date.block
format.btitle "title" output.check
format.bvolume output
format.number.series output
publisher empty$
{ format.organization.address output }
{ organization "organization" bibinfo.check output
format.publisher.address output
}
if$
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {techreport}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title
"title" output.check
new.sentence
format.tr.number output.nonnull
institution "institution" bibinfo.warn output
address "address" bibinfo.check output
format.doi output
format.url output
format.note output
format.eprint output
fin.entry
}
FUNCTION {unpublished}
{ output.bibitem
format.authors "author" output.check
author format.key output
format.date "year" output.check
date.block
format.title "title" output.check
format.doi output
format.url output
format.note "note" output.check
format.eprint output
fin.entry
}
FUNCTION {default.type} { misc }
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 :=
"" 't :=
s #1 "{vv~}{ll}" format.name$
s num.names$ duplicate$
#2 >
{ pop$
" " * bbl.etal *
}
{ #2 <
'skip$
{ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
{
" " * bbl.etal *
}
{ bbl.and space.word * 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.short.authors}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
{ type$ "proceedings" =
'editor.key.label
'author.key.label
if$
}
if$
'short.list :=
}
FUNCTION {calc.label}
{ calc.short.authors
short.list
"("
*
year duplicate$ empty$
{ pop$ "????" }
'skip$
if$
*
'label :=
}
FUNCTION {sort.format.names}
{ 's :=
#1 'nameptr :=
""
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{ll{ }}{ f{ }}{ jj{ }}"
format.name$ 't :=
nameptr #1 >
{
" " *
namesleft #1 = t "others" = and
{ "zzzzz" * }
{ numnames #2 > nameptr #2 = and
{ "zz" * year field.or.null * " " * }
'skip$
if$
t sortify *
}
if$
}
{ 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 number.label }
FUNCTION {initialize.extra.label.stuff}
{ #0 int.to.chr$ 'last.label :=
"" 'next.extra :=
#0 'last.extra.num :=
#0 'number.label :=
}
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$
number.label #1 + 'number.label :=
}
FUNCTION {reverse.pass}
{ next.extra "b" =
{ "a" 'extra.label := }
'skip$
if$
extra.label 'next.extra :=
extra.label
duplicate$ empty$
'skip$
{ "{\natexlab{" swap$ * "}}" * }
if$
'extra.label :=
label extra.label * 'label :=
}
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}{" number.label int.to.str$ * "}" *
write$ newline$
"\providecommand{\natexlab}[1]{#1}"
write$ newline$
"\providecommand{\url}[1]{{#1}}"
write$ newline$
"\providecommand{\urlprefix}{URL }"
write$ newline$
"\expandafter\ifx\csname urlstyle\endcsname\relax"
write$ newline$
" \providecommand{\doi}[1]{DOI~\discretionary{}{}{}#1}\else"
write$ newline$
" \providecommand{\doi}{DOI~\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
write$ newline$
"\providecommand{\eprint}[2][]{\url{#2}}"
write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
%% End of customized bst file
%%
%% End of file `spbasic.bst'.
diff --git a/bmc_template/vancouver.bst b/bmc_template/vancouver.bst
new file mode 100644
index 0000000..bd7e340
--- /dev/null
+++ b/bmc_template/vancouver.bst
...
%%
%% This `vancouver.bst' bibliographic style file (for LaTeX/BibTeX) is
%% generated with the docstrip utility and modified manually to meet the
%% ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals''
%% as published in N Engl J Med 1997;336:309-315.
%% (also known as the Vancouver style)
%% This specification may be found on the web page of the
%% International Committe of Medical Journal Editors:
%%
%% http://www.icmje.org
%%
%%-------------------------------------------------------------------
%%
%% Copyright 2004 Folkert van der Beek
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Folkert van der Beek.
%%
%% Complaints, suggestions and comments may be sent to
%%
%% Folkert van der Beek
%%
%%-------------------------------------------------------------------
%%
%% This bibliography style file is intended for texts in ENGLISH
%% This is a numerical citation style, and as such is standard LaTeX.
%% It requires no extra package to interface to the main text.
%% The form of the \bibitem entries is
%% \bibitem{key}...
%% Usage of \cite is as follows:
%% \cite{key} ==>> [#]
%% \cite[chap. 2]{key} ==>> [#, chap. 2]
%% where # is a number determined by the ordering in the reference list.
%% The order in the reference list is that by which the works were originally
%% cited in the text, or that in the database.
%
%% To change the reference numbering system from [1] to 1,
%% put the following code in the preamble:
%% \makeatletter % Reference list option change
%% \renewcommand\@biblabel[1]{#1} % from [1] to 1
%% \makeatother %
%%
%%---------------------------------------------------------------------
%% List of all possible fields
ENTRY
{ address
assignee % for patents
author
booktitle % for articles in books
chapter % for incollection, esp. internet documents
cartographer % for maps
day
edition
editor
howpublished
institution % for technical reports
inventor % for patents
journal
key
month
note
number
organization
pages
part
publisher
school
series
title
type
volume
word
year
eprint % urlbst
doi % urlbst
url % urlbst
lastchecked % urlbst
updated % urlbst
}
{}
{ label }
%% Declaration of integer variables
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl } % urlbst...
INTEGERS { hrefform addeprints adddoiresolver }
% Following constants may be adjusted by hand, if desired
FUNCTION {init.config.constants}
{
"Available from: " 'urlintro := % prefix before URL
"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
"doi:" 'doiprefix := % text prefix printed before DOI ref
#0 'addeprints := % 0=no eprints; 1=include eprints
#0 'adddoiresolver := % 0=no DOI resolver; 1=include it
#0 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
}
INTEGERS {
bracket.state
outside.brackets
open.brackets
within.brackets
close.brackets
}
% ...urlbst to here
FUNCTION {init.state.consts}
{ #0 'outside.brackets := % urlbst
#1 'open.brackets :=
#2 'within.brackets :=
#3 'close.brackets :=
#0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
}
%% Declaration of string variables
STRINGS { s t}
% urlbst
FUNCTION {output.nonnull.original}
{ 's :=
output.state mid.sentence =
{ ". " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
% urlbst...
FUNCTION {output.nonnull}
{ % Save the thing we've been asked to output
's :=
% If the bracket-state is close.brackets, then add a close-bracket to
% what is currently at the top of the stack, and set bracket.state
% to outside.brackets
bracket.state close.brackets =
{ "]" *
outside.brackets 'bracket.state :=
}
'skip$
if$
bracket.state outside.brackets =
{ % We're outside all brackets -- this is the normal situation.
% Write out what's currently at the top of the stack, using the
% original output.nonnull function.
s
output.nonnull.original
}
{ % Still in brackets. Add open-bracket or (continuation) comma, add the
% new text (in s) to the top of the stack, and move to the close-brackets
% state, ready for next time (unless inbrackets resets it). If we come
% into this branch, then output.state is carefully undisturbed.
bracket.state open.brackets =
{ " [" * }
{ ", " * } % bracket.state will be within.brackets
if$
s *
close.brackets 'bracket.state :=
}
if$
}
% Call this function just before adding something which should be presented in
% brackets. bracket.state is handled specially within output.nonnull.
FUNCTION {inbrackets}
{ bracket.state close.brackets =
{ within.brackets 'bracket.state := } % reset the state: not open nor closed
{ open.brackets 'bracket.state := }
if$
}
FUNCTION {format.lastchecked}
{ lastchecked empty$
{ "" }
{ updated empty$
{ inbrackets "cited " lastchecked * }
{ inbrackets "updated " updated * "; cited " * lastchecked * }
if$
}
if$
}
% ...urlbst to here
FUNCTION {output}
{ duplicate$ empty$
'pop$
'output.nonnull
if$
}
FUNCTION {output.check}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'output.nonnull
if$
}
FUNCTION {fin.entry}
{
bracket.state close.brackets = % urlbst
{ "]" * }
'skip$
if$
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 {add.blank}
{ " " * before.all 'output.state :=
}
FUNCTION {no.blank.or.punct}
{ "" * before.all 'output.state :=
}
FUNCTION {add.semicolon}
{
";" *
no.blank.or.punct
}
FUNCTION {date.block}
{
"." *
no.blank.or.punct
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LOGICAL `NOT', `AND', AND `OR' %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Logical 'not':
% If the first element on the stack is A then this function
% does the following:
% push { #0 }
% push { #1 }
% So now the first 3 elements of the stack are
% { #1 } { #0 } A
% The first 3 are popped and subjected to 'if':
% If A > 0 then { #0 } is executed, else { #1 } is executed:
% if A > 0
% then 0
% else 1
% So consider integers as logicals, where 1 = true and 0 = false,
% then this does
% (if A then false else true)
% which is a logical 'not'.
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Logical 'and':
% If the first 2 elements on the stack are A B
% then this function does the following:
% push 'skip$
% push { pop$ #0 }
% So now first 4 elements are
% { pop$ #0 } 'skip$ A B
% The first 3 are popped and subjected to 'if' (B is on top of
% the stack):
% If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed:
% if A > 0
% then (B stays on top of stack)
% else (B is popped and #0 is pushed)
% So consider integers as logicals, where 1 = true and 0 = false,
% then this does
% (if A then B else false)
% which is a logical 'and'.
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Logical 'or':
% If the first 2 elements on the stack are A B
% then this function does the following:
% push { pop$ #1 }
% push 'skip$
% So now first 4 elements are
% 'skip$ { pop$ #1 } A B
% The first 3 are popped and subjected to 'if' (B is on top of
% the stack):
% If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed:
% if A > 0
% then (B is popped and #1 is pushed)
% else (B stays on top of stack)
% So consider integers as logicals, where 1 = true and 0 = false,
% then this does
% (if A then true else B)
% which is a logical 'or'.
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GENERAL PURPOSE FUNCTIONS FOR FORMATTING %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% issues warning if field is empty
% call with
% "field" field warning.if.empty
% Note that the first field must be between quotes
% because it is the fieldname for use in the warning message.
%
FUNCTION {warning.if.empty}
{ empty$
{ "No " swap$ * " in " * cite$ * warning$ }
{ pop$ }
if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% encloses string in pre- and postfix string
% call with
% prefix postfix S enclose.check
% delivers empty string if S empty
%
FUNCTION {enclose.check}
{ duplicate$ empty$
{ pop$ pop$ pop$
""
}
{ swap$ * * }
if$
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% emphasizes top of stack
% call with
% string" emphasize.check
%
FUNCTION {emphasize.check}
{ "\Bem{" swap$
"}" swap$
enclose.check
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% brackets top of stack
% call with
% "string" bracket.check
%
FUNCTION {bracket.check}
{ "[" swap$
"]" swap$
enclose.check
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% parenthesizes top of stack
% call with
% "string" parenthesize
%
FUNCTION {parenthesize.check}
{ "(" swap$
")" swap$
enclose.check
}
STRINGS {z}
FUNCTION {remove.dots}
{ 'z := % expects string on top of the stack, pops the string and assigns it to variable z
"" % push empty string
{ z empty$ not } % returns 0 if variable z is empty
{ z #1 #1 substring$ % push the first character of variable z
z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
duplicate$ "\" = % pushes 1 if the last character is "\", otherwise 0
{ * % concatenates the last 2 literals
z #1 #1 substring$ % push the first character of variable z
z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z
* % concatenates the last 2 literals, i.e. every character, even a dot, following a "\" will be printed
}
{ duplicate$ "." = % pushes 1 if the last character is ".", otherwise 0
'pop$ % pushes the pop$ function
{ * } % concatenates the last 2 literals
if$ % pops the last character if it is a dot, otherwise concatenates it with the string on top of the stack
}
if$
}
while$
}
INTEGERS {l}
FUNCTION{string.length}
{
#1 'l :=
{ duplicate$ duplicate$ #1 l substring$ = not }
{ l #1 + 'l := }
while$
pop$ l
}
STRINGS {replace find text}
INTEGERS {find_length}
FUNCTION {find.replace}
{
'replace :=
'find :=
'text :=
find string.length 'find_length :=
""
{ text empty$ not }
{ text #1 find_length substring$ find =
{
replace *
text #1 find_length + global.max$ substring$ 'text :=
}
{ text #1 #1 substring$ *
text #2 global.max$ substring$ 'text :=
}
if$
}
while$
}
FUNCTION {new.block.checka}
{ empty$
'skip$
'new.block
if$
}
FUNCTION {new.block.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.block
if$
}
FUNCTION {new.sentence.checka}
{ empty$
'skip$
'new.sentence
if$
}
FUNCTION {new.sentence.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.sentence
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {emphasize}
{ skip$ }
FUNCTION {tie.or.space.prefix}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$
}
FUNCTION {capitalize}
{ "u" change.case$ "t" change.case$ }
FUNCTION {space.word}
{ " " swap$ * " " * }
% Here are the language-specific definitions for explicit words.
% Each function has a name bbl.xxx where xxx is the English word.
% The language selected here is ENGLISH
FUNCTION {bbl.and}
{ "and"}
FUNCTION {bbl.etal}
{ "et~al." }
FUNCTION {bbl.editors}
{ "editors" }
FUNCTION {bbl.editor}
{ "editor" }
FUNCTION {bbl.cartographers}
{ "cartographers" }
FUNCTION {bbl.cartographer}
{ "cartographer" }
FUNCTION {bbl.inventors}
{ "inventors" }
FUNCTION {bbl.inventor}
{ "inventor" }
FUNCTION {bbl.assignees}
{ "assignees" }
FUNCTION {bbl.assignee}
{ "assignee" }
FUNCTION {bbl.edby}
{ "edited by" }
FUNCTION {bbl.edition}
{ "ed." }
FUNCTION {bbl.volume}
{ "vol." }
FUNCTION {bbl.of}
{ "of" }
FUNCTION {bbl.number}
{ "no." }
FUNCTION {bbl.nr}
{ "no." }
FUNCTION {bbl.in}
{ "in" }
FUNCTION {bbl.pages}
{ "p." }
FUNCTION {bbl.page}
{ "p." }
FUNCTION {bbl.chapter}
{ "chap." }
FUNCTION {bbl.techrep}
{ "Tech. Rep." }
FUNCTION {bbl.mthesis}
{ "Master's thesis" }
FUNCTION {bbl.phdthesis}
{ "Ph.D. thesis" }
FUNCTION {bbl.first}
{ "1st" }
FUNCTION {bbl.second}
{ "2nd" }
FUNCTION {bbl.third}
{ "3rd" }
FUNCTION {bbl.fourth}
{ "4th" }
FUNCTION {bbl.fifth}
{ "5th" }
FUNCTION {bbl.st}
{ "st" }
FUNCTION {bbl.nd}
{ "nd" }
FUNCTION {bbl.rd}
{ "rd" }
FUNCTION {bbl.th}
{ "th" }
MACRO {jan} {"Jan."}
MACRO {feb} {"Feb."}
MACRO {mar} {"Mar."}
MACRO {apr} {"Apr."}
MACRO {may} {"May"}
MACRO {jun} {"Jun."}
MACRO {jul} {"Jul."}
MACRO {aug} {"Aug."}
MACRO {sep} {"Sep."}
MACRO {oct} {"Oct."}
MACRO {nov} {"Nov."}
MACRO {dec} {"Dec."}
FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
#-2 #1 substring$ "1" =
{ bbl.th * }
{ duplicate$ #-1 #1 substring$
duplicate$ "1" =
{ pop$ bbl.st * }
{ duplicate$ "2" =
{ pop$ bbl.nd * }
{ "3" =
{ bbl.rd * }
{ bbl.th * }
if$
}
if$
}
if$
}
if$
}
FUNCTION {bibinfo.check}
{ swap$
duplicate$ missing$
{
pop$ pop$
""
}
{ duplicate$ empty$
{
swap$ pop$
}
{ swap$
pop$
}
if$
}
if$
}
FUNCTION {bibinfo.warn}
{ swap$
duplicate$ missing$
{
swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
""
}
{ duplicate$ empty$
{
swap$ "empty " swap$ * " in " * cite$ * warning$
}
{ swap$
pop$
}
if$
}
if$
}
STRINGS { bibinfo}
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 'bibinfo :=
duplicate$ empty$ 'skip$ {
"." ". " find.replace 's :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{vv~}{ll}{ f{}}{ jj}"
format.name$
remove.dots
bibinfo bibinfo.check
't :=
nameptr #1 >
{
nameptr #6
#1 + =
numnames #6
> and
{ "others" 't :=
#1 'namesleft := }
'skip$
if$
namesleft #1 >
{ ", " * t * }
{
"," *
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal *
}
{ " " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
} if$
}
FUNCTION {format.names.org}
{ 'bibinfo :=
duplicate$ empty$ 'skip$ {
's :=
"" 't :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
"{ff~}{vv~}{ll}"
format.name$
bibinfo bibinfo.check
't :=
nameptr #1 >
{
namesleft #1 >
{ "; " * t * }
{
";" *
s nameptr "{ll}" format.name$ duplicate$ "others" =
{ 't := }
{ pop$ }
if$
t "others" =
{
" " * bbl.etal *
}
{ " " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
} if$
}
FUNCTION {format.names.ed}
{
format.names
}
FUNCTION {format.authors}
{
author "author" format.names
%%"." " " "author" find.replace format.names
}
FUNCTION {format.organizations}
{ organization "organization" format.names.org
}
FUNCTION {get.bbl.editor}
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
FUNCTION {get.bbl.cartographer}
{ cartographer num.names$ #1 > 'bbl.cartographers 'bbl.cartographer if$ }
FUNCTION {get.bbl.inventor}
{ inventor num.names$ #1 > 'bbl.inventors 'bbl.inventor if$ }
FUNCTION {get.bbl.assignee}
{ assignee num.names$ #1 > 'bbl.assignees 'bbl.assignee if$ }
FUNCTION {format.editors}
{ editor "editor" format.names duplicate$ empty$ 'skip$
{
"," *
" " *
get.bbl.editor
*
}
if$
}
FUNCTION {format.assignees}
{ assignee "assignee" format.names.org duplicate$ empty$ 'skip$
{
"," *
" " *
get.bbl.assignee
*
}
if$
}
FUNCTION {format.cartographers}
{ cartographer "cartographer" format.names duplicate$ empty$ 'skip$
{
"," *
" " *
get.bbl.cartographer
*
}
if$
}
FUNCTION {format.inventors}
{ inventor "inventor" format.names duplicate$ empty$ 'skip$
{
"," *
" " *
get.bbl.inventor
*
}
if$
}
FUNCTION {format.note}
{
note empty$
{ "" }
{ note #1 #1 substring$
duplicate$ "{" =
'skip$
{ output.state mid.sentence =
{ "l" }
{ "u" }
if$
change.case$
}
if$
note #2 global.max$ substring$ * "note" bibinfo.check
}
if$
}
FUNCTION {format.title}
{ title
%%duplicate$ empty$ 'skip$
%% { "t" change.case$ }
%%if$
"title" bibinfo.check
}
FUNCTION {format.type}
{ type empty$
'skip$
{ inbrackets type }
%%{ add.blank "[" type * "]" * }
if$
}
FUNCTION {output.bibitem}
{ outside.brackets 'bracket.state := % urlbst
newline$
"\bibitem{" write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
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 {word.in}
{ bbl.in capitalize
":" *
" " * }
FUNCTION {format.journal.date}
{
month "month" bibinfo.check
duplicate$ empty$
year "year" bibinfo.check duplicate$ empty$
{
swap$ 'skip$
{ "there's a month but no year in " cite$ * warning$ }
if$
*
}
{ swap$ 'skip$
{
" " * swap$
}
if$
*
remove.dots
}
if$
duplicate$ empty$
'skip$
{
before.all 'output.state :=
after.sentence 'output.state :=
}
if$
}
FUNCTION {format.date}
{
no.blank.or.punct
";"
duplicate$ empty$
year "year" bibinfo.check duplicate$ empty$
{ swap$ 'skip$
{ "there's a month but no year in " cite$ * warning$ }
if$
*
}
{ swap$ 'skip$
{
swap$
" " * swap$
}
if$
*
}
if$
}
FUNCTION {format.btitle}
{ title "title" bibinfo.check
duplicate$ empty$ 'skip$
{
}
if$
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
{ bbl.volume volume tie.or.space.prefix
"volume" bibinfo.check * *
series "series" bibinfo.check
duplicate$ empty$ 'pop$
{ swap$ bbl.of space.word * swap$
emphasize * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.number.series}
{ volume empty$
{ number empty$
{ series field.or.null }
{ series empty$
{ number "number" bibinfo.check }
{ output.state mid.sentence =
{ bbl.number }
{ bbl.number capitalize }
if$
number tie.or.space.prefix "number" bibinfo.check * *
bbl.in space.word *
series "series" bibinfo.check *
}
if$
}
if$
}
{ "" }
if$
}
FUNCTION {is.num}
{ chr.to.int$
duplicate$ "0" chr.to.int$ < not
swap$ "9" chr.to.int$ > not and
}
FUNCTION {extract.num}
{ duplicate$ 't :=
"" 's :=
{ t empty$ not }
{ t #1 #1 substring$
t #2 global.max$ substring$ 't :=
duplicate$ is.num
{ s swap$ * 's := }
{ pop$ "" 't := }
if$
}
while$
s empty$
'skip$
{ pop$ s }
if$
}
FUNCTION {convert.edition}
{ extract.num "l" change.case$ 's :=
s "first" = s "1" = or
{ bbl.first 't := }
{ s "second" = s "2" = or
{ bbl.second 't := }
{ s "third" = s "3" = or
{ bbl.third 't := }
{ s "fourth" = s "4" = or
{ bbl.fourth 't := }
{ s "fifth" = s "5" = or
{ bbl.fifth 't := }
{ s #1 #1 substring$ is.num
{ s eng.ord 't := }
{ edition 't := }
if$
}
if$
}
if$
}
if$
}
if$
}
if$
t
}
FUNCTION {format.edition}
{ edition duplicate$ empty$ 'skip$
{
convert.edition
output.state mid.sentence =
{ "l" }
{ "t" }
if$ change.case$
"edition" bibinfo.check
" " * bbl.edition *
}
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 duplicate$ empty$ 'skip$
{ duplicate$ multi.page.check
{
bbl.pages swap$
n.dashify
}
{
bbl.page swap$
}
if$
tie.or.space.prefix
"pages" bibinfo.check
* *
}
if$
}
FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
{ swap$ duplicate$ empty$
{ pop$ pop$ format.pages }
{
":" *
swap$
n.dashify
"pages" bibinfo.check
*
}
if$
}
if$
}
FUNCTION {format.vol.num}
{ volume field.or.null
duplicate$ empty$ 'skip$
{
"volume" bibinfo.check
}
if$
number "number" bibinfo.check duplicate$ empty$ 'skip$
{
swap$ duplicate$ empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
swap$
"(" swap$ * ")" *
}
if$ *
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
duplicate$ empty$ 'skip$
{
"volume" bibinfo.check
}
if$
number "number" bibinfo.check duplicate$ empty$ 'skip$
{
swap$ duplicate$ empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
swap$
"(" swap$ * ")" *
}
if$ *
format.journal.pages
}
FUNCTION {format.chapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ bbl.chapter }
{ type "l" change.case$
"type" bibinfo.check
}
if$
chapter tie.or.space.prefix
"chapter" bibinfo.check
* *
pages empty$
'skip$
{ ", " * format.pages * }
if$
}
if$
}
FUNCTION {format.booktitle}
{
booktitle "booktitle" bibinfo.check
}
FUNCTION {format.in.ed.booktitle}
{ format.booktitle duplicate$ empty$ 'skip$
{
editor "editor" format.names.ed duplicate$ empty$ 'pop$
{
"," *
" " *
get.bbl.editor
". " *
* swap$
* }
if$
word.in swap$ *
}
if$
}
FUNCTION {format.in.ed.title}
{ format.title duplicate$ empty$ 'skip$
{
editor "editor" format.names.ed duplicate$ empty$ 'pop$
{
"," *
" " *
get.bbl.editor
". " *
* swap$
* }
if$
word.in swap$ *
}
if$
}
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
month empty$ year empty$ note empty$
and and and and and
{ "all relevant fields are empty in " cite$ * warning$ }
'skip$
if$
}
FUNCTION {format.thesis.type}
{ type duplicate$ empty$
'pop$
{ swap$ pop$
"t" change.case$ "type" bibinfo.check
}
if$
}
FUNCTION {format.tr.number}
{
number "number" bibinfo.check
%%type duplicate$ empty$
%%{ pop$ bbl.techrep }
%%'skip$
%%if$
%%"type" bibinfo.check
%%swap$ duplicate$ empty$
%%{ pop$ "t" change.case$ }
%%{ tie.or.space.prefix * * }
%%if$
}
FUNCTION {format.org.or.pub}
{ 't :=
""
address empty$ t empty$ and
'skip$
{
address "address" bibinfo.check *
t empty$
'skip$
{ address empty$
'skip$
{ ": " * }
if$
t *
}
if$
}
if$
}
FUNCTION {format.publisher.address}
{ publisher "publisher" bibinfo.warn format.org.or.pub
}
FUNCTION {format.organization.address}
{ organization "organization" bibinfo.check format.org.or.pub
}
FUNCTION {format.institution.address}
{ institution "institution" bibinfo.check format.org.or.pub
}
% urlbst...
% Functions for making hypertext links.
% In all cases, the stack has (link-text href-url)
%
% make 'null' specials
FUNCTION {make.href.null}
{
pop$
}
% make hypertex specials
FUNCTION {make.href.hypertex}
{
"\special {html: }" * swap$ *
"\special {html:}" *