LyX 下使用法语 guillemets 在 csquotes 中实现跨越多个段落的引文

LyX 下使用法语 guillemets 在 csquotes 中实现跨越多个段落的引文

这个问题已经提出并回答过了这里对于美国人来说:

\documentclass{article}
\usepackage{csquotes}
\usepackage[american]{babel}
\DeclareQuoteStyle[american]{english}% verified
  {\textquotedblleft}
  [\textquotedblleft]
  {\textquotedblright}
  [0.05em]
  {\textquoteleft}
  {\textquoteright}
\MakeOuterQuote{"}
\begin{document}

"This is a quotation," he said.  "It continues onto the next paragraph.

Here is the continuation of my quote.  As per literary convention,
there is no end-quote at the end of the previous paragraph."

\end{document}

但我需要将其改编为法语。

通常,在 LyX 文档中,将第一部分放在\begin{document}序言部分之前,其余部分放在LyX 编辑器\begin\end应该可以工作(除了文档类在 LyX 界面中声明,并且 LyX 声明\language)。

第一个问题:在生成的 pdf 中,我没有中间的引文(开始中间段落的引文)。

第二个问题:我曾尝试修改法语代码,但没有成功:

%\documentclass{article}
\usepackage{csquotes}
\usepackage[frenchle]{babel}
%\usepackage[american]{babel}
\DeclareQuoteStyle[french]{guillemets}
%\DeclareQuoteStyle[american]{english}% verified
  {\guillemotleft}
  [\guillemotleft]
  {\guillemotright}
  [0.05em]
  {\guillemotleft}
  {\guillemotright}
\MakeOuterQuote{"}

pdf 输出完全相同。但我认为它与第 1 点相关。因此,这是完整的 LyX 代码(\language应在文本编辑器中手动编辑,否则 LyX 会在其界面中显示 français,但随后会发出错误):

#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass article
\begin_preamble
%\documentclass{article}
\usepackage{csquotes}
\usepackage[frenchle]{babel}
%\usepackage[american]{babel}
\DeclareQuoteStyle[french]{guillemets}
%\DeclareQuoteStyle[american]{english}% verified
  {\guillemotleft}
  [\guillemotleft]
  {\guillemotright}
  [0.05em]
  {\guillemotleft}
  {\guillemotright}
\MakeOuterQuote{"}
%\MakeAutoQuote{«}{»}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language frenchle
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Verbatim

\end_layout

\begin_layout Verbatim
"This is a quotation," he said.
  "It continues onto the next paragraph.
\end_layout

\begin_layout Verbatim

\end_layout

\begin_layout Verbatim
Here is the continuation of my quote.
  As per literary convention,
\end_layout

\begin_layout Verbatim
there is no end-quote at the end of the previous paragraph."
\end_layout

\begin_layout Verbatim

\end_layout

\begin_layout Verbatim
blabla
\end_layout

\begin_layout Verbatim

\end_layout

\begin_layout Verbatim
«This is a quotation,» he said.
  «It continues onto the next paragraph.
\end_layout

\begin_layout Verbatim

\end_layout

\begin_layout Verbatim
Here is the continuation of my quote.
  As per literary convention,
\end_layout

\begin_layout Verbatim
there is no end-quote at the end of the previous paragraph.»
\end_layout

\begin_layout Verbatim

\end_layout

\end_body
\end_document

第三点:我想知道我是否可以使用\MakeAutoQuote{«}{»}来在 LyX 编辑器中\DeclareQuoteStyle输入而不是。我想使用而不是,但当然,当在序言中选择法语样式时仍然会输出。«some text»"some text"«some text»« some text »« some text »

答案1

通过下面的代码,我设法用简单的方法获得了它pdflatex

测试.png

... 不确定这是否是您想要的。看来您必须(重新)做\DeclareQuoteAlias[french]{guillemets}{french}问题 1 和 2;\MakeAutoQuote{«}{»}特别是问题 3 的序言。以下是 MWE:

\documentclass{article}
\usepackage{xcolor}
\pagecolor{yellow!10}
\usepackage[utf8]{inputenc} % must have, to be able to enter {«}{»} for \MakeAutoQuote
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[french]{babel}
\DeclareQuoteStyle[french]{guillemets}
%\DeclareQuoteStyle[american]{english}% verified
  {\guillemotleft}
  [\guillemotleft]
  {\guillemotright}
  [0.05em]
  {\guillemotleft}
  {\guillemotright}
\MakeAutoQuote{«}{»} % works fine here (with utf8 support)
\MakeOuterQuote{"}
% from tex/latex/csquotes/csquotes.def:
% http://de.comp.text.tex.narkive.com/bQLQv3EF/csquotes-und-blockquote
\DeclareQuoteAlias[french]{guillemets}{french}

\begin{document}
\typeout{language is \languagename} % language is french

"This is a quotation," he said.  "It continues onto the next paragraph.

Here is the continuation of my quote.  As per literary convention,
there is no end-quote at the end of the previous paragraph."

% \MakeAutoQuote{«}{»} % passes here, if not used in preamble - but doesn't add the « on the second paragraph
% \MakeOuterQuote{«} % causes "! Package csquotes Error: Invalid argument."

«This is a quotation,» he said.  «It continues onto the next paragraph.

Here is the continuation of my quote.  As per literary convention,
there is no end-quote at the end of the previous paragraph.»

\end{document}

相关内容