2

I am trying to use a beamer template that I a user shared with me. Unfortunately, I have an issue using accents (because I write in French) : It seems like characters using accents are ignored and not shown on the template. For instance writing : "Etalement à interface élastique" gives "Etalement interface lastique"enter image description here

I use this sty file : named "YTU.sty"

    \mode<presentation>

\newif\ifbeamer@secheader
\beamer@secheaderfalse

%\DeclareOptionBeamer{secheader}{\beamer@secheadertrue}
\ProcessOptionsBeamer

\useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars}
\makeatletter % [add curpage/total page at the bottom](http://tex.stackexchange.com/questions/100838/beamer-dresden-theme-miniframes-appeareance-and-frame-number-insertion)
\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}}
\setbeamertemplate{footline} 
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle}%
      \hfill%
      {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatother

\useinnertheme{circles}

%\useoutertheme{default}
%\useinnertheme[shadow=true]{rounded}

%define qut theme color 
\xdefinecolor{qut}{HTML}{00407a}  %PANTONE 541 BLUE
\setbeamercolor{footline}{bg=qut}
\setbeamercolor{frametitle}{bg=qut,fg=white}
\setbeamercolor{title}{bg=qut}
\setbeamerfont{frametitle}{size=\large}
%\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}[text]
\setbeamertemplate{caption}[numbered]

\setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black}
%\setbeamercolor*{sidebar}{use=structure,bg=structure.fg}
\setbeamercolor{titlelike}{parent=palette primary}

%% try
\setbeamercolor{block title}{bg=qut}
\setbeamercolor*{block title example}{use={normal text,example text},bg=white,fg=qut}
\setbeamercolor{fine separation line}{}
\setbeamercolor{item projected}{fg=white}
\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
%\setbeamercolor{palette sidebar quaternary}{fg=white}
\setbeamercolor{section in sidebar}{fg=brown}
\setbeamercolor{section in sidebar shaded}{fg=grey}
\setbeamercolor{separation line}{}
\setbeamercolor{sidebar}{bg=qut}
\setbeamercolor{sidebar}{parent=palette primary}
\setbeamercolor{structure}{fg=qut}
\setbeamercolor{subsection in sidebar}{fg=brown}
\setbeamercolor{subsection in sidebar shaded}{fg=grey}
\AtBeginSection[]{
    \begin{frame}
        \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
    \end{frame}
}
\AtBeginSubsection[]{
    \begin{frame}
        \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
    \end{frame}
}

\mode
<all>

This is the code of the template :

% !TEX encoding = UTF-8 Unicode
\documentclass[french]{beamer}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}

%\usepackage[T1]{fontenc}
\UseRawInputEncoding


\usepackage{pgfpages}
\usepackage{pgf, tikz, adjustbox}

\usetikzlibrary{arrows.meta,
                patterns.meta
                }

% other packages
\usepackage{latexsym,amsmath,xcolor,multicol,booktabs,calligra}
\usepackage{graphicx,listings,stackengine}

%% Enable only in Xelatex
% \usepackage{pstricks}

\author{XXX}
\title{Etalement d'une goutte à interface élastique}
\subtitle{Presentation}
\institute [Sorbonne Université - ESPCI, Paris] {Laboratoire PMMH \\PSL University}
\date{\today}

\usepackage{YTU}

% defs
\def\cmd#1{\texttt{\color{red}\footnotesize $\backslash$#1}}
\def\env#1{\texttt{\color{blue}\footnotesize #1}}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\definecolor{halfgray}{gray}{0.55}

\lstset{
    basicstyle=\ttfamily\small,
    keywordstyle=\bfseries\color{deepblue},
    emphstyle=\ttfamily\color{deepred},    % Custom highlighting style
    stringstyle=\color{deepgreen},
    numbers=left,
    numberstyle=\small\color{halfgray},
    rulesepcolor=\color{red!20!green!20!blue!20},
    frame=shadowbox,
}


\begin{document}

\begin{frame}
    \titlepage

    
    \begin{note}
        {Introduce your self}
    \end{note}

\end{frame}
\end{document}

Could someone help me to solve this problem please ?

Thank you in advance,

4
  • 3
    What should be the purpose of \UseRawInputEncoding?
    – egreg
    Sep 12 at 9:55
  • While testing the original template it was told to me that is used to display the code but to be honest I don't understand its use very well. Does it interfere with utf8 encoding ? I have tried to remove it and now it works well...
    – Wiss
    Sep 12 at 9:59
  • @egreg Thank you for your remark but do you know what is the reason behind this error ? Thanks
    – Wiss
    Sep 12 at 10:00
  • Unrelated to the problem, but your preamble could do with a clean up: lot's of unnecessary packages... Sep 12 at 10:04

1 Answer 1

5

Remove \UseRawInputEncoding, that's all.

If you look in the .log file, you will see

Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A9> in font cmss8!
Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A0> in font cmss8!
Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A9> in font cmss8!
Missing character: There is no <C3> in font cmss12!
Missing character: There is no <A0> in font cmss12!
Missing character: There is no <C3> in font cmss12!
Missing character: There is no <A9> in font cmss12!
Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A9> in font cmss8!
Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A0> in font cmss8!
Missing character: There is no <C3> in font cmss8!
Missing character: There is no <A9> in font cmss8!

The precise purpose of \UseRawInputEncoding is to absorb the input byte by byte without assuming any encoding; since the main document font (Computer Modern Sans) has nothing in the 128–255 slots, that's what happens. With a different font you might get arbitrary rubbish.

Removing that wrong declaration yields

enter image description here

Since you're writing in French you should also reenable \usepackage[T1]{fontenc} and add \usepackage{babel}.

Isn't the correct French spelling “Étalement”? I don't think you should omit accents on uppercase letters.

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.