Using \href is not rendering on pdf

hrefpdftexrendering

I am attempting to use the href package in LaTex to make a link to my GitHub clickable in a resume. I believe that I am using it correctly, but the label remains unclickable.

For background, I am using WSL and creating .dvi files and then converting to .pdf. To even get the .dvi file to work I had to change the 'render method' to 'dvips' under the 'view' tab of Yap (.dvi viewer).

An example of the code:

\documentclass{article}
\usepackage[unicode]{hyperref}

\begin{document}

\title{Test}
\author{Me}

\maketitle

\href{https://github.com/stevend-15}{github.com/stevend-15}

\end{document}

I then run latex test_href.tex which gives me this output:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./test_href.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty
(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def
(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty)
(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file test_href.aux.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty)
(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.

[1] (./test_href.aux)

Package rerunfilecheck Warning: File `test_href.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )
Output written on test_href.dvi (1 page, 2684 bytes).
Transcript written on test_href.log.

I then run dvipdfm test_href.dvi which outputs the following a few times:

test_href.dvi -> test_href.pdf
[1
xdvipdfmx:warning: Unparsed material at end of special ignored.

Current input buffer is -->! systemdict /pdfmark known{userdict /?pdfmark sys...<--

xdvipdfmx:warning: Unknown token "SDict"
xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!!
xdvipdfmx:warning: Interpreting special command ps: (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(72, 720)" (in PDF)
xdvipdfmx:warning: >> xxx "ps:SDict begin [/Producer (dvips + Distiller)/Title ()/Subje..."
xdvipdfmx:warning: >> Reading special command stopped around >>begin [/Producer (dvips + Distiller)/Title ()/Subject ()/Cre...<<
xdvipdfmx:warning: Unparsed material at end of special ignored.

Current input buffer is -->! /DvipsToPDF{72.27 mul Resolution div} def/PDFToD...<--

xdvipdfmx:warning: Unknown token "SDict"
xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!!
xdvipdfmx:warning: Interpreting special command ps: (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(72, 720)" (in PDF)
xdvipdfmx:warning: >> xxx "ps:SDict begin /product where{pop product(Distiller)search{p..."
xdvipdfmx:warning: >> Reading special command stopped around >>begin /product where{pop product(Distiller)search{pop pop po...<<
xdvipdfmx:warning: Unknown token "SDict"
xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!!
xdvipdfmx:warning: Interpreting special command ps: (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(132.768, 705.06)" (in PDF)
xdvipdfmx:warning: >> xxx "ps:SDict begin H.S end"
xdvipdfmx:warning: >> Reading special command stopped around >>begin H.S end<<
xdvipdfmx:warning: Unknown token "SDict"
xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!!
xdvipdfmx:warning: Interpreting special command ps: (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(132.768, 705.06)" (in PDF)
xdvipdfmx:warning: >> xxx "ps:SDict begin H.R end"
xdvipdfmx:warning: >> Reading special command stopped around >>begin H.R end<<
xdvipdfmx:warning: Unknown token "SDict"
xdvipdfmx:warning: Interpreting PS code failed!!! Output might be broken!!!
xdvipdfmx:warning: Interpreting special command ps: (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(132.768, 705.06)" (in PDF)
xdvipdfmx:warning: >> xxx "ps:SDict begin [/View [/XYZ H.V]/Dest (page.1) cvn /DEST pdf..."
xdvipdfmx:warning: >> Reading special command stopped around >>begin [/View [/XYZ H.V]/Dest (page.1) cvn /DEST pdfmark end<<

But it stops after a second and gives me this .pdf (shown as an image): enter image description here

Unfortunately, the label is unclickable.

Any help at all would be appreciated.

Thank you

Best Answer

As you can see in the log, hyperref is loading code for dvips:

/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def

and (x)dvipdfmx doesn't like that.

Pass the correct option (dvipdfm will work too):

\documentclass{article}
\usepackage[dvipdfmx,unicode]{hyperref}

\begin{document}

\title{Test}
\author{Me}

\maketitle

\href{https://github.com/stevend-15}{github.com/stevend-15}

\end{document}

then hyperref will load /tex/latex/hyperref/hdvipdfm.def and the link will work.