Chktex complains about “no italic correction found”, how to fix this?












2















I use the following code for custom theorems, as I like slanted text in thereoms better than italicized, using amsthm.



newtheoremstyle{thm-sl}
{}{}
{slshape} % slanted text instead of italicized
{}
{bfseries}
{.}
{.5em}
{}


I get a warning from chktex:



Warning 6 in doc.tex line 21: No italic correction (`/') found.
{slshape} % slanted text instead of italicized
^


I understand, that italic correction (/) should be used, to insert some space between italicized/slanted characters and upright characters, appearing directly after another. Though in my case, there should be no characters after the slanted text.



So is this just an overreaction of chktex or is there a more "correct" to use newtheoremstyle?



Funnily, using {slshape/} mutes chktex, but will not compile, due to the error



! You can't use `/' in vertical mode.









share|improve this question


















  • 1





    I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

    – moewe
    Jan 13 at 12:14








  • 1





    Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

    – moewe
    Jan 13 at 12:40











  • Yep that works, thanks!

    – red_trumpet
    Jan 13 at 12:48











  • I'm not even sure why chktex examines things in the preamble.

    – egreg
    Jan 13 at 14:23
















2















I use the following code for custom theorems, as I like slanted text in thereoms better than italicized, using amsthm.



newtheoremstyle{thm-sl}
{}{}
{slshape} % slanted text instead of italicized
{}
{bfseries}
{.}
{.5em}
{}


I get a warning from chktex:



Warning 6 in doc.tex line 21: No italic correction (`/') found.
{slshape} % slanted text instead of italicized
^


I understand, that italic correction (/) should be used, to insert some space between italicized/slanted characters and upright characters, appearing directly after another. Though in my case, there should be no characters after the slanted text.



So is this just an overreaction of chktex or is there a more "correct" to use newtheoremstyle?



Funnily, using {slshape/} mutes chktex, but will not compile, due to the error



! You can't use `/' in vertical mode.









share|improve this question


















  • 1





    I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

    – moewe
    Jan 13 at 12:14








  • 1





    Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

    – moewe
    Jan 13 at 12:40











  • Yep that works, thanks!

    – red_trumpet
    Jan 13 at 12:48











  • I'm not even sure why chktex examines things in the preamble.

    – egreg
    Jan 13 at 14:23














2












2








2








I use the following code for custom theorems, as I like slanted text in thereoms better than italicized, using amsthm.



newtheoremstyle{thm-sl}
{}{}
{slshape} % slanted text instead of italicized
{}
{bfseries}
{.}
{.5em}
{}


I get a warning from chktex:



Warning 6 in doc.tex line 21: No italic correction (`/') found.
{slshape} % slanted text instead of italicized
^


I understand, that italic correction (/) should be used, to insert some space between italicized/slanted characters and upright characters, appearing directly after another. Though in my case, there should be no characters after the slanted text.



So is this just an overreaction of chktex or is there a more "correct" to use newtheoremstyle?



Funnily, using {slshape/} mutes chktex, but will not compile, due to the error



! You can't use `/' in vertical mode.









share|improve this question














I use the following code for custom theorems, as I like slanted text in thereoms better than italicized, using amsthm.



newtheoremstyle{thm-sl}
{}{}
{slshape} % slanted text instead of italicized
{}
{bfseries}
{.}
{.5em}
{}


I get a warning from chktex:



Warning 6 in doc.tex line 21: No italic correction (`/') found.
{slshape} % slanted text instead of italicized
^


I understand, that italic correction (/) should be used, to insert some space between italicized/slanted characters and upright characters, appearing directly after another. Though in my case, there should be no characters after the slanted text.



So is this just an overreaction of chktex or is there a more "correct" to use newtheoremstyle?



Funnily, using {slshape/} mutes chktex, but will not compile, due to the error



! You can't use `/' in vertical mode.






amsthm italic slanted italic-correction chktex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 13 at 12:12









red_trumpetred_trumpet

1749




1749








  • 1





    I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

    – moewe
    Jan 13 at 12:14








  • 1





    Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

    – moewe
    Jan 13 at 12:40











  • Yep that works, thanks!

    – red_trumpet
    Jan 13 at 12:48











  • I'm not even sure why chktex examines things in the preamble.

    – egreg
    Jan 13 at 14:23














  • 1





    I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

    – moewe
    Jan 13 at 12:14








  • 1





    Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

    – moewe
    Jan 13 at 12:40











  • Yep that works, thanks!

    – red_trumpet
    Jan 13 at 12:48











  • I'm not even sure why chktex examines things in the preamble.

    – egreg
    Jan 13 at 14:23








1




1





I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

– moewe
Jan 13 at 12:14







I guess in that case you just don't want to keep chktex happy. These automatic tools can't always get everything right.

– moewe
Jan 13 at 12:14






1




1





Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

– moewe
Jan 13 at 12:40





Apparently you should be able to silence the warning by adding % chktex 6 after the {slshape} (haven't tested that).

– moewe
Jan 13 at 12:40













Yep that works, thanks!

– red_trumpet
Jan 13 at 12:48





Yep that works, thanks!

– red_trumpet
Jan 13 at 12:48













I'm not even sure why chktex examines things in the preamble.

– egreg
Jan 13 at 14:23





I'm not even sure why chktex examines things in the preamble.

– egreg
Jan 13 at 14:23










1 Answer
1






active

oldest

votes


















4














Automatic syntax checkers or linters don't (and maybe can't) always get everything right.



In this case there is no need for italic correction with slshape since the following text will start in a new line and not directly after the slanted text in the same line. Anyway, it would certainly be inappropriate to add / directly after slshape here since the correction needs to be added at the end of the slanted/italic text ({slhape lorem ipsumf/} dolor not {slshape/ lorem ipsumf} dolor). Here the {slshape} is not a group that prints anything, it is the argument of a command that determines the formatting of the theorem later.



You can disable the warning by adding a comment with checktex 6 in the offending line



newtheoremstyle{thm-sl}
{}{}
{slshape}% chktex 6
{}
{bfseries}
{.}
{.5em}
{}


See §6.1.4 of the ChkTeX documentation.



Since you are probably going to use only the text...{...} macros instead of their switches (textititshape etc.) in the document you could probably disable the entire warning 6 altogether. The documentation has more hints on that (-n6 command line option or chktexrc config file).






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469942%2fchktex-complains-about-no-italic-correction-found-how-to-fix-this%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    Automatic syntax checkers or linters don't (and maybe can't) always get everything right.



    In this case there is no need for italic correction with slshape since the following text will start in a new line and not directly after the slanted text in the same line. Anyway, it would certainly be inappropriate to add / directly after slshape here since the correction needs to be added at the end of the slanted/italic text ({slhape lorem ipsumf/} dolor not {slshape/ lorem ipsumf} dolor). Here the {slshape} is not a group that prints anything, it is the argument of a command that determines the formatting of the theorem later.



    You can disable the warning by adding a comment with checktex 6 in the offending line



    newtheoremstyle{thm-sl}
    {}{}
    {slshape}% chktex 6
    {}
    {bfseries}
    {.}
    {.5em}
    {}


    See §6.1.4 of the ChkTeX documentation.



    Since you are probably going to use only the text...{...} macros instead of their switches (textititshape etc.) in the document you could probably disable the entire warning 6 altogether. The documentation has more hints on that (-n6 command line option or chktexrc config file).






    share|improve this answer






























      4














      Automatic syntax checkers or linters don't (and maybe can't) always get everything right.



      In this case there is no need for italic correction with slshape since the following text will start in a new line and not directly after the slanted text in the same line. Anyway, it would certainly be inappropriate to add / directly after slshape here since the correction needs to be added at the end of the slanted/italic text ({slhape lorem ipsumf/} dolor not {slshape/ lorem ipsumf} dolor). Here the {slshape} is not a group that prints anything, it is the argument of a command that determines the formatting of the theorem later.



      You can disable the warning by adding a comment with checktex 6 in the offending line



      newtheoremstyle{thm-sl}
      {}{}
      {slshape}% chktex 6
      {}
      {bfseries}
      {.}
      {.5em}
      {}


      See §6.1.4 of the ChkTeX documentation.



      Since you are probably going to use only the text...{...} macros instead of their switches (textititshape etc.) in the document you could probably disable the entire warning 6 altogether. The documentation has more hints on that (-n6 command line option or chktexrc config file).






      share|improve this answer




























        4












        4








        4







        Automatic syntax checkers or linters don't (and maybe can't) always get everything right.



        In this case there is no need for italic correction with slshape since the following text will start in a new line and not directly after the slanted text in the same line. Anyway, it would certainly be inappropriate to add / directly after slshape here since the correction needs to be added at the end of the slanted/italic text ({slhape lorem ipsumf/} dolor not {slshape/ lorem ipsumf} dolor). Here the {slshape} is not a group that prints anything, it is the argument of a command that determines the formatting of the theorem later.



        You can disable the warning by adding a comment with checktex 6 in the offending line



        newtheoremstyle{thm-sl}
        {}{}
        {slshape}% chktex 6
        {}
        {bfseries}
        {.}
        {.5em}
        {}


        See §6.1.4 of the ChkTeX documentation.



        Since you are probably going to use only the text...{...} macros instead of their switches (textititshape etc.) in the document you could probably disable the entire warning 6 altogether. The documentation has more hints on that (-n6 command line option or chktexrc config file).






        share|improve this answer















        Automatic syntax checkers or linters don't (and maybe can't) always get everything right.



        In this case there is no need for italic correction with slshape since the following text will start in a new line and not directly after the slanted text in the same line. Anyway, it would certainly be inappropriate to add / directly after slshape here since the correction needs to be added at the end of the slanted/italic text ({slhape lorem ipsumf/} dolor not {slshape/ lorem ipsumf} dolor). Here the {slshape} is not a group that prints anything, it is the argument of a command that determines the formatting of the theorem later.



        You can disable the warning by adding a comment with checktex 6 in the offending line



        newtheoremstyle{thm-sl}
        {}{}
        {slshape}% chktex 6
        {}
        {bfseries}
        {.}
        {.5em}
        {}


        See §6.1.4 of the ChkTeX documentation.



        Since you are probably going to use only the text...{...} macros instead of their switches (textititshape etc.) in the document you could probably disable the entire warning 6 altogether. The documentation has more hints on that (-n6 command line option or chktexrc config file).







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 13 at 14:32

























        answered Jan 13 at 14:01









        moewemoewe

        89.1k9110339




        89.1k9110339






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469942%2fchktex-complains-about-no-italic-correction-found-how-to-fix-this%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mario Kart Wii

            The Binding of Isaac: Rebirth/Afterbirth

            What does “Dominus providebit” mean?