The branch, master, has been updated. - Log -----------------------------------------------------------------
commit 54c41ce26e5f87c34653d0ebe24d067fdfebf480 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Sun Aug 19 11:57:48 2012 +0200 Support for the TeX Gyre fonts (#4332) diff --git a/development/FORMAT b/development/FORMAT index e11e017..5161594 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx. ----------------------- +2012-08-19 Jürgen Spitzmüller <sp...@lyx.org> + * Format incremented to 437 + Support for the TeX Gyre LaTeX fonts. + 2012-08-18 Jürgen Spitzmüller <sp...@lyx.org> * Format incremented to 436 Support for the mathdesign LaTeX fonts. diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 2e7c57b..12744c6 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -366,6 +366,14 @@ \TestPackage{mdbch} \TestPackage{mdput} \TestPackage{mdugm} +\TestPackage{tgadventor} +\TestPackage{tgbonum} +\TestPackage{tgchorus} +\TestPackage{tgcursor} +\TestPackage{tgheros} +\TestPackage{tgpagella} +\TestPackage{tgschola} +\TestPackage{tgtermes} \TestPackage{tipa} \TestPackage{tipx} \TestPackage{txfonts}% For the txtt monospaced font diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx index 42b702f..1662106 100644 --- a/lib/doc/LaTeXConfig.lyx +++ b/lib/doc/LaTeXConfig.lyx @@ -1,5 +1,5 @@ #LyX 2.1 created this file. For more info see http://www.lyx.org/ -\lyxformat 436 +\lyxformat 437 \begin_document \begin_header \textclass article @@ -1026,6 +1026,208 @@ arg "utopia" \end_layout \begin_layout Subsection +The TeX Gyre collection of fonts +\end_layout + +\begin_layout Description +CTAN: +\family typewriter +fonts/tex-gyre +\end_layout + +\begin_layout Description +Notes: The +\family sans +tex-gyre +\family default + collection provides extensive remakes and extensions of the freely available + 35 base PostScript fonts. + The fonts have specifically been designed for the use with LaTeX. + The following fonts are currently available and natively supported by LyX: +\end_layout + +\begin_layout Itemize + +\family sans +tgadventor +\family default + (TeX Gyre Adventor): A sans serif font based on URW Gothic L (itself an + Avant Garde clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgadventor" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgbonum +\family default + (TeX Gyre Bonum): A roman font based on URW Bookman L (an ITC Bookman clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgbonum" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgchorus +\family default + (TeX Gyre Chorus): A roman (script) font based on URW Chancery L (a Zapf + Chancery clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgchorus" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgcursor +\family default + (TeX Gyre Cursor): A monospaced font based on URW Nimbus Mono L (a Courier + clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgcursor" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgheros +\family default + (TeX Gyre Heros): A sans serif font based on URW Nimbus Sans L (a Helvetica + clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgheros" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgpagella +\family default + (TeX Gyre Pagella): A roman font based on URW Palladio L (a Palatino clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgpagella" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgschola +\family default + (TeX Gyre Schola): A roman font based on URW Century Schoolbook L. +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgschola" +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family sans +tgtermes +\family default + (TeX Gyre Termes): A roman font based on URW Nimbus Roman No9 L (a Times + New Roman clone). +\begin_inset Newline newline +\end_inset + + +\series bold +Found: +\series default + +\begin_inset Info +type "package" +arg "tgtermes" +\end_inset + + +\end_layout + +\begin_layout Subsection tipa/tipx \end_layout diff --git a/lib/latexfonts b/lib/latexfonts index 12f5a2c..5fd5a2e 100644 --- a/lib/latexfonts +++ b/lib/latexfonts @@ -176,6 +176,36 @@ Font times Requires psnfss EndFont +Font tgbonum + GuiName "TeX Gyre Bonum" + Family rm + Package tgbonum +EndFont + +Font tgchorus + GuiName "TeX Gyre Chorus" + Family rm + Package tgchorus +EndFont + +Font tgpagella + GuiName "TeX Gyre Pagella" + Family rm + Package tgpagella +EndFont + +Font tgschola + GuiName "TeX Gyre Schola" + Family rm + Package tgschola +EndFont + +Font tgtermes + GuiName "TeX Gyre Termes" + Family rm + Package tgtermes +EndFont + # fourier supersedes utopia.sty, but does # not work with OT1 encoding. Font utopia @@ -235,6 +265,18 @@ Font lmss Requires lmodern EndFont +Font tgadventor + GuiName "TeX Gyre Adventor" + Family sf + Package tgadventor +EndFont + +Font tgheros + GuiName "TeX Gyre Heros" + Family sf + Package tgheros +EndFont + # # MONOSPACED FONTS @@ -282,6 +324,12 @@ Font luximono Package luximono EndFont +Font tgcursor + GuiName "TeX Gyre Cursor" + Family tt + Package tgcursor +EndFont + Font txtt GuiName "TX Typewriter" Family tt diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 713e227..ac2452a 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -884,6 +884,35 @@ def revert_mathdesign(document): preamble += "]{mathdesign}" add_to_preamble(document, [preamble]) document.header[i] = "\\font_roman default" + + +def revert_texgyre(document): + " Revert native TeXGyre font definition to LaTeX " + + if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1: + texgyre_fonts = ["tgadventor", "tgbonum", "tgchorus", "tgcursor", \ + "tgheros", "tgpagella", "tgschola", "tgtermes"] + i = find_token(document.header, "\\font_roman", 0) + if i != -1: + val = get_value(document.header, "\\font_roman", i) + if val in texgyre_fonts: + preamble = "\\usepackage{%s}" % val + add_to_preamble(document, [preamble]) + document.header[i] = "\\font_roman default" + i = find_token(document.header, "\\font_sans", 0) + if i != -1: + val = get_value(document.header, "\\font_sans", i) + if val in texgyre_fonts: + preamble = "\\usepackage{%s}" % val + add_to_preamble(document, [preamble]) + document.header[i] = "\\font_sans default" + i = find_token(document.header, "\\font_typewriter", 0) + if i != -1: + val = get_value(document.header, "\\font_typewriter", i) + if val in texgyre_fonts: + preamble = "\\usepackage{%s}" % val + add_to_preamble(document, [preamble]) + document.header[i] = "\\font_typewriter default" ## @@ -914,10 +943,12 @@ convert = [ [433, [convert_armenian]], [434, []], [435, []], - [436, []] + [436, []], + [437, []] ] revert = [ + [434, [revert_texgyre]], [434, [revert_mathdesign]], [434, [revert_txtt]], [433, [revert_libertine]], diff --git a/src/version.h b/src/version.h index 1948ddb..da997c7 100644 --- a/src/version.h +++ b/src/version.h @@ -30,8 +30,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 436 // spitz: support for the mathdesign fonts -#define LYX_FORMAT_TEX2LYX 436 // spitz: support for the mathdesign fonts +#define LYX_FORMAT_LYX 437 // spitz: support for the TeXGyre fonts +#define LYX_FORMAT_TEX2LYX 437 // spitz: support for the TeXGyre fonts #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER ----------------------------------------------------------------------- Summary of changes: development/FORMAT | 4 + lib/chkconfig.ltx | 8 ++ lib/doc/LaTeXConfig.lyx | 204 ++++++++++++++++++++++++++++++++++++++++++++++- lib/latexfonts | 48 +++++++++++ lib/lyx2lyx/lyx_2_1.py | 33 ++++++++- src/version.h | 4 +- 6 files changed, 297 insertions(+), 4 deletions(-) hooks/post-receive -- The LyX Source Repository