From: Georg Baum Date: Mon, 17 Oct 2011 18:54:13 +0000 (+0000) Subject: more work on spaces X-Git-Tag: 2.1.0beta1~2580 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6304d7225535aa98b495ddef5dae6f9a97d60cd5;p=features.git more work on spaces git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39876 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/unicodesymbols b/lib/unicodesymbols index ee23af21d8..c1fae26bb2 100644 --- a/lib/unicodesymbols +++ b/lib/unicodesymbols @@ -1529,7 +1529,24 @@ # # general punctuation # -0x2010 "-" "" "" # HYPHEN # identic in LaTeX to FIGURE DASH +0x2000 "\\enskip" "" "" "\\enskip" "" # EN QUAD +0x2001 "\\quad" "" "" "\\quad" "" # EM QUAD +0x2002 "\\enskip" "" "" "\\enskip" "" # EN SPACE +0x2003 "\\quad" "" "" "\\quad" "" # EM SPACE +0x2004 "\\;" "" "" "\\;" "" # THREE-PER-EM SPACE +0x2005 "\\:" "" "" "\\:" "" # FOUR-PER-EM SPACE +0x2006 "\\," "" "" "\\," "" # SIX-PER-EM SPACE +#0x2007 "" "" "" "" "" # FIGURE SPACE +#0x2008 "" "" "" "" "" # PUNCTUATION SPACE +0x2009 "\\," "" "" "\\," "" # THIN SPACE +#0x200a "" "" "" "" "" # HAIR SPACE +#0x200b "" "" "" "" "" # ZERO WIDTH SPACE +#0x200c "" "" "" "" "" # ZERO WIDTH NON-JOINER +#0x200d "" "" "" "" "" # ZERO WIDTH JOINER +#0x200e "" "" "" "" "" # LEFT-TO-RIGHT MARK +#0x200f "" "" "" "" "" # RIGHT-TO-LEFT MARK +0x2010 "-" "" "" "" "" # HYPHEN # identic in LaTeX to FIGURE DASH +#0x2011 "" "" "" "" "" # NON-BREAKING HYPHEN 0x2012 "-" "" "" # FIGURE DASH 0x2013 "\\textendash" "" "" # EN DASH 0x2014 "\\textemdash" "" "" # EM DASH @@ -1579,6 +1596,7 @@ 0x205d "\\vdots" "" "" # TRICOLON # ≈ VERTICAL ELLIPSIS #0x205e "" "" "" "" "" # VERTICAL FOUR DOTS 0x205f "" "" "" "\\:" "" # MEDIUM MATHEMATICAL SPACE +#0x2060 "" "" "" "" "" # WORD JOINER 0x2070 "\\textsuperscript{0}" "" "" "{{}^0}" "" # SUPERSCRIPT ZERO 0x2071 "\\textsuperscript{i}" "" "" "{{}^i}" "" # SUPERSCRIPT LATIN SMALL LETTER I 0x2074 "\\textsuperscript{4}" "" "" "{{}^4}" "" # SUPERSCRIPT FOUR diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index c516b137ee..081b98c44c 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -646,9 +646,17 @@ int InsetSpace::plaintext(odocstream & os, OutputParams const &) const case InsetSpaceParams::DOWNBRACEFILL: os << "/-^-\\"; return 5; + case InsetSpaceParams::VISIBLE: + os.put(0x2423); + return 1; case InsetSpaceParams::ENSKIP: os.put(0x2002); return 1; + case InsetSpaceParams::ENSPACE: + os.put(0x2060); // WORD JOINER, makes the breakable en space unbreakable + os.put(0x2002); + os.put(0x2060); // WORD JOINER, makes the breakable en space unbreakable + return 3; case InsetSpaceParams::QUAD: os.put(0x2003); return 1; @@ -738,20 +746,27 @@ docstring InsetSpace::xhtml(XHTMLStream & xs, OutputParams const &) const output = " "; break; case InsetSpaceParams::ENSKIP: - case InsetSpaceParams::ENSPACE: output =" "; break; + case InsetSpaceParams::ENSPACE: + output ="⁠ ⁠"; + break; case InsetSpaceParams::QQUAD: - output =" "; + output ="  "; + break; case InsetSpaceParams::THICK: + output =" "; + break; case InsetSpaceParams::QUAD: output =" "; break; + case InsetSpaceParams::MEDIUM: + output =" "; + break; case InsetSpaceParams::THIN: output =" "; break; case InsetSpaceParams::PROTECTED: - case InsetSpaceParams::MEDIUM: case InsetSpaceParams::NEGTHIN: case InsetSpaceParams::NEGMEDIUM: case InsetSpaceParams::NEGTHICK: @@ -773,9 +788,13 @@ docstring InsetSpace::xhtml(XHTMLStream & xs, OutputParams const &) const // Can we do anything with those in HTML? break; case InsetSpaceParams::CUSTOM: + // FIXME XHTML + // Probably we could do some sort of blank span? + break; case InsetSpaceParams::CUSTOM_PROTECTED: // FIXME XHTML // Probably we could do some sort of blank span? + output =" "; break; } // don't escape the entities!