![标题中的法语引号](https://linux22.com/image/298159/%E6%A0%87%E9%A2%98%E4%B8%AD%E7%9A%84%E6%B3%95%E8%AF%AD%E5%BC%95%E5%8F%B7.png)
我目前正在完成我的博士论文。我使用 Lyx 和软件包
\usepackage[french]{babel}
\frenchbsetup{FrenchFootnotes=false}
我在文本中使用法语引号(guillemets),没有任何问题,但是当文档变成.pdf
.
我确信这个问题有一个简单的答案,但我在网上没有找到。
非常感谢你的帮助!
这是一个可编译的代码:
\documentclass[12pt,oneside,english,french,oldfontcommands]{memoir}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2.5cm,rmargin=2.5cm}
\setcounter{secnumdepth}{-2}
\setcounter{tocdepth}{5}
\setlength{\parindent}{1.15cm}
\setSpacing{1.3999999999999999}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}
\usepackage[french]{babel}
\usepackage{csquotes}
\frenchbsetup{FrenchFootnotes=false}
\setcounter{secnumdepth}{5}
\usepackage{chngcntr}
\counterwithout{paragraph}{subsubsection}
\renewcommand*{\theparagraph}{\arabic{paragraph}.}
\newcommand\p{\paragraph{}}
\newcommand\ap{\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}}
\newcommand\av{\addtocontents{toc}{\protect\setcounter{tocdepth}{4}}}
\usepackage[bottom]{footmisc}
\renewcommand\@makefntext[1]{%
\noindent
\mbox{\@thefnmark.~}{#1}}
\makeatother
\let\footnotesize\scriptsize
\addtolength{\skip\footins}{4mm}
\makeatother
\usepackage{babel}
\makeatletter
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\makeatother
\begin{document}
Text \og inside \fg{} the text.
\paragraph*{1° â Text \og inside \fg{} the paragraph title}
\selectlanguage{english}%
\p{}\foreignlanguage{french}{Text \og following \fg{} the paragraph
title.}\selectlanguage{french}%
\end{document}
答案1
在 LaTeX 等连载标题中,\paragraph
标题文本会在下一段开始时设置。因此\selectlanguage{english}
“适得其反”(\color{red}
此处的 a 也会使标题变色)。因此,您应该在更改语言之前开始段落,例如\leavevmode
:
\documentclass[12pt,oneside,english,french]{memoir}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\begin{document}
Text \og inside \fg{} the text.
\paragraph*{Text \og inside \fg{} title}
\selectlanguage{english} \og blb\fg{}
\selectlanguage{french}
\paragraph*{Text \og inside \fg{} title}
\leavevmode\selectlanguage{english} \og blb\fg{}
\end{document}