I would like to add a text with a hyperlink to my document being generated via pyLaTeX. In LaTeX this would be performed by using:
\href{http://www.sharelatex.com}{Something Linky}
I have found the labelref documentation containing the Marker object as well as the Hyperref Object but i cannot seem to get it working.
from pylatex import Document, Hyperref
doc = Document()
doc.append("Example text a link should go ")
# i was hoping the hyperlink would work like i'm showing below
doc.append(Hyperref("https://jeltef.github.io/PyLaTeX", "here"))
doc.generate_pdf("Example_document", clean_tex=True)
Running the following code produces the a pdf document without errors. image of the document produced
While what i would expect is that the word "here" is a hyperlink and shown in blue.
\hyperref[https://jeltef.github.io/PyLaTeX]{here}toExample_document.tex. That line is trying to reference a label, not a URL. It also mentions in the documentation you linked that the class is meant to reference label/ref parameters. Doesn't look like this package can automatically reference URLs like how you want.