ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
cite.m
Go to the documentation of this file.
1%> \brief
2%> Return a scalar MATLAB raw string or HTML-style hyperlink
3%> containing the weblink to ParaMonte library publications.
4%>
5%> \param[in] format : The input scalar MATLAB string indicating
6%> the format of the output we address.<br>
7%> <ol>
8%> <li> An input value of ``"raw"`` will return a raw web address.
9%> <li> An input value of ``"html"`` will return an HTML style web address.
10%> </ol>
11%> (**optional**, default = ``"html"``)
12%>
13%> \return
14%> ``str`` : The output scalar MATLAB string containing either,
15%> <ol>
16%> <li> a raw weblink to the ParaMonte library publications
17%> if the library is used outside the MATLAB GUI interface, or,
18%> <li> an HTML-style hyperlink to the ParaMonte library publications
19%> if the library is used within the MATLAB GUI interface.
20%> </ol>
21%>
22%> \interface{cite}
23%> \code{.m}
24%>
25%> str = pm.lib.cite()
26%> str = pm.lib.cite(format)
27%>
28%> \endcode
29%>
30%> \example{cite}
31%> \include{lineno} example/lib/cite/main.m
32%> \output{cite}
33%> \include{lineno} example/lib/cite/main.out.m
34%>
35%> \final{cite}
36%>
37%> \author
38%> \JoshuaOsborne, May 21 2024, 8:05 PM, University of Texas at Arlington<br>
39%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
40%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
41function str = cite(format)
42 citefile = fullfile(pm.lib.path.auxil(), ".cite.link");
43 try
44 if nargin < 1
45 format = "html";
46 end
47 str = string(fileread(citefile));
48 if strcmpi(format, "html")
49 str = pm.web.href(str);
50 end
51 catch me
52 str = "";
53 weblinks = pm.lib.weblinks();
54 warning ( newline ...
55 + string(me.identifier) + " : " + string(me.message) + newline ...
56 + "Failed to read the contents of the citation file:" + newline ...
57 + newline ...
58 + pm.io.tab + """" + citefile + """" + newline ...
59 + newline ...
60 + "The structure of the ParaMonte library appears compromised." + newline ...
61 + "You can always a fresh latest version of the library from:" + newline ...
62 + newline ...
63 + pm.io.tab + pm.web.href(weblinks.github.releases.url) + newline ...
64 + newline ...
65 );
66 end
67end
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function cite(in format)
Return a scalar MATLAB raw string or HTML-style hyperlink containing the weblink to ParaMonte library...
function href(in url)
Return an HTML-style decoration of the input URL if the ParaMonte MATLAB library is used in GUI,...
function lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...
function tab()
Return a scalar MATLAB string containing 4 blank characters equivalent to a tab character.