4

I need to format my thesis in linguistics as required by the publisher. The font has to be Times New Roman 10,2°, spacing 11,9°. While this works for the main text, I cannot change the font size of the examples using langsci-gb4e package strong text.

Here is a MWE

\documentclass[twoside, 10.2pt, listof=nochaptergap]{scrbook}

% language packages
\usepackage[T2A,T1,T3]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,ngerman]{babel}
\usepackage[]{textgreek}

%some more packages

% layout
\usepackage[paperwidth=17cm, paperheight=24cm, %seitengrösse
outer=2.7cm, inner=2.4cm, top=2.5cm,bottom=2.5cm, %seitenränder
headsep=0.62cm]{geometry} %abstand von kopfzeile zu text
\setlength{\textheight}{19cm}
\setlength{\textwidth}{11.9cm} %satzspiegel definieren

\usepackage{fontspec}
\setmainfont{Times New Roman}

\AtBeginDocument{\fontsize{10.2}{11.9}\selectfont}
\setlength\parindent{6mm}

%some more formatting of bibliography, captions, etc.

% examples
\usepackage{langsci-gb4e}
\renewcommand{\exfont}{\fontsize{10.2}{11.9}\selectfont\itshape} 
\renewcommand{\glossfont}{\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\transfont}{\normalfont\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\exnrfont}{\normalfont\fontsize{10.2}{11.9}\selectfont}

\usepackage{blindtext}

\begin{document}

\blindtext

\begin{exe}
\ex\label{ex:specificlabel}
\gll es hungrigs ross\\
a.\textsc{nom/acc.neutr} hungry.\textsc{nom/acc.neutr} horse \\
\trans `a hungry horse'
\end{exe}

\blindtext

\end{document}

It does not matter whether I use

\renewcommand{\exfont}{\fontsize{10.2}{11.9}\selectfont\itshape} 

or

\newcommand{\exfont}{\fontsize{10.2}{11.9}\selectfont\itshape} 

I have also tried using \eachwordone instead of \exfont as shown here. This works for the first line (example) and the second (glossing), but not the third one (translation) or the number.

\documentclass[twoside, 10.2pt, listof=nochaptergap]{scrbook}

% language packages
\usepackage[T2A,T1,T3]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,ngerman]{babel}
\usepackage[]{textgreek}

% some more packages

% layout
\usepackage[paperwidth=17cm, paperheight=24cm, %seitengrösse
outer=2.7cm, inner=2.4cm, top=2.5cm,bottom=2.5cm, %seitenränder
headsep=0.62cm]{geometry} %abstand von kopfzeile zu text
\setlength{\textheight}{19cm}
\setlength{\textwidth}{11.9cm} %satzspiegel definieren

\usepackage{fontspec}
\setmainfont{Times New Roman}

\AtBeginDocument{\fontsize{10.2}{11.9}\selectfont}
\setlength\parindent{6mm}

% some more formatting of bibliography, captions, etc.

% examples
\usepackage{langsci-gb4e}
\renewcommand{\eachwordone}{\fontsize{10.2}{11.9}\selectfont\itshape} 
\renewcommand{\eachwordtwo}{\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\eachwordthree}{\normalfont\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\exnrfont}{\normalfont\fontsize{10.2}{11.9}\selectfont}

\usepackage{blindtext}

\begin{document}

\blindtext

\begin{exe}
\ex\label{ex:specificlabel}
\gll es hungrigs ross\\
a.\textsc{nom/acc.neutr} hungry.\textsc{nom/acc.neutr} horse \\
\trans `a hungry horse'
\end{exe}

\blindtext

\end{document}

I have also tried not using the exe enviroment as suggested in the manual of the langsci-gb4e package which also does not help.

\documentclass[twoside, 10.2pt, listof=nochaptergap]{scrbook}

% language packages
\usepackage[T2A,T1,T3]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian,ngerman]{babel}
\usepackage[]{textgreek}

% some more packages

% layout
\usepackage[paperwidth=17cm, paperheight=24cm, %seitengrösse
outer=2.7cm, inner=2.4cm, top=2.5cm,bottom=2.5cm, %seitenränder
headsep=0.62cm]{geometry} %abstand von kopfzeile zu text
\setlength{\textheight}{19cm}
\setlength{\textwidth}{11.9cm} %satzspiegel definieren

\usepackage{fontspec}
\setmainfont{Times New Roman}

\AtBeginDocument{\fontsize{10.2}{11.9}\selectfont}
\setlength\parindent{6mm}

% some more formatting of bibliography, captions, etc.

% examples
\usepackage{langsci-gb4e}
\renewcommand{\eachwordone}{\fontsize{10.2}{11.9}\selectfont\itshape} 
\renewcommand{\eachwordtwo}{\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\eachwordthree}{\normalfont\fontsize{10.2}{11.9}\selectfont}
\renewcommand{\exnrfont}{\normalfont\fontsize{10.2}{11.9}\selectfont}

\usepackage{blindtext}

\begin{document}

\blindtext

\ea
\label{ex:specificlabel}
\gll es hungrigs ross\\
a.\textsc{nom/acc.neutr} hungry.\textsc{nom/acc.neutr} horse \\
\glt `a hungry horse'
\z

\blindtext

\end{document}

Does anyone have any idea how to solve this? Every help is very much appreciated.

1 Answer 1

4

The problem is that you're loading fontenc with old encodings. You should not do this, because you are using fontspec and are compiling with XeLaTeX or LuaLaTeX. But you need to set up your fonts properly for Russian. You should also not be loading the textgreek package, but instead set up Greek properly with babel. See the babel documentation for how to do that.

A global font change like the one you've added using \AtBeginDocument is also not a good idea. Since you're using the KOMA class scrbook, your fontsize=10.2pt should be all you need.

Then you don't need to do any redefinitions of the gb4e macros other than making \eachwordone to be \itshape.

Then your file compiles, but the Times New Roman font doesn't have small caps (at least the one I have doesn't) so your glossing abbreviations end up being substituted. This means you need a font that has proper small caps.

\documentclass[twoside, 10.2pt, listof=nochaptergap]{scrbook}

% language packages

\usepackage[russian,ngerman]{babel}

% some more packages

% layout
\usepackage[paperwidth=17cm, paperheight=24cm, %seitengrösse
outer=2.7cm, inner=2.4cm, top=2.5cm,bottom=2.5cm, %seitenränder
headsep=0.62cm]{geometry} %abstand von kopfzeile zu text
\setlength{\textheight}{19cm}
\setlength{\textwidth}{11.9cm} %satzspiegel definieren

\usepackage{fontspec}
\setmainfont{Times New Roman}

\setlength\parindent{6mm}

% some more formatting of bibliography, captions, etc.

% examples
\usepackage{langsci-gb4e}
\renewcommand{\eachwordone}{\itshape} 

\usepackage{blindtext}

\begin{document}

\blindtext

\begin{exe}
\ex\label{ex:specificlabel}
\gll es hungrigs ross\\
a.\textsc{nom/acc.neutr} hungry.\textsc{nom/acc.neutr} horse \\
\trans `a hungry horse'
\end{exe}

\blindtext

\end{document}

output of code

5
  • Thank you so much for your help and your explanations. I have tried to replicate your code. However, while your MWE works, I cannot compile my file when deleting the fontenc-package. I am currently trying to figure out what is causing this problem, but right now I have no clue. If you happen to have any idea -- without having to go through my very long preamble -- I would be very happy. Else I will continue to look for the error.
    – ahasse
    Aug 23, 2022 at 14:41
  • @ahasse The problem is likely related to your use of textgreek, and possibly anything that you are using related to Russian. As I mentioned, you need to set up both Greek and Russian properly using babel and then remove any code that depended on e.g. textgreek.
    – Alan Munn
    Aug 23, 2022 at 14:44
  • @ahasse Remember also, to look at the log file and pay attention to the first error reported (subsequent errors may not be useful.) Then fix that error and try again. Are you getting undefined control sequence errors or something else?
    – Alan Munn
    Aug 23, 2022 at 14:46
  • Thank you so much @Alain-Munn. I have compiled my preamble bit by bit. I no longer get any erreros and everything is printed in the right font and font size. However, I encountered a related problem. I think that I need fontenc nevertheless, but it seems to be interfering with tipa. I have posted it as a new question here.
    – ahasse
    Aug 24, 2022 at 12:52
  • @ahasse The simplest solution for legacy TIPA in a LuaTeX or XeTeX document is here: Using TIPA with fontspec
    – Alan Munn
    Aug 24, 2022 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .