I know this How to typeset a file path? I think that the PATH command works like making possible to use shorter PATH in URLs. I have documents in my filesystem which I often include in my notes. I would like to assign their folder location by the path -command. However, I am not sure if I use the right function because of unexpected result below.
Code
\documentclass{article}
\usepackage[obeyspaces]{url}
\begin{document}
\path{/Users/masi/Dropbox/Internal Diseases}
\url{PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf}
\end{document}
Output:
/Users/masi/Dropbox/Internal Diseases
PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf
Expected output:
/Users/masi/Dropbox/Internal Diseases/PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf
2nd example having pseudocode
\documentclass{article}
\usepackage[obeyspaces]{url}
\begin{document}
\somePathCommand{/Users/masi/Dropbox/Internal Diseases}
\someHrefCommand{PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf}{Diabetes Guideline}
\end{document}
which should print the link Diabetes Guideline i.e. having redirection to:
/Users/masi/Dropbox/Internal Diseases/PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf
How can you typeset correctly the file path? I.e. use it with images, and do not print the actual path in the document as text.
\url
command as the\path
command work as expected. What's wrong with the outcome of\path{/Users/masi/Dropbox/Internal Diseases}
in the image?\path
is to print the path and it does print it. What do you expect it to do otherwise? And what is the relation to\url
?\path{/Users/masi/Dropbox/Internal Diseases}
to do other than typesetting the argument?\path{/Users/masi/Dropbox/Internal Diseases/PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf}
or\url{/Users/masi/Dropbox/Internal Diseases/PubMed Central, Table 3_ Diabetes Care. 2010 Jan; 33(Suppl 1)_ S62–S69. doi_ 10.pdf}
?