Lines can have an hfill \hfill in the middle.
Lines can have a protected hfill \hspace*{\fill} in the middle.
+Lines can have a dotted fill \dotfill in the middle.
+Lines can have a rule fill \hrulefill in the middle.
+Lines can have a left arrow fill \leftarrowfill in the middle.
+Lines can have a right arrow fill \rightarrowfill in the middle.
+Lines can have a upbrace fill \upbracefill in the middle.
+Lines can have a downbrace fill \downbracefill in the middle.
Lines can have space \hspace{2cm} in the middle.
Lines can have protected space \hspace*{2cm} in the middle.
Thin\,a
+Medium\:a
+
+Thick\;a
+
NegThin\negthinspace{}a
+NegMed\negmedspace{}a
+
+NegThick\negthickspace{}a
+
+enspace\enspace{}a
+
enskip\enskip{}a
quad\quad{}a
/// spaces known by InsetSpace
char const * const known_spaces[] = { " ", "space", ",", "thinspace", "quad",
-"qquad", "enspace", "enskip", "negthinspace", 0};
+"qquad", "enspace", "enskip", "negthinspace", "hfill", "dotfill", "hrulefill",
+"leftarrowfill", "rightarrowfill", "upbracefill", "downbracefill", 0};
/// the same as known_spaces with .lyx names
char const * const known_coded_spaces[] = { "space{}", "space{}",
"thinspace{}", "thinspace{}", "quad{}", "qquad{}", "enspace{}", "enskip{}",
-"negthinspace{}", 0};
+"negthinspace{}", "hfill{}", "dotfill{}", "hrulefill{}", "leftarrowfill{}",
+"rightarrowfill{}", "upbracefill{}", "downbracefill{}", 0};
/// splits "x=z, y=b" into a map and an ordered keyword vector
p.skip_spaces();
// We add a protected space if something real follows
if (p.good() && p.next_token().cat() != catComment) {
- os << "\\InsetSpace ~\n";
+ begin_inset(os, "Space ~\n");
+ end_inset(os);
}
}
#endif
if (t.character() == '~') {
if (context.layout->free_spacing)
os << ' ';
- else
- os << "\\InsetSpace ~\n";
+ else {
+ begin_inset(os, "Space ~\n");
+ end_inset(os);
+ }
} else
os << t.cs();
}
context);
}
- else if (t.cs() == "hfill") {
- context.check_layout(os);
- os << "\n\\hfill\n";
- skip_braces(p);
- p.skip_spaces();
- }
-
else if (t.cs() == "makeindex" || t.cs() == "maketitle") {
// FIXME: Somehow prevent title layouts if
// "maketitle" was not found
else if (is_known(t.cs(), known_spaces)) {
char const * const * where = is_known(t.cs(), known_spaces);
context.check_layout(os);
- os << "\\InsetSpace ";
+ begin_inset(os, "Space ");
os << '\\' << known_coded_spaces[where - known_spaces]
<< '\n';
+ end_inset(os);
// LaTeX swallows whitespace after all spaces except
// "\\,". We have to do that here, too, because LyX
// adds "{}" which would make the spaces significant.