Posted By

deepsoul on 08/18/09


Tagged

url sed bibtex long-line


Versions (?)

Fix BibTeX URLs and long lines


 / Published in: Bash
 

URL: http://lists.debian.org/debian-user/2000/11/msg00692.html

The tetex implementation of BibTeX, LaTeX's bibliography tool, forcibly breaks lines above a certain length (79 chars) by inserting % signs and line feeds, unless they can be broken between words. This is a problem when URLs are referenced, or if control sequences without spaces between them are used.

The following solution using sed improves on the one given in the post above in that it works if a line is broken twice or more times. It can be used as an example on how to concatenate lines ending with a specific character indicating continuation.

  1. # shell functions save a lot of typing...
  2. function fixbbl()
  3. {
  4. # This will overwrite the target file in-place
  5. sed -i ':s
  6. /%$/{
  7. N
  8. bs
  9. }
  10. s/%\n//g' "$1"
  11. }
  12.  
  13. # usage:
  14. fixbbl document.bbl

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Thanos on July 13, 2018

There are the best function in windows connection for require the online create communication so visit here for knowing how do i fix bluetooth audio devices connections in windows 10 and have to save to all feature for getting the online best work thanks.

Posted By: elit on October 25, 2018

here you get rrb ntpc result and also download the answer key.

Posted By: elit on October 25, 2018

here you get

rrb ntpc result

and also download the answer key

Posted By: playstoreapp on October 25, 2018

Download best apps from the play store app and enjoy free amazing applications. The paid option is also available to go with download play store.

You need to login to post a comment.