diff --git a/lib/unicodesymbols b/lib/unicodesymbols index dbeeb706c0..9579959d2a 100644 --- a/lib/unicodesymbols +++ b/lib/unicodesymbols @@ -179,8 +179,8 @@ 0x011f "\\u{g}" "" "mathalpha" "\\breve{g}" # LATIN SMALL LETTER G WITH BREVE 0x0120 "\\.{G}" "" "mathalpha" "\\dot{G}" # LATIN CAPITAL LETTER G WITH DOT ABOVE 0x0121 "\\.{g}" "" "mathalpha" "\\dot{g}" # LATIN SMALL LETTER G WITH DOT ABOVE -0x0122 "\\c{G}" "" "mathalpha" "\\cedilla{G}" "accents,cedilla" # LATIN CAPITAL LETTER G WITH CEDILLA -0x0123 "\\accent96 g" "" "mathalpha,notermination=both" "\\mathaccent96 g" "" # LATIN SMALL LETTER G WITH CEDILLA +0x0122 "\\c{G}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{G}" "accents,cedilla" # LATIN CAPITAL LETTER G WITH CEDILLA (actually a comma accent, Latvian) +0x0123 "\\c{g}" "textbaltic" "mathalpha,force=utf8,notermination=math" "\\mathaccent96 g" "" # LATIN SMALL LETTER G WITH CEDILLA (actually a comma above accent, Latvian) 0x0124 "\\^{H}" "" "mathalpha" "\\hat{H}" # LATIN CAPITAL LETTER H WITH CIRCUMFLEX 0x0125 "\\^{h}" "" "mathalpha" "\\hat{h}" # LATIN SMALL LETTER H WITH CIRCUMFLEX #0x0126 "" "" "" "" "" # LATIN CAPITAL LETTER H WITH STROKE @@ -199,13 +199,13 @@ 0x0133 "ij" "" "mathalpha,notermination=both" "ij" "" # LATIN SMALL LIGATURE IJ 0x0134 "\\^{J}" "" "mathalpha" "\\hat{J}" # LATIN CAPITAL LETTER J WITH CIRCUMFLEX 0x0135 "\\^{\\j}" "" "mathalpha,force=utf8" "\\hat{\\jmath}" "" # LATIN SMALL LETTER J WITH CIRCUMFLEX -0x0136 "\\c{K}" "" "mathalpha" "\\cedilla{K}" "accents,cedilla" # LATIN CAPITAL LETTER K WITH CEDILLA -0x0137 "\\c{k}" "" "mathalpha" "\\cedilla{k}" "accents,cedilla" # LATIN SMALL LETTER K WITH CEDILLA +0x0136 "\\c{K}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{K}" "accents,cedilla" # LATIN CAPITAL LETTER K WITH CEDILLA (actually a comma accent, Latvian) +0x0137 "\\c{k}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{k}" "accents,cedilla" # LATIN SMALL LETTER K WITH CEDILLA (actually a comma accent, Latvian) #0x0138 "" "" "" "" "" # LATIN SMALL LETTER KRA 0x0139 "\\'{L}" "" "mathalpha" "\\acute{L}" # LATIN CAPITAL LETTER L WITH ACUTE 0x013a "\\'{l}" "" "mathalpha" "\\acute{l}" # LATIN SMALL LETTER L WITH ACUTE -0x013b "\\c{L}" "" "mathalpha" "\\cedilla{L}" "accents,cedilla" # LATIN CAPITAL LETTER L WITH CEDILLA -0x013c "\\c{l}" "" "mathalpha" "\\cedilla{l}" "accents,cedilla" # LATIN SMALL LETTER L WITH CEDILLA +0x013b "\\c{L}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{L}" "accents,cedilla" # LATIN CAPITAL LETTER L WITH CEDILLA (actually a comma accent, Latvian) +0x013c "\\c{l}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{l}" "accents,cedilla" # LATIN SMALL LETTER L WITH CEDILLA (actually a comma accent, Latvian) 0x013d "\\v{L}" "" "mathalpha" "L\\mkern-7mu\\mathchar19" # LATIN CAPITAL LETTER L WITH CARON 0x013e "\\v{l}" "" "mathalpha" "l\\mkern-5mu\\mathchar19" # LATIN SMALL LETTER L WITH CARON #0x013f "" "" "" "" "" # LATIN CAPITAL LETTER L WITH MIDDLE DOT @@ -214,8 +214,8 @@ 0x0142 "\\l" "" "mathalpha,notermination=math" "\\mathchar'40\\mkern-5mu l" # LATIN SMALL LETTER L WITH STROKE 0x0143 "\\'{N}" "" "mathalpha" "\\acute{N}" # LATIN CAPITAL LETTER N WITH ACUTE 0x0144 "\\'{n}" "" "mathalpha" "\\acute{n}" # LATIN SMALL LETTER N WITH ACUTE -0x0145 "\\c{N}" "" "mathalpha" "\\cedilla{N}" "accents,cedilla" # LATIN CAPITAL LETTER N WITH CEDILLA -0x0146 "\\c{n}" "" "mathalpha" "\\cedilla{n}" "accents,cedilla" # LATIN SMALL LETTER N WITH CEDILLA +0x0145 "\\c{N}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{N}" "accents,cedilla" # LATIN CAPITAL LETTER N WITH CEDILLA (actually a comma accent, Latvian) +0x0146 "\\c{n}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{n}" "accents,cedilla" # LATIN SMALL LETTER N WITH CEDILLA (actually a comma accent, Latvian) 0x0147 "\\v{N}" "" "mathalpha" "\\check{N}" # LATIN CAPITAL LETTER N WITH CARON 0x0148 "\\v{n}" "" "mathalpha" "\\check{n}" # LATIN SMALL LETTER N WITH CARON #0x0149 "" "" "" "" "" # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE @@ -231,8 +231,8 @@ 0x0153 "\\oe" "" "" "" "" # LATIN SMALL LIGATURE OE 0x0154 "\\'{R}" "" "mathalpha" "\\acute{R}" # LATIN CAPITAL LETTER R WITH ACUTE 0x0155 "\\'{r}" "" "mathalpha" "\\acute{r}" # LATIN SMALL LETTER R WITH ACUTE -0x0156 "\\c{R}" "" "mathalpha" "\\cedilla{R}" "accents,cedilla" # LATIN CAPITAL LETTER R WITH CEDILLA -0x0157 "\\c{r}" "" "mathalpha" "\\cedilla{r}" "accents,cedilla" # LATIN SMALL LETTER R WITH CEDILLA +0x0156 "\\c{R}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{R}" "accents,cedilla" # LATIN CAPITAL LETTER R WITH CEDILLA (actually a comma accent, Latvian) +0x0157 "\\c{r}" "textbaltic" "mathalpha,force=utf8" "\\cedilla{r}" "accents,cedilla" # LATIN SMALL LETTER R WITH CEDILLA (actually a comma accent, Latvian) 0x0158 "\\v{R}" "" "mathalpha" "\\check{R}" # LATIN CAPITAL LETTER R WITH CARON 0x0159 "\\v{r}" "" "mathalpha" "\\check{r}" # LATIN SMALL LETTER R WITH CARON 0x015a "\\'{S}" "" "mathalpha" "\\acute{S}" # LATIN CAPITAL LETTER S WITH ACUTE @@ -428,10 +428,10 @@ 0x0215 "\\textdoublegrave{u}" "tipa" "force,mathalpha" "\\dgrave{u}" "tipasymb,dgrave" # LATIN SMALL LETTER U WITH DOUBLE GRAVE 0x0216 "\\textroundcap{U}" "tipa" "force,mathalpha" "\\rcap{U}" "tipasymb,rcap" # LATIN CAPITAL LETTER U WITH INVERTED BREVE 0x0217 "\\textroundcap{u}" "tipa" "force,mathalpha" "\\rcap{u}" "tipasymb,rcap" # LATIN SMALL LETTER U WITH INVERTED BREVE -#0x0218 "" "" "" # LATIN CAPITAL LETTER S WITH COMMA BELOW -#0x0219 "" "" "" # LATIN SMALL LETTER S WITH COMMA BELOW -#0x021a "" "" "" # LATIN CAPITAL LETTER T WITH COMMA BELOW -#0x021b "" "" "" # LATIN SMALL LETTER T WITH COMMA BELOW +0x0218 "\\textcommabelow{S}" "textcommabelow" "force" # LATIN CAPITAL LETTER S WITH COMMA BELOW +0x0219 "\\textcommabelow{s}" "textcommabelow" "force" # LATIN SMALL LETTER S WITH COMMA BELOW +0x021a "\\textcommabelow{T}" "textcommabelow" "force" # LATIN CAPITAL LETTER T WITH COMMA BELOW +0x021b "\\textcommabelow{t}" "textcommabelow" "force" # LATIN SMALL LETTER T WITH COMMA BELOW #0x021c "" "" "" # LATIN CAPITAL LETTER YOGH #0x021d "" "" "" # LATIN SMALL LETTER YOGH 0x021e "\\v{H}" "" "mathalpha" "\\check{H}" # LATIN CAPITAL LETTER H WITH CARON @@ -687,9 +687,9 @@ 0x0310 "\\textdotbreve" "tipa" "combining,force" # COMBINING CANDRABINDU 0x0311 "\\textroundcap" "tipa" "combining,force" # COMBINING INVERTED BREVE #0x0312 "" "" "combining,force" # COMBINING TURNED COMMA ABOVE -#0x0313 "" "" "combining,force" # COMBINING COMMA ABOVE == COMBINING GREEK KORONIS (psili) +0x0313 "\\textcommaabove" "textcommaabove" "combining,force" # COMBINING COMMA ABOVE #0x0314 "" "" "combining,force" # COMBINING REVERSED COMMA ABOVE -#0x0315 "" "" "combining,force" # COMBINING COMMA ABOVE RIGHT +0x0315 "\\textcommaaboveright" "textcommaaboveright" "combining,force" # COMBINING COMMA ABOVE RIGHT 0x0316 "\\textsubgrave" "tipa" "combining,force" # COMBINING GRAVE ACCENT BELOW 0x0317 "\\textsubacute" "tipa" "combining,force" # COMBINING ACUTE ACCENT BELOW 0x0318 "\\textadvancing" "tipa" "combining,force" # COMBINING LEFT TACK BELOW @@ -706,7 +706,7 @@ 0x0323 "\\d" "" "combining,force" # COMBINING DOT BELOW 0x0324 "\\textsubumlaut" "tipa" "combining,force" # COMBINING DIAERESIS BELOW 0x0325 "\\textsubring" "tipa" "combining,force" # COMBINING RING BELOW -#0x0326 "" "" "combining,force" # COMBINING COMMA BELOW +0x0326 "\\textcommabelow" "textcommabelow" "combining,force" # COMBINING COMMA BELOW 0x0327 "\\c" "" "combining,force" # COMBINING CEDILLA 0x0328 "\\k" "" "combining,force" # COMBINING OGONEK 0x0329 "\\textsyllabic" "tipa" "combining,force" # COMBINING VERTICAL LINE BELOW @@ -1238,8 +1238,8 @@ 0x1e0d "\\d{d}" "" "mathalpha" "\\subdot{d}" "accents,subdot" # LATIN SMALL LETTER D WITH DOT BELOW #0x1e0e "" "" "" # LATIN CAPITAL LETTER D WITH LINE BELOW #0x1e0f "" "" "" # LATIN SMALL LETTER D WITH LINE BELOW -0x1e10 "\\c{D}" "" "mathalpha" "\\cedilla{D}" "accents,cedilla" # LATIN CAPITAL LETTER D WITH CEDILLA -0x1e11 "\\c{d}" "" "mathalpha" "\\cedilla{d}" "accents,cedilla" # LATIN SMALL LETTER D WITH CEDILLA +0x1e10 "\\c{D}" "" "force=utf8,mathalpha" "\\cedilla{D}" "accents,cedilla" # LATIN CAPITAL LETTER D WITH CEDILLA +0x1e11 "\\c{d}" "" "force=utf8,mathalpha" "\\cedilla{d}" "accents,cedilla" # LATIN SMALL LETTER D WITH CEDILLA 0x1e12 "\\textsubcircum{D}" "tipa" "force,mathalpha" "\\subhat{D}" "accents,subhat" # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW 0x1e13 "\\textsubcircum{d}" "tipa" "force,mathalpha" "\\subhat{d}" "accents,subhat" # LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW #0x1e14 "" "" "" # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index a23837b1f6..756949aefe 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -249,6 +249,42 @@ static docstring const ogonek_def = from_ascii( " \\mathchar\"0\\hexnumber@\\symtipasymb0C}{#2}}\n" "\\newcommand{\\ogonek}[1]{\\mathpalette\\doogonek{#1}}\n"); +static docstring const lyxaccent_def = from_ascii( + "%% custom text accent \\LyxTextAccent[]{}{}\n" + "\\newcommand*{\\LyxTextAccent}[3][0ex]{%\n" + " \\hmode@bgroup\\ooalign{\\null#3\\crcr\\hidewidth\n" + " \\raise#1\\hbox{#2}\\hidewidth}\\egroup}\n" + "%% select a font size smaller than the current font size:\n" + "\\newcommand{\\LyxAccentSize}[1][\\sf@size]{%\n" + " \\check@mathfonts\\fontsize#1\\z@\\math@fontsfalse\\selectfont\n" + "}\n"); + +static docstring const textcommabelow_def = from_ascii( + "\\ProvideTextCommandDefault{\\textcommabelow}[1]{%%\n" + " \\LyxTextAccent[-.31ex]{\\LyxAccentSize,}{#1}}\n"); + +static docstring const textcommaabove_def = from_ascii( + "\\ProvideTextCommandDefault{\\textcommaabove}[1]{%%\n" + " \\LyxTextAccent[.5ex]{\\LyxAccentSize`}{#1}}\n"); + +static docstring const textcommaaboveright_def = from_ascii( + "\\ProvideTextCommandDefault{\\textcommaaboveright}[1]{%%\n" + " \\LyxTextAccent[.5ex]{\\LyxAccentSize\\ `}{#1}}\n"); + +// Baltic languages use a comma-accent instead of a cedilla +static docstring const textbaltic_def = from_ascii( + "%% use comma accent instead of cedilla for these characters:\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{g}{\\textcommaabove{g}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{G}{\\textcommabelow{G}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{k}{\\textcommabelow{k}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{K}{\\textcommabelow{K}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{l}{\\textcommabelow{l}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{L}{\\textcommabelow{L}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{n}{\\textcommabelow{n}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{N}{\\textcommabelow{N}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{r}{\\textcommabelow{r}}\n" + "\\DeclareTextCompositeCommand{\\c}{T1}{R}{\\textcommabelow{R}}\n"); + static docstring const lyxref_def = from_ascii( "\\RS@ifundefined{subsecref}\n" " {\\newref{subsec}{name = \\RSsectxt}}\n" @@ -498,6 +534,9 @@ bool LaTeXFeatures::isProvided(string const & name) const from_ascii(params_.fonts_math)).provides(name, ot1, complete, nomath); + // TODO: "textbaltic" provided, if the font-encoding is "L7x" + // "textgreek" provided, if a language with font-encoding LGR is used in the document + // "textcyr" provided, if a language with font-encoding T2A is used in the document } @@ -1146,6 +1185,23 @@ docstring const LaTeXFeatures::getMacros() const if (!usePolyglossia() && mustProvide("textcyr")) macros << textcyr_def << '\n'; + // non-standard text accents: + if (mustProvide("textcommaabove") || mustProvide("textcommaaboveright") || + mustProvide("textcommabelow") || mustProvide("textbaltic")) + macros << lyxaccent_def; + + if (mustProvide("textcommabelow") || mustProvide("textbaltic")) + macros << textcommabelow_def << '\n'; + + if (mustProvide("textcommaabove") || mustProvide("textbaltic")) + macros << textcommaabove_def << '\n'; + + if (mustProvide("textcommaaboveright")) + macros << textcommaaboveright_def << '\n'; + + if (mustProvide("textbaltic")) + macros << textbaltic_def << '\n'; + if (mustProvide("lyxmathsym")) macros << lyxmathsym_def << '\n';