diff --git a/development/FORMAT b/development/FORMAT index a57d3ed66c..ccd11c95e1 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,9 @@ changes happened in particular if possible. A good example would be ----------------------- +2018-03-14 Yuriy Skalko + * Format incremented to 547: support for Charter font from XCharter package. + 2018-03-10 Uwe Stöhr * Format incremented to 546: support for ParaType fonts. - \usepackage{PTSerif} > \font_roman "PTSerif-TLF" diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 0aa948c840..e4ba2edce8 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -480,6 +480,7 @@ \TestPackage{tipx} \TestPackage{tone} \TestPackage{txfonts}% For the txtt monospaced font +\TestPackage{XCharter} % symbol packages supported by LyX for items and the special character dialog % see the unicodesymbols file \TestPackage{ascii} diff --git a/lib/latexfonts b/lib/latexfonts index 307b10e5e9..0b87742241 100644 --- a/lib/latexfonts +++ b/lib/latexfonts @@ -460,6 +460,12 @@ AltFont futj SwitchDefault 1 EndFont +Font xcharter + GuiName "Bitstream Charter (XCharter)" + Family rm + Package XCharter + OsfOption osf +EndFont # # SANS SERIF FONTS diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 536bf106d9..377f6e7e18 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -126,6 +126,17 @@ def revert_paratype(document): else: add_to_preamble(document, ["\\usepackage{PTMono}"]) + +def revert_xcharter(document): + " Revert XCharter font definitions to LaTeX " + + if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1: + preamble = "" + i1 = find_token(document.header, "\\font_roman \"xcharter\"", 0) + if i1 != -1: + add_to_preamble(document, ["\\usepackage{XCharter}"]) + + ## # Conversion hub # @@ -133,10 +144,12 @@ def revert_paratype(document): supported_versions = ["2.4.0", "2.4"] convert = [ [545, [convert_lst_literalparam]], - [546, []] + [546, []], + [547, []] ] revert = [ + [546, [revert_xcharter]], [545, [revert_paratype]], [544, [revert_lst_literalparam]] ] diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 247422e223..b6c0454299 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -144,7 +144,7 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman", "ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "fourier", "garamondx", "libertine", "libertineRoman", "libertine-type1", "lmodern", "mathdesign", "mathpazo", "mathptmx", "MinionPro", "newcent", "NotoSerif-TLF", "PTSerif-TLF", "tgbonum", "tgchorus", -"tgpagella", "tgschola", "tgtermes", "utopia", 0 }; +"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 }; const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum", "biolinum-type1", "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc", @@ -840,6 +840,12 @@ void Preamble::handle_package(Parser &p, string const & name, if (name == "PTSerif") h_font_roman[0] = "PTSerif-TLF"; + if (name == "XCharter") { + h_font_roman[0] = "xcharter"; + if (opts == "osf") + h_font_osf = "true"; + } + // sansserif fonts if (is_known(name, known_sans_fonts)) { h_font_sans[0] = name; diff --git a/src/tex2lyx/test/CJK.lyx.lyx b/src/tex2lyx/test/CJK.lyx.lyx index 087301b4b3..2e8a640819 100644 --- a/src/tex2lyx/test/CJK.lyx.lyx +++ b/src/tex2lyx/test/CJK.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/CJKutf8.lyx.lyx b/src/tex2lyx/test/CJKutf8.lyx.lyx index 27b56ad53e..a898e07217 100644 --- a/src/tex2lyx/test/CJKutf8.lyx.lyx +++ b/src/tex2lyx/test/CJKutf8.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/DummyDocument.lyx.lyx b/src/tex2lyx/test/DummyDocument.lyx.lyx index 45307b73a6..e572bcc163 100644 --- a/src/tex2lyx/test/DummyDocument.lyx.lyx +++ b/src/tex2lyx/test/DummyDocument.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/Dummy~Document.lyx.lyx b/src/tex2lyx/test/Dummy~Document.lyx.lyx index edaff1cf56..85b6788fae 100644 --- a/src/tex2lyx/test/Dummy~Document.lyx.lyx +++ b/src/tex2lyx/test/Dummy~Document.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx index c62361b221..8c3023469e 100644 --- a/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx +++ b/src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/algo2e.lyx.lyx b/src/tex2lyx/test/algo2e.lyx.lyx index 86861da1ca..f2cfc89a6a 100644 --- a/src/tex2lyx/test/algo2e.lyx.lyx +++ b/src/tex2lyx/test/algo2e.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx index 75c414c92e..dc0fee502e 100644 --- a/src/tex2lyx/test/box-color-size-space-align.lyx.lyx +++ b/src/tex2lyx/test/box-color-size-space-align.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets-basic.lyx.lyx b/src/tex2lyx/test/test-insets-basic.lyx.lyx index 9bed0234cc..3049b87f2e 100644 --- a/src/tex2lyx/test/test-insets-basic.lyx.lyx +++ b/src/tex2lyx/test/test-insets-basic.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index f93fde1e82..b340878d36 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-memoir.lyx.lyx b/src/tex2lyx/test/test-memoir.lyx.lyx index 9805199134..fbd30caaea 100644 --- a/src/tex2lyx/test/test-memoir.lyx.lyx +++ b/src/tex2lyx/test/test-memoir.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-minted.lyx.lyx b/src/tex2lyx/test/test-minted.lyx.lyx index fef59fdcbf..b043e36d4b 100644 --- a/src/tex2lyx/test/test-minted.lyx.lyx +++ b/src/tex2lyx/test/test-minted.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-modules.lyx.lyx b/src/tex2lyx/test/test-modules.lyx.lyx index fb7871f51b..fac36de46e 100644 --- a/src/tex2lyx/test/test-modules.lyx.lyx +++ b/src/tex2lyx/test/test-modules.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx index 8e81e0ce14..5b9672f7ff 100644 --- a/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx +++ b/src/tex2lyx/test/test-refstyle-theorems.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-scr.lyx.lyx b/src/tex2lyx/test/test-scr.lyx.lyx index 71ab353663..ac105da962 100644 --- a/src/tex2lyx/test/test-scr.lyx.lyx +++ b/src/tex2lyx/test/test-scr.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx index a9770cf24a..a4d2626eb5 100644 --- a/src/tex2lyx/test/test-structure.lyx.lyx +++ b/src/tex2lyx/test/test-structure.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/test.lyx.lyx b/src/tex2lyx/test/test.lyx.lyx index b6e66beee3..7a2c88a1da 100644 --- a/src/tex2lyx/test/test.lyx.lyx +++ b/src/tex2lyx/test/test.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/tex2lyx/test/verbatim.lyx.lyx b/src/tex2lyx/test/verbatim.lyx.lyx index 91de7026c5..d38a1b0cd7 100644 --- a/src/tex2lyx/test/verbatim.lyx.lyx +++ b/src/tex2lyx/test/verbatim.lyx.lyx @@ -1,5 +1,5 @@ #LyX file created by tex2lyx 2.4 -\lyxformat 546 +\lyxformat 547 \begin_document \begin_header \save_transient_properties true diff --git a/src/version.h b/src/version.h index 843d761ed0..8d136cdff4 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 546 // uwestoehr: support for ParaType fonts -#define LYX_FORMAT_TEX2LYX 546 +#define LYX_FORMAT_LYX 547 // Yuriy Skalko: support for XCharter font +#define LYX_FORMAT_TEX2LYX 547 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER