Guest User

Untitled

a guest
Oct 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{filecontents}
  3. % UseBibLaTex is a variable that if is less than 1 the document
  4. % will have to compiled with `bibTeX`... else with biber
  5. defUseBibLaTeX{0}
  6. % ``url'' package is used in order to make LaTeX to break the urls
  7. % in places like the bibliography combined with the next (upcoming)
  8. % command
  9. %usepackage{breakurl}
  10. usepackage[hyphens]{url}
  11. Urlmuskip=0mu plus 1mu
  12.  
  13. ifnumUseBibLaTeX>0
  14. usepackage[backend=biber,style=authoryear]{biblatex}
  15. newcommandmyurl[1]{#1}
  16. DeclareFieldFormat{url}{{footnotesize URL:}space%expandafter%noexpand
  17. myurl{#1}}
  18. addbibresource{myBib.bib}
  19. else
  20. % ``natbib'' package offers the bigger ammount possibilities in bibliography
  21. % formating
  22. letmyurlurl
  23. usepackage{natbib}
  24. fi
  25.  
  26.  
  27. begin{filecontents*}{myBib.bib}
  28. @Article{cite1,
  29. title={One Article with a url that has to break both in bibtex and biblatex},
  30. author={Someone NotMe and Someother Me},
  31. year={2018},
  32. month={10},
  33. url={url{http://A-long-URL-that-has-to-break-through-lines-and-biber-has-to-ignore-the-textbackslash url-command}},
  34. doi={http://dx.doi.org/10.1038/nphys1170}
  35. }
  36. end{filecontents*}
  37.  
  38. title{Double Functionality about Bibliography}
  39. author{Konstantinos Leledakis}
  40. date{October 2018}
  41.  
  42. begin{document}
  43.  
  44. maketitle
  45.  
  46. nocite{*}
  47. ifnumUseBibLaTeX>0
  48. printbibliography
  49. else
  50. bibliographystyle{agsm}
  51. begin{sloppypar}
  52. bibliography{myBib}
  53. end{sloppypar}
  54. fi
  55.  
  56.  
  57.  
  58. end{document}
Add Comment
Please, Sign In to add comment