3

I am preparing the documentation for a website that I am building at work, and I would like to cite the relevant online references. This is an excerpt from the *.bib file:

% 
% How to Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 18.04
%
@misc{Ellingwood2018,
  author       = {Justin Ellingwood},
  howpublished = {DigitalOcean Community Tutorials},
  month        = {Jul},
  note         = {[Online; accessed 25. Jan. 2020]},
  title        = {How to Set Up Django with Postgres, Nginx, and Gunicorn 
                  on Ubuntu 18.04},
  url          = {https://www.digitalocean.com/community/tutorials/
                  how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-
                  ubuntu-18-04},
  year         = {2018}
}


% 
% Setting up python, pipenv and jupyter notebook on Ubuntu 18.04
%
@misc{Brown2018,
  title  = {Setting up python, pipenv and jupyter notebook on Ubuntu 18.04},
  year   = {2018},
  month  = {May},
  author = {Matthew Brown},
  note   = {[Online; accessed 25. Jan. 2020]},
  url    = {https://matthewbrown.io/2018/05/05/setting-up-my-python-workspace-
            2018/}
}

As a personal preference, I like to have the bibliography entry fields aligned, with a maximum line length of 80 characters. As a consequence, the URL field entries do contain line breaks, which are being rendered as %20 in the generated PDF, like so: Snapshot of generated PDF

The minimal LaTeX file that includes this bibliography is:

\documentclass{article}
\usepackage[backend=biber, bibencoding=utf8, style=alphabetic]{biblatex}
\addbibresource{./000_cs.bib}

\begin{document}

\nocite{*}

\printbibliography
\end{document}

I have referred to the following questions here and here but I was still unable to determine the solution as to how to prevent the %20 from being rendered while preserving the line breaks. I'm sure that I am missing out something trivial, as I am still quite new to LaTeX.

Any help would be appreciated!

4
  • 1
    Welcome to TeX.SE! Simply write the complete url in one line! Your used new line in your url caused the '%20' in the printed url ('%20' is space) ...
    – Mensch
    Feb 6, 2020 at 8:32
  • 1
    Not writing a line break in your source files is of course preferred, but if you really want to keep your source formatting you might be able to remove the newline characters when generating the bibliography with BibLaTeX, see for example tex.stackexchange.com/questions/83943/….
    – Marijn
    Feb 6, 2020 at 8:50
  • @Mensch: Thank you for the welcome! :-) You are correct that not using the line breaks would have the URL rendered without the %20, but I was hoping it would be possible. Feb 7, 2020 at 6:05
  • @Marijn: Thank you for the link; I will see if I can come up with a solution based on the answer to that question. Feb 7, 2020 at 6:08

0

You must log in to answer this question.

Browse other questions tagged .