I use texstudio with windows 11. I have to use ama
style in the bibliography
in my report. I already have the ama
style here. What is missing is numeric citing and the numbers in citation must be superscript. I want to prepare bibliography like this with superscipt numeric citation. I cannot use ama.bst
already available for bibtex
, because I have to divide in bibliography like articles
, websources
. Please tell me how can I get superscript numeric citation. I have tried doing following by combining this and this, but gives error. I do not know coding except in matlab.
\documentclass[12pt,abstract = true,toc = flat,toc = bib]{scrreprt}
\usepackage[english]{babel}
\usepackage[hidelinks]{hyperref}
\usepackage{url}
\usepackage[backend=biber, style=authoryear, bibstyle=authortitle, maxcitenames=2, maxbibnames=99, isbn=false, natbib = true, firstinits=true, uniquename=false, uniquelist=false, terseinits,citestyle=numeric-comp,labeldateparts]{biblatex}
\addbibresource{example.bib}
\begin{filecontents}{example.bib}
@article{baillie_deliver_2021,
title = {A Long url},
url = {https://www.hydrocarbonprocessing.com/magazine/2021/september-2021/catalysts/deliver-high-levels-of-sox-reduction-with-sox-reduction-additive},
journal = {this url goes out of margin},
author = {Test},
month = march,
year = {2022},
},
@article{responsetoukaraniancrisis,
title = {BAPS Responds to Ukrainian Humanitarian Crisis, Poland},
url = {https://www.baps.org/Photos/2022/Emergency-Response-in-Rzesz243w-Poland-24266.aspx?mid=226449},
journal = {BAPS News UK and Europe},
author = {BAPS},
month = march,
year = {2022}
}
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\revsdnamepunct}{}
\newrobustcmd{\mkbibsubscript}[1]{%
\unspace\allowhyphens\textsubscript{%
\begingroup
\protected\long\def\mkbibsuperscript##1{%
\blx@warning{Nested superscript}%
\mkbibbrackets{##1}}%
#1\endgroup}}
\DeclareCiteCommand{\subcite}[\mkbibsubscript]
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
%
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{{#1\isdot}}
\renewbibmacro{in:}{}
\DeclareFieldFormat{pages}{#1}
\renewcommand*{\bibpagespunct}{\addcolon}
% Normal title font (remove italic)
\DeclareFieldFormat{journaltitle}{#1\addperiod}
\DeclareFieldFormat{booktitle}{{#1}}
\DeclareFieldFormat{title}{{#1}}
% Year after title
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{issue+date}%
\setunit{\addsemicolon\addspace}%
\usebibmacro{volume+number+eid}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit%
}
\newrobustcmd{\mkbibsubscript}[1]{%
\unspace\allowhyphens\textsubscript{%
\begingroup
\protected\long\def\mkbibsuperscript##1{%
\blx@warning{Nested superscript}%
\mkbibbrackets{##1}}%
#1\endgroup}}
\DeclareCiteCommand{\subcite}[\mkbibsubscript]
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
% Print only the year
\renewbibmacro*{issue+date}{%
\printfield{year}%
}
% Remove "and" from list of authors
\renewcommand*{\finalnamedelim}{\multinamedelim}
\end{filecontents}
\begin{document}
\supercite{responsetoukaraniancrisis}
\nocite{*}
\printbibliography
\end{document}
I need the following:
Please remove the word URL
, In:
from all things like websources, books…etc. The title of Journal or website must be in italic, but there must be period and space between the journal title and the year. How can i prevent url from starting into current line and put it to next line if it is too long that it goes into margin.
We are able to make custom style i.e.,bst
files in bibtex
easily by answering questions in latex makebst
. Is there any similar way to create custom style in biblatex
?
Best Answer
Here is a stab at a numeric AMA style with
biblatex
. Note that if you want to submit your paper to a journal it is unlikely that you can usebiblatex
. Most journals use the classical BibTeX-based approach. Journals that accept LaTeX submissions often have templates or at least author guides on how to prepare a manuscript.biblatex
is probably only supported if it is explicitly recommended there.I did not address the URL breaking here, as that is discussed elsewhere, e.g. Line breaks of long URLs in biblatex bibliography?, How to break a long URL and more generally also in How to adjust the breaking in the bibliography?.