LaTeX forum ⇒ BibTeX, biblatex and biberBreak long URLs in bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am

Break long URLs in bibliography

Postby marek_step » Thu Sep 11, 2014 12:32 pm

Hello all!


Thesis is nearly finished. I only have two problems, one on topic one off topic.

I have a bibliography with over 350 entries. The long URLs do not break. Perhaps somebody could help? I made up a little example, as it is use here, to illustrate my problem. All books have a problem in the original bibliography. Here in this minimal example only five have an "Overfull \hbox" problem.

The file "bibtex_test.tex":

  1. \documentclass[twoside,BCOR=12mm,DIV=13,headsepline=yes,draft=true]{scrreprt}
  2.  
  3. \pagestyle{headings}
  4. \usepackage[ngerman,english]{babel}
  5. \usepackage[utf8]{inputenc}
  6. \usepackage{CJKutf8}
  7. \usepackage[T1]{fontenc}
  8. \usepackage{csquotes} % Package biblatex Warning: 'babel/polyglossia' detected but 'csquotes' missing.
  9.  
  10. \DeclareUnicodeCharacter{014D}{{\=o}}
  11. \DeclareUnicodeCharacter{016B}{{\=u}}
  12. \DeclareUnicodeCharacter{014C}{{\=O}}
  13. \DeclareUnicodeCharacter{016A}{{\=U}}
  14.  
  15. \usepackage{scale}
  16. \usepackage[colorlinks=false,breaklinks=true]{hyperref}
  17. \usepackage[backend=biber, hyperref=true, url=true, isbn=true, backref=true, citereset=chapter, maxcitenames=3, maxbibnames=100, block=none]{biblatex}
  18. \addbibresource{bibtex_test.bib}
  19.  
  20. \usepackage{url}
  21. %\usepackage[anythingbreaks]{breakurl}
  22. % \PassOptionsToPackage{hyphens}{url}
  23. % \expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks% save the current one
  24. % \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%
  25. % \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%
  26. % \do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D%
  27. % \do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%
  28. % \do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
  29. % \do\Y\do\Z\do\*\do\-\do\~\do\'\do\"\do\-}
  30. % \def\UrlBreaks{\do\/\do-\do_}
  31.  
  32. \begin{document}
  33.  
  34. \part{Chapter with some too long Bibliography Entries}
  35.  
  36. Herewith I show you[\footcite{ikegami2005bonds}] some bibliography[\footcite{tsubaki1971zeami}] entries.[\footcite{tierney2014bonsai}]
  37.  
  38. \section{Here a Chapter}
  39.  
  40. And here an other chapter,[\footcite{haikasoru2013liu}] please read:[\footcite{imari2014wiki}]
  41.  
  42.  
  43. \section{An other Chapter}
  44.  
  45. And here some other entries,[\footcite{bowman2013columbia}] which does not fit into[\footcite{arbuckle2014reduction}] the bibliography,[\footcite{artisticnippon2014banko}] because the URLs are too long ... [\footcite{glendale2014tamba}] [\footcite{rachel2014curating}] Some of the entries are fitting now into the biblography, because they have only an one number entry. In the original the books go up to 350.[\footcite{types2014wiki}]
  46.  
  47. \printbibliography[heading=bibintoc,title=Bibliography]
  48.  
  49. \end{document}
  50.  


And the file "bibtex_test.bib":

  1. @book{ikegami2005bonds,
  2. Author = {Ikegami, Eiko},
  3. Publisher = {Cambridge University Press},
  4. Title = {Bonds of civility: aesthetic networks and the political origins of Japanese culture},
  5. Year = {2005}}
  6.  
  7. @article{tsubaki1971zeami,
  8. title={Zeami and the Transition of the Concept of Y{\=u}gen: A Note on Japanese Aesthetics},
  9. author={Tsubaki, Andrew T},
  10. journal={Journal of Aesthetics and Art Criticism},
  11. pages={55--67},
  12. year={1971},
  13. publisher={JSTOR}
  14. }
  15.  
  16. @online{tierney2014bonsai,
  17. Author = {Prof. Lennox Tierney},
  18. Date-Added = {2014-05-22 10:37:17 +0000},
  19. Date-Modified = {2014-05-22 10:39:49 +0000},
  20. Keywords = {Japanese Aesthetic, garden art},
  21. Title = {The Nature of Japanese Garden Art},
  22. Url = {http://bonsaibeautiful.com/nature_of_garden_art/japanese/index.html},
  23. Bdsk-Url-1 = {http://bonsaibeautiful.com/nature_of_garden_art/japanese/index.html}}
  24.  
  25. @online{haikasoru2013liu,
  26. Date-Added = {2014-05-22 10:37:17 +0000},
  27. Date-Modified = {2014-05-22 10:39:49 +0000},
  28. Title = {Q/A With Ken Liu (and the return of Intern Kathleen)},
  29. Url = {http://www.haikasoru.com/the-future-is-japanese/qa-with-ken-liu-and-the-return-of-intern-kathleen/},
  30. Bdsk-Url-1 = {http://www.haikasoru.com/the-future-is-japanese/qa-with-ken-liu-and-the-return-of-intern-kathleen/}}
  31.  
  32. @online{imari2014wiki,
  33. Author = {Wikipedia},
  34. Date-Added = {2014-05-22 10:37:17 +0000},
  35. Date-Modified = {2014-05-22 10:39:49 +0000},
  36. Keywords = {Imari Porcelain},
  37. Title = {Imari porcelain},
  38. Url = {http://en.wikipedia.org/wiki/Imari_porcelain},
  39. Bdsk-Url-1 = {http://en.wikipedia.org/wiki/Imari_porcelain}}
  40.  
  41. @book{bowman2013columbia,
  42. Author = {Bowman, John Stewart},
  43. Publisher = {Columbia University Press},
  44. Title = {Columbia Chronologies of Asian History and Culture},
  45. Year = {2013}}
  46.  
  47. @online{arbuckle2014reduction,
  48. Author = {Arbuckle},
  49. Date-Added = {2014-05-22 10:37:17 +0000},
  50. Date-Modified = {2014-05-22 10:39:49 +0000},
  51. Keywords = {Reduction firing},
  52. Title = {Reduction firing},
  53. Url = {http://lindaarbuckle.com/handouts/reduction_fire.pdf},
  54. Bdsk-Url-1 = {http://lindaarbuckle.com/handouts/reduction_fire.pdf}}
  55.  
  56. @online{artisticnippon2014banko,
  57. Comment = {Shop with Banko ware},
  58. Date-Added = {2014-05-22 10:37:17 +0000},
  59. Date-Modified = {2014-05-22 10:39:49 +0000},
  60. Keywords = {Banko ware, Banko Shop},
  61. Title = {Banko teapots and cups (Japanese teapots/kyusu},
  62. Url = {http://www.artisticnippon.com/product/Banko/bankoyaki_index.html},
  63. Bdsk-Url-1 = {http://www.artisticnippon.com/product/Banko/bankoyaki_index.html}}
  64.  
  65. @misc{glendale2014tamba,
  66. Publisher = {seco.glendale.edu},
  67. Title = {Tamba Storage Vessel, Japan},
  68. Url = {http://seco.glendale.edu/~rkibler/tambastoragevessel.html},
  69. Bdsk-Url-1 = {http://seco.glendale.edu/~rkibler/tambastoragevessel.html}}
  70.  
  71. @online{rachel2014curating,
  72. Date-Added = {2014-05-22 10:37:17 +0000},
  73. Date-Modified = {2014-05-22 10:39:49 +0000},
  74. author= {Rachel},
  75. Title = {Curating the Oceans: The Future of Singapore’s Past},
  76. Url = {http://idlethink.wordpress.com/2009/07/14/curating-the-oceans-the-future-of-singapores-past/},
  77. Bdsk-Url-1 = {http://idlethink.wordpress.com/2009/07/14/curating-the-oceans-the-future-of-singapores-past/}}
  78.  
  79. @online{types2014wiki,
  80. Author = {Wikipedia},
  81. Date-Added = {2014-05-22 10:37:17 +0000},
  82. Date-Modified = {2014-05-22 10:39:49 +0000},
  83. Keywords = {kilns in China},
  84. Title = {Liste traditioneller chinesischer Keramikbrennofentypen},
  85. Url = {http://de.wikipedia.org/wiki/Liste_traditioneller_chinesischer_Keramikbrennofentypen},
  86. Bdsk-Url-1 = {http://de.wikipedia.org/wiki/Liste_traditioneller_chinesischer_Keramikbrennofentypen}}
  87.  


To "compile" this example enter into the shell:

  1. pdflatex bibtex_test
  2. biber bibtex_test.bib
  3. pdflatex bibtex_test
  4. pdflatex bibtex_test


Now my off-topic question: I would like to insert a little geographical locator to the right of my text for some cities: a little square in the country (China or Japan) and the city in the bigger surrounding square. (You see such kind of locators in newspapers). How to produce these little locators? I looked into the Openstreetmap pages but have no clue ... Perhaps somebody could give a tip or a link.

Sorry for this long posting and best greetings from Munich

marek

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Sep 11, 2014 12:57 pm

Hi marek,

add
  1. \setcounter{biburllcpenalty}{9000}% Kleinbuchstaben
  2. \setcounter{biburlucpenalty}{9000}% Großbuchstaben
to your preamble after loading biblatex. Hyphenation of url-fields works a bit different with biblatex.
Zeilenbrüche in Bibliografielinks (german)


Concerning the other thing, i can't imagine the output right now or in other words i don't understand the problem right now. Can you add a screenshot (or something similar) to show what you are trying to achieve and more important: where? Best done in a new thread to keep the place clean.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am

Postby marek_step » Thu Sep 11, 2014 3:15 pm

Thank you Johannes :-)

This was a fast answer! And thank you for the link. I was unable to find this solution in the net.

What concerns the "locator": this is not a latex related question. I have no idea, where to insert this question on this forum in a new thread. Perhaps you could give me a hint to produce many of this kind of maps:

http://es.wikipedia.org/wiki/Archivo:Mecca,_Saudi_Arabia_locator_map.png


Best greetings!

marek

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Sep 11, 2014 3:45 pm

Well, that is really an off-topic question. I have no expertise in this field.
The picture you linked to is free to use (at least the spanish reads like that, tough i don't speak spanish) so you could actually use that in your document.
If you have a blind map without any markings, you could use tikz to print the image and set marks on top of that.
I just read up on Keyhole Markup Language, this might be worth a look.

btw: you write from germany (or north dakota), but du you actually speak german? IF not, i can stop linking to helpful german content.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 9 guests