Troubleshooters.Com®, Linux Library and Litt's LyX Library Present:
Using the TeX Gyre Century Schoolbook Equivalent Fonts
Copyright © 2021 by Steve Litt
See the Troubleshooters.Com Bookstore.
CONTENTS
I think that for screen reading, Century Schoolbook is by far the most readable font. If you agree with me, you might have noticed some challenges using Century Schoolbook with LyX. If you've noticed such challenges, this web page is for you.
I didn't create the procedure described in this document. Kornel Benko and Ricardo Berlasso from the LyX mailing list provided all the information: I just tech-edited it to make sure it works, and then formatted it as documentation.
Before getting into details, this section reveals a few key points:
tlmgr install tex-gyre tlmgr install scholax
The reason you installed the scholax package is it works better under certain conditions.
If you need more info on running the tlmgr program, look at its man page. Also, a helpful GUI version of tlmgr is available using the following command, once again as user root:
tlmgr gui
If you use some other LaTeX package manager other than CTAN/tlmgr, for instance your distros packages, you'll need to learn how your system enables you to install these two packages.
DANGER!
You can use CPAN/tlmgr, or you can use your distro's LaTeX packages, but you can't use both. Trying to use both makes your entire LaTeX experience seem quirky and intermittent.
Open the document, for which you want to use the TeX Gyre Century Schoolbook lookalike fonts, in LyX. Menu to Document->Settings->Fonts, and check the "Use non TeX fonts" checkbox. Next, on the dropdowns, select as follows:
IMPORTANT: The three selected fonts should not be followed by the string "(not installed)". If any or all of these three fonts are followed by this string, the font family has been installed but not revealed to LyX. Attempting to use these fonts will result in something that's not like Century Schoolbook, and probably inferior.
If you have "(not installed)" at the end of the font names continue on to the Revealing the Fonts to LyX section. If the "(not installed)" string does NOT appear, go ahead and compile your document, and verify that the print is a nice, readable, thick Century Schoolbook lookalike.
Ugh! This is where it can get a little complicated. The TeX-Gyre fonts are installed, but not revealed to LyX, so you must reveal them. First, make sure you've followed the instructions thus far. If so, continue...
Broadly speaking, the following is a list of steps you take to reveal the new fonts to LyX. Perform each step as user root, or use sudo on each one. Each item is a link to an explanation:
Perform the following command, and note the output:
kpsewhich -var-value TEXMFSYSVAR
The following is an actual session using the preceding command, as user root, on my computer:
[root@mydesk ~]# kpsewhich -var-value TEXMFSYSVAR
/usr/local/texlive/2021/texmf-var
[root@mydesk ~]#
So, as you can see, on my computer the preceding command yielded directory /usr/local/texlive/2021/texmf-var. Whatever directory it yields, remember it for the next step.
Prepend whatever directory was found, with a trailing slash, before filename texlive-fontconfig.conf, and copy to /etc/fonts/conf.avail/09-texlive-fonts.conf. On my computer, using the directory found in the preceding step, the command is as follows:
cp /usr/local/texlive/2021/texmf-var/texlive-fontconfig.conf \ /etc/fonts/conf.avail/09-texlive-fonts.conf
I split the preceding command to fit better on a web page that might be viewed on a mobile device, but you don't need to split it. Once you've performed the preceding command and verified that file /etc/fonts/conf.avail/09-texlive-fonts.conf exists, you're ready to proceed to the next step.
Having the 09-texlive-fonts.conf in directory /etc/fonts/conf.avail is not sufficient. To make the TeXLive fonts available, the file must be symlinked to the /etc/fonts/conf.d directory. The following command does this for you:
ln -s /etc/fonts/conf.avail/09-texlive-fonts.conf \ /etc/fonts/conf.d/09-texlive-fonts.conf
Before moving on, make sure your command made the symlink it was supposed to.
Now you have all the right files in the right places, but that doesn't mean all the software knows about it. To make the system aware, perform the following command:
fc-cache -fsv
DANGER!
Be sure to use exactly the command as shown above. Do not interrupt the command while it's doing its work. Not complying with either of these instructions could result in a whole big mess of fonts, fonts you don't want or need, being recognized.
From within LyX's menu system, perform Document->Tools->Reconfigure. This makes LyX aware of the new changes.
Close LyX, open it, and again perform menu command Document->Settings->Fonts, make sure the "Use non TeX fonts" checkbox is checked, and make sure the dropdowns conform to the following:
Make sure none of the three ends with the string "(not installed)". If one does, troubleshoot and try again. If none ends with that string, compile your document with LuaLaTeX, either from within LyX or using the following command line commands, assuming your LyX file is called myfile.lyx.
When all you want is a colored, wrapping, clickable URL and it just won't happen, things go downhill fast, because there's so much ambiguous and contradictory advice for this problem on the Internet. If you use either pdflatex or lualatex, you've solved the major problem, and the rest is probably easy to handle.
The procedure described in this web page looks big and complex, but it's not. I simply used a lot of extra verbiage to remove all ambiguity, enabling you to succeed with this. Once you're accustomed to this procedure, it takes five minutes at most. I haven't yet tech edited this document, so if you find errors or edge cases in this document, please email me, and I'll fix what's necessary.
[ Training | Troubleshooters.Com | Email Steve Litt ]