bugLaTeX semantic checker - Bugs: bug #44413, Wrong warning about non-matching...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44413: Wrong warning about non-matching number of brackets

Submitted by:  Jan Gosmann <jgosmann>
Submitted on:  Tue 03 Mar 2015 04:58:39 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sun 08 Mar 2015 03:58:46 AM UTC, comment #2:

Fixed by revision 268.

Ivan Andrus <gvol>
Project Administrator
Wed 04 Mar 2015 05:30:14 AM UTC, comment #1:

Thanks for the bug report. This is because \cite is defined in the default chktexrc file as being \cite:[]{} instead of \cite:[][]{} (in the WipeArg section). So you can fix it (until the next release) by changing your chktexrc file.

It would be great if you looked through that section to see if there are any other possible problems (that you know about). The newly updated version is below.

WipeArg
{
\label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
\cite:[][]{} \nocite:{}
\input:{} \verbatiminput:[]{} \listinginput:[]{}{}
\verbatimtabinput:[]{} \include:{} \includeonly:{}
\bibitem:[]{}
\cline:{} \cmidrule:[](){}
\href:{}{}
# Cleveref -- there are many others that could be here as well...
\cref:{} \cpageref:{} \crefrange:{}{} \cpagerefrange:{}{}
\Cref:{} \Cpageref:{} \Crefrange:{}{} \Cpagerefrange:{}{}
# natbib
\citet:[][]{} \citep:[][]{} \citealt:{} \citealp:[]{} \citeauthor:*{}
\Citet:[][]{} \Citep:[][]{} \Citealt:{} \Citealp:[]{} \Citeauthor:{}
\citetext:{} \citeyear:*{} \citeyearpar:{}
}

Ivan Andrus <gvol>
Project Administrator
Tue 03 Mar 2015 04:58:39 PM UTC, original submission:

Using the following example Latex document:

\documentclass{scrartcl}
\begin{document}
\cite[a][]{key}
\end{document}

ChkTeX 1.7.2 gives the following warnings:

Warning 10 in x.tex line 3: Solo `]' found.
\cite[a][]{key}
^
Warning 17 in x.tex line 4: Number of `[' doesn't match the number of `]'!

No errors printed; 2 warnings printed; No user suppressed warnings; No line suppressed warnings.

However, the number of `[' brackets clearly matches the number of `]`. Also, the \cite[prenote][postnote]{key} form is a valid command with the biblatex package (not included in the example above as ChkTeX doesn't check for it).

Jan Gosmann <jgosmann>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gvol (Posted a comment)
  • -unavailable- added by jgosmann (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 08 Mar 2015 03:59:15 AM UTCgvolOpen/ClosedOpen=>Closed
    Sun 08 Mar 2015 03:58:46 AM UTCgvolStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1