sylvainhalle / textidote

Spelling, grammar and style checking on LaTeX documents
https://sylvainhalle.github.io/textidote
GNU General Public License v3.0
933 stars 68 forks source link

Ignore `\begin{…}` / `\end{…}` for environments like proof or theorem #250

Open dpo opened 11 months ago

dpo commented 11 months ago

What is the syntax to ignore multiple macros? I have tried

—remove-macros citet
—remove-macros citep
—remove-macros citealp

and

—remove-macros citet citep citealp

and

—remove-macros citet,citep,citealp

but none ignore \citet, \citep and \citealp in my document.

In addition, TeXtidote complains about things like

L953C8-L953C8 This sentence does not start with an uppercase letter.. 
  Suggestions: [Proof] (21848) [lt:en:UPPERCASE_SENTENCE_START] 
  \begin{proof}

Why isn’t \begin{proof} simply ignored? I don’t want to ignore the entire environment as it contains lots of text to be checked. Do we really have to use replacements for all such environments (theorem, lemma, corollary, proposition, assumption, etc, etc.)? If so, could you please show the syntax (especially how to include the backslash)?

sylvainhalle commented 11 months ago

The correct syntax is the third one (with commas). That said, TeXtidote already handles these commands by replacing them with [X] in the text to analyze, so setting them as macros to ignore has no effect. I would consider that part of the issue as closed.

The second issue you mention still stands. For the moment, TeXtidote does nothing with delimiters of environments like proof, theorem, etc. I agree that they should simply be ignored, and the text they contain be analyzed like normal text.

dpo commented 11 months ago

Thank you for the quick answer. Two comments about the issue that you consider resolved:

  1. \citep, \citet, etc., are most definitely not ignored in my case;
  2. I think it would be worth adding an example to the documentation explaining that a comma should be used to separate multiple macros.

Here is my configuration file:

--output plain
--check en
--firstlang fr
--dict .textidote_dict.txt
--replace .textidote_replacements.txt
--read-all
--remove subequations
--remove-macros href
dpo commented 11 months ago

Here are examples of \cite commands not being ignored and that seem quite bizarre to me:

L112C1-L112C7 Do not mix \cite with \citep or \citet in the same document.                                                                                              
  [sh:c:itemix]                                                                                                                                                           
  \citeauthor{carter-1987}’s procedures are used to                                                                                                                       
  ^^^^^^^                                            

L85C35-L85C37 There should be a space after a comma. [sh:d:001]                                                                                                         
  vkin-baraldi-orban-2022b,carter-1987} and \citet{l
                          ^^^

L96C226-L96C231 Possible spelling mistake found.. Suggestions: [cited, cite, 
  cites, civet] (4457) [lt:en:MORFOLOGIK_RULE_EN_US] 
  ppa_{\mathrm{ufh}}\), \citet[\S\(8.4\)]{conn-gould
                         ^^^^^^

L114C8-L114C32 This sentence does not start with an uppercase letter.. 
  Suggestions: [Cartis-gould-toint-2010] (5171) 
  [lt:en:UPPERCASE_SENTENCE_START] 
  \citet{cartis-gould-toint-2010} show that the stee
        ^^^^^^^^^^^^^^^^^^^^^^^^^
dpo commented 10 months ago

Bump