Open MartinThoma opened 9 years ago
Isn't href just hyperlink (e.g., it can refer to other areas of the document) and you still need a \url so that it breaks at the right places?
Href lets you add hyperlinks. The pattern is
\href{<the hyperlink>}{<the printed text>}
where the second argument is treated like normal text. See http://tex.stackexchange.com/a/111701/5645
whoops, you are right. I will try to fix it sometime; patches welcome though :)
I would patch it if I could, but I don't know how to write (and much less how to read) perl. (Your script seems quite easy to read in contrast to many perl scripts I've seen, though)
I am thinking about re-developing your script in Python. But at the moment I have too much work (2 days left for my bachelor's thesis.)
Thank you for your script! Especially the "duplicate word" feature helped me :-)
The script is a bunch of regexes really. As long as you know regexes, it should be easy.
https://github.com/devd/Academic-Writing-Check/blob/master/checkwriting#L302
is the check you need to modify. $regex
is just a regex for URLs. The regex in line 325 just needs to be modified: right now, it special cases \url as "ok don't warn"; just change that to match "\url and \href"
I think changing
s/(\\url\{[^}]*\})|
to
s/((?:\\url|\\href)\{[^}]*\})|
is enough. But it is the testing etc that takes time :)
The usage of
and similar causes the tool to find a 'typography error'. I don't think that should be the case.