Hi AmberV,
Thank you (again) for your responses.
I wanted to followup on the threads from last July regarding the appearance of the hashtag (#) in \href.
I have found that the same compile error issue with \href{} appears when the hashtag (#) is used in a \url{} command such as:
\url{https://en.wikipedia.org/wiki/Global_catastrophic_risk#Anthropogenic}
Since last July, I’ve found two links to LaTeX coding sites that offer possible solutions:
-
https://latex.org/forum/viewtopic.php?f=50&t=15632&sid=f3af07e588676f15f61dcd60406af094
-
https://github.com/latex3/hyperref/issues/110
As best I can tell, the ‘solutions’ offered on the above web sites either do not work for me or do not directly address the errors that appear at compile time whenever the hashtag (#) appears in a \url or \href command. Escaping the # character (#) allows the compile to finish without error, but then the links are incorrect and an error occurs when clicking on the link to open the web page.
As best I can tell, this appears to be a LaTeX issue, not a Scrivener issue, but I thought I’d followup the earlier thread given the links I found on latex.org and gitHub.com.
For now, I am manually adjusting the \href and \url links to eliminate or escape the hashtag (#) symbol but this does not solve the underlying issue.
On the latex.org website, there is some conjecture that the problem lies with how “\itshape sets everything in italics” and that their solution using “\harvardurl” works " (as long as you don’t use the hyperref package)", but this is not an option for me.
On the gitHub.com website, they suggest using “a bitly link”, but I feel this is a bit of a kludge as it needs to be maintained manually.
What is a bit odd about the issue is how well the \url{} command is at handling all other special characters that can appear in a hyperlink, but seems to choke when it comes to the hashtag (#) character.
I’m curious if anyone else has run into this issue, and if so, if there are any solutions other than what is offered on either the latex.org or the gitHub.com websites. It would not be the first time I’ve missed something that may be obvious to others.
Thank you for all your help,
scrive
