LaTeX: Difference between revisions
(Created page with " Some general resources are: * [https://www.overleaf.com/learn/latex/Main_Page The Overleaf documention] has some user-friendly LaTeX documentation that also helps you get sta...") |
No edit summary |
||
Line 22: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Replace the highlighted line with <code>{ "" }</code> to set it to ignore URLs by default. | Replace the highlighted line with <code>{ "" }</code> to set it to ignore URLs by default. | ||
If you don't want to over-write the default, you can copy <code>plainnat.bst</code> as <code>plainnatnourl.bst</code>, make the appropriate changes, and then select <code>plainnatnourl</code> as your bibliography style in your .tex file. |
Revision as of 09:55, 17 October 2018
Some general resources are:
- The Overleaf documention has some user-friendly LaTeX documentation that also helps you get started using Overleaf.
- The Wikibook has a lot of useful information.
Removing URLs etc. from Bibliography
If you maintain your .bib file through Mendeley or some other program, you may find that when you call cite,citep,citet
that the bibliography contains all sorts of unwanted content, such as lengthy URLs.
One option to remove these is to remove all of the URLs from your .bib file, but that can be cumbersome (particularly if you maintain a large .bib).
Another option to remove these is to modify the appropriate .bst file to ignore them.
For example, if you use natbib (a popular and very nice package for bibliographies) with the style plainnat
, then you would need to modify plainnat.bst
(can be locate on a nix machine by calling locate plainnat.bst
).
Within the .bst file, you'll find sections that look like:
FUNCTION {format.url}
{ url empty$
{ "" }
{ new.block "URL \url{" url * "}" * }
if$
}
Replace the highlighted line with { "" }
to set it to ignore URLs by default.
If you don't want to over-write the default, you can copy plainnat.bst
as plainnatnourl.bst
, make the appropriate changes, and then select plainnatnourl
as your bibliography style in your .tex file.