LyXKOMA-script in LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
jungi77
Posts: 3
Joined: Sat Jan 17, 2015 9:07 am

KOMA-script in LyX

Post by jungi77 »

Hi all, I'm trying to change font type and font-size for pdflatex export with LyX. My publisher wants me to create pdf using Times New Roman and font-size 14. I'm using Koma Script Book as a document class and can't find a way to change the required settings. Many thanks for any suggestions.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

KOMA-script in LyX

Post by Johannes_B »

You can let KOMA calculate the font sizes for \footnotesize and related commands, but this will never be as good as values by a professional typographer. Please ask your editor/publisher for advice.

Package tgtermes (please refer to README-TeX-Gyre-Termes.txt) provides a Times Clone. But you run into trouble, as there are no fonts matching the new (and unusual) type sizes. So just the next best font size is used. Packages mathptmx and newtxtext might also be of interest. If you want to use Times New Roman coming from Microsoft, you have to use XeLaTeX or LuaLaTeX for typesetting.
Using Open-Type fonts will also resolve the font size issue mentioned above.

Code: Select all

\documentclass[fontsize=14pt]{scrbook}
\usepackage{blindtext}
\usepackage{tgtermes}
%\usepackage{mathptmx}
%\usepackage{newtxtext}
%\usepackage{fontspec}
\begin{document}
\blinddocument
\end{document}
Edit: I just wrote a bit more on this at TeX.SX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
jungi77
Posts: 3
Joined: Sat Jan 17, 2015 9:07 am

Re: KOMA-script in LyX

Post by jungi77 »

Hi Johannes_B, thanks for the quick response. Since I’m LyX user I need to put the proper commands in the preamble so between the class definition and the \begin command. Which lines are necessary to put in there in order to make Times New Roman font of size 14 work with Koma-Script-Buch in LyX? I’ve tried using XeLaTeX or LuaLaTeX for output but LyX has trouble using German fonts for BibTex entries.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

KOMA-script in LyX

Post by Johannes_B »

Code: Select all

\KOMAoption{fontsize}{14pt}\recalctypearea
The above has to go to the preamble, as well as one of the font packages i mentioned above.

Concerning your last question, i am sorry, this is mixed up. I really don't know what you mean. What are german fonts?

If you are interested, we have german partner sites, TeXwelt is a question and answer site, GoLaTeX is a forum where one can discuss stuff.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
jungi77
Posts: 3
Joined: Sat Jan 17, 2015 9:07 am

Re: KOMA-script in LyX

Post by jungi77 »

It works! Using newtxtext package and the script from your last post I was able to get a .pdf with fonts size 14pt! Thanks a lot Johannes_B! ...and I'm sorry for the confusion. By German fonts I meant fonts including for example Umlauts like ä, ö, ü - which are not quite easy for me to deal with.

Like mentioned in my previous post by using XeLaTeX or LuaLaTeX LyX left Umlauts out putting blank spaces instead. But it was only the case for the BibTex entries , the regular text was still ok.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: KOMA-script in LyX

Post by Johannes_B »

All of the above fonts have support for german umlauts.

You need to do some minimal changes to use Xe- or LuaTeX. Mainly using utf8 encoded files. If i recall correctly, LyX uses latin9 by default. That means that both new engines just don't know what to do with those characters.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply