bugLaTeX semantic checker - Bugs: bug #61669, Adding `\autoref` as a default...

 
 

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

bug #61669: Adding `\autoref` as a default Linker

Submitter:  Michael Hoffman <michaelhoffman>
Submitted:  Mon 13 Dec 2021 07:51:26 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Wed 05 Oct 2022 03:20:44 AM UTC, comment #1: 

Turning \autoref into a Linker doesn't make it warn on


morale has improved (\autoref{fig:myfig})


because it only checks if the previous character was a space, and in this case it's a left parenthesis.

If you created a wrapper around \autoref that added the parentheses, then you could turn that into a Linker.  It could also take multiple arguments and separate them with semi-colons like you want.

If I were to make \autoref a Linker, it would definitely warn on

(\autoref{fig:myfig}; \autoref{tbl:mytbl})

and I don't want to change that because I don't think there is a good way to know when it shouldn't warn.  At least, I can't think of one.  I'm going to go ahead and close this, but if you can tell me how it should know not to warn, then let me know and I'll consider fixing it.

What I would do if I were you is create a UserWarn section in your chktexrc file to find the case you are worried about.


UserWarn
{
    " (\autoref"
}


Ivan Andrus <gvol>
Group administrator
Mon 13 Dec 2021 07:51:26 PM UTC, original submission:  

I have `\autoref` in the Linker section of my `chktexrc`. I find this helpful because I usually refer to figures like this

```
morale has improved~(\autoref{fig:myfig})
```

It looks strange to have the "(Figure 1)" appear on a new line.

If this is done, there should be some special treatment regarding space between punctuation and a Linker. Because if `\autoref` is a Linker, separating runs of references to display items with a semicolon or comma like this:

```
(\autoref{fig:myfig}; \autoref{tbl:mytbl})
```

chktex will complain if there is no `~` between the two autorefs above. I can't find any way to fix that myself other than adding `% chktex 2` to every line where it's an issue

Michael Hoffman <michaelhoffman>

 

(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 michaelhoffman (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-05 gvol StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code