@STRING{procspie = "Proc. SPIE"}
@STRING{pub-adobe = "Adobe Systems Incorporated"}

%% Test that brace-delimited names are not initialized when using a style that would otherwise initial them.
@INITIALIZE1{initialize1,
  title = {On vortex motion},
  author = {{Lord} Kelvin},
  year = {1869}
}

%% Test the name initialization when a name ends in a period.
@INITIALIZE2{initialize2,
  title = {Implementation scheme for recursion in spectral dimension},
  institution = {Chemical Research, Development and Engineering Center},
  year = {1992},
  author = {Chein-I. Chang}
}

%% Test whether a trailing comma after a title is removed when the title ends with '?'.
@TITLE_PUNCTUATION{title_punctuation,
  title = {Are there quantum jumps?},
  author = {J. S. Bell},
  booktitle = {Speakable and Unspeakable in Quantum Mechanics},
  publisher = {Cambridge University Press},
  year = {1987},
  pages = {201--212}
}

%% Test whether brace-delimited quotations in a quote-delimited entry are parsed correctly.
@QUOTE_DELIMITS{quote_delimits,
  title = "Comments on {"}Filenames and Fonts{"}",
  author = "Somebody Else",
  year = "0000"
}

@PAGE_RANGE{page_range,
  title = {Interview with Walter Stewart},
  author = {Doug Stewart},
  journal = {Omni},
  year = {1989},
  volume = {11},
  pages = {64--66, 87--92, 94}
}

%% Test the option 'use_sentence_case' to see if upper case letters are forced to lower case except when at brace level > 0.
@USE_SENTENCE_CASE{use_sentence_case,
  title = {On the {C}ram{\'e}r-{R}ao Bound under Parametric Constraints},
  author = {Petre Stoica and Boon Chong Ng},
  year = {1998}
}

%% Test the ability to parse nested italics, so that even-order italics are written with \textup{} rather than \textit{}.
@NESTED_ITALICS1{nested_italics1,
  title = {Experimental realization of Einstein-Podolsky-Rosen-Bohm \textit{Gedenkenexperiment}: a new violation of Bell's inequalities},
  author = {Alain Aspect and Philippe Grangier and G{\'e}rard Roger},
  year = {1982}
}

%% Test the ability to parse nested italics, so that even-order italics are written with \textup{} rather than \textit{}.
@NESTED_ITALICS2{nested_italics2,
  title1 = {z\textit{{{\textit{mm}}w\textit{{qq}}}}\textit{zz}y},
  title2 = {a\textit{\textit{\textit{bbb} cc}d}eee\textit{ff}g}
}

%% Test the 'french_initials' option, where names with digraphs are truncated only after the digraph. That is, 'Charles' -> 'Ch.' not 'C.'.
@FRENCH_INITIALS{french_initials,
  title = {Sur l'application de ph{\'e}nom{\`e}nes d'interf{\'e}rence {\`a} la solution de divers probl{\`e}mes de spectroscopie et de m{\'e}trologie},
  author = {A. Perot and Charles Fabry},
  year = {1899}
}

%% Test (1,2) that namedict['last'] cannot be empty; (3,4) that the prefix is correctly parsed in a space-delimited name, (5,6) that a comma-delimited
%% name containing one comma is correctly parsed, (7) that empty name tokens do not raise errors, (8,9) that a comma-delimited name containing two
%% commas is correctly parsed (even when the suffix part is empty). Also test that "name1, and name2" parses correctly as two names (one comma-
%% delimited and one not).
@NAME_PARSING1{name_parsing1,
  title = {None},
  author = {AA and AA bb and AA bb CC and AA bb CC dd EE and bb CC dd EE, AA and bb, AA and BB, and bb CC,XX, AA and BB,, AA},
  year = {0000}
}

%% Test that the new formats of three-comma-delimited names and four-comma-delimited names are parsed correctly.
@NAME_PARSING2{name_parsing2,
  title = {None},
  author = {First, Middle, Prefix, Last and First, Middle, Prefix, Last, Suffix},
  year = {0000}
}

%% Test that brace-delimited compound names are parsed correctly.
@NAME_PARSING3{name_parsing3,
  title = {On an absolute thermometric scale, founded on Carnot's theory of the motive power of heat},
  author = {W. {Thomson [Lord Kelvin]}},
  year = {1848}
}

%% Test that a LaTeX-markup first letter of a first name is properly parsed and abbreviated.
@NAME_PARSING4{name_parsing4,
  author = "Germund Dalhquist and {\AA}ke Bj{\"o}rck and Ned Anderson",
  title = "Numerical Methods",
  publisher = "Prentice-Hall,
  year = "1974"
}

%% Test that a parenthesis in the author name string is parsed correctly.
@NAME_PARSING5{name_parsing5,
  author =  "Thomas H. Cormen and Charles E. (Eric) Leiserson and Ronald L. Rivest",
  title =   "Introduction to Algorithms",
  publisher = "McGraw-Hill",
  year =    "1990"
}

%% Test that for nested bold formatting, the even-order operators are converted to \textmd{}.
@NESTED_BOLD{nested_bold,
  title1 = {a\textbf{bb{\A}}c\textbf{d}ff\textbf{{g}}h{i}!},
  title2 = {a\textbf{b{c{\textbf{d}}e\textbf{f}g}h}i}
}

%% Test that nested quotes are properly parsed, and that special character markup like \"e and \'o is not mistaken
%% for quotation marks.
@NESTED_QUOTES{nested_quotes,
  title1 = {"`This is' `quoted and ``nested''.'"},
  title2 = {"This is `quoted and ``nested''.'"},
  title3 = {`"This is `quoted and ``nested''.'"'},
  title4 = {`This is "`quoted and ``nested''.'"'},
  title5 = {`This is "`qu\'oted and \"e ``nested''.'"'}
}

%% Test that when there are more authors than "option.maxauthors", then the bibliography only shows "option.minauthors" number of names.
@MANY_AUTHORS{many_authors,
  title = {SEGUE: a spectroscopic survey of 240,000 stars with $g = 14$--20},
  author = {Brian Yanny and Constance Rockosi and Heidi Jo Newberg and Gillian R. Knapp and Jennifer K. Adelman-McCarthy and Bonnie Alcorn and Sahar Allam and Carlos Allende Prieto and Deokkeun An and Kurt S.~J. Anderson and Scott Anderson and Coryn A.~L. Bailer-Jones and Steve Bastian and Timothy C. Beers and Eric Bell and Vasily Belokurov and Dmitry Bizyaev and Norm Blythe and John J. Bochanski and William N. Boroski and Jarle Brinchmann and J. Brinkmann and Howard Brewington and Larry Carey and Kyle M. Cudworth and Michael Evans and N.~W. Evans and Evalyn Gates and B.~T. G{\"a}nsicke and Bruce Gillespie and Gerald Gilmore and Ada Nebot Gomez-Moran and Eva K. Grebel and Jim Greenwell and James E. Gunn and Cathy Jordan and Wendell Jordan and Paul Harding and Hugh Harris and John S. Hendry and Diana Holder and Inese I. Ivans and {\v{Z}}eljko Ivezi{\v{c}} and Sebastian Jester and Jennifer A. Johnson and Stephen M. Kent and Scot Kleinman and Alexei Kniazev and Jurek Krzesinski and Richard Kron and Nikolay Kuropatkin and Svetlana Lebedeva and Young Sun Lee and R. French Leger and S{\'e}bastien L{\'e}pine and Steve Levine and Huan Lin and Daniel C. Long and Craig Loomis and Robert Lupton and Olena Malanushenko and Viktor Malanushenko and Bruce Margon and David Martinez-Delgado and Peregrine McGehee and Dave Monet and Heather L. Morrison and Jeffrey A. Munn and Eric H. Neilsen Jr and Atsuko Nitta and John E. Norris and Dan Oravetz and Russell Owen and Nikhil Padmanabhan and Kaike Pan and R.~S. Peterson and Jeffrey R. Pier and Jared Platson and Paola Re Fiorentin and Gordon T. Richards and Hans-Walter Rix and David J. Schlegel and Donald P. Schneider and Matthias R. Schreiber and Axel Schwope and Valena Sibley and Audrey Simmons and Stephanie A. Snedden and J. Allyn Smith and Larry Stark and Fritz Stauffer and M. Steinmetz and C. Stoughton and Mark SubbaRao and Alex Szalay and Paula Szkody and Aniruddha R. Thakar and Sivarani Thirupathi and Douglas Tucker and Alan Uomoto and Dan Vanden Berk and Simon Vidrih and Yogesh Wadadekar and Shannon Watters and Ron Wilhelm and Rosemary F.~G. Wyse and Jean Yarger and Dan Zucker},
  journal = {Astron. J.},
  year = {2009},
  volume = {137},
  pages = {4377--4399},
  number = {5},
}

%% Test that when there are more editors than "options.maxeditors", then the bibliography only shows "option.mineditors" number of names.
@MANY_EDITORS{many_editors,
  title = {Sensors and Camera Systems for Scientific, Industrial, and Digital Photography Applications},
  year = {2000},
  editor = {Morley M. Blouke and Nitin Sampat and Williams, Jr., George M. and Thomas Yeh}
}

%% Test that the "nameabbrev" field is properly used when formatting an author name.
@NAME_ABBREV1{name_abbrev1,
  author = {Jean de la Fontaine du Bois Joli},
  title = {Something},
  year = {1234},
  nameabbrev = {Jean de la Fontaine > {JdlF.}}
}

%% Test that multiple "nameabbrev" field entries are properly used when formatting an author name.
@NAME_ABBREV2{name_abbrev2,
  author = {Jean de la Fontaine
            du Bois Joli},
  title = {Something},
  year = {1234},
  nameabbrev = {de la Fontaine > {dlF.}, du Bois > du}
}

%% Test that brace-delimited double-quotes inside a quote-delimited field are parsed correctly.
@BRACE_DELIMITED_QUOTES{brace_delimited_quotes,
  title = "Comments on {"}Filenames and Fonts{"}",
  author = "Someone New",
  year = 4321
}

%% Test that when the "options.procspie_as_journal" option is True, then the INPROCEEDINGS entry type with "series=procspie" is
%% converted to a ARTICLE type with journal name "Proc. SPIE". Note that the entry type here must ne "inproceedings" and not
%% "procspie_as_journal".
@INPROCEEDINGS{procspie_as_journal,
  title = {Task-specific snapshot Mueller matrix channeled spectropolarimeter optimization},
  author = {Andrey S. Alenin and J. Scott Tyo},
  booktitle = {Polarization: Measurement, Analysis, and Remote Sensing X},
  year = {2012},
  eid = {836402},
  volume = {8364},
  series = procspie
}

%% Part one of testing that crossrefs are correctly applied.
@CROSSREF1{crossref1,
  title = {Task-specific snapshot Mueller matrix channeled spectropolarimeter optimization},
  author = {Andrey S. Alenin and J. Scott Tyo},
  year = {2012},
  eid = {836402},
  volume = {8364},
  series = procspie,
  crossref = {ProcSPIE8364}
}

%% Part two of testing that crossrefs are correctly applied.
@PROCEEDINGS{ProcSPIE8364,
  title = {Polarization: Measurement, Analysis, and Remote Sensing X},
  year = {2012},
  editor = {David B. Chenault and Dennis H. Goldstein},
  volume = {8364},
  series = {procspie}
}

%% Test that non-English characters are formatted correctly.
@JAPANESE{japanese,
  author-ja = {{乙部} 厳己 and Paul Horton},
  author-yomi = {よしき おとべ and ポール ホートン},
  author-en = {Yoshiki Otobe and Paul Horton},
  title-ja = {jBibTEXの使用法},
  title-en = {How to use JBibTeX},
  publisher-ja = {ソフトバンクパブリッシング},
  publisher-en = {Soft Bank Publishing},
  year = {2006},
  pages = {17--24},
  language = {Japanese}
}

%% Test whether a trailing comma at the end of the last field causes a parsing error.
@TRAILING_COMMA{trailing_comma,
  title = {Looney tunes},
  author = "Bugs Bunny",
  year = {2001},
}

%% Test whether a "preamble" entrytype correctly places text into the BBL file preamble.
@PREAMBLE{"\providecommand{\um}{$\mu$m}"}

%% Test the month formatting with an abbreviation key.
@MONTHNAME1{monthname1,
  title = {Looney tunes},
  author = "Bugs Bunny",
  month = apr,
  year = {2001},
}

%% Test the month formatting with a numeric string.
@MONTHNAME2{monthname2,
  title = {Looney tunes},
  author = "Bugs Bunny",
  month = "4",
  year = {2001},
}

%% Test the month formatting with a numeral.
@MONTHABBREV{monthabbrev,
  title = {Looney tunes},
  author = "Bugs Bunny",
  month = 4,
  year = {2001},
}

%% Test the month formatting with a regular name string.
@MONTHFORMAT4{monthformat4,
  title = {Looney tunes},
  author = "Bugs Bunny",
  month = "April",
  year = {2001},
}

%% Test the name ties option.
@USE_NAME_TIES{use_name_ties,
  title = {None},
  author = {First, Middle1 Middle2, Prefix, Last and First,, Prefix, Last, Suffix},
  year = {0000}
}

%% Test whether the period after initials is properly removed.
@PERIOD_AFTER_INITIAL{period_after_initial,
  title = {Looney tunes},
  author = "Bugs R. Bunny",
  year = {2001},
}

%% Test whether the "terse inits" options is working correctly -- it should both remove periods after initials and also remove spaces between initials.
@TERSE_INITS{terse_inits,
  title = {Looney tunes},
  author = "Daffy D. Duck",
  year = {2001},
}

%% Test that newlines in the entry fields are correctly removed in the formatted BBL file.
@REPLACE_NEWLINES{replace_newlines,
  title = {Partially coherent
           illumination in full-field
           interferometric synthetic
           aperture microscopy},
  author = {Daniel L. Marks and
            Brynmor J. Davis and
            Stephen A. Boppart and
            P. Scott Carney},
  journal = "J. Opt. Soc. Am. A",
  year = {2009},
  volume = {26},
  pages = {376--386}
}

%% Test that the code can detect the difference between apostrophes and accent characters from quotation marks.
@QUOTE_AND_ACCENT_DETECTION{quote_and_accent_detection,
  title = {Sur l'{\'e}tude spectrale des protub{\'e}rances solaires [Spectral study of solar prominences]},
  author = {P. J. C. Janssen},
  journal = {Comptes Rendus Acad. Sci.},
  year = {1869},
  volume = {68},
  pages = {93--95}
}

@HYPERLINKED_TITLE{hyperlinked_title,
  title = {Minesweeper is NP-complete},
  author = {Richard Kaye},
  journal = {Mathematical Intelligencer},
  year = {2000},
  volume = {22},
  pages = {9--15},
  doi = {10.1007/BF03025367}
}

%% Test that we can turn off generating initials from the editor name list. The template for this is in "test1_author_firstname_initials.bst".
@EDITOR_FIRSTNAME_INITIALS{editor_firstname_initials,
  title = {Polarization: Measurement, Analysis, and Remote Sensing X},
  year = {2012},
  editor = {David B. Chenault and Dennis H. Goldstein},
  volume = {8364},
  series = {procspie}
}

%% Test that we can turn off generating initials from the author name list. The template for this is in "test1_author_firstname_initials.bst".
@AUTHOR_FIRSTNAME_INITIALS{author_firstname_initials,
  title = {Experimental realization of Einstein-Podolsky-Rosen-Bohm \textit{Gedenkenexperiment}: a new violation of Bell's inequalities},
  author = {Alain Aspect and Philippe Grangier and G{\'e}rard Roger},
  year = {1982}
}

%% Test that the "edition_ordinal" is properly generated from the "edition" field.
@EDITION_ORDINAL{edition_ordinal,
  title = {Principles of Optics},
  year = {1999},
  author = {Max Born and Emil Wolf},
  publisher = {Cambridge Univ. Press},
  edition = 7
}

%% Test having an entry with capitalized fields.
@CAPITALIZED_FIELD_NAMES1{capitalized_field_names1,
    AUTHOR="H. Schmidt",
    TITLE="Quantum-mechanical random-number generator",
    JOURNAL={J. Appl. Phys.},
    VOLUME={41},
    NUMBER={2},
    YEAR={1970},
    PAGES={462--468}
}

%% Exercise some Unicode a little.
@MULTILINGUAL{multilingual,
  author = {Someone},
  title = {ユーザー別サイト
           体中文
           크로스 플랫폼으로
מדורים מבוקשים
أفضل البحوث
           Σὲ γνωρίζω ἀπὸ
           Десятую Международную
           แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช
           ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i)
           français langue étrangère
           mañana olé},
  year = 2222
}

%% Test that using Hindu works withou problems.
@HINDU{hindu,
  author = {Someone Who Speaks Hindu},
  title = {सच्चिदानन्द हीरानन्द वात्स्यायन},
  year = 2013
}

%% Test the user-defined variable 著者名 gets correctly mapped to the "author" field by the special template.
@USER_DEFINED_FIELD{user_defined_field,
  著者名 = {Natsume Soseki},
  title = {Michikusa},
  institution = {Tuttle},
  year = 1915
}

%% Test an unorthodox template style for movie databases.
@MOVIE1{movie1,
  title = {The Inheritance},
  director = {Per Fly},
  year = {2003},
  rating = 5
}

%% Second entry for testing an unorthodox template style for movie databases.
@MOVIE2{movie2,
  title = {The Celebration},
  director = {Thomas Vinterberg},
  year = {1998},
  rating = 4
}

%% Test that using a negative year works without problems. (Note that the true year for this entry is 1979, of course.) And while we're at it, we
%% can also test that using {\makehashsign} works correctly.
@NEGATIVEYEAR{negativeyear,
  title = {Updating formulae and a pairwise algorithm for computing sample variances},
  author = {Tony F. Chan and Gene H. Golub and Randall J. LeVeque},
  institution = {Stanford University},
  year = {-1979},
  number = {STAN-CS-79-773},
  month = {November}
}

%% Test that the code responds properly to a malformed template.
@MALFORMED_TEMPLATE1{malformed_template1,
  title = {On the impossible pilot wave},
  author = {J. S. Bell},
  journal = {Found. Phys.},
  year = {1982},
  volume = {12},
  number = {10},
  pages = {989--999}
}

%% Test that the code responds properly to a malformed template.
@MALFORMED_TEMPLATE2{malformed_template2,
  title = {On the impossible pilot wave},
  author = {J. S. Bell},
  journal = {Found. Phys.},
  year = {1982},
  volume = {12},
  number = {10},
  pages = {989--999}
}

%% Test that the code responds properly to a malformed template.
@MALFORMED_TEMPLATE3{malformed_template3,
  title = {On the impossible pilot wave},
  author = {J. S. Bell},
  journal = {Found. Phys.},
  year = {1982},
  volume = {12},
  number = {10},
  pages = {989--999}
}

%% Test that the code responds properly to a malformed template.
@MALFORMED_TEMPLATE4{malformed_template4,
  title = {On the impossible pilot wave},
  author = {J. S. Bell},
  journal = {Found. Phys.},
  year = {1982},
  volume = {12},
  number = {10},
  pages = {989--999}
}

@OTHERS_BECOMES_ETAL{others_becomes_etal,
  title = {Some title},
  author = {Mr. A and Mr. B and Mr. C and others},
  year = {2000}
}

%% Test that the code responds properly to a malformed template.
@IMPLICIT_INDEX{implicit_index,
  title = {Computational geometry I: new algebraic tools for classical geometry},
  author = {David Hestenes and Hongbo Li and Alyn Rockwood},
  editor = {Gerald Sommer},
  chapter = {1},
  pages = {3--26},
  year = {2001},
  publisher = {Springer},
  booktitle = {Geometric Computing with Clifford Algebras}
}

