how to align item in enumeration list that has an image so it is symmetrical











up vote
1
down vote

favorite












I'd like to add a small tiny image on the same line as an item entry, something like



item href{index.htm}{some other link} includegraphics[...]


But having hard time getting it to look the way I want it. Here is what I do now



documentclass[12pt]{article}

usepackage{graphicx}
usepackage{calc}
usepackage{enumitem}

usepackage{hyperref}

begin{document}

begin{enumerate}
item href{index.htm}{some link}
item href{index.htm}{some link}
item href{index.htm}{some other link}
includegraphics[width=2cm]{example-image-a}
item href{index.html}{another link}
item href{index.htm}{some link}
end{enumerate}

end{document}


And this is how it looks like when compiled



Mathematica graphics



What I want is like this



Mathematica graphics



I tried using a small table, but that did not help



begin{enumerate}
item href{index.htm}{some link}
item href{index.htm}{some link}
item begin{tabular}{cc}
href{index.htm}{some other link}&
includegraphics[width=2cm]{example-image-a}
end{tabular}
item href{index.html}{another link}
item href{index.htm}{some link}
end{enumerate}


It got a little closer to what I want, but not exactly



Mathematica graphics



What is the correct way to do this in Latex to obtain what I want as shown above?



TL 2018










share|improve this question


























    up vote
    1
    down vote

    favorite












    I'd like to add a small tiny image on the same line as an item entry, something like



    item href{index.htm}{some other link} includegraphics[...]


    But having hard time getting it to look the way I want it. Here is what I do now



    documentclass[12pt]{article}

    usepackage{graphicx}
    usepackage{calc}
    usepackage{enumitem}

    usepackage{hyperref}

    begin{document}

    begin{enumerate}
    item href{index.htm}{some link}
    item href{index.htm}{some link}
    item href{index.htm}{some other link}
    includegraphics[width=2cm]{example-image-a}
    item href{index.html}{another link}
    item href{index.htm}{some link}
    end{enumerate}

    end{document}


    And this is how it looks like when compiled



    Mathematica graphics



    What I want is like this



    Mathematica graphics



    I tried using a small table, but that did not help



    begin{enumerate}
    item href{index.htm}{some link}
    item href{index.htm}{some link}
    item begin{tabular}{cc}
    href{index.htm}{some other link}&
    includegraphics[width=2cm]{example-image-a}
    end{tabular}
    item href{index.html}{another link}
    item href{index.htm}{some link}
    end{enumerate}


    It got a little closer to what I want, but not exactly



    Mathematica graphics



    What is the correct way to do this in Latex to obtain what I want as shown above?



    TL 2018










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'd like to add a small tiny image on the same line as an item entry, something like



      item href{index.htm}{some other link} includegraphics[...]


      But having hard time getting it to look the way I want it. Here is what I do now



      documentclass[12pt]{article}

      usepackage{graphicx}
      usepackage{calc}
      usepackage{enumitem}

      usepackage{hyperref}

      begin{document}

      begin{enumerate}
      item href{index.htm}{some link}
      item href{index.htm}{some link}
      item href{index.htm}{some other link}
      includegraphics[width=2cm]{example-image-a}
      item href{index.html}{another link}
      item href{index.htm}{some link}
      end{enumerate}

      end{document}


      And this is how it looks like when compiled



      Mathematica graphics



      What I want is like this



      Mathematica graphics



      I tried using a small table, but that did not help



      begin{enumerate}
      item href{index.htm}{some link}
      item href{index.htm}{some link}
      item begin{tabular}{cc}
      href{index.htm}{some other link}&
      includegraphics[width=2cm]{example-image-a}
      end{tabular}
      item href{index.html}{another link}
      item href{index.htm}{some link}
      end{enumerate}


      It got a little closer to what I want, but not exactly



      Mathematica graphics



      What is the correct way to do this in Latex to obtain what I want as shown above?



      TL 2018










      share|improve this question













      I'd like to add a small tiny image on the same line as an item entry, something like



      item href{index.htm}{some other link} includegraphics[...]


      But having hard time getting it to look the way I want it. Here is what I do now



      documentclass[12pt]{article}

      usepackage{graphicx}
      usepackage{calc}
      usepackage{enumitem}

      usepackage{hyperref}

      begin{document}

      begin{enumerate}
      item href{index.htm}{some link}
      item href{index.htm}{some link}
      item href{index.htm}{some other link}
      includegraphics[width=2cm]{example-image-a}
      item href{index.html}{another link}
      item href{index.htm}{some link}
      end{enumerate}

      end{document}


      And this is how it looks like when compiled



      Mathematica graphics



      What I want is like this



      Mathematica graphics



      I tried using a small table, but that did not help



      begin{enumerate}
      item href{index.htm}{some link}
      item href{index.htm}{some link}
      item begin{tabular}{cc}
      href{index.htm}{some other link}&
      includegraphics[width=2cm]{example-image-a}
      end{tabular}
      item href{index.html}{another link}
      item href{index.htm}{some link}
      end{enumerate}


      It got a little closer to what I want, but not exactly



      Mathematica graphics



      What is the correct way to do this in Latex to obtain what I want as shown above?



      TL 2018







      horizontal-alignment enumerate






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      Nasser

      8,02663081




      8,02663081






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          It's easy with adjustbox:



          documentclass[12pt]{article}

          usepackage{graphicx}
          usepackage[export]{adjustbox}
          usepackage{calc}
          usepackage{enumitem}

          usepackage{hyperref}

          begin{document}

          begin{enumerate}
          item href{index.htm}{some link}
          item href{index.htm}{some link}
          item href{index.htm}{some other link}
          includegraphics[width=2cm, valign= c]{example-image-a}
          item href{index.html}{another link}
          item href{index.htm}{some link}
          end{enumerate}

          end{document}


          enter image description here






          share|improve this answer




























            up vote
            1
            down vote













            Also without packages using the TeX primitive vcenter in a new macro for convenience:



            documentclass[12pt]{article}
            usepackage{graphicx}
            usepackage{enumitem}
            usepackage{hyperref}

            newcommand{imcenter}[1]{$vcenter{hbox{#1}}$}

            begin{document}

            begin{enumerate}
            item href{index.htm}{some link}
            item href{index.htm}{some link}
            item href{index.htm}{some other link}
            imcenter{includegraphics[width=2cm]{example-image-a}}
            item href{index.html}{another link}
            item href{index.htm}{some link}
            end{enumerate}

            end{document}



            enter image description here







            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: 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%2f463054%2fhow-to-align-item-in-enumeration-list-that-has-an-image-so-it-is-symmetrical%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








              up vote
              2
              down vote













              It's easy with adjustbox:



              documentclass[12pt]{article}

              usepackage{graphicx}
              usepackage[export]{adjustbox}
              usepackage{calc}
              usepackage{enumitem}

              usepackage{hyperref}

              begin{document}

              begin{enumerate}
              item href{index.htm}{some link}
              item href{index.htm}{some link}
              item href{index.htm}{some other link}
              includegraphics[width=2cm, valign= c]{example-image-a}
              item href{index.html}{another link}
              item href{index.htm}{some link}
              end{enumerate}

              end{document}


              enter image description here






              share|improve this answer

























                up vote
                2
                down vote













                It's easy with adjustbox:



                documentclass[12pt]{article}

                usepackage{graphicx}
                usepackage[export]{adjustbox}
                usepackage{calc}
                usepackage{enumitem}

                usepackage{hyperref}

                begin{document}

                begin{enumerate}
                item href{index.htm}{some link}
                item href{index.htm}{some link}
                item href{index.htm}{some other link}
                includegraphics[width=2cm, valign= c]{example-image-a}
                item href{index.html}{another link}
                item href{index.htm}{some link}
                end{enumerate}

                end{document}


                enter image description here






                share|improve this answer























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  It's easy with adjustbox:



                  documentclass[12pt]{article}

                  usepackage{graphicx}
                  usepackage[export]{adjustbox}
                  usepackage{calc}
                  usepackage{enumitem}

                  usepackage{hyperref}

                  begin{document}

                  begin{enumerate}
                  item href{index.htm}{some link}
                  item href{index.htm}{some link}
                  item href{index.htm}{some other link}
                  includegraphics[width=2cm, valign= c]{example-image-a}
                  item href{index.html}{another link}
                  item href{index.htm}{some link}
                  end{enumerate}

                  end{document}


                  enter image description here






                  share|improve this answer












                  It's easy with adjustbox:



                  documentclass[12pt]{article}

                  usepackage{graphicx}
                  usepackage[export]{adjustbox}
                  usepackage{calc}
                  usepackage{enumitem}

                  usepackage{hyperref}

                  begin{document}

                  begin{enumerate}
                  item href{index.htm}{some link}
                  item href{index.htm}{some link}
                  item href{index.htm}{some other link}
                  includegraphics[width=2cm, valign= c]{example-image-a}
                  item href{index.html}{another link}
                  item href{index.htm}{some link}
                  end{enumerate}

                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 3 hours ago









                  Bernard

                  163k768192




                  163k768192






















                      up vote
                      1
                      down vote













                      Also without packages using the TeX primitive vcenter in a new macro for convenience:



                      documentclass[12pt]{article}
                      usepackage{graphicx}
                      usepackage{enumitem}
                      usepackage{hyperref}

                      newcommand{imcenter}[1]{$vcenter{hbox{#1}}$}

                      begin{document}

                      begin{enumerate}
                      item href{index.htm}{some link}
                      item href{index.htm}{some link}
                      item href{index.htm}{some other link}
                      imcenter{includegraphics[width=2cm]{example-image-a}}
                      item href{index.html}{another link}
                      item href{index.htm}{some link}
                      end{enumerate}

                      end{document}



                      enter image description here







                      share|improve this answer

























                        up vote
                        1
                        down vote













                        Also without packages using the TeX primitive vcenter in a new macro for convenience:



                        documentclass[12pt]{article}
                        usepackage{graphicx}
                        usepackage{enumitem}
                        usepackage{hyperref}

                        newcommand{imcenter}[1]{$vcenter{hbox{#1}}$}

                        begin{document}

                        begin{enumerate}
                        item href{index.htm}{some link}
                        item href{index.htm}{some link}
                        item href{index.htm}{some other link}
                        imcenter{includegraphics[width=2cm]{example-image-a}}
                        item href{index.html}{another link}
                        item href{index.htm}{some link}
                        end{enumerate}

                        end{document}



                        enter image description here







                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Also without packages using the TeX primitive vcenter in a new macro for convenience:



                          documentclass[12pt]{article}
                          usepackage{graphicx}
                          usepackage{enumitem}
                          usepackage{hyperref}

                          newcommand{imcenter}[1]{$vcenter{hbox{#1}}$}

                          begin{document}

                          begin{enumerate}
                          item href{index.htm}{some link}
                          item href{index.htm}{some link}
                          item href{index.htm}{some other link}
                          imcenter{includegraphics[width=2cm]{example-image-a}}
                          item href{index.html}{another link}
                          item href{index.htm}{some link}
                          end{enumerate}

                          end{document}



                          enter image description here







                          share|improve this answer












                          Also without packages using the TeX primitive vcenter in a new macro for convenience:



                          documentclass[12pt]{article}
                          usepackage{graphicx}
                          usepackage{enumitem}
                          usepackage{hyperref}

                          newcommand{imcenter}[1]{$vcenter{hbox{#1}}$}

                          begin{document}

                          begin{enumerate}
                          item href{index.htm}{some link}
                          item href{index.htm}{some link}
                          item href{index.htm}{some other link}
                          imcenter{includegraphics[width=2cm]{example-image-a}}
                          item href{index.html}{another link}
                          item href{index.htm}{some link}
                          end{enumerate}

                          end{document}



                          enter image description here








                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 3 hours ago









                          AboAmmar

                          31.6k22781




                          31.6k22781






























                              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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2f463054%2fhow-to-align-item-in-enumeration-list-that-has-an-image-so-it-is-symmetrical%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

                              Accessing regular linux commands in Huawei's Dopra Linux

                              Can't connect RFCOMM socket: Host is down

                              Kernel panic - not syncing: Fatal Exception in Interrupt