more work on spaces

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39876 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2011-10-17 18:54:13 +00:00
parent 97de79f412
commit 6304d72255
2 changed files with 41 additions and 4 deletions

View File

@ -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

View File

@ -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 ="&ensp;";
break;
case InsetSpaceParams::ENSPACE:
output ="&#x2060;&ensp;&#x2060;";
break;
case InsetSpaceParams::QQUAD:
output ="&emsp;";
output ="&emsp;&emsp;";
break;
case InsetSpaceParams::THICK:
output ="&#x2004;";
break;
case InsetSpaceParams::QUAD:
output ="&emsp;";
break;
case InsetSpaceParams::MEDIUM:
output ="&#x2005;";
break;
case InsetSpaceParams::THIN:
output ="&thinsp;";
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 ="&nbsp;";
break;
}
// don't escape the entities!