TransWikia.com

Change document font keeping accents

TeX - LaTeX Asked on May 20, 2021

I’ve changed the whole document font with

usepackage[default]{sourcesanspro}
usepackage[T1]{fontenc}

but my code for special characters as accents

usepackage[spanish]{babel}

isn’t working now which gives me problems because I wrote accents as "árbol" instead of "’arbol", and I’d like to keep writing this way.

The whole preamble is the following:

documentclass[12pt]{article}

usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage[default]{sourcesanspro} %https://tug.org/FontCatalogue/sourcesanspro/


begin{document}
árbol y no 'arbol
end{document}

One Answer

This is not an answer. Only to report that I got what it seems to be the correct output, both with pdflatex and lualatex. (win7 + TeXstudio + MikTeX, none of which I think is relevant)

Using sourcesanspro.sty 2018/05/19 v2.7 Adobe's Source Sans Pro typeface

Installed from https://ctan.org/pkg/sourcesanspro?lang=en

The .otf installed files were created on 26-Apr-20.

% TeX encoding = UTF-8 <<<< important!

z

% !TeX encoding = UTF-8 %% use this directive or add usepackage[utf8]{inputenc}

documentclass[12pt]{article}

usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage[default]{sourcesanspro} %https://tug.org/FontCatalogue/sourcesanspro/    

begin{document}

    árbol y no 'arbol
    
    cigüeña     
    
    ágape
    
    bebé
    
    abogacía
    
    ocasión
    
    última
        
end{document}

Answered by Simon Dispa on May 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP