\documentclass[a4paper,10pt]{ltxdockit}
\usepackage[czech,english]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{tgpagella}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{hanging}


\def\t|#1|{\texttt{#1}}
\def\c#1{%
\hangpara{3em}{1}%
\fullcite{#1}}

\newcommand*{\biber}{\sty{biber}\xspace}
\newcommand*{\biblatex}{\sty{biblatex}\xspace}

\usepackage[
   backend=biber
  ,style=iso-authoryear
  ,autolang=other
  ,pagetotal=true
  ,sortlocale=cs_CZ
  ,bibencoding=UTF8
  ,spacecolon=false
  %,block=ragged
]{biblatex}

\addbibresource{mybib.bib}

\titlepage{%
  title={ISO~690 \biblatex style},
  subtitle={},
  url={https://github.com/michal-h21/biblatex-iso690},
  author={Michal Hoftich},
  email={michal.h21@gmail.com},
  revision={0.3.2},
  date={\today}}

\hypersetup{%
  pdftitle={ISO~690 \biblatex style},
  pdfsubject={Bibliography References and Citations by ISO~690},
  pdfauthor={Michal Hoftich with Johannes Böttcher, Moewew and Dávid Lupták},
  pdfkeywords={tex, latex, bibtex, biblatex, bibliography, references, citation}}

\begin{document}

\printtitlepage
\tableofcontents

\section{Introduction}

\subsection{About}

\biblatex is a bibliography and citation tool for \LaTeX. This project provides
support for citations and references according to the ISO~690 international standard.
As the norm ISO~690 is a little bit ambiguous in some details regarding formatting of records,
we largely follow requirements of the Czech interpretation, as it is the required form
in many Czech universities. Of course, the style can be used in other languages as well.

\subsection{Requirements}

Basically, \biblatex $\geq$ 3.4 with \biber $\geq$ 2.5 is all you need to use this package.
No special packages different from those required by the \biblatex package are used. For a complete
list of such packages, please refer to the \biblatex documentation.

\subsection{License}

This project is released under the LaTeX Project Public License\footnote{\url{http://www.latex-project.org/lppl.txt}}.

\subsection{Acknowledgments}

Thanks to all contributors who have participated in the development of this style,
especially Johannes Böttcher, Moewew, Dávid Lupták and others.

\subsection{Feedback}

The project lives on the GitHub page \url{https://github.com/michal-h21/biblatex-iso690}
so feel free to use the possibilites provided there for reporting issues and the like.

\section{Use}

\subsection{General}

\begin{verbatim}
..
\usepackage[english,czech]{babel} % [other,main]
% or in case of using xelatex, use the 'polyglossia' package instead
\usepackage{polyglossia}
\setmainlanguage{czech}
\setotherlanguage{english}
..
\usepackage[
   backend=biber
  ,style=iso-authoryear
  ,sortlocale=cs_CZ
  ,autolang=other
  ,bibencoding=UTF8
]{biblatex}
\addbibresource{filename.fileextension}
..
\printbibliography

\end{verbatim}

According to the ISO~690 norm, some of the elements of the bibliographic
resource should be printed in the main document language (language I~am
currently writing) while the others should be in the language of a resource. You can
specify the language of a resource into the field \t|langid| on a per-entry
basis in a resource (\t|.bib|) file. In addition, all of the languages
specified in these fields have to be loaded by the \t|babel| or \t|polyglossia|
package respectively.\label{gen:multilang}

Note that for correct support of localization functionality, the \t|babel|
or \t|polyglossia| package should be used. The main document language
is the last one entered in a list of languages passed to the \t|babel| package,
respectively the directives \t|\textbackslash setmainlanguage| and
\t|\textbackslash setotherlanguage| in case the \t|polyglossia| package
is used.

\subsection{Citation methods}

The international standard ISO 690 prescribes exactly 3 methods of
citation. However, based on the user input, this package contains
more of them.

\subsubsection{Official methods}

\begin{description}
\item[iso-authoryear] name and date system, so-called Harvard style
\item[iso-numeric] numeric system
\end{description}

There is also one more system of running notes, which is not
implemented yet.

\subsubsection{Unofficial methods}

\begin{description}
\item[iso-alphabetic] alphabetic system
\item[iso-authortitle] name and title system
\end{description}

\subsection{Package options}

\subsubsection{Provided by \biblatex by default}

Frequently used package options are

\begin{description}
\item[style] style to be used for bibliographic references and citations.
Four possibilities are available, \t|iso-authoryear| commonly known as
“Harvard system”, \t|iso-numeric| as a numeric system, \t|iso-alphabetic|
and \t|iso-authortitle|.

\item[backend] backend program for generating bibliographic entries. \biber
is the default one for the \biblatex package, providing a large variety
of features. Other options are \t|bibtex| and \t|bibtex8|, but they both
are far behind the possibilities of \biber. \biber is the recommended backend.

\item[autolang] controls which language environment is used. The most
significant value is \t|other|, which supports printing localization
terms in the language of the resource or language specific hyphenation. 
Default value is \t|none|, which disables this feature.

\item[sortlocale] responsible for sorting the bibliography according to the
entered \t|locale| identifier. It should usually be set to one using the 
main document language, e.g. \t|en\_IN| for English as used in India.

\item[bibencoding] specifies the character encoding of the \t|bib| files. 
\t|<encoding>| needs to be explicitly specified only if the encoding of the 
\t|bib| file is different from the one of the \t|tex| file. Default value 
is \t|auto|, i.e. the encoding of the \t|bib| file is identical to the 
encoding of the \t|tex| file.
\end{description}

\subsubsection{Provided by \t|biblatex-iso690| in addition}

\begin{description}
  \item[spacecolon] if \t|true|, a space is printed before the colon
  used in subtitles and publication information. Printing the colon this way
  is not recommended. Default value is \t|false|.

  \item[pagetotal] the number of total pages is no longer required if the 
  item is being cited as a whole. Setting this option to \t|true| will print
  such optional information in the notes section at the end of the reference.
  Default value is \t|false|.\label{pkg:opt:iso690:pp}

  \item[shortnumeration] the standard ISO~690 allows omission of term
  \t|volume| and terms for smaller components of a serial publication.
  If this option is \t|true|, such terms are distinguished typographically
  (the volume number in bold type and the part number, if required, in
  parentheses). If \t|false|, such terms are printed with preceding
  literal terms.

  \item[thesisinfoinnotes] to print a thesis information
  (thesis type, institution and supervisor) before the section
  \textit{availability and access} is possible by setting the option
  to \t|false|. Otherwise it will be printed in the \textit{notes} section.
  Default value is \t|true|.
\end{description}


\subsection{Database guide}

\t|biblatex| supports more entry fields than legacy \t|bibtex|. Hence
some examples of bibliography entry types with respective fields follow.

%\begin{description}

\paragraph{Book} \hfill\\

\c{t01}
\begin{verbatim}
@BOOK{t01,
  author      =   {Borgman, Christine L.}, 
  year        =   {2003},
  title       =   {From Gutenberg to the global information infrastructure}, 
  subtitle    =   {access to information in the networked world},
  edition     =   {1},  % should not be stated
  location    =   {Cambridge (Mass)}, 
  publisher   =   {The MIT Press},
  pagetotal   =   {xviii, 324},
  isbn        =   {0-262-52345-0},
  langid      =   {english}
}
\end{verbatim} 

The \t|edition| field is the edition of a printed publication. It is required
if the item is not a first edition. Use an integer or a literal string to fill
in this field.

The \t|pagetotal| field is the total number of pages of the work. If multiple
kinds of numeration are used in the work, e.g. arabic as well as roman numerals,
both can be provided, separated by a comma. The localization term \t|pages| is 
only appended for arabic numerals, though. Note that the total number of pages
is no longer required by the norm itself, see also \ref{pkg:opt:iso690:pp}.

The \t|langid| field is required for multilingual support of printing
references. This affects printing of localization terms used in the reference,
e.g. \t|edition| field. See also \ref{gen:multilang}.

\paragraph{Contribution to a collection} \hfill\\

\c{t02}
\begin{verbatim}
@INCOLLECTION{t02,
  author        =   {Greenberg, David}, 
  year          =   {1998},
  title         =   {Camel drivers and gatecrashers},
  subtitle      =   {quality control in the digital research library},
  editor        =   {Hawkins, B.L and Battin, P},
  booktitle     =   {The mirage of continuity},
  booksubtitle  =   {reconfiguring academic information 
                      resources for the 21st  century}, 
  location      =   {Washington (D.C.)}, 
  publisher     =   {Council on Library and Information Resources; 
                      Association of American Universities}, 
  pages         =   {105-116},
  langid        =   {english}
}
\end{verbatim} 

The \t|title| field is the title of the contribution, the \t|booktitle|
is the title of the collection.

The \t|pages| field is one or more page numbers or page ranges. This field
is essential since the reference should identify the part of the item
that is cited.

It is also possible to use the cross-referencing feature to reference
from a contribution entry (child entry) to a separate entry of a collection
(parent entry). This can be done with the \t|crossref| field
as the following example shows:
\newline

\noindent\c{prispevek1}
 
\begin{verbatim}
@COLLECTION{sbornik,
  title       =   {Mimořádně užitečný sborník},
  editor      =   {Geniální, Jiří},
  year        =   {2007},
  langid      =   {czech},
  location    =   {Praha},
  publisher   =   {Academia},
  isbn        =   {978-222-626-222-2}
}

@INCOLLECTION{prispevek1,
  crossref    =   {sbornik},
  title       =   {Velmi zajímavý článek},
  author      =   {Vlaštovka, Josef},
  pages       =   {22-45}
}
\end{verbatim}

Now, there is no need to fill in \t|booktitle| in the \t|sbornik| entry.
The \t|biber| backend program performs the inheritance between parent and
child entry automatically. Other backends may not support this feature.

\paragraph{Article in a serial}\hfill\\

\c{t03}
\begin{verbatim}
@ARTICLE{t03,
  author        =   {LYNCH, C.},
  year          =   {2005},
  title         =   {Where do we go from here?},
  subtitle      =   {the next decade for digital libraries},
  journaltitle  =   {DLib Magazine},
  volume        =   {11},
  number        =   {7/8},
  urldate       =   {2005-08-15},
  url           =   {http://www.dlib.org/dlib/july05/lynch/07lynch.html}, 
  issn          =   {1082-9873},
  langid        =   {english}
}
\end{verbatim}

The example above is an article in an online magazine. If the magazine
is available online only, i.e. it is not published in print,
it should be cited as an electronic information resource. This can be
achieved by providing the \t|urldate| field. On the other hand
\newline

\c{knuth}
\begin{verbatim}
@PERIODICAL{tug,
  journaltitle  =   {TUGBoat},
  publisher     =   {TUG},
  issn          =   {1222-3333},
  langid        =   {english},
  date          =   {1980/},
  url           =   {http://tugboat.tug.org/}
}

@ARTICLE{knuth,
  author        =   {Knuth, Donald},
  title         =   {Journeys of \TeX},
  volume        =   {17},
  number        =   {3},
  year          =   {2003},
  pages         =   {12-22},
  url           =   {http://tugboat.tug.org/kkk.pdf},
  crossref      =   {tug}
}
\end{verbatim}

\noindent the example shows an article in a printed magazine, which is 
\emph{also} available online. Similar to the contribution to a collection,
using cross-referencing feature can be beneficial.

\subsubsection{Specific entry types}

\paragraph{Thesis}\hfill\\

The \t|thesis| entry type and its aliases \t|mastersthesis| and
\t|phdthesis| are available by default for thesis works. Use the
\t|type| field to specify the type of the thesis -- a localization
term or literal string can be entered. For the list of supported
localization terms, please refer to section 4.9.2.13 of the
\t|biblatex| documentation. Names of the supervisor and school
(institution) can be entered into the fields \t|supervisor| and
\t|institution|, respectively.

\paragraph{Patent}\hfill\\

The field \t|classification| is available for the respective stuff.
For other details regarding \t|patent| type, please refer
to the \t|biblatex| documentation.

\subsection{Hints and Caveats}

This section provides additional hints concerning the \t|biblatex| package
as well as the ISO~690 standard.

For now, some of the things have to be dealt with at the level of the 
\t|bib| file, other ones are directly addressed in this style package.
Everything else relies on the \t|biblatex| package, so please also refer
to the \t|biblatex| documentation.

\subsubsection{Creators}

The persons or organizations responsible for the cited work should be
primarily given in the \t|author| field. If it is not appropriate,
other fields like \t|editor| and \t|editorX| family fields or some
specific ones (e.g. \t|translator|) can be used. Note also the field
\t|editortype| and \t|editortypeX| family fields which can be used
to specify the type of the editor. This is useful to distinguish the role
of the creator and their relationship to the cited work. Some roles
are supported by default, e.g. \t|editor|, \t|compiler|, \t|founder|
and \t|reviser|, in other cases the literal string can be entered.

Example:
When citing cinematographic works which are typically the output of many
individuals, the title should be used as the first element of the reference.
However, it is appropriate to include some relevant roles, e.g. the director:

%\begin{ltxexample}
\begin{verbatim}
  ..
  editora     = {Welles, Orson}
  editoratype = {Directed by}
  ..
\end{verbatim}
%\end{ltxexample}

in English, or

%\begin{ltxexample}
\begin{verbatim}
  ..
  editora     = {Welles, Orson}
  editoratype = {Réžia}
  ..
\end{verbatim}
%\end{ltxexample}

in Slovak.

The field \t|nameaddon| can be used to append additional information
to the creator's name, e.g. variant forms of a name, name additions
or pseudonyms. This field is printed as is, in square brackets after
the creator's name.

For anonymous works cited by the author-year method, the term \textit{Anon}
should be used in place of the creator's name. Please reflect this
in the \t|bib| file, since there is no other support for this for now.

\subsubsection{Titles}

Similar to the \t|nameaddon| field for names, \t|titleaddon| serves such
purpose for titles. This field is appropriate for providing other or
alternative titles, elucidation of ambiguous or incorrect titles,
substitute for no titles, translation of titles, etc.

Note that also other \t|*titleaddon| fields are supported by default.

\subsubsection{Medium type}

The field \t|howpublished| is used for providing information about
the medium designation or type of medium. Default value for electronic
information resources is \t|online|. This field is printed as is,
in square brackets after title section, generally.

\subsubsection{Edition}

The \t|edition| field is the edition of a publication. It is required
if the item is not a first edition. Use an integer or a literal string
to fill in this field. Please reflect the constraint not to print
the edition if the cited item is a first edition, by not providing
this field in the \t|bib| file.

The \t|version| field is used for providing information about
updated versions of an item, usually software.

\subsubsection{Date}

In case no date is given and also no approximation is possible, that
should be stated. Please reflect this in the \t|bib| file by including
the following line in the respective entry.

\begin{verbatim}
  ..
  date = {\mkbibbrackets{\bibsstring{nodate}}}
  ..
\end{verbatim}

Explanation of the above code:
\t|nodate| is a localization string which prints something like
\textit{n.d.}, \textit{b.r.}, etc. depending on the language,
\t|bibsstring| is a command to use such localization terms and
\t|mkbibbrackets| is a command used to wrap its argument into
square brackets. Finally, this statement is entered into
the date entry field to be available as a date in a reference.
So as a result we get e.g. \textit{[n.d.]}, which conforms to
the standard.

Please also note the syntax for dates -- ISO 8601 format
(YYYY-MM-DD) is accepted. Please use slash instead of
any kind of dash for ranges of dates. If the range is
open ended, enter just the first date followed by a slash.
And last, but not least, use the \t|date| field instead of
the \t|year| field in general.

Examples follow:

\begin{verbatim}
  date = {2012-12-21}    % exact date
  date = {1998/2001}     % date range
  date = {2016/}         % open ended date range
\end{verbatim}

\subsubsection{Location}

If only a limited number of copies of the work exists or
the location of a graphic work is essential to its identification,
such location (e.g. library or repository) should be stated
in a reference. The field \t|library| serves for this purpose.

\nocite{*}
\printbibliography[title={Reference bibliography},heading={bibnumbered}]


\section{Revision history}

\begin{changelog}

\begin{release}{0.3.2}{2016-04-25}
\item Synchronized \t|iso-numeric| bibliography environment with original \t|numeric| style
\item Added support for alphabetic bibliographic style (\t|iso-alphabetic|)
\item Incompatible change: \t|thesisinfolast| package option changed to \t|thesisinfoinnotes|
\item README copyediting and conversion to markdown
\item Various doc and README corrections and enhancements
\item Added German localization
\end{release}

\begin{release}{0.3.1}{2016-05-13}
\item Added support for entry types \t|thesis| and \t|patent|
\item Added support for including location information (\t|library| field)
\item Added Slovak localization
\item Removed non-breaking space after standard identifier terms
\item Streamlined the author-title citation style
\item Minor doc corrections
\end{release}

\begin{release}{0.3}{2016-05-04}
\item A~complete refactoring of the style to comply the latest version of the \t|biblatex| package as well as ISO~690 international standard
\item Added english version of the documentation/user guide (this document)
\end{release}

\begin{release}{0.2.1}{2016-03-13}
\item Solved issues about punctuation marks and redundant spaces
\item Compatibility support for the latest version of the \t|biblatex| package
\item Reformatted the driver for \verb|inbook| entry type
\end{release}

\begin{release}{0.2}{2015-03-25}
\item Gathered changes during past four years
\item Solved issue about the spacing of strings in main document language
\end{release}

\begin{release}{0.1}{2011-02-03}
\item First release
\item Draft of the documentation (only in Czech)
\item Support for almost all of the entry types provided by the \t|biblatex| package
\end{release}

\end{changelog}

\end{document}
