【问题标题】:Prevent Auctex indentation with (fill-paragraph)使用 (fill-paragraph) 防止 Auctex 缩进
【发布时间】:2014-02-18 18:29:30
【问题描述】:

我不喜欢在我的 LaTeX 文档中使用缩进,因为它使与其他编辑器的用户合作变得更加困难。这通常很容易实现,除了 Auctex 喜欢在我使用 (fill-paragraph) 时自动缩进。

例如,如果我有类似的东西:

\begin{abstract}
Some series of sentences here.
\end{abstract}

当我运行 (fill-paragraph) 时,我得到类似的东西

\begin{abstract}
  Some series of
  sentences here.
\end{abstract}

我不希望填充的文本缩进。

请注意,我不想在 Emacs 范围内禁用此功能,因为我喜欢能够在其他模式下填充缩进的 cmets 等。我只是不希望它发生在 Auctex 中。

我怎样才能做到这一点?

我已经看过这个问题 [1],但它只有乳胶模式的部分解决方案,而不是 Auctex。

[1]Emacs: Turn off indentation when doing a paragraph fill in LaTeX mode

【问题讨论】:

    标签: emacs latex elisp indentation auctex


    【解决方案1】:

    如果您将自定义变量 LaTeX-indent-levelLaTeX-item-indent 设置为 0,您将消除大部分或全部 AucTex 的缩进。

    【讨论】:

      【解决方案2】:

      你可以做类似的事情

      (add-hook 'LaTeX-mode-hook
                (lambda ()
                  (kill-local-variable 'line-indent-function)))
      

      以便禁用 LaTeX 的缩进算法。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-12
        相关资源
        最近更新 更多