Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Sans Pro isn't applied as a main font family when using XeLaTeX #8

Closed
iandol opened this issue May 31, 2017 · 8 comments
Closed

Comments

@iandol
Copy link

iandol commented May 31, 2017

Hi, if I supply a lang: en-GB or lang: en-US metadata field to your custom-titlepage example, the main body text is not source sans pro any more, but the latex default:

screen shot 2017-05-31 at 17 16 25

removing it and all is fine...

---
title: "Vinaque sanguine metuenti cuiquam Alcyone fixus"
author: [Author Name]
date: 2017-02-20
subject: "Markdown"
tags: [Markdown, Example]
subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum"
titlepage: true
titlepage-color: eeeeee
titlepage-text-color: ffffff
titlepage-rule-color: ffffff
titlepage-rule-height: 1
lang: en-GB
...
@iandol
Copy link
Author

iandol commented May 31, 2017

I see the same error if I use -V lang=en-GB at the command line...

@Wandmalfarbe
Copy link
Owner

I can't reproduce this. Could you give me the complete command that you used to generate the PDF? You could also check if the package sourcesanspro is installed on your system with:

kpsewhich sourcesanspro.sty

I recently changed the default language of the template... maybe I already fixed it.

@iandol
Copy link
Author

iandol commented Jun 1, 2017

Hi, I'm currently using TeXLive2017 basic on macOS, and do have sourcesanspro installed (also have it installed as a system font). I get no errors on compile using this (I've redownloaded eisvogel.latex and custom-titlepage.md to the latest versions), still not working:

👉  kpsewhich sourcesanspro.sty
/usr/local/texlive/2017basic/texmf-dist/tex/latex/sourcesanspro/sourcesanspro.sty
👉  pandoc -t latex -o out.tex --template=eisvogel.latex -V lang=en-GB custom-titlepage.md
👉  latexmk -time -f -pv -xelatex out.tex;

Here are the LaTeX source file and log: https://gist.github.com/iandol/b6b7667bc6c29abcbfdb7f754f6a012e

If you can't figure out why, we can close this as it is probably a LaTeX bug. I will rewrite your template to use \setmainfont \setsansfont etc. using my system installed fonts...

@Wandmalfarbe
Copy link
Owner

Okay, I can reproduce this even with pandoc:

pandoc "custom-titlepage.md" -o "custom-titlepage.pdf" --from markdown --template eisvogel.latex --latex-engine=xelatex

When I change the engine to pdflatex, the font gets applied normally. I really don't know what's causing the font to change when using xelatex.

At least I found out that you can load the package sourcesanspro with the option default that applies the font as the default font family. Unfortunately this does not fix the problem.

@Wandmalfarbe Wandmalfarbe changed the title lang: en-GB breaks main font Source Sans Pro isn't applied as a main font family when using XeLaTeX Jun 4, 2017
@nextlevelshit
Copy link

nextlevelshit commented Jul 4, 2017

In my case it did not had anything to do with the latex engine. There were only missing the right texlive extensions:

sudo apt-get install texlive-fonts-recommended texlive-fonts-extra

That line of code did the job. I am using Ubuntu Gnome 17.04.

@Wandmalfarbe
Copy link
Owner

@nextlevelshit Thank you for your suggestion. I hope that will be useful for all Ubuntu users out there.

On OS X/macOS I checked the installed packages and the needed packages sourcesanspro, sourcecodeproand sourceserifpro are definitely installed (tlmgr info <packagename>).

The current workaround on macOS would be to use setmainfont and mainfontoptions in the YAML metadata block

---
title: "Example PDF"
author: [Author]
date: 2017-02-20
subject: "Markdown"
tags: [Markdown, Example]
mainfont: "SourceSansPro-Regular"
mainfontoptions: "Scale=1.0"
...

# Vinaque sanguine metuenti cuiquam Alcyone fixus

or via command line options

pandoc "ex.md" -o "ex.pdf" --from markdown --template eisvogel.latex --latex-engine=xelatex -V mainfont="SourceSansPro-Regular" -V mainfontoptions="Scale=1.0"

.
Unfortunately the result looks a bit different.

@mriedmann
Copy link

Same issue here with MiKTeX on Win10, pandoc and xelatex. All font packages are installed. Lang is set to de. Workaround helps but a "permanent" solution would be awesome.

> systeminfo
...
Betriebssystemname:                            Microsoft Windows 10 Pro
Betriebssystemversion:                         10.0.10586 Nicht zutreffend Build 10586
...

> latex --version
MiKTeX-pdfTeX  (MiKTeX 2.9.6300)

> pandoc --version
pandoc 2.0.1
Compiled with pandoc-types 1.17.2, texmath 0.9.4.4, skylighting 0.4.2

BTW: Very nice template! I'm pretty new to latex so I can only support you with tests/infos, sorry.

@Wandmalfarbe
Copy link
Owner

Wandmalfarbe commented Nov 19, 2017

This is an issue in polyglossia (reutenauer/polyglossia#127 and reutenauer/polyglossia#186). I followed the first workaround from jfbz on Tex StackExchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants