我想切换到无衬线字体,以使我的文本适合诵读困难者阅读。
不幸的是,标题仍然有衬线,并且会引发警告:
Font shape 'T1/lmss/m/sc' in size <12> not available
Font shape 'T1/lmr/m/sc' tried instead
我(显然)使用了 lmodern,\usepackage{anyfontsize}
还尝试了其他几种技巧,但都不起作用。有什么想法吗?
\documentclass[a4paper,12pt]{report} %article, report, book
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[gen]{eurosym}
\usepackage{gensymb}
\usepackage[english,francais]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{mathtools, bm}
\usepackage{amssymb, bm}
\usepackage[colorlinks=true]{hyperref}
\usepackage{nccrules}
\usepackage[version=3]{mhchem}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\usepackage{geometry}
\usepackage{parskip}
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault} % Supprime le serif (dyslexie)
%\usepackage[font=sf, labelfont={sf}]{caption}
%\usepackage[font=sf]{floatrow}
\linespread{1.2}
\geometry{hmargin=2.5cm,vmargin=2.5cm}
%\pagestyle{empty}
\hypersetup{urlcolor=blue,linkcolor=black,citecolor=black}
\begin{document}
\begin{figure}[h]
\centering
\includegraphics[width=0.7 \textwidth]{Deb.jpg}
\caption{Leviers}
\label{Leviers}
\end{figure}
答案1
french 将 caption 中的字体更改为小型大写字母,而无衬线 latin modern 没有小型大写字母,因此您需要替换它。您可以这样避免这种情况:
\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel} %use french instead of the outdated francais
\frenchsetup{SmallCapsFigTabCaptions=false}
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault} % Supprime le serif (dyslexie)
\usepackage[font=sf, labelfont={sf}]{caption}
\begin{document}
\begin{figure}[h]
\centering
a figure
\caption{Leviers}
\label{Leviers}
\end{figure}
\end{document}