290 wrapped tables InsetWrap
292 japanese japanese-plain
293 ? InsetInfo
-299 hyperlink types InsetHyperlink
309 \nocite InsetCitation
310 \nocite{*} InsetBibtex
316 subfig.sty (subfloats) InsetFloat
between~\verbatiminput{foo} or~\verbatiminput*{foo}.
-\section{URL\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
+\section{URLs and Hyperlinks\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
-An URL: \url{http://www.lyx.org}
-\nomenclature{URL2}{uniform resource locator}
+An URL: \url{http://www.lyx.org} \nomenclature{URL2}{uniform resource locator}
+
+link:\href{http://www.test.test}{www.test.test}
+
+link2:\href{http://www.test.test}{http://www.test.test}
+
+mail:\href{mailto:www.test.test}{name}
+
+file:\href{file:www.test.test}{www.test.test}
+
+ftp:\href{ftp://www.test.test}{ftp://www.test.test}
+
+ftp2:\href{ftp://www.test.test}{www.test.test}
\section{Lists\index{Lists}}
parse_text_in_inset(p, os, FLAG_ITEM, outer, context);
end_inset(os);
}
+
+ else if (t.cs() == "href") {
+ context.check_layout(os);
+ string target = p.getArg('{', '}');
+ string name = p.getArg('{', '}');
+ string type;
+ size_t i = target.find(':');
+ if (i != string::npos) {
+ type = target.substr(0, i + 1);
+ if (type == "mailto:" || type == "file:")
+ target = target.substr(i + 1);
+ // handle the case that name is equal to target, except of "http://"
+ else if (target.substr(i + 3) == name && type == "http:")
+ target = name;
+ }
+ begin_command_inset(os, "href", "href");
+ if (name != target)
+ os << "name \"" << name << "\"\n";
+ os << "target \"" << target << "\"\n";
+ if (type == "mailto:" || type == "file:")
+ os << "type \"" << type << "\"\n";
+ end_inset(os);
+ skip_spaces_braces(p);
+ }
else if (t.cs() == "lyxline") {
// swallow size argument (it is not used anyway)