How do I set a background color and font for inline verb text?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background.



I found this in the Tcolorbox manual:



DeclareTotalTCBoxcommandbox s v 
verbatim,colupper=white,colback=black!75!white,colframe=black
IfBooleanTF#1textcolorredttfamilybfseries > %
lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^


which appears to be similar to what I desire. However, I get numerous errors:



- Undefined control sequence
- You can't use `macro parameter character #' in horizontal mode.


This is the header code so far with the above included:



documentclass[oneside,11pt]book
usepackage[T1]fontenc
usepackage[letterpaper, margin=1in]geometry
usepackageamsmath,amsthm,amssymb
usepackagemathpazo
usepackagelistings
usepackageminted
usepackagexcolor
usepackagetcolorbox
usepackageetoolbox
usepackagetcolorbox
tcbuselibrarylistings, minted, skins

BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
AfterEndEnvironmentmintedendtcolorboxvspace2mm%

usepackagenewverbs
definecolorinlineRGB187,57,82
newverbcommandcverbcolorinline
usemintedstyleparaiso-dark

definecolorbgRGB22,43,58
setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

DeclareTotalTCBoxcommandbox s v
verbatim,colupper=white,colback=black!75!white,colframe=black
IfBooleanTF#1textcolorredttfamilybfseries > %
lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

setlengthparindent0pt
titleHugetextbfProgramming in C, Java, & More
authorRichard Robinson, B.Eng. Cand.

begindocument









share|improve this question

























    up vote
    3
    down vote

    favorite












    I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background.



    I found this in the Tcolorbox manual:



    DeclareTotalTCBoxcommandbox s v 
    verbatim,colupper=white,colback=black!75!white,colframe=black
    IfBooleanTF#1textcolorredttfamilybfseries > %
    lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^


    which appears to be similar to what I desire. However, I get numerous errors:



    - Undefined control sequence
    - You can't use `macro parameter character #' in horizontal mode.


    This is the header code so far with the above included:



    documentclass[oneside,11pt]book
    usepackage[T1]fontenc
    usepackage[letterpaper, margin=1in]geometry
    usepackageamsmath,amsthm,amssymb
    usepackagemathpazo
    usepackagelistings
    usepackageminted
    usepackagexcolor
    usepackagetcolorbox
    usepackageetoolbox
    usepackagetcolorbox
    tcbuselibrarylistings, minted, skins

    BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
    AfterEndEnvironmentmintedendtcolorboxvspace2mm%

    usepackagenewverbs
    definecolorinlineRGB187,57,82
    newverbcommandcverbcolorinline
    usemintedstyleparaiso-dark

    definecolorbgRGB22,43,58
    setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

    DeclareTotalTCBoxcommandbox s v
    verbatim,colupper=white,colback=black!75!white,colframe=black
    IfBooleanTF#1textcolorredttfamilybfseries > %
    lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

    setlengthparindent0pt
    titleHugetextbfProgramming in C, Java, & More
    authorRichard Robinson, B.Eng. Cand.

    begindocument









    share|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background.



      I found this in the Tcolorbox manual:



      DeclareTotalTCBoxcommandbox s v 
      verbatim,colupper=white,colback=black!75!white,colframe=black
      IfBooleanTF#1textcolorredttfamilybfseries > %
      lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^


      which appears to be similar to what I desire. However, I get numerous errors:



      - Undefined control sequence
      - You can't use `macro parameter character #' in horizontal mode.


      This is the header code so far with the above included:



      documentclass[oneside,11pt]book
      usepackage[T1]fontenc
      usepackage[letterpaper, margin=1in]geometry
      usepackageamsmath,amsthm,amssymb
      usepackagemathpazo
      usepackagelistings
      usepackageminted
      usepackagexcolor
      usepackagetcolorbox
      usepackageetoolbox
      usepackagetcolorbox
      tcbuselibrarylistings, minted, skins

      BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
      AfterEndEnvironmentmintedendtcolorboxvspace2mm%

      usepackagenewverbs
      definecolorinlineRGB187,57,82
      newverbcommandcverbcolorinline
      usemintedstyleparaiso-dark

      definecolorbgRGB22,43,58
      setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

      DeclareTotalTCBoxcommandbox s v
      verbatim,colupper=white,colback=black!75!white,colframe=black
      IfBooleanTF#1textcolorredttfamilybfseries > %
      lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

      setlengthparindent0pt
      titleHugetextbfProgramming in C, Java, & More
      authorRichard Robinson, B.Eng. Cand.

      begindocument









      share|improve this question













      I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background.



      I found this in the Tcolorbox manual:



      DeclareTotalTCBoxcommandbox s v 
      verbatim,colupper=white,colback=black!75!white,colframe=black
      IfBooleanTF#1textcolorredttfamilybfseries > %
      lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^


      which appears to be similar to what I desire. However, I get numerous errors:



      - Undefined control sequence
      - You can't use `macro parameter character #' in horizontal mode.


      This is the header code so far with the above included:



      documentclass[oneside,11pt]book
      usepackage[T1]fontenc
      usepackage[letterpaper, margin=1in]geometry
      usepackageamsmath,amsthm,amssymb
      usepackagemathpazo
      usepackagelistings
      usepackageminted
      usepackagexcolor
      usepackagetcolorbox
      usepackageetoolbox
      usepackagetcolorbox
      tcbuselibrarylistings, minted, skins

      BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
      AfterEndEnvironmentmintedendtcolorboxvspace2mm%

      usepackagenewverbs
      definecolorinlineRGB187,57,82
      newverbcommandcverbcolorinline
      usemintedstyleparaiso-dark

      definecolorbgRGB22,43,58
      setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

      DeclareTotalTCBoxcommandbox s v
      verbatim,colupper=white,colback=black!75!white,colframe=black
      IfBooleanTF#1textcolorredttfamilybfseries > %
      lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

      setlengthparindent0pt
      titleHugetextbfProgramming in C, Java, & More
      authorRichard Robinson, B.Eng. Cand.

      begindocument






      color tcolorbox verbatim minted code






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 30 mins ago









      Richard Robinson

      776




      776




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote













          Use library xparse.



          % arara: pdflatex: shell: 1
          documentclass[oneside,11pt]book
          usepackage[T1]fontenc
          usepackage[letterpaper, margin=1in]geometry
          usepackageamsmath,amsthm,amssymb
          usepackagemathpazo
          usepackagelistings
          usepackageminted
          usepackagexcolor
          usepackagetcolorbox
          usepackageetoolbox
          usepackagetcolorbox
          tcbuselibrarylistings, minted, skins, xparse

          BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
          AfterEndEnvironmentmintedendtcolorboxvspace2mm%

          usepackagenewverbs
          definecolorinlineRGB187,57,82
          newverbcommandcverbcolorinline
          usemintedstyleparaiso-dark

          definecolorbgRGB22,43,58
          setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

          DeclareTotalTCBoxcommandbox s v
          verbatim,colupper=red!75!black,colback=lightgray, enhanced, frame hidden, arc=2pt
          IfBooleanTF#1textcolorredttfamilybfseries > %
          lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

          setlengthparindent0pt
          titleHugetextbfProgramming in C, Java, & More
          authorRichard Robinson, B.Eng. Cand.

          begindocument

          commandboxABC

          enddocument





          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f452249%2fhow-do-i-set-a-background-color-and-font-for-inline-verb-text%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote













            Use library xparse.



            % arara: pdflatex: shell: 1
            documentclass[oneside,11pt]book
            usepackage[T1]fontenc
            usepackage[letterpaper, margin=1in]geometry
            usepackageamsmath,amsthm,amssymb
            usepackagemathpazo
            usepackagelistings
            usepackageminted
            usepackagexcolor
            usepackagetcolorbox
            usepackageetoolbox
            usepackagetcolorbox
            tcbuselibrarylistings, minted, skins, xparse

            BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
            AfterEndEnvironmentmintedendtcolorboxvspace2mm%

            usepackagenewverbs
            definecolorinlineRGB187,57,82
            newverbcommandcverbcolorinline
            usemintedstyleparaiso-dark

            definecolorbgRGB22,43,58
            setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

            DeclareTotalTCBoxcommandbox s v
            verbatim,colupper=red!75!black,colback=lightgray, enhanced, frame hidden, arc=2pt
            IfBooleanTF#1textcolorredttfamilybfseries > %
            lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

            setlengthparindent0pt
            titleHugetextbfProgramming in C, Java, & More
            authorRichard Robinson, B.Eng. Cand.

            begindocument

            commandboxABC

            enddocument





            share|improve this answer
























              up vote
              4
              down vote













              Use library xparse.



              % arara: pdflatex: shell: 1
              documentclass[oneside,11pt]book
              usepackage[T1]fontenc
              usepackage[letterpaper, margin=1in]geometry
              usepackageamsmath,amsthm,amssymb
              usepackagemathpazo
              usepackagelistings
              usepackageminted
              usepackagexcolor
              usepackagetcolorbox
              usepackageetoolbox
              usepackagetcolorbox
              tcbuselibrarylistings, minted, skins, xparse

              BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
              AfterEndEnvironmentmintedendtcolorboxvspace2mm%

              usepackagenewverbs
              definecolorinlineRGB187,57,82
              newverbcommandcverbcolorinline
              usemintedstyleparaiso-dark

              definecolorbgRGB22,43,58
              setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

              DeclareTotalTCBoxcommandbox s v
              verbatim,colupper=red!75!black,colback=lightgray, enhanced, frame hidden, arc=2pt
              IfBooleanTF#1textcolorredttfamilybfseries > %
              lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

              setlengthparindent0pt
              titleHugetextbfProgramming in C, Java, & More
              authorRichard Robinson, B.Eng. Cand.

              begindocument

              commandboxABC

              enddocument





              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                Use library xparse.



                % arara: pdflatex: shell: 1
                documentclass[oneside,11pt]book
                usepackage[T1]fontenc
                usepackage[letterpaper, margin=1in]geometry
                usepackageamsmath,amsthm,amssymb
                usepackagemathpazo
                usepackagelistings
                usepackageminted
                usepackagexcolor
                usepackagetcolorbox
                usepackageetoolbox
                usepackagetcolorbox
                tcbuselibrarylistings, minted, skins, xparse

                BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
                AfterEndEnvironmentmintedendtcolorboxvspace2mm%

                usepackagenewverbs
                definecolorinlineRGB187,57,82
                newverbcommandcverbcolorinline
                usemintedstyleparaiso-dark

                definecolorbgRGB22,43,58
                setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

                DeclareTotalTCBoxcommandbox s v
                verbatim,colupper=red!75!black,colback=lightgray, enhanced, frame hidden, arc=2pt
                IfBooleanTF#1textcolorredttfamilybfseries > %
                lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

                setlengthparindent0pt
                titleHugetextbfProgramming in C, Java, & More
                authorRichard Robinson, B.Eng. Cand.

                begindocument

                commandboxABC

                enddocument





                share|improve this answer












                Use library xparse.



                % arara: pdflatex: shell: 1
                documentclass[oneside,11pt]book
                usepackage[T1]fontenc
                usepackage[letterpaper, margin=1in]geometry
                usepackageamsmath,amsthm,amssymb
                usepackagemathpazo
                usepackagelistings
                usepackageminted
                usepackagexcolor
                usepackagetcolorbox
                usepackageetoolbox
                usepackagetcolorbox
                tcbuselibrarylistings, minted, skins, xparse

                BeforeBeginEnvironmentmintedvspace2mmbegintcolorbox[colback=bg, colframe=bg, arc=1.2pt]%
                AfterEndEnvironmentmintedendtcolorboxvspace2mm%

                usepackagenewverbs
                definecolorinlineRGB187,57,82
                newverbcommandcverbcolorinline
                usemintedstyleparaiso-dark

                definecolorbgRGB22,43,58
                setmintedfontfamily=fdm, fontsize=footnotesize, gobble=4, baselinestretch=1.2

                DeclareTotalTCBoxcommandbox s v
                verbatim,colupper=red!75!black,colback=lightgray, enhanced, frame hidden, arc=2pt
                IfBooleanTF#1textcolorredttfamilybfseries > %
                lstinline[language=command.com,keywordstyle=colorblue!35!whitebfseries]^#2^

                setlengthparindent0pt
                titleHugetextbfProgramming in C, Java, & More
                authorRichard Robinson, B.Eng. Cand.

                begindocument

                commandboxABC

                enddocument






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 24 mins ago









                TeXnician

                21.6k52882




                21.6k52882



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452249%2fhow-do-i-set-a-background-color-and-font-for-inline-verb-text%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    List of Gilmore Girls characters

                    What does second last employer means? [closed]

                    One-line joke