Making STIX appear in LyX|Document>Settings...>[-Fonts-]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Making STIX appear in LyX|Document>Settings...>[-Fonts-]

Jethro Belle
My question is: What are the correct entries for the latexfonts file (see: Step below 4) to make the offered procedure correct for STIX. STIX is the free font for "Scientific and Technical Information Exchange" and is a "no-brainer" extensive unicode font to use for anyone in these fields.

My install is LyX2.1.4-MikTeX2.9-Win7, so sorry to Linux/mac users, but you are clever and can translate it The specific question is identical.

I expected LyX to display in the font menu fonts installed with MikTeX and wasted considerable time because this posting for TeXLive clearly states the LyX menu automatically shows newly installed fonts!  How to use more than the thirteen Roman fonts listed   gives the impression everyone, including LyX developers have given up of LaTex fronts, using the kludge solution of preamble LaTeX font specification  until XeTeX does it all accessing the (very easy to install and see in the LyX menu) system fonts. I think LaTeX fonts are a LaTeX strength allowing LaTeX specific abilities (The STIX developers have deemed it worth generating both) and OS independence.

Driven by the requirement to use STIX in classicthesis (read pdfLATEX) I set about making the menu show STIX. STIX Version 1.1.1 has been in MikTeX since 2013 and STIX Ver2.0 should have already been released. Installing STIX as system font and using  XeTeX/LuaTEX works very easily and as expected, but the classicthesis style is still pdfLaTeX.

Step 1

 Install the font (STIX) in MikTeX.

Step 2

 Find C:\Program Files (x86)\LyX 2.1\Resources\chkconfig.ltx and open it in your PFE (as ADMIN).
Read the excellent instructions it contains. If they make sense, you can add the menu item (make a backup first).  I appended the following under the fonts entries.

    % *********User Installed Fonts *************
     \TestFont[comic8t]{comicsans} %Not required for STIX. I tested finding (tfm) files.

Step 3

|lyX|Tools>Reconfigure> reads chkconfig.ltx to set up lyX, and removes the (not installed) that appears in the menu (see Minion Pro in the font list- assuming you haven't loaded it). More importantly LyX will then automatically set up to use the font. Without it being detected, LyX simply ignores the menu setting (see next step).
After |Tools>Reconfigure>  the loaded packages  should appear in %AppData%\Roaming\LyX2.1\ packages.lst and the style files appear in styFiles.lst. If they don't something need fixing upstream. %AppData% = C:\Users\'username'\AppData

Step 4

 Now to create the menu entry. Open C:\Program Files (x86)\LyX 2.1\Resources\latexfonts in your PFE (as ADMIN)
I entered the superficial basics shown below at the start of the font definitions and it seems to work

  Font stix
  GuiName          "Stix"
        Family           rm
        Package          stix
  Font comicsansMS
        GuiName          "ComicSans"
        Family           rm
        Package          comicsans

Step 5

 Save and Restart LyX. A Reconfigure is not required to see the menu changes.
Open a file. Lyx will now apply the menu available STIX and comicsans fonts like the default font menu offerings.


 I have very little experience with LaTeX fonts (less with the internals of LyX) so all I am claiming is the above works in a superficial level for roman family (on my install ). I have not specified: San Serif, Typewriter, Maths families, nor put in alternative fonts etc. Also to my surprise the Font 'name' at the head of the font specification seems to have no effect except be displayed when the font is (not available)!?. I wasted a week installing fonts manually (expecting LyX to show them) and so on, so I hope a LaTeX font guru can suggest the correct entries to make STIX work as if it had been programmed in by the software authors  

I really appreciate the hard work LyX programmers have put into LyX , but have strongly hinted this is a problem area to avoid others suffering the misunderstanding and problems, not as criticism. I will post a feature request after hearing back how to make my solution clear and worthy. If it can be done manually for STIX and comicsans, it could also be semi -automated by users editing a file in the non-admin user settings, making LaTeX LyX as friendly as System Font LyX.