如何在不使用 \noindent 的情况下完全抑制引用环境中的段落缩进?

如何在不使用 \noindent 的情况下完全抑制引用环境中的段落缩进?

在此处输入图片描述

\documentclass[oneside,12pt]{article}
\usepackage{geometry}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{enumitem}
\setlist[enumerate,1]{label=\arabic*.,align=left,leftmargin=*,
 labelsep=1.5em}

\usepackage{quoting}
\quotingsetup{vskip=1em}

\begin{document}
\subsection*{Exercises 27}
Take the following q-valuation:
\begin{quoting}
  The domain is \{Romeo,Juliet,Benedick,Beatrice\}

  \noindent Constants are assigned references as follows:
  \begin{quoting}
    \texttt{`m'}$\Rightarrow$Romeo

    \noindent\texttt{`n'}$\Rightarrow$Juliet
  \end{quoting}

  \noindent Predicates are assigned extensions as follows:
  \begin{quoting}
    `F'$\Rightarrow$\{Romeo,Benedick\}\\
    `G'$\Rightarrow$\{Juliet,Beatrice\}\\
    `L'$\Rightarrow$\{<Romeo,Juliet>,<Juliet,Romeo>,<Benedick,
    Beatrice><Beatrice,Benedick>,<Benedick,Benedick>\}
  \end{quoting}
\end{quoting}
Then what are the truth values of the following wffs?
\begin{enumerate}[nosep]
\item $\exists xLmx$
\item $\forall xLxm$
\item $(\exists xLmx\supset Lmn)$
\item $\forall x(Fx\equiv\neg Gx)$
\item $\forall x(Gx\supset(Lxm\vee\neg Lmx))$
\item $\forall x(Gx\supset\exists yLxy)$
\item $\exists x(Fx\wedge\forall y(Gy\supset Lxy))$
\end{enumerate}
\end{document}

我想简洁地抑制引用环境中的段落缩进,而无需\noindent

除了这个问题之外,我还有一行在页面右侧之前没有换行。我该如何修复它?我想按以下方式排版。忽略下图中的黄色突出显示。

在此处输入图片描述

答案1

我不建议在这里滥用引号环境。并不是说滥用它们通常都是坏事 - 它们基本上只是列表 - 但我认为像arrayor 这样的东西tabular更合适。

这是一个assign环境:

\documentclass[oneside,12pt]{article}
\usepackage[showframe]{geometry}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{enumitem}
\setlist[enumerate,1]{label=\arabic*.,leftmargin=3\parindent,labelwidth=\parindent, align=left}
\usepackage{quoting}
\quotingsetup{vskip=1em}
\usepackage{array,tabularx}
\newenvironment{assign}[1]{%
  \noindent #1
  \medskip\par\noindent
  \tabularx{\linewidth}{>{\ttfamily\arraybackslash}l!{$\Rightarrow$}>{\raggedright\arraybackslash}X}
  }{\endtabularx\medskip\par\noindent}

\begin{document}
\subsection*{Exercises 27}
Take the following q-valuation:
\begin{quoting}
  The domain is \{Romeo,Juliet,Benedick,Beatrice\}

  \begin{assign}{Constants are assigned references as follows:}
    `m'&Romeo\\
    `n'&Juliet\\
  \end{assign}
  \begin{assign}{Predicates are assigned extensions as follows:}
    `F'&\{Romeo,Benedick\}\\
    `G'&\{Juliet,Beatrice\}\\
    `L'&\{<Romeo,Juliet>, <Juliet,Romeo>, <Benedick,Beatrice>, <Beatrice,Benedick>, <Benedick,Benedick>\}\\
  \end{assign}
\end{quoting}
Then what are the truth values of the following wffs?
\begin{enumerate}[noitemsep]
  \item $\exists x\, Lmx$
  \item $\forall x\, Lxm$
  \item $(\exists x\, Lmx\supset Lmn)$
  \item $\forall x\, (Fx\equiv\lnot Gx)$
  \item $\forall x\, (Gx\supset(Lxm\vee\lnot Lmx))$
  \item $\forall x\, (Gx\supset\exists y\, Lxy)$
  \item $\exists x\, (Fx\land\forall y\, (Gy\supset Lxy))$
\end{enumerate}
\end{document}

作业

您的一个溢出环境溢出的唯一原因是它不包含空格,因此 TeX 无法断线。

答案2

将这些行添加到你的序言中:

\usepackage{etoolbox} 
\AtBeginEnvironment{quoting}{\parindent=0pt}

相关内容