Custom LaTeX logo problem












5















I have been trying to create a KaTeX logo for a paper that I'm writing, but it seems to break when I combine the following packages and try to put the logo in the title.



documentclass[a4paper, 12pt]{article}

usepackage{hyperref}

% define KaTeX logo
makeatletter
DeclareRobustCommand{KaTeX}{%
Kkern -.19em
{sbox z@ Tvbox toht z@ {hbox{%
check@mathfonts
fontsizesf@sizez@
selectfont A}%
vss}%
}kern -.15em
TeX}
makeatother

begin{document}
section{KaTeX}
end{document}


I get the following errors:



19: Argument of select@group has an extra }. [ section{KaTeX}]
19: Paragraph ended before select@group was complete. [ section{KaTeX}]
19: Argument of select@group has an extra }. [ section{KaTeX}]
19: Paragraph ended before select@group was complete. [ section{KaTeX}]
19: Argument of select@group has an extra }. [ section{KaTeX}]
19: Paragraph ended before select@group was complete. [ section{KaTeX}]
19: Argument of select@group has an extra }. [ section{KaTeX}]
19: Paragraph ended before select@group was complete. [ section{KaTeX}]
19: Paragraph ended before HyPsd@@ProtectSpacesFi was complete. [ section{KaTeX}]
19: Missing { inserted. [ section{KaTeX}]
19: Extra }, or forgotten endgroup. [ section{KaTeX}]
19: Extra }, or forgotten endgroup. [ section{KaTeX}]
19: Infinite glue shrinkage found on current page. [ section{KaTeX}]
19: Extra }, or forgotten endgroup. [ section{KaTeX}]
19: Use of HyPsd@RemoveMask doesn't match its definition. [ section{KaTeX}]
19: Undefined control sequence. [ section{KaTeX}]
19: Paragraph ended before HyPsd@RemoveBraces was complete. [ section{KaTeX}]
19: Extra }, or forgotten endgroup. [ section{KaTeX}]
19: Argument of HyPsd@CheckCatcodes has an extra }. [ section{KaTeX}]
19: Paragraph ended before HyPsd@CheckCatcodes was complete. [ section{KaTeX}]


Thanks in advance!










share|improve this question





























    5















    I have been trying to create a KaTeX logo for a paper that I'm writing, but it seems to break when I combine the following packages and try to put the logo in the title.



    documentclass[a4paper, 12pt]{article}

    usepackage{hyperref}

    % define KaTeX logo
    makeatletter
    DeclareRobustCommand{KaTeX}{%
    Kkern -.19em
    {sbox z@ Tvbox toht z@ {hbox{%
    check@mathfonts
    fontsizesf@sizez@
    selectfont A}%
    vss}%
    }kern -.15em
    TeX}
    makeatother

    begin{document}
    section{KaTeX}
    end{document}


    I get the following errors:



    19: Argument of select@group has an extra }. [ section{KaTeX}]
    19: Paragraph ended before select@group was complete. [ section{KaTeX}]
    19: Argument of select@group has an extra }. [ section{KaTeX}]
    19: Paragraph ended before select@group was complete. [ section{KaTeX}]
    19: Argument of select@group has an extra }. [ section{KaTeX}]
    19: Paragraph ended before select@group was complete. [ section{KaTeX}]
    19: Argument of select@group has an extra }. [ section{KaTeX}]
    19: Paragraph ended before select@group was complete. [ section{KaTeX}]
    19: Paragraph ended before HyPsd@@ProtectSpacesFi was complete. [ section{KaTeX}]
    19: Missing { inserted. [ section{KaTeX}]
    19: Extra }, or forgotten endgroup. [ section{KaTeX}]
    19: Extra }, or forgotten endgroup. [ section{KaTeX}]
    19: Infinite glue shrinkage found on current page. [ section{KaTeX}]
    19: Extra }, or forgotten endgroup. [ section{KaTeX}]
    19: Use of HyPsd@RemoveMask doesn't match its definition. [ section{KaTeX}]
    19: Undefined control sequence. [ section{KaTeX}]
    19: Paragraph ended before HyPsd@RemoveBraces was complete. [ section{KaTeX}]
    19: Extra }, or forgotten endgroup. [ section{KaTeX}]
    19: Argument of HyPsd@CheckCatcodes has an extra }. [ section{KaTeX}]
    19: Paragraph ended before HyPsd@CheckCatcodes was complete. [ section{KaTeX}]


    Thanks in advance!










    share|improve this question



























      5












      5








      5


      0






      I have been trying to create a KaTeX logo for a paper that I'm writing, but it seems to break when I combine the following packages and try to put the logo in the title.



      documentclass[a4paper, 12pt]{article}

      usepackage{hyperref}

      % define KaTeX logo
      makeatletter
      DeclareRobustCommand{KaTeX}{%
      Kkern -.19em
      {sbox z@ Tvbox toht z@ {hbox{%
      check@mathfonts
      fontsizesf@sizez@
      selectfont A}%
      vss}%
      }kern -.15em
      TeX}
      makeatother

      begin{document}
      section{KaTeX}
      end{document}


      I get the following errors:



      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@@ProtectSpacesFi was complete. [ section{KaTeX}]
      19: Missing { inserted. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Infinite glue shrinkage found on current page. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Use of HyPsd@RemoveMask doesn't match its definition. [ section{KaTeX}]
      19: Undefined control sequence. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@RemoveBraces was complete. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Argument of HyPsd@CheckCatcodes has an extra }. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@CheckCatcodes was complete. [ section{KaTeX}]


      Thanks in advance!










      share|improve this question
















      I have been trying to create a KaTeX logo for a paper that I'm writing, but it seems to break when I combine the following packages and try to put the logo in the title.



      documentclass[a4paper, 12pt]{article}

      usepackage{hyperref}

      % define KaTeX logo
      makeatletter
      DeclareRobustCommand{KaTeX}{%
      Kkern -.19em
      {sbox z@ Tvbox toht z@ {hbox{%
      check@mathfonts
      fontsizesf@sizez@
      selectfont A}%
      vss}%
      }kern -.15em
      TeX}
      makeatother

      begin{document}
      section{KaTeX}
      end{document}


      I get the following errors:



      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Argument of select@group has an extra }. [ section{KaTeX}]
      19: Paragraph ended before select@group was complete. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@@ProtectSpacesFi was complete. [ section{KaTeX}]
      19: Missing { inserted. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Infinite glue shrinkage found on current page. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Use of HyPsd@RemoveMask doesn't match its definition. [ section{KaTeX}]
      19: Undefined control sequence. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@RemoveBraces was complete. [ section{KaTeX}]
      19: Extra }, or forgotten endgroup. [ section{KaTeX}]
      19: Argument of HyPsd@CheckCatcodes has an extra }. [ section{KaTeX}]
      19: Paragraph ended before HyPsd@CheckCatcodes was complete. [ section{KaTeX}]


      Thanks in advance!







      hyperref logos






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 2 at 13:15









      user36296

      1




      1










      asked Feb 2 at 12:41









      Tomáš SlámaTomáš Sláma

      1158




      1158






















          1 Answer
          1






          active

          oldest

          votes


















          7














          The problem is that section titles are not only displayed in the pdf, but are also used for bookmarks etc. which don't accept special characters and complicate markup.



          You can workaround the problem by using texorpdfstring{<for pdf>}{<for bookmarks>} to giving an alternative text which will be used for bookmarks:



          documentclass[a4paper, 12pt]{article}

          usepackage{hyperref}

          % define KaTeX logo
          makeatletter
          DeclareRobustCommand{KaTeX}{%
          Kkern -.19em
          {sbox z@ Tvbox toht z@ {hbox{%
          check@mathfonts
          fontsizesf@sizez@
          selectfont A}%
          vss}%
          }kern -.15em
          TeX}
          makeatother

          begin{document}
          section{texorpdfstring{KaTeX}{KaTeX}}
          end{document}





          share|improve this answer





















          • 1





            @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

            – user36296
            Feb 2 at 13:02













          • That makes sense. Thanks for the great explanation!

            – Tomáš Sláma
            Feb 2 at 13:10














          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%2f473024%2fcustom-latex-logo-problem%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









          7














          The problem is that section titles are not only displayed in the pdf, but are also used for bookmarks etc. which don't accept special characters and complicate markup.



          You can workaround the problem by using texorpdfstring{<for pdf>}{<for bookmarks>} to giving an alternative text which will be used for bookmarks:



          documentclass[a4paper, 12pt]{article}

          usepackage{hyperref}

          % define KaTeX logo
          makeatletter
          DeclareRobustCommand{KaTeX}{%
          Kkern -.19em
          {sbox z@ Tvbox toht z@ {hbox{%
          check@mathfonts
          fontsizesf@sizez@
          selectfont A}%
          vss}%
          }kern -.15em
          TeX}
          makeatother

          begin{document}
          section{texorpdfstring{KaTeX}{KaTeX}}
          end{document}





          share|improve this answer





















          • 1





            @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

            – user36296
            Feb 2 at 13:02













          • That makes sense. Thanks for the great explanation!

            – Tomáš Sláma
            Feb 2 at 13:10


















          7














          The problem is that section titles are not only displayed in the pdf, but are also used for bookmarks etc. which don't accept special characters and complicate markup.



          You can workaround the problem by using texorpdfstring{<for pdf>}{<for bookmarks>} to giving an alternative text which will be used for bookmarks:



          documentclass[a4paper, 12pt]{article}

          usepackage{hyperref}

          % define KaTeX logo
          makeatletter
          DeclareRobustCommand{KaTeX}{%
          Kkern -.19em
          {sbox z@ Tvbox toht z@ {hbox{%
          check@mathfonts
          fontsizesf@sizez@
          selectfont A}%
          vss}%
          }kern -.15em
          TeX}
          makeatother

          begin{document}
          section{texorpdfstring{KaTeX}{KaTeX}}
          end{document}





          share|improve this answer





















          • 1





            @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

            – user36296
            Feb 2 at 13:02













          • That makes sense. Thanks for the great explanation!

            – Tomáš Sláma
            Feb 2 at 13:10
















          7












          7








          7







          The problem is that section titles are not only displayed in the pdf, but are also used for bookmarks etc. which don't accept special characters and complicate markup.



          You can workaround the problem by using texorpdfstring{<for pdf>}{<for bookmarks>} to giving an alternative text which will be used for bookmarks:



          documentclass[a4paper, 12pt]{article}

          usepackage{hyperref}

          % define KaTeX logo
          makeatletter
          DeclareRobustCommand{KaTeX}{%
          Kkern -.19em
          {sbox z@ Tvbox toht z@ {hbox{%
          check@mathfonts
          fontsizesf@sizez@
          selectfont A}%
          vss}%
          }kern -.15em
          TeX}
          makeatother

          begin{document}
          section{texorpdfstring{KaTeX}{KaTeX}}
          end{document}





          share|improve this answer















          The problem is that section titles are not only displayed in the pdf, but are also used for bookmarks etc. which don't accept special characters and complicate markup.



          You can workaround the problem by using texorpdfstring{<for pdf>}{<for bookmarks>} to giving an alternative text which will be used for bookmarks:



          documentclass[a4paper, 12pt]{article}

          usepackage{hyperref}

          % define KaTeX logo
          makeatletter
          DeclareRobustCommand{KaTeX}{%
          Kkern -.19em
          {sbox z@ Tvbox toht z@ {hbox{%
          check@mathfonts
          fontsizesf@sizez@
          selectfont A}%
          vss}%
          }kern -.15em
          TeX}
          makeatother

          begin{document}
          section{texorpdfstring{KaTeX}{KaTeX}}
          end{document}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 2 at 13:21

























          answered Feb 2 at 12:52









          user36296user36296

          1




          1








          • 1





            @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

            – user36296
            Feb 2 at 13:02













          • That makes sense. Thanks for the great explanation!

            – Tomáš Sláma
            Feb 2 at 13:10
















          • 1





            @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

            – user36296
            Feb 2 at 13:02













          • That makes sense. Thanks for the great explanation!

            – Tomáš Sláma
            Feb 2 at 13:10










          1




          1





          @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

          – user36296
          Feb 2 at 13:02







          @TomášSláma LaTeX works because hyperref redefines the macro if it is used in bookmarks etc to avoid this problem.

          – user36296
          Feb 2 at 13:02















          That makes sense. Thanks for the great explanation!

          – Tomáš Sláma
          Feb 2 at 13:10







          That makes sense. Thanks for the great explanation!

          – Tomáš Sláma
          Feb 2 at 13:10




















          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%2f473024%2fcustom-latex-logo-problem%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

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith