I'm using the breakurl package and the hyperref package with pdfLatex and BibTeX to cite a url. The url is breaking, but not according to 开发者_StackOverflowmy margins. Is there any way I can make the url recognize my margins or force a line break? Thanks in advance.
Code:
\usepackage{hyperref}
\usepackage[vertfit]{breakurl}
@MISC{cmm:dataset, author = {University of Bristol Centre for Multilevel Modelling}, title = {Datasets used in reviews}, howpublished = {\url{http://www.cmm.bristol.ac.uk/learning-training/multilevel-m-software/exam.shtml}}, }
Sometimes, when LaTeX cannot break lines nicely, it leaves them unadjusted. You can control that behavior putting \sloppy
at the beginnig of your document and see if the behavior suits you more. Also, you have spaces in your URL, as I've seen in your post. Remove them. The url
package usuallly does a nice job breaking urls (I have not used the breakurl
package and my URLs break nicely by the slashes or dashes).
Better to add 'breaklinks' to the options for hyperref or if using url explicitly format the url in the bibtex file "\url{http:....}". This fixed the problem for me. You may still need to redefine the format for the url if the default box does not suit your purposes.
精彩评论