From fd1491f26520e3b47086659050ccde69af506c06 Mon Sep 17 00:00:00 2001 From: Edward Longman <eialongman@gmail.com> Date: Mon, 7 Jun 2021 17:51:19 +0100 Subject: [PATCH] Add FAQ section to README --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 3fb484f..82eee4d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,39 @@ LaTeX Documents for the University of Southampton. Mainly for Thesis and project reports For slides with Beamer, please see https://git.soton.ac.uk/sw2f11/latex-slides-template + +## FAQ +#### Q: How do I include an "Accessed on", "Visited on", "Date last Accessed" or "Last visited" note for urls? +The bibliography is formatted by the `natbib` package that does not support the `urldate` field in `.bib` files. +As a work around, add a `note={Accessed on 2020-01-01}` to the relevant bib entry. + +For more info see [this Stack Exchange question](https://tex.stackexchange.com/questions/103133/problems-with-natbib-strange-url-format-and-urldate-not-shown). + +#### Q: How do I fix a bib entry with special characters (`&``%`)? +You may get an error like "Paragraph ended before \\BR@@bibitem was complete" +or there may be a cascade of errors because of an unclosed `\begin` statement. + +The short term solution is to manually "escape" special characters in the `.bib` url fields, +i.e. `url = {http://www.somesite.com/8%20report}` => `url = {http://www.somesite.com/8\%20report}`. + +Unfortunately, the longer term solution requires editing some source files. +Locate the `plainnat.bst` (or `biblatex.bst` file, if using `biblatex`) +and add the following in the file at the end of `FUNCTION {begin.bib}` +``` + "\providecommand{\BIBdecl}{\relax}" + write$ newline$ + "\BIBdecl" + write$ newline$ +``` +Then add ``\newcommand{\BIBdecl}{\catcode`\%=12 }`` before `\begin{document}` in your `.tex` document source. + +[Stack Exchange Source](https://tex.stackexchange.com/questions/140143/hyperref-with-pagebackref-requires-manual-escaping-of-percentage-signs-in-urls) + +#### Q: Can I use `biblatex` instead of `natbib`? +Yes you can. Since this template has existed longer than `biblatex` it uses the older `natbib`. +there are good reasons to change to `biblatex` but `natbib` is still preferred by journals, +so using `natbib` will mean that source material from papers will not need to be modified, + ## Your `{TEXMF}` root subdirectory For Tex Live: This whole folder can be moved into the `~/texmf` directory to begin using the class files. -- GitLab