How to scale a verbatim environment on a minipage?












1















I have a plain vebatim environment. Questions 1, 2 are too complex to understand. I would simply like to align in the center and rescale the ascii art logo.
MWE:



 documentclass{article}
usepackage{amsmath}
usepackage{lipsum, caption}

begin{document}
begin{figure}[!b]
centering
begin{minipage}[b]{0.5linewidth}
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo1}
label{interpt1}
end{minipage}hspace*{5mm}
begin{minipage}[b]{0.3linewidth}
centering
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo2}
label{interpt2}
end{minipage}
end{figure}
end{document}


photo



The minibox is simple to understand so i used it.










share|improve this question

























  • The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

    – marmot
    2 hours ago











  • they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

    – ItsmeJulian
    2 hours ago
















1















I have a plain vebatim environment. Questions 1, 2 are too complex to understand. I would simply like to align in the center and rescale the ascii art logo.
MWE:



 documentclass{article}
usepackage{amsmath}
usepackage{lipsum, caption}

begin{document}
begin{figure}[!b]
centering
begin{minipage}[b]{0.5linewidth}
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo1}
label{interpt1}
end{minipage}hspace*{5mm}
begin{minipage}[b]{0.3linewidth}
centering
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo2}
label{interpt2}
end{minipage}
end{figure}
end{document}


photo



The minibox is simple to understand so i used it.










share|improve this question

























  • The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

    – marmot
    2 hours ago











  • they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

    – ItsmeJulian
    2 hours ago














1












1








1








I have a plain vebatim environment. Questions 1, 2 are too complex to understand. I would simply like to align in the center and rescale the ascii art logo.
MWE:



 documentclass{article}
usepackage{amsmath}
usepackage{lipsum, caption}

begin{document}
begin{figure}[!b]
centering
begin{minipage}[b]{0.5linewidth}
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo1}
label{interpt1}
end{minipage}hspace*{5mm}
begin{minipage}[b]{0.3linewidth}
centering
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo2}
label{interpt2}
end{minipage}
end{figure}
end{document}


photo



The minibox is simple to understand so i used it.










share|improve this question
















I have a plain vebatim environment. Questions 1, 2 are too complex to understand. I would simply like to align in the center and rescale the ascii art logo.
MWE:



 documentclass{article}
usepackage{amsmath}
usepackage{lipsum, caption}

begin{document}
begin{figure}[!b]
centering
begin{minipage}[b]{0.5linewidth}
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo1}
label{interpt1}
end{minipage}hspace*{5mm}
begin{minipage}[b]{0.3linewidth}
centering
begin{verbatim}
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/

end{verbatim}
captionof{figure}{logo2}
label{interpt2}
end{minipage}
end{figure}
end{document}


photo



The minibox is simple to understand so i used it.







minipage verbatim scale






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago







ItsmeJulian

















asked 2 hours ago









ItsmeJulianItsmeJulian

252212




252212













  • The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

    – marmot
    2 hours ago











  • they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

    – ItsmeJulian
    2 hours ago



















  • The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

    – marmot
    2 hours ago











  • they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

    – ItsmeJulian
    2 hours ago

















The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

– marmot
2 hours ago





The linked answers seem to provide a solution and you forgot to put usepackage{caption}.

– marmot
2 hours ago













they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

– ItsmeJulian
2 hours ago





they entangle things, i do not have userdefined env. and no special symbols. its hard to see (so for other newbies)

– ItsmeJulian
2 hours ago










2 Answers
2






active

oldest

votes


















3














verbatimbox can help.



documentclass{article}
usepackage{amsmath,verbatimbox}
usepackage{lipsum, caption}
usepackage[showframe,pass]{geometry}
begin{document}
begin{figure}[ht]
centering smallskip
begin{verbbox}[small]
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/
end{verbbox}
begin{minipage}[b]{0.5linewidth}
theverbbox
captionof{figure}{logo1}
label{interpt1}
end{minipage}hspace*{5mm}
begin{minipage}[b]{0.3linewidth}
centering
begin{verbbox}[tiny]
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/
end{verbbox}
theverbbox
captionof{figure}{logo2}
label{interpt2}
end{minipage}
end{figure}
begin{figure}[ht]
centering
begin{verbbox}[LARGE]
__ ____ _ __ ________
/ |/ (_)__ (_) / / __/ __/
/ /|_/ / / _ / / /___ _
/_/ /_/_/_//_/_/____/___/___/
end{verbbox}
theverbbox
caption{Here is my scaled verbatim}
end{figure}
end{document}


enter image description here






share|improve this answer































    0














    Using your second link I got these results
    enter image description here



    documentclass[9pt]{article}
    usepackage{amsmath,adjustbox,fancyvrb,caption}
    usepackage{lipsum}


    newenvironment{myverb}{%
    VerbatimEnvironment
    begin{adjustbox}{max width=linewidth}
    begin{BVerbatim}
    }{
    end{BVerbatim}
    end{adjustbox}
    }

    begin{document}

    begin{figure}[!h]centering Huge % huge LARGE Large large these are case sensitive simply move the % comment to the right for smaller
    begin{myverb}
    __ ____ _ __ ________
    / |/ (_)__ (_) / / __/ __/
    / /|_/ / / _ / / /___ _
    /_/ /_/_/_//_/_/____/___/___/
    end{myverb}
    captionof{figure}{Huge 1}
    label{interpt2}
    end{figure}

    vspace{0.5cm}

    begin{figure}[!h]centering small footnotesize scriptsize tiny %these are case sensitive simply move the % comment to the left for larger
    begin{myverb}
    __ ____ _ __ ________
    / |/ (_)__ (_) / / __/ __/
    / /|_/ / / _ / / /___ _
    /_/ /_/_/_//_/_/____/___/___/
    end{myverb}
    captionof{figure}{Tiny 2}
    label{interpt2}
    end{figure}

    end{document}





    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%2f488327%2fhow-to-scale-a-verbatim-environment-on-a-minipage%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      verbatimbox can help.



      documentclass{article}
      usepackage{amsmath,verbatimbox}
      usepackage{lipsum, caption}
      usepackage[showframe,pass]{geometry}
      begin{document}
      begin{figure}[ht]
      centering smallskip
      begin{verbbox}[small]
      __ ____ _ __ ________
      / |/ (_)__ (_) / / __/ __/
      / /|_/ / / _ / / /___ _
      /_/ /_/_/_//_/_/____/___/___/
      end{verbbox}
      begin{minipage}[b]{0.5linewidth}
      theverbbox
      captionof{figure}{logo1}
      label{interpt1}
      end{minipage}hspace*{5mm}
      begin{minipage}[b]{0.3linewidth}
      centering
      begin{verbbox}[tiny]
      __ ____ _ __ ________
      / |/ (_)__ (_) / / __/ __/
      / /|_/ / / _ / / /___ _
      /_/ /_/_/_//_/_/____/___/___/
      end{verbbox}
      theverbbox
      captionof{figure}{logo2}
      label{interpt2}
      end{minipage}
      end{figure}
      begin{figure}[ht]
      centering
      begin{verbbox}[LARGE]
      __ ____ _ __ ________
      / |/ (_)__ (_) / / __/ __/
      / /|_/ / / _ / / /___ _
      /_/ /_/_/_//_/_/____/___/___/
      end{verbbox}
      theverbbox
      caption{Here is my scaled verbatim}
      end{figure}
      end{document}


      enter image description here






      share|improve this answer




























        3














        verbatimbox can help.



        documentclass{article}
        usepackage{amsmath,verbatimbox}
        usepackage{lipsum, caption}
        usepackage[showframe,pass]{geometry}
        begin{document}
        begin{figure}[ht]
        centering smallskip
        begin{verbbox}[small]
        __ ____ _ __ ________
        / |/ (_)__ (_) / / __/ __/
        / /|_/ / / _ / / /___ _
        /_/ /_/_/_//_/_/____/___/___/
        end{verbbox}
        begin{minipage}[b]{0.5linewidth}
        theverbbox
        captionof{figure}{logo1}
        label{interpt1}
        end{minipage}hspace*{5mm}
        begin{minipage}[b]{0.3linewidth}
        centering
        begin{verbbox}[tiny]
        __ ____ _ __ ________
        / |/ (_)__ (_) / / __/ __/
        / /|_/ / / _ / / /___ _
        /_/ /_/_/_//_/_/____/___/___/
        end{verbbox}
        theverbbox
        captionof{figure}{logo2}
        label{interpt2}
        end{minipage}
        end{figure}
        begin{figure}[ht]
        centering
        begin{verbbox}[LARGE]
        __ ____ _ __ ________
        / |/ (_)__ (_) / / __/ __/
        / /|_/ / / _ / / /___ _
        /_/ /_/_/_//_/_/____/___/___/
        end{verbbox}
        theverbbox
        caption{Here is my scaled verbatim}
        end{figure}
        end{document}


        enter image description here






        share|improve this answer


























          3












          3








          3







          verbatimbox can help.



          documentclass{article}
          usepackage{amsmath,verbatimbox}
          usepackage{lipsum, caption}
          usepackage[showframe,pass]{geometry}
          begin{document}
          begin{figure}[ht]
          centering smallskip
          begin{verbbox}[small]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          begin{minipage}[b]{0.5linewidth}
          theverbbox
          captionof{figure}{logo1}
          label{interpt1}
          end{minipage}hspace*{5mm}
          begin{minipage}[b]{0.3linewidth}
          centering
          begin{verbbox}[tiny]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          theverbbox
          captionof{figure}{logo2}
          label{interpt2}
          end{minipage}
          end{figure}
          begin{figure}[ht]
          centering
          begin{verbbox}[LARGE]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          theverbbox
          caption{Here is my scaled verbatim}
          end{figure}
          end{document}


          enter image description here






          share|improve this answer













          verbatimbox can help.



          documentclass{article}
          usepackage{amsmath,verbatimbox}
          usepackage{lipsum, caption}
          usepackage[showframe,pass]{geometry}
          begin{document}
          begin{figure}[ht]
          centering smallskip
          begin{verbbox}[small]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          begin{minipage}[b]{0.5linewidth}
          theverbbox
          captionof{figure}{logo1}
          label{interpt1}
          end{minipage}hspace*{5mm}
          begin{minipage}[b]{0.3linewidth}
          centering
          begin{verbbox}[tiny]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          theverbbox
          captionof{figure}{logo2}
          label{interpt2}
          end{minipage}
          end{figure}
          begin{figure}[ht]
          centering
          begin{verbbox}[LARGE]
          __ ____ _ __ ________
          / |/ (_)__ (_) / / __/ __/
          / /|_/ / / _ / / /___ _
          /_/ /_/_/_//_/_/____/___/___/
          end{verbbox}
          theverbbox
          caption{Here is my scaled verbatim}
          end{figure}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Steven B. SegletesSteven B. Segletes

          163k9209421




          163k9209421























              0














              Using your second link I got these results
              enter image description here



              documentclass[9pt]{article}
              usepackage{amsmath,adjustbox,fancyvrb,caption}
              usepackage{lipsum}


              newenvironment{myverb}{%
              VerbatimEnvironment
              begin{adjustbox}{max width=linewidth}
              begin{BVerbatim}
              }{
              end{BVerbatim}
              end{adjustbox}
              }

              begin{document}

              begin{figure}[!h]centering Huge % huge LARGE Large large these are case sensitive simply move the % comment to the right for smaller
              begin{myverb}
              __ ____ _ __ ________
              / |/ (_)__ (_) / / __/ __/
              / /|_/ / / _ / / /___ _
              /_/ /_/_/_//_/_/____/___/___/
              end{myverb}
              captionof{figure}{Huge 1}
              label{interpt2}
              end{figure}

              vspace{0.5cm}

              begin{figure}[!h]centering small footnotesize scriptsize tiny %these are case sensitive simply move the % comment to the left for larger
              begin{myverb}
              __ ____ _ __ ________
              / |/ (_)__ (_) / / __/ __/
              / /|_/ / / _ / / /___ _
              /_/ /_/_/_//_/_/____/___/___/
              end{myverb}
              captionof{figure}{Tiny 2}
              label{interpt2}
              end{figure}

              end{document}





              share|improve this answer




























                0














                Using your second link I got these results
                enter image description here



                documentclass[9pt]{article}
                usepackage{amsmath,adjustbox,fancyvrb,caption}
                usepackage{lipsum}


                newenvironment{myverb}{%
                VerbatimEnvironment
                begin{adjustbox}{max width=linewidth}
                begin{BVerbatim}
                }{
                end{BVerbatim}
                end{adjustbox}
                }

                begin{document}

                begin{figure}[!h]centering Huge % huge LARGE Large large these are case sensitive simply move the % comment to the right for smaller
                begin{myverb}
                __ ____ _ __ ________
                / |/ (_)__ (_) / / __/ __/
                / /|_/ / / _ / / /___ _
                /_/ /_/_/_//_/_/____/___/___/
                end{myverb}
                captionof{figure}{Huge 1}
                label{interpt2}
                end{figure}

                vspace{0.5cm}

                begin{figure}[!h]centering small footnotesize scriptsize tiny %these are case sensitive simply move the % comment to the left for larger
                begin{myverb}
                __ ____ _ __ ________
                / |/ (_)__ (_) / / __/ __/
                / /|_/ / / _ / / /___ _
                /_/ /_/_/_//_/_/____/___/___/
                end{myverb}
                captionof{figure}{Tiny 2}
                label{interpt2}
                end{figure}

                end{document}





                share|improve this answer


























                  0












                  0








                  0







                  Using your second link I got these results
                  enter image description here



                  documentclass[9pt]{article}
                  usepackage{amsmath,adjustbox,fancyvrb,caption}
                  usepackage{lipsum}


                  newenvironment{myverb}{%
                  VerbatimEnvironment
                  begin{adjustbox}{max width=linewidth}
                  begin{BVerbatim}
                  }{
                  end{BVerbatim}
                  end{adjustbox}
                  }

                  begin{document}

                  begin{figure}[!h]centering Huge % huge LARGE Large large these are case sensitive simply move the % comment to the right for smaller
                  begin{myverb}
                  __ ____ _ __ ________
                  / |/ (_)__ (_) / / __/ __/
                  / /|_/ / / _ / / /___ _
                  /_/ /_/_/_//_/_/____/___/___/
                  end{myverb}
                  captionof{figure}{Huge 1}
                  label{interpt2}
                  end{figure}

                  vspace{0.5cm}

                  begin{figure}[!h]centering small footnotesize scriptsize tiny %these are case sensitive simply move the % comment to the left for larger
                  begin{myverb}
                  __ ____ _ __ ________
                  / |/ (_)__ (_) / / __/ __/
                  / /|_/ / / _ / / /___ _
                  /_/ /_/_/_//_/_/____/___/___/
                  end{myverb}
                  captionof{figure}{Tiny 2}
                  label{interpt2}
                  end{figure}

                  end{document}





                  share|improve this answer













                  Using your second link I got these results
                  enter image description here



                  documentclass[9pt]{article}
                  usepackage{amsmath,adjustbox,fancyvrb,caption}
                  usepackage{lipsum}


                  newenvironment{myverb}{%
                  VerbatimEnvironment
                  begin{adjustbox}{max width=linewidth}
                  begin{BVerbatim}
                  }{
                  end{BVerbatim}
                  end{adjustbox}
                  }

                  begin{document}

                  begin{figure}[!h]centering Huge % huge LARGE Large large these are case sensitive simply move the % comment to the right for smaller
                  begin{myverb}
                  __ ____ _ __ ________
                  / |/ (_)__ (_) / / __/ __/
                  / /|_/ / / _ / / /___ _
                  /_/ /_/_/_//_/_/____/___/___/
                  end{myverb}
                  captionof{figure}{Huge 1}
                  label{interpt2}
                  end{figure}

                  vspace{0.5cm}

                  begin{figure}[!h]centering small footnotesize scriptsize tiny %these are case sensitive simply move the % comment to the left for larger
                  begin{myverb}
                  __ ____ _ __ ________
                  / |/ (_)__ (_) / / __/ __/
                  / /|_/ / / _ / / /___ _
                  /_/ /_/_/_//_/_/____/___/___/
                  end{myverb}
                  captionof{figure}{Tiny 2}
                  label{interpt2}
                  end{figure}

                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 1 hour ago









                  KJOKJO

                  4,2251324




                  4,2251324






























                      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%2f488327%2fhow-to-scale-a-verbatim-environment-on-a-minipage%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

                      What other Star Trek series did the main TNG cast show up in?

                      Berlina muro

                      Berlina aerponto