Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{filecontents}
- % UseBibLaTex is a variable that if is less than 1 the document
- % will have to compiled with `bibTeX`... else with biber
- defUseBibLaTeX{0}
- % ``url'' package is used in order to make LaTeX to break the urls
- % in places like the bibliography combined with the next (upcoming)
- % command
- %usepackage{breakurl}
- usepackage[hyphens]{url}
- Urlmuskip=0mu plus 1mu
- ifnumUseBibLaTeX>0
- usepackage[backend=biber,style=authoryear]{biblatex}
- newcommandmyurl[1]{#1}
- DeclareFieldFormat{url}{{footnotesize URL:}space%expandafter%noexpand
- myurl{#1}}
- addbibresource{myBib.bib}
- else
- % ``natbib'' package offers the bigger ammount possibilities in bibliography
- % formating
- letmyurlurl
- usepackage{natbib}
- fi
- begin{filecontents*}{myBib.bib}
- @Article{cite1,
- title={One Article with a url that has to break both in bibtex and biblatex},
- author={Someone NotMe and Someother Me},
- year={2018},
- month={10},
- url={url{http://A-long-URL-that-has-to-break-through-lines-and-biber-has-to-ignore-the-textbackslash url-command}},
- doi={http://dx.doi.org/10.1038/nphys1170}
- }
- end{filecontents*}
- title{Double Functionality about Bibliography}
- author{Konstantinos Leledakis}
- date{October 2018}
- begin{document}
- maketitle
- nocite{*}
- ifnumUseBibLaTeX>0
- printbibliography
- else
- bibliographystyle{agsm}
- begin{sloppypar}
- bibliography{myBib}
- end{sloppypar}
- fi
- end{document}
Add Comment
Please, Sign In to add comment