From f6b069c5441e2ba598b97c269ac8d00977606ef6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 30 Oct 2021 03:00:57 +0000 Subject: CTAN sync 202110300300 --- macros/latex/contrib/biblatex2bibitem/README.md | 8 ++- .../biblatex2bibitem/biblatex2bibitem-examples.bib | 3 +- .../biblatex2bibitem-hyperref-result.pdf | Bin 0 -> 126889 bytes .../biblatex2bibitem-hyperref-result.tex | 80 +++++++++++++++++++++ .../biblatex2bibitem/biblatex2bibitem-hyperref.pdf | Bin 0 -> 132428 bytes .../biblatex2bibitem/biblatex2bibitem-hyperref.tex | 43 +++++++++++ .../biblatex2bibitem-mwe-result.pdf | Bin 0 -> 125439 bytes .../biblatex2bibitem-mwe-result.tex | 60 ++++++++++++++++ .../biblatex2bibitem/biblatex2bibitem-mwe.pdf | Bin 121133 -> 130518 bytes .../biblatex2bibitem-new-result.pdf | Bin 0 -> 127158 bytes .../biblatex2bibitem/biblatex2bibitem-new.pdf | Bin 0 -> 132428 bytes .../contrib/biblatex2bibitem/biblatex2bibitem.sty | 26 +++++-- 12 files changed, 210 insertions(+), 10 deletions(-) create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.pdf create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.tex create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.pdf create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.tex create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.pdf create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.tex create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new-result.pdf create mode 100644 macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new.pdf (limited to 'macros/latex/contrib/biblatex2bibitem') diff --git a/macros/latex/contrib/biblatex2bibitem/README.md b/macros/latex/contrib/biblatex2bibitem/README.md index 7358a0e7de..22fd526d8e 100644 --- a/macros/latex/contrib/biblatex2bibitem/README.md +++ b/macros/latex/contrib/biblatex2bibitem/README.md @@ -24,7 +24,8 @@ At the very end of document: The desired `bibitem`s will be written directly to the PDF file. When it's time to switch to `bibitem`s (e.g. before sending the paper to the journal), -just copy them to the to your `.tex` file, remove `biblatex` commands and load `cite` package. +just copy them directly from the pdf into your `.tex` file, remove +`biblatex` commands and (probably) load the `cite` package. ### Disclaimer @@ -59,10 +60,10 @@ If you really want to have a space after the title of an e.g. an article, just ### `bibitem` separators -By default, generated `bibitem`s are separated by a line with a percent sign on it to make the readng of the cde easier. +By default, generated `bibitem`s are separated by a line with an empty pair of curly braces on it to make the reading of the code easier. You can tweak this by e.g. ```latex -\renewcommand{\printgeneratedbibitemseparator}{\ttfamily\%\\} +\renewcommand{\printgeneratedbibitemseparator}{\ttfamily\{\}\\} ``` (for putting all the `bibitem`s into monotype font) or e.g. ```latex @@ -78,6 +79,7 @@ Don't forget about `\makeatletter` and `\makeatother`! + `\print@end@thebibliography` - default: `\textbackslash end\{thebibliography\} ` ++ `\print@bibitem@command` - default: `\textbackslash bibitem` ## See also diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-examples.bib b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-examples.bib index c07dcbbbf9..fa00467eb2 100644 --- a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-examples.bib +++ b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-examples.bib @@ -2,13 +2,14 @@ title={On a question\relax ~of Erd\H{o}s and Ulam}, author={Solymosi, Jozsef and De Zeeuw, Frank}, archivePrefix = {arXiv}, - eprint = {0806.3095}, + eprint = {0806.3095_}, journal={Discrete \& Computational Geometry}, volume={43}, number={2}, pages={393--401}, year={2010}, publisher={Springer}, + url={https://example.com/@рус_}, } @article{halbeisen2019geometric, diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.pdf new file mode 100644 index 0000000000..fbb6ba40da Binary files /dev/null and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.tex b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.tex new file mode 100644 index 0000000000..eb083b2bf3 --- /dev/null +++ b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref-result.tex @@ -0,0 +1,80 @@ +\documentclass[british]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{babel} +\usepackage{csquotes} + +\usepackage{amssymb} % Just for \mathbb + + +\usepackage{xcolor} +\usepackage[colorlinks]{hyperref} +\makeatletter +\Hy@AtBeginDocument{% + \def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true + \def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true + % Hyperlink border style will be underline of width 1pt +} +\makeatother +\hypersetup{% + colorlinks=true,% hyperlinks will be coloured + linkcolor=blue,% hyperlink text will be blue + urlcolor=blue,% hyperlink text will be blue + linkbordercolor=red,% hyperlink border will be red + urlbordercolor=red,% hyperlink border will be red +} + +%%\usepackage[backend=biber,style=alphabetic,citestyle=alphabetic,backref]{biblatex} +%%\addbibresource{biblatex-examples.bib} +%%\addbibresource{biblatex2bibitem-examples.bib} + +%%\usepackage{biblatex2bibitem} +\usepackage{cite} + +\begin{document} +\cite{sigfridsson,knuth:ct:e}. + +See also \cite{solymosi2010question,halbeisen2019geometric,Kohnert2006IntegralPS}. + +\newpage + +\begin{thebibliography}{99} +{} +\bibitem{halbeisen2019geometric} +Lorenz Halbeisen and Norbert Hungerbühler. ‘A geometric +representation of integral solutions of $x^2+ xy+ y^2= m^2$’. In: +\emph{Quaestiones Mathematicae} (2019), pp. 1–15 (cit. on +p. \hyperlink {page.1} {1}). +{} +\bibitem{Kohnert2006IntegralPS} +Axel Kohnert and Sascha Kurz. ‘Integral point sets over {$\mathbb +{Z}^m_n$}’. In: \emph{Discrete Applied Mathematics} 157 (2006), +pp. 2105–2117 (cit. on p. \hyperlink {page.1} {1}). +{} +\bibitem{knuth:ct:e} +Donald E. Knuth. \emph{Computers \& Typesetting}. Vol. E: +\emph{{Computer Modern} Typefaces}. Reading, Mass.: +Addison-Wesley, 1986 (cit. on p. \hyperlink {page.1} {1}).{} +\bibitem{solymosi2010question} +Jozsef Solymosi and Frank De Zeeuw. ‘On a question\relax ~of Erdős +and Ulam’. In: \emph{Discrete \& Computational Geometry} 43.2 +(2010), pp. 393–401. arXiv: \href {http://arxiv.org/abs/0806.3095_} +{\nolinkurl {0806.3095_}}. \textsc{url}: \url +{https://example.com/@%D1%80%D1%83%D1%81_} (cit. on +p. \hyperlink {page.1} {1}). +{} +\bibitem{sigfridsson} +Emma Sigfridsson and Ulf Ryde. ‘Comparison of methods for deriving +atomic charges from the electrostatic potential and moments’. In: +\emph{Journal of Computational Chemistry} 19.4 (1998), pp. 377–395. +\textsc{doi}: \href +{https://doi.org/10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P} +{\nolinkurl +{10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}} +(cit. on p. \hyperlink {page.1} {1}). +\end{thebibliography} + +%%\printbibliography +%%\printbibitembibliography + +\end{document} diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.pdf new file mode 100644 index 0000000000..106bfb2723 Binary files /dev/null and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.tex b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.tex new file mode 100644 index 0000000000..ff139a9af2 --- /dev/null +++ b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-hyperref.tex @@ -0,0 +1,43 @@ +\documentclass[british]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{babel} +\usepackage{csquotes} + +\usepackage{amssymb} % Just for \mathbb + + +\usepackage{xcolor} +\usepackage[colorlinks]{hyperref} +\makeatletter +\Hy@AtBeginDocument{% + \def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true + \def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true + % Hyperlink border style will be underline of width 1pt +} +\makeatother +\hypersetup{% + colorlinks=true,% hyperlinks will be coloured + linkcolor=blue,% hyperlink text will be blue + urlcolor=blue,% hyperlink text will be blue + linkbordercolor=red,% hyperlink border will be red + urlbordercolor=red,% hyperlink border will be red +} + +\usepackage[backend=biber,style=alphabetic,citestyle=alphabetic,backref]{biblatex} +\addbibresource{biblatex-examples.bib} +\addbibresource{biblatex2bibitem-examples.bib} + +\usepackage{biblatex2bibitem} + +\begin{document} +\cite{sigfridsson,knuth:ct:e}. + +See also \cite{solymosi2010question,halbeisen2019geometric,Kohnert2006IntegralPS}. + +\newpage + +\printbibliography + +\printbibitembibliography +\end{document} diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.pdf new file mode 100644 index 0000000000..abc7102b73 Binary files /dev/null and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.tex b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.tex new file mode 100644 index 0000000000..36d5d232fd --- /dev/null +++ b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe-result.tex @@ -0,0 +1,60 @@ +\documentclass[british]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{babel} +\usepackage{csquotes} + +%These two are needed because biblatex provides \nolinkurl and \url +\usepackage{url} +\providecommand*{\nolinkurl}{\url} + +\usepackage{amssymb} % Just for \mathbb +\usepackage{cite} +%% \usepackage[style=numeric, backend=biber]{biblatex} +%% \usepackage{biblatex2bibitem} +%% +%% \addbibresource{biblatex-examples.bib} +%% +%% \addbibresource{biblatex2bibitem-examples.bib} + +\begin{document} +\cite{sigfridsson,knuth:ct:e}. + +See also \cite{solymosi2010question,halbeisen2019geometric,Kohnert2006IntegralPS}. + +\begin{thebibliography}{99} +{} +\bibitem{halbeisen2019geometric} +Lorenz Halbeisen and Norbert Hungerbühler. ‘A geometric +representation of integral solutions of $x^2+ xy+ y^2= m^2$’. In: +\emph{Quaestiones Mathematicae} (2019), pp. 1–15. +{} +\bibitem{knuth:ct:e} +Donald E. Knuth. \emph{Computers \& Typesetting}. Vol. E: +\emph{{Computer Modern} Typefaces}. Reading, Mass.: +Addison-Wesley, 1986. +{} +\bibitem{Kohnert2006IntegralPS} +Axel Kohnert and Sascha Kurz. ‘Integral point sets over {$\mathbb +{Z}^m_n$}’. In: \emph{Discrete Applied Mathematics} 157 (2006), +pp. 2105–2117. +{} +\bibitem{sigfridsson} + +Emma Sigfridsson and Ulf Ryde. ‘Comparison of methods for deriving +atomic charges from the electrostatic potential and moments’. In: +\emph{Journal of Computational Chemistry} 19.4 (1998), pp. 377–395. +\textsc{doi}: \nolinkurl +{10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}. +{} +\bibitem{solymosi2010question} +Jozsef Solymosi and Frank De Zeeuw. ‘On a question\relax ~of Erdős +and Ulam’. In: \emph{Discrete \& Computational Geometry} 43.2 +(2010), pp. 393–401. arXiv: \nolinkurl {0806.3095_}. \textsc{url}: \url +{https://example.com/@%D1%80%D1%83%D1%81_}. +\end{thebibliography} + +%% \printbibliography +%% +%% \printbibitembibliography +\end{document} diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe.pdf index 26eb8348c0..f1448bfbfd 100644 Binary files a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe.pdf and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-mwe.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new-result.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new-result.pdf new file mode 100644 index 0000000000..380b22a018 Binary files /dev/null and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new-result.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new.pdf b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new.pdf new file mode 100644 index 0000000000..a97926d469 Binary files /dev/null and b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem-new.pdf differ diff --git a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem.sty b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem.sty index 6065032d98..1099f7728c 100644 --- a/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem.sty +++ b/macros/latex/contrib/biblatex2bibitem/biblatex2bibitem.sty @@ -1,24 +1,26 @@ % 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. -% +%% https://ctan.org/license/lppl1.3c +% \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{biblatex2bibitem} - [2020/03/03 v0.2.0 LaTeX package to convert biblatex-generated bibliography to bibitem commands] + [2021/10/26 v0.2.1 LaTeX package to convert biblatex-generated bibliography to bibitem commands] \RequirePackage{biblatex} -\newcommand{\printgeneratedbibitemseparator}{\%\\} +\newcommand{\printgeneratedbibitemseparator}{\{\}\\} \newcommand{\print@begin@thebibliography}{\textbackslash begin\{thebibliography\}\{99\}} \newcommand{\print@end@thebibliography }{\textbackslash end\{thebibliography\} } +\newcommand{\print@bibitem@command}{\textbackslash bibitem} + \defbibenvironment{bibitembibliography} { @@ -38,6 +40,18 @@ \renewcommand*{\textsc}[1]{\textbackslash textsc\{##1\}}% \renewcommand*{\emph}[1]{\textbackslash emph\{##1\}}% % + \providecommand*{\nolinkurl}{\url} + \renewcommand*{\nolinkurl}[1]{\textbackslash nolinkurl \{##1\}}% + \renewcommand*{\url}[1]{\textbackslash url \{##1\}}% + % + \ifcsname href\endcsname% Sometimes it is not defined + \renewcommand*{\href}[2]{\textbackslash href \{##1\} \{##2\}}% + \fi + % + \ifcsname hyperlink\endcsname% Sometimes it is not defined + \renewcommand*{\hyperlink}[2]{\textbackslash hyperlink \{##1\} \{##2\}}% + \fi + % \renewcommand*{\mkbibemph}[1]{\textbackslash emph\{##1\}}% \renewcommand*{\mkbibitalic}[1]{\textbackslash textit\{##1\}}% \renewcommand*{\mkbibbold}[1]{\textbackslash textbf\{##1\}}% @@ -49,7 +63,7 @@ \thispagestyle{empty} \pagestyle{empty} } - {\item\printgeneratedbibitemseparator\textbackslash bibitem\{\printfield{entrykey}\}\\} + {\item\printgeneratedbibitemseparator\print@bibitem@command\{\printfield{entrykey}\}\\} \newcommand{\utffriendlydetokenize}[1]{% \scantokens{% -- cgit v1.2.3