{smcl} {* *! Version 1.0 of this help file by Mead Over, 27Jul2020}{...} {vieweralsosee "[P] smcl" "help smcl##ascii"}{...} {vieweralsosee "[FN] char(n)" "help char()"}{...} {viewerjumpto "Author" "mluwild##author"}{...} {hline} help for {hi:net_from_url}{right:{hi:Version 1.0 4Aug2020}} {hline} {title:Title} {p2colset 5 20 22 2}{...} {p2col :{cmd:net_from_url}}Tips on the punctuation for linking Stata to a URL.{p_end} {p2colreset}{...} {title:Linking to a user site} {pstd} In an {help ado} file, to display a clickable link to a user's download site, the trick is to exactly copy the following placement of punctuation: {pstd} {cmd:display as txt {c 'g}"click {c -(}stata "view net from http://digital.cgdev.org/doc/stata/MO/Misc":here{c )-} to browse a user's Stata site"'} {pstd} Note that the double quotes (`" and "') enclose the argument to be {help display:display}ed, the braces ({ and }) enclose the {help smcl} command and the regular quotes (" and ") enclose the {cmd:view} command. The {help ado} file, when executed, will display the following text and clickable link in the results window and in the SMCL log file. {pstd} {cmd:click {stata "view net from http://digital.cgdev.org/doc/stata/MO/Misc":here} to browse a user's Stata site"'} {title:Linking to a program install} {pstd} In an {help ado} file, to display a clickable link to a Stata program download, the trick is to exactly copy the following placement of punctuation: {pstd} {cmd:display as txt {c 'g}"click {c -(}stata "view net describe mlu, from(http://digital.cgdev.org/doc/stata/MO/Misc)":here{c )-} to install the program -mlu-"'} {pstd} Again the double quotes (`" and "') enclose the argument to be {help display:display}ed, the braces ({ and }) enclose the {help smcl} command and the regular quotes (" and ") enclose the {cmd:view} command. The {help ado} file, when executed, will display the following text and clickable link in the results window and in the SMCL log file. {pstd} {cmd:click {stata "view net describe mlu, from(http://digital.cgdev.org/doc/stata/MO/Misc)":here} to install the program -mlu-} {title:Warning} {pstd} The {help net:net {it:args}} entry in the {cmd:help} file for {help smcl:SMCL} advises that "Whenever args contains a colon, as it does when args is a URL, be sure to enclose args in quotes." This advice might lead the user to code the link to the URL as: {pstd}{txt} {cmd:display as txt {c 'g}"click {c -(}stata view net "describe mlu, from(http://digital.cgdev.org/doc/stata/MO/Misc)":here{c )-}"'} {pstd}{txt} However, the above line of code does not work. Executing it results in the following misleading display: {com}click {stata view net "describe mlu, from(http://digital.cgdev.org/doc/stata/MO/Misc)":here} {pstd}{txt} Clicking on this link does not work and instead displays the following text and error message: {com}. view net "describe mlu, from(http {err}invalid something: quotes do not match {txt}{search r(198), local:r(198);} {marker author}{...} {title:Author} {txt}{phang}{browse "http://www.cgdev.org/expert/mead-over/":Mead Over} Contact him at {browse "mailto:mover@cgdev.org":MOver@CGDev.Org} if you observe any problems. {p_end} {* Version History of this help file} {* Version 1.0 4Aug2020}