bugLaTeX semantic checker - Bugs: bug #55317, WipeArg doesn't work for multiline...

 
 

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

bug #55317: WipeArg doesn't work for multiline arguments

Submitter:  Leonard König <larkey>
Submitted:  Fri 28 Dec 2018 09:23:55 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Postponed
Privacy:  Public Assigned to:  gvol
Open/Closed:  Open

Thu 13 Oct 2022 12:06:24 AM UTC, comment #2: 

I spent quite a while trying to get this to work and it's going to be hard to get it working correctly.  With the work I have so far, there are cases when it can keep wiping to the end of the file which is obviously worse than what it does now.

Ivan Andrus <gvol>
Group administrator
Wed 09 Jan 2019 03:54:24 AM UTC, comment #1: 

This is certainly true.  Unfortunately, the way ChkTeX is currently written is very line-oriented and it may be difficult to keep wiping arguments across lines. 

Sometimes the behavior changes if the line ends with a comment (because it removes the whitespace introduced by the newline), and so I tried adding comments to the end of each line, and it silenced the warning, though for a different reason than I had hoped.  :-/

In fact, the reason that


\usepackage[
  natbib=true,
  backend=biber,
  bibstyle=numeric,
  citestyle=numeric-comp,
  sorting=nty,
  sortlocale=de_DE,%
  seconds=true,
  alldates=iso,
]{biblatex}


is because it see the "DE," as having no space after it.  If it were typeset it would appear as ...de_DE,seconds..., and so chktex is fooled into not warning about improper spacing because there is no spacing.  Anyway, I thought you might be interested in this work around.

Ivan Andrus <gvol>
Group administrator
Fri 28 Dec 2018 09:23:55 PM UTC, original submission:  

I use this


UserWarnRegex {
        (?!#After-comma! spacing! `\@,! '! should! perhaps! be! used)[A-Z][A-Z][[:punct:]][[:space:]]
}


to warn me about things like "foo US, bar" which should be "foo US\@, bar" because the 'S' sets spacefactor=999 and the ',' should set the spacefactor=1250 but can only go up to 1000 because it's not allowed to jump from <1000 to >1000.  It's basically a similar problem to interword and intersentence-spacing.

Anyway, I also have this in my document before \begin{document}


\usepackage[
  natbib=true,
  backend=biber,
  bibstyle=numeric,
  citestyle=numeric-comp,
  sorting=nty,
  sortlocale=de_DE,
  seconds=true,
  alldates=iso,
]{biblatex}


Sadly the UserWarnRegex warns about "DE,\n". I tried to silence the warning using WipeArg:


WipeArg {
    \usepackage:[]{}
}


unfortunately this only wipes the arguments for this use:


\usepackage[sortlocale=de_DE]{}


But as soon as I go multi-line it doesn't work anymore.  This is true of course for all WipeArgs but usually not of a big issue because the arguments tend to be short and inline.

Leonard König <larkey>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-13 gvol StatusConfirmed Postponed
    2019-01-09 gvol StatusNone Confirmed
        Assigned toNone gvol

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code