3

Since I'm working with the fontspec package, using the Segoe UI font

(actually, let me include a secondary question here: which font would you prefer for a scientifical paper on influenza, keeping in mind both aesthetics and readability? Segoe UI or Segoe UI Light? If you please, you can recommend me another font for my paper, but as you see, I prefer "clean", modern, sleek fonts. I tried the Flanders Art font (since our Flemish government started using this one and I'm pretty fond of it), but it's just not compatible enough; the Segoe UI package is very compatible. Here are meaningless excerpts of an example document: http://i.imgur.com/zItzJTA.png for the normal version and http://i.imgur.com/9H2JqSr.png for the light version)

the bibliography will show "pp. 94--98" instead of "pp. 94-98". Is there a way I can remove one hyphen? I tried to remove one from the bibliography itself, xetex'ing the main file, running bibtex and twive xetex again, but this didn't work.

Can someon help me on both my primary and secondary question?

Thanks!

Michael

Part of the source code that might be interesting. Don't mind any Dutch comments:

BIBLIOGRAPHY FILE (BIBINFLU.BIB)

@Article{Met78,
Author = {Metz, Charles E.},
Title = {Basic principles of {ROC} analysis},
Journal = {{S}eminars in {N}uclear {M}edicine},
Volume = 8,
Pages = {283-298},
year = 1978
}
@book{Wel03,
author = "Stefan Wellek", year = 2003,
title = "Testing Statistical Hypotheses of Equivalence",
publisher = "{Chapman \& Hall/CRC Press}",
address = "New York"
}
@Article{pmid23462501,
   Author="Kuchar, E.  and Nitsch-Osuch, A.  and Karpinska, T.  and Kurpas, D.  and Zycinska, K.  and Wardyn, K.  and Szenborn, L. ",
   Title="{{P}andemic influenza in the 2009/2010 season in central {P}oland: the surveillance study of laboratory confirmed cases}",
   Journal="Respir Physiol Neurobiol",
   Year="2013",
   Volume="187",
   Number="1",
   Pages="94-98",
   Month="Jun"
}

MAIN FILE (INFLUENZA.TEX)

\documentclass[12pt]{report}
\usepackage[left=1.5in,right=1.5cm,top=2cm,bottom=2.5cm]{geometry}
\usepackage[dutch]{babel}       %vertaling naar Nederlands
\usepackage{graphicx}           %insluiten van afbeeldingen
\usepackage{framed}             %omkaderen van tekst
\usepackage{url}                %weergeven van url's
%\usepackage{makeidx}           %index maken, overbodig in casu
\usepackage{lmodern}            %beter lettertype
%\usepackage{nomencl}           %nomenclatuur, overbodig in casu
\newlength\longest
%\usepackage[toc,nonumberlist]{glossaries} 
                                %package voor glossarium
%\makeglossaries                %registreren van de entries
%\include{glossarium}
%\makeglossaries                %voor de zekerheid
%\printglossary[title=Verklarende woordenlijst] moet nog ingevoegd worden op de gewenste plaats van het glossarium!             
\usepackage{fancyhdr}           %mooiere hoofding en voettekst
\usepackage{tocloft}            %controleert ToC
\usepackage{ragged2e}           %controls voor uitlijning
\usepackage{fontspec}           %voor ander lettertype
\setmainfont[
  %SmallCapsFont={TeX Gyre Termes},
  %SmallCapsFeatures={Letters=SmallCaps},
]{Segoe UI Light}       
%\usepackage{hyperref}          %voor referentielinks       
\usepackage[parfill]{parskip}
\usepackage{natbib}
%\bibliographystyle{apalike}
\usepackage[nottoc]{tocbibind} % Bibliografie in ToC
\bibliographystyle{merlin}
\usepackage{titlesec}
% to change titles font family
\usepackage{titling}
%%% declare fonts and set some formats
% fontspec to use non-latex with xetex
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
                                %Flanders Art Serif voor titels
% font declaration and title settings
%\newfontfamily\headingfont[]{Flanders Art Serif}
%\titleformat{\chapter}[hang]
%  {\huge\headingfont}{\thechapter}{20pt}{\Huge}
%\titleformat*{\section}{\LARGE\headingfont}
%\titleformat*{\subsection}{\Large\headingfont}
%\renewcommand{\maketitlehooka}{\headingfont}
\titleformat{\chapter}[hang]{\huge\bfseries}{\makebox[2.5em]{\thechapter\hfill}}{0pt}{}
\begin{document}
\bibliography{Bibinflu}
%\bibliographystyle{apalike}
%\bibliographystyle{bibliodutch}
\end{document}
  • if you specify tex ligatures -- should be typeset as an en-dash. You probably need to show a complete example that demonstrates the problem. – David Carlisle Dec 8 '14 at 22:03
  • you must load the font with the Ligatures=TeX option. See the documentation of fontspec. – Ulrike Fischer Dec 8 '14 at 22:08
  • Then is there a way - let me say, something like %SmallCapsFont={TeX Gyre Termes}, %SmallCapsFeatures={Letters=SmallCaps} but then for double hyphens, so it would use the standard TeX font? (Which name does that font have, actually?) Is there an alternative for the Ligatures=TeX option? I have absolutely no idea, truth be told, how to use that... – FSJ963 Dec 8 '14 at 22:15
  • Your code loads three [3!] bibliography styles: merlin, apalike, and bibliodutch. Which one is supposed to be in use? – Mico Dec 8 '14 at 22:17
  • Good question... I'd say merlin, since it's included before the inclusion of the bibliography? EDIT: it IS Merlin (here an APA-ref. style, but that aside); replaced the other ones with a % in front of them to prevent further personal confusion. – FSJ963 Dec 8 '14 at 22:19
5

As for your primary question: use the Ligatures=TeX when selecting the font; for example, \setmainfont[Ligatures=TeX]{Segoe UI}. You can use Unicode en dash (–; U+2013) directly instead, which I find better than using the old TeX ligatures.

As for your secondary question: I can recommend wholeheartedly Gentium. It is free, libre, comprehensive and extremely readable and beautiful.

If you want to use bold and/or small caps, it’s a little bit tricky: Gentium Plus contains small caps, Gentium Basic contains bold glyphs, and both are available for download here. Using fontspec and XeLaTeX one can enjoy both worlds and fake bold small caps (this is not possible in LuaLaTeX, as far as I know). This is a way to make it possible:

\documentclass{article}

\usepackage{fontspec}
\setmainfont[BoldFont={Gentium Basic Bold}]{Gentium Plus}
\fontspec[FakeBold=2.5]{Gentium Plus}
\DeclareFontShape{EU1}{Gentium Plus(0)}{bx}{sc}{<->ssub * Gentium Plus(1)/m/sc}{}

\begin{document}
hello \textbf{hello} \textsc{hello} \textsc{\textbf{hello}} \textbf{\textsc{hello}}
\end{document}

Gentium with fontspec/XeLaTeX tricks

  • Great answer. any alternative for the small caps and bold text? (Gentium itself isn't fully compatible, and I'd like to use it, for which I thank you; I'm especially stunned by it's italic style) – FSJ963 Dec 8 '14 at 22:22
  • @MichaëlHenrotte: you can use Gentium Plus and Gentium Basic; see the part I’ve added to my answer as to how to achieve it nicely in fontspec+XeLaTeX. And yes, Gentium italic is really good looking… ☺ – Júda Ronén Dec 8 '14 at 23:17
  • 4
    Adding Ligatures=TeX is not needed with the last version of fontspec. – egreg Dec 8 '14 at 23:19
  • @JúdaRonén it still gives me LaTeX Font Warning: Font shape 'EU1/GentiumPlus(0)/m/sc' undefined when doing that :/ – FSJ963 Dec 8 '14 at 23:27
  • @MichaëlHenrotte: Have you installed all required font files from both Gentium Plus and Gentium Basic? Is your LaTeX distribution (e.g. TeX Live) up-to-date? – Júda Ronén Dec 8 '14 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.