<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Gary,
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 14, 2018, at 6:30 AM, Gary L. Gray <<a href="mailto:euler@psu.edu" class="">euler@psu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">This is sort of Mac related in that I do not understand why it works on my Mac. :-) And I apologize in advance for a rather long message.<br class="">
<br class="">
From within a presentation, I would like to be able to link to and open a .tex file. Some searching in the hyperref manual alludes to the fact that this can be done, but I sure can’t find the scheme for doing so. So I tried the following<br class="">
<br class="">
\href{<a href="file:///Users/gray/Documents/Teaching/LaTeX\" class="">file:///Users/gray/Documents/Teaching/LaTeX\</a> Course/Lectures/2018\ -\ Fall/Lecture\ 03/simple_document/simple_doc.tex}{Simple \LaTeX\ Document}<br class="">
<br class="">
which shows the title as a link, but clicking on it does nothing and when one hovers, it shows nothing.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Use relative paths, as you discovered.</div>
<div>Typically — probably for security reasons — applications aren’t allowed to use arbitrary full paths.</div>
<div>Otherwise malicious code within a PDF (or other) document could do potentially damaging things.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class=""><br class="">
The next thing I did was to head over to TeX StackExchange (that place intimidates me a more than a little) where I found this<br class="">
<br class="">
<a href="https://protect-au.mimecast.com/s/TM8JCYW86EsnBJOuj6nwD?domain=tex.stackexchange.com" class="">https://tex.stackexchange.com/questions/41539/does-hyperref-work-between-two-files/41605#41605</a><br class="">
<br class="">
The answer from Sony suggests using “run:” before the path to the file. So I tried this<br class="">
<br class="">
\href{run:/Users/gray/Documents/Teaching/LaTeX\ Course/Lectures/2018\ -\ Fall/Lecture\ 03/simple_document/simple_doc.tex}{Simple \LaTeX\ Document}<br class="">
<br class="">
which also did not work. In this case it linked to:<br class="">
<br class="">
<a href="file:///Users/gray/Documents/Teaching/LaTeX%20Course/Lectures/2018%20-%20Fall/Lecture%2003//Users/gray/Documents/Teaching/LaTeX%5C%20Course/Lectures/2018%5C%20-%5C%20Fall/Lecture%5C%2003/simple_document/simple_doc.tex" class="">file:///Users/gray/Documents/Teaching/LaTeX%20Course/Lectures/2018%20-%20Fall/Lecture%2003//Users/gray/Documents/Teaching/LaTeX%5C%20Course/Lectures/2018%5C%20-%5C%20Fall/Lecture%5C%2003/simple_document/simple_doc.tex</a><br class="">
<br class="">
so you can see that some extraneous stuff was inserted.<br class="">
<br class="">
Finally, rather than use an absolute path, I used a relative one as<br class="">
<br class="">
\href{run:simple_document/simple_doc.tex}{Simple \LaTeX\ Document 2}<br class="">
<br class="">
and amazingly, this worked. </div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Keep the file names simple and relative.</div>
<div>You cannot guarantee that URL encoding ( all that %20 and %5C stuff) will work on all systems.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class="">In this case, the link is to<br class="">
<br class="">
<a href="file:///Users/gray/Documents/Teaching/LaTeX%20Course/Lectures/2018%20-%20Fall/Lecture%2003/simple_document/simple_doc.tex" class="">file:///Users/gray/Documents/Teaching/LaTeX%20Course/Lectures/2018%20-%20Fall/Lecture%2003/simple_document/simple_doc.tex</a><br class="">
<br class="">
and so the .tex file opens in the default app for such files. By the way, this also works:<br class="">
<br class="">
\href{run:./simple_document/simple_doc.tex}{Simple \LaTeX\ Document}<br class="">
<br class="">
So, can anyone explain what this run thing is doing? </div>
</div>
</blockquote>
<div><br class="">
</div>
<div> run is also what you do when you play a video, or audio file from within a PDF document.</div>
<div>Just as with hyperlinks, an “annotation" is used to interface between an area on the page,</div>
<div>and some action that you want to perform.</div>
<div><br class="">
</div>
<div>There are many things that can be done with annotations.</div>
<div>The Hyperref package has extensive coding that helps setup an annotation to do exactly what you want.</div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class="">Searching the web, it appears to be a Windows thing, but works perfectly on my machine. More importantly, what should I be doing to open a .tex file as I am doing here?<br class="">
<br class="">
Any insights would be greatly appreciated.<br class="">
<br class="">
Gary<br class="">
</div>
</div>
</blockquote>
<br class="">
</div>
<div><br class="">
</div>
<div>Hope this helps.</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Ross</div>
<br class="">
<div apple-content-edited="true" class="">
<div style="font-family: Arial, sans-serif; orphans: 2; widows: 2;" class=""><span class="Apple-style-span" style="font-size: 9px;"><b class=""><span style="font-size: 9pt;" class=""><br class="Apple-interchange-newline">
Dr Ross Moore</span></b></span></div>
<div style="orphans: 2; widows: 2;" class="">
<p style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin-bottom: 3.75pt;" class="">
<font color="#000000" class=""><b style="color: rgb(119, 119, 119); font-family: Arial, sans-serif; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Mathematics
Dept </b><b style="color: rgb(119, 119, 119); font-family: Arial, sans-serif; font-size: 9pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">|</b><font color="#777777" face="Arial, sans-serif" class=""><span style="font-size: 9pt;" class=""> 12
Wally</span></font><font face="Arial, sans-serif" class="">’</font><font color="#777777" face="Arial, sans-serif" class=""><span style="font-size: 9pt;" class="">s Walk, 734</span></font><br class="">
<font color="#777777" face="Arial, sans-serif" class=""><span style="font-size: 9pt;" class="">Macquarie University, NSW 2109, Australia</span></font><font color="#777777" size="3" class=""><span style="font-family: 'Times New Roman', serif; font-size: 12pt;" class=""></span></font></font></p>
<p style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Arial, sans-serif; color: rgb(119, 119, 119); font-size: 7pt; line-height: 11.25pt; margin-bottom: 3.75pt;" class="">
<b class=""><span style="font-size: 9pt;" class=""><font color="#000000" class="">T:</font></span></b><span style="font-size: 9pt;" class=""><font color="#000000" class=""> +61 2 9850 <b class="">8955 | F:</b> </font><a href="tel:%2B61%202%209850%209695" value="+61298509695" target="_blank" class=""><font color="#000000" class="">+61
2 9850 8114</font></a><br class="">
<font color="#000000" class=""><b class="">M:</b><a href="tel:%2B61%20409%20125%20670" value="+61409125670" target="_blank" class="">+61 407 288 255</a><b class=""> | </b>E: </font><a href="mailto:rick.minter@mq.edu.au" target="_blank" class=""><font color="#000000" class="">ross.moore@mq.edu.au</font><font color="#1155cc" class=""><span style="color: black;" class=""></span></font></a><font color="#1155cc" class=""><span style="color: black;" class=""></span></font><span style="color: black;" class=""></span><br class="">
</span></p>
<p style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Arial, sans-serif; color: rgb(119, 119, 119); font-size: 7pt; line-height: 11.25pt; margin-bottom: 3.75pt;" class="">
<span style="font-size: 9pt;" class=""><span style="color: black;" class=""><a title="Macquarie University" href="http://mq.edu.au/" target="_blank" class="">http://www.maths.mq.edu.au</a></span></span></p>
<p style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Arial, sans-serif; color: rgb(119, 119, 119); font-size: 7pt; line-height: 11.25pt; margin-bottom: 3.75pt;" class="">
<span style="font-size: 12px; line-height: normal;"><a href="http://mq.edu.au/" target="_blank" style="font-size: 12px; line-height: normal;" class=""><span><br class="Apple-interchange-newline">
<span><img height="58" width="260" apple-inline="yes" id="51886F2D-41E8-4221-B6D8-2604D8699867" apple-width="yes" apple-height="yes" src="cid:image001.png@01D030BE.D37A46F0" class=""></span></span></a></span></p>
<p style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Arial, sans-serif; color: rgb(119, 119, 119); font-size: 7pt;" class="">
<a href="http://mq.edu.au/" target="_blank" class=""><span style="color: rgb(119, 119, 119); font-size: 7pt;" class=""><br class="Apple-interchange-newline">
CRICOS Provider Number 00002J. Think before you print. <br class="">
Please consider the environment before printing this email.</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;" class=""></span></a></p>
<p style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Arial, sans-serif; color: rgb(119, 119, 119); font-size: 7pt;" class="">
<a href="http://mq.edu.au/" target="_blank" class=""><span style="color: rgb(119, 119, 119); font-size: 7pt;" class="">This message is intended for the addressee named and may <br class="">
contain confidential information. If you are not the intended <br class="">
recipient, please delete it and notify the sender. Views expressed <br class="">
in this message are those of the individual sender, and are not <br class="">
necessarily the views of Macquarie University.</span></a></p>
</div>
</div>
<br class="">
</div>
</body>
</html>