summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex2bibitem
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-03 22:05:18 +0000
committerKarl Berry <karl@freefriends.org>2020-03-03 22:05:18 +0000
commit74c1d92ba64029791576b8509bf631a0f94dd042 (patch)
treea76ad93315a1ccf8972c0b05a55a220f4528e3ed /Master/texmf-dist/tex/latex/biblatex2bibitem
parent5d743e0a015ef1e44cb5ec2f0851c34e3ae6721c (diff)
biblatex2bibitem (3mar20)
git-svn-id: svn://tug.org/texlive/trunk@54030 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex2bibitem')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex2bibitem/biblatex2bibitem.sty82
1 files changed, 82 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex2bibitem/biblatex2bibitem.sty b/Master/texmf-dist/tex/latex/biblatex2bibitem/biblatex2bibitem.sty
new file mode 100644
index 00000000000..6065032d98b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex2bibitem/biblatex2bibitem.sty
@@ -0,0 +1,82 @@
+% A workaround to convert biblatex-generated bibliography to bibitems
+%
+% (c) Nikolai Avdeev aka @nickkolok, and @odomanov
+%
+% See also https://github.com/odomanov/biblatex-gost/issues/20
+%
+%% This program 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.
+%
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{biblatex2bibitem}
+ [2020/03/03 v0.2.0 LaTeX package to convert biblatex-generated bibliography to bibitem commands]
+
+\RequirePackage{biblatex}
+
+\newcommand{\printgeneratedbibitemseparator}{\%\\}
+
+\newcommand{\print@begin@thebibliography}{\textbackslash begin\{thebibliography\}\{99\}}
+\newcommand{\print@end@thebibliography }{\textbackslash end\{thebibliography\} }
+
+
+\defbibenvironment{bibitembibliography}
+ {
+ % Page numbers and page headings are not wanted when copying
+ \thispagestyle{empty}
+ \pagestyle{empty}
+ \hyphenpenalty=10000
+ \exhyphenpenalty=10000
+ \raggedright
+ \renewcommand*{\&}{\textbackslash \symbol{38}}%
+ \ifcsname mkbibsc\endcsname% Sometimes it is not defined
+ \renewcommand*{\mkbibsc}[1]{\textbackslash textsc\{##1\}}%
+ \fi%
+ \renewcommand*{\texttt}[1]{\textbackslash texttt\{##1\}}%
+ \renewcommand*{\textit}[1]{\textbackslash textit\{##1\}}%
+ \renewcommand*{\textbf}[1]{\textbackslash textbf\{##1\}}%
+ \renewcommand*{\textsc}[1]{\textbackslash textsc\{##1\}}%
+ \renewcommand*{\emph}[1]{\textbackslash emph\{##1\}}%
+ %
+ \renewcommand*{\mkbibemph}[1]{\textbackslash emph\{##1\}}%
+ \renewcommand*{\mkbibitalic}[1]{\textbackslash textit\{##1\}}%
+ \renewcommand*{\mkbibbold}[1]{\textbackslash textbf\{##1\}}%
+ %\DeclareFieldFormat{titlecase}{\texttt{\utffriendlydetokenize{#1}}}
+ \print@begin@thebibliography
+ \list{}{}}
+ {\endlist
+ \print@end@thebibliography
+ \thispagestyle{empty}
+ \pagestyle{empty}
+ }
+ {\item\printgeneratedbibitemseparator\textbackslash bibitem\{\printfield{entrykey}\}\\}
+
+\newcommand{\utffriendlydetokenize}[1]{%
+\scantokens{%
+\catcode`\_=12%
+\catcode`\^=12%
+\catcode`\{=12%
+\catcode`\}=12%
+\catcode`\&=12%
+\catcode`\$=12%
+\catcode`\#=12%
+\catcode`\~=12%
+\catcode`\\=12%
+#1%
+}%
+}
+
+
+\newcommand{\ignorespacesaftertitlecase}{\leavevmode\unskip}
+
+\newcommand{\printbibitembibliography}{
+ \DeclareFieldFormat{titlecase}{\utffriendlydetokenize{##1}\ignorespacesaftertitlecase}
+ %\DeclareDelimFormat[bib]{nametitledelim}{\newline\bibsentence}
+ \printbibliography[env=bibitembibliography]
+}
+
+
+
+\endinput
+%%
+%% End of file `biblatex2bibitem.sty'.