How can I center a text and figure vertically in a framed box of fixed size? (Ideally within the tocentry environment from the achemso package.) The Next CEO of Stack OverflowHow to continue the framed text box on multiple pages?Achemso: Can I remove the “S”1 from the bibliography in supporting information of the achemso package, manuscipt=suppinfoHow to create command for a box where text inside the box can automatically adjust?How could a verbatimtab environment in a figure environment be resized (perhaps using the package adjustbox)?How to put a Figure caption (without grphic) in a box in main text with space between text and box, width box same width text?Overfull with two columns, one small box and one big box, how can I deal with the overfull without breaking the boxes?How can I align two boxes to the top right and top left of a surrounding box?Size of the box and text in the centerHow can I top align AND left align a box flush with the top of a paragraph?

What's the point of interval inversion?

Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?

Apart from "berlinern", do any other German dialects have a corresponding verb?

How did people program for Consoles with multiple CPUs?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

What is the difference between "behavior" and "behaviour"?

Is the concept of a "numerable" fiber bundle really useful or an empty generalization?

Fastest way to shutdown Ubuntu Mate 18.10

How easy is it to start Magic from scratch?

Why didn't Khan get resurrected in the Genesis Explosion?

How can I quit an app using Terminal?

The King's new dress

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

How to use tikz in fbox?

Is it okay to store user locations?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

What happens if you roll doubles 3 times then land on "Go to jail?"

Trouble understanding the speech of overseas colleagues

Does the Brexit deal have to be agreed by both Houses?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

How to count occurrences of text in a file?

Why here is plural "We went to the movies last night."

Implement the Thanos sorting algorithm



How can I center a text and figure vertically in a framed box of fixed size? (Ideally within the tocentry environment from the achemso package.)



The Next CEO of Stack OverflowHow to continue the framed text box on multiple pages?Achemso: Can I remove the “S”1 from the bibliography in supporting information of the achemso package, manuscipt=suppinfoHow to create command for a box where text inside the box can automatically adjust?How could a verbatimtab environment in a figure environment be resized (perhaps using the package adjustbox)?How to put a Figure caption (without grphic) in a box in main text with space between text and box, width box same width text?Overfull with two columns, one small box and one big box, how can I deal with the overfull without breaking the boxes?How can I align two boxes to the top right and top left of a surrounding box?Size of the box and text in the centerHow can I top align AND left align a box flush with the top of a paragraph?










2















I am trying to add a TOC entry with text and a figure to an ACS paper draft.
I would like to have everything fit in a box of width=3.25in and height=1.75in, with the figure on the right and the text on the left, everything being centered vertically.
How can I achieve this?



This is my current minimum working example illustrating the problem:



documentclass[journal=apchd5,manuscript=letter]achemso
titleTitle

begindocument

% required max size
includegraphics[width=3.25in, height=1.75in]example-image-a

% what I think mimics the ACS tocentry environment
begincenter
fbox
beginminipage3.25in
vbox to 1.75in
parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a

endminipage

endcenter

% ACS tocentry environment
begintocentry
parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a
endtocentry

enddocument


I cannot get the text and figure centered vertically.
In addition, the frame ends up being heigher than height=1.75in.



How can I center a text and figure vertically in a framed box of fixed size?
How can I do it within the tocentry environment from the achemso package?










share|improve this question


























    2















    I am trying to add a TOC entry with text and a figure to an ACS paper draft.
    I would like to have everything fit in a box of width=3.25in and height=1.75in, with the figure on the right and the text on the left, everything being centered vertically.
    How can I achieve this?



    This is my current minimum working example illustrating the problem:



    documentclass[journal=apchd5,manuscript=letter]achemso
    titleTitle

    begindocument

    % required max size
    includegraphics[width=3.25in, height=1.75in]example-image-a

    % what I think mimics the ACS tocentry environment
    begincenter
    fbox
    beginminipage3.25in
    vbox to 1.75in
    parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a

    endminipage

    endcenter

    % ACS tocentry environment
    begintocentry
    parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a
    endtocentry

    enddocument


    I cannot get the text and figure centered vertically.
    In addition, the frame ends up being heigher than height=1.75in.



    How can I center a text and figure vertically in a framed box of fixed size?
    How can I do it within the tocentry environment from the achemso package?










    share|improve this question
























      2












      2








      2


      1






      I am trying to add a TOC entry with text and a figure to an ACS paper draft.
      I would like to have everything fit in a box of width=3.25in and height=1.75in, with the figure on the right and the text on the left, everything being centered vertically.
      How can I achieve this?



      This is my current minimum working example illustrating the problem:



      documentclass[journal=apchd5,manuscript=letter]achemso
      titleTitle

      begindocument

      % required max size
      includegraphics[width=3.25in, height=1.75in]example-image-a

      % what I think mimics the ACS tocentry environment
      begincenter
      fbox
      beginminipage3.25in
      vbox to 1.75in
      parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a

      endminipage

      endcenter

      % ACS tocentry environment
      begintocentry
      parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a
      endtocentry

      enddocument


      I cannot get the text and figure centered vertically.
      In addition, the frame ends up being heigher than height=1.75in.



      How can I center a text and figure vertically in a framed box of fixed size?
      How can I do it within the tocentry environment from the achemso package?










      share|improve this question














      I am trying to add a TOC entry with text and a figure to an ACS paper draft.
      I would like to have everything fit in a box of width=3.25in and height=1.75in, with the figure on the right and the text on the left, everything being centered vertically.
      How can I achieve this?



      This is my current minimum working example illustrating the problem:



      documentclass[journal=apchd5,manuscript=letter]achemso
      titleTitle

      begindocument

      % required max size
      includegraphics[width=3.25in, height=1.75in]example-image-a

      % what I think mimics the ACS tocentry environment
      begincenter
      fbox
      beginminipage3.25in
      vbox to 1.75in
      parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a

      endminipage

      endcenter

      % ACS tocentry environment
      begintocentry
      parbox[c]0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu non odio euismod lacinia at quis risus sed vulputate.includegraphics[width=0.5textwidth]example-image-a
      endtocentry

      enddocument


      I cannot get the text and figure centered vertically.
      In addition, the frame ends up being heigher than height=1.75in.



      How can I center a text and figure vertically in a framed box of fixed size?
      How can I do it within the tocentry environment from the achemso package?







      boxes achemso






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 11 hours ago









      KIAazeKIAaze

      25017




      25017




















          1 Answer
          1






          active

          oldest

          votes


















          3














          Here is an alternate version called alttocentry that will keep the box size correct, unless the text becomes too much for the space. In the first instance, I show rules to the right and below to confirm the dimensions.



          Adjustable parameters include fboxsep, fboxrule, mygap, imgwd, boxwd, and boxht.



          documentclass[journal=apchd5,manuscript=letter]achemso
          usepackagestackengine
          newlengthmygap
          setlengthmygap5pt
          newlengthboxwd
          setlengthboxwd3.25in
          newlengthboxht
          setlengthboxht1.75in
          newlengthimgwd
          setlengthimgwd.5boxwd
          newcommandmytextwdboxwd-imgwd-fboxsep-fboxrule-mygap
          newcommandmytextenvsetstretch1.1sffamily
          newcommandmyboxshift-.5dimexprheight-.5htstrutbox+.5dpstrutboxrelax
          newcommandmyboxoptswidth=imgwd-fboxsep-fboxrule
          newcommandmyaddgap.5boxht-.5ht0-.5dp0-fboxsep-fboxrule
          newenvironmentalttocentry[1]
          defmyimgname#1%
          setbox0=hboxbgroupbeginminipagemytextwdmytextenvstrutignorespaces
          %
          endminipage%
          kernmygap%
          raiseboxmyboxshift%
          expandafterincludegraphicsexpandafter[myboxopts]myimgname%
          egroup%
          centerlinefboxaddstackgap[myaddgap]copy0%
          showboxht%%%%% CAN GET RID OF THIS
          %

          %%%%% CAN GET RID OF THESE, ONCE HAPPY WITH RESULT
          newcommandshowboxht%
          rlap,rule[-.5boxht+.35htstrutbox-.35dpstrutbox]3ptboxht
          newcommandshowboxwdparcenterlinerule3.25in3pt
          %%%%%%%%%
          titleTitle
          begindocument
          beginalttocentryexample-image-a
          Lorem ipsum dolor sit amet,
          consectetur adipiscing elit,
          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%
          endalttocentry
          showboxwd%%%%% CAN GET RID OF THIS
          bigskip

          letshowboxhtrelax
          setlengthimgwd.45boxwd

          beginalttocentryexample-image-b
          This is a test of an toc entry smaller than the figure.
          textbackslash imgwd reduced.
          endalttocentry
          beginalttocentryexample-image-b
          This is a test of an toc entry larger than allowed vertical space.
          This is a test of an toc entry larger than allowed vertical space.
          This is a test of an toc entry larger than allowed vertical space.
          This is a test of an toc entry larger than allowed vertical space.
          endalttocentry
          enddocument


          enter image description here



          I'm not sure that the actual tocentry environment preserves the vertical dimension. But here is my attempt using the actual environment.



          documentclass[journal=apchd5,manuscript=letter]achemso
          titleTitle
          begindocument
          % ACS tocentry environment
          begintocentry
          vfill
          beginminipage0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit,
          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. endminipage%
          raisebox-.5dimexprheight-htstrutbox+dpstrutboxrelax%
          includegraphics[width=0.5textwidth]example-image-a
          \vfill
          endtocentry
          enddocument


          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',
            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%2f481930%2fhow-can-i-center-a-text-and-figure-vertically-in-a-framed-box-of-fixed-size-id%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









            3














            Here is an alternate version called alttocentry that will keep the box size correct, unless the text becomes too much for the space. In the first instance, I show rules to the right and below to confirm the dimensions.



            Adjustable parameters include fboxsep, fboxrule, mygap, imgwd, boxwd, and boxht.



            documentclass[journal=apchd5,manuscript=letter]achemso
            usepackagestackengine
            newlengthmygap
            setlengthmygap5pt
            newlengthboxwd
            setlengthboxwd3.25in
            newlengthboxht
            setlengthboxht1.75in
            newlengthimgwd
            setlengthimgwd.5boxwd
            newcommandmytextwdboxwd-imgwd-fboxsep-fboxrule-mygap
            newcommandmytextenvsetstretch1.1sffamily
            newcommandmyboxshift-.5dimexprheight-.5htstrutbox+.5dpstrutboxrelax
            newcommandmyboxoptswidth=imgwd-fboxsep-fboxrule
            newcommandmyaddgap.5boxht-.5ht0-.5dp0-fboxsep-fboxrule
            newenvironmentalttocentry[1]
            defmyimgname#1%
            setbox0=hboxbgroupbeginminipagemytextwdmytextenvstrutignorespaces
            %
            endminipage%
            kernmygap%
            raiseboxmyboxshift%
            expandafterincludegraphicsexpandafter[myboxopts]myimgname%
            egroup%
            centerlinefboxaddstackgap[myaddgap]copy0%
            showboxht%%%%% CAN GET RID OF THIS
            %

            %%%%% CAN GET RID OF THESE, ONCE HAPPY WITH RESULT
            newcommandshowboxht%
            rlap,rule[-.5boxht+.35htstrutbox-.35dpstrutbox]3ptboxht
            newcommandshowboxwdparcenterlinerule3.25in3pt
            %%%%%%%%%
            titleTitle
            begindocument
            beginalttocentryexample-image-a
            Lorem ipsum dolor sit amet,
            consectetur adipiscing elit,
            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%
            endalttocentry
            showboxwd%%%%% CAN GET RID OF THIS
            bigskip

            letshowboxhtrelax
            setlengthimgwd.45boxwd

            beginalttocentryexample-image-b
            This is a test of an toc entry smaller than the figure.
            textbackslash imgwd reduced.
            endalttocentry
            beginalttocentryexample-image-b
            This is a test of an toc entry larger than allowed vertical space.
            This is a test of an toc entry larger than allowed vertical space.
            This is a test of an toc entry larger than allowed vertical space.
            This is a test of an toc entry larger than allowed vertical space.
            endalttocentry
            enddocument


            enter image description here



            I'm not sure that the actual tocentry environment preserves the vertical dimension. But here is my attempt using the actual environment.



            documentclass[journal=apchd5,manuscript=letter]achemso
            titleTitle
            begindocument
            % ACS tocentry environment
            begintocentry
            vfill
            beginminipage0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit,
            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. endminipage%
            raisebox-.5dimexprheight-htstrutbox+dpstrutboxrelax%
            includegraphics[width=0.5textwidth]example-image-a
            \vfill
            endtocentry
            enddocument


            enter image description here






            share|improve this answer





























              3














              Here is an alternate version called alttocentry that will keep the box size correct, unless the text becomes too much for the space. In the first instance, I show rules to the right and below to confirm the dimensions.



              Adjustable parameters include fboxsep, fboxrule, mygap, imgwd, boxwd, and boxht.



              documentclass[journal=apchd5,manuscript=letter]achemso
              usepackagestackengine
              newlengthmygap
              setlengthmygap5pt
              newlengthboxwd
              setlengthboxwd3.25in
              newlengthboxht
              setlengthboxht1.75in
              newlengthimgwd
              setlengthimgwd.5boxwd
              newcommandmytextwdboxwd-imgwd-fboxsep-fboxrule-mygap
              newcommandmytextenvsetstretch1.1sffamily
              newcommandmyboxshift-.5dimexprheight-.5htstrutbox+.5dpstrutboxrelax
              newcommandmyboxoptswidth=imgwd-fboxsep-fboxrule
              newcommandmyaddgap.5boxht-.5ht0-.5dp0-fboxsep-fboxrule
              newenvironmentalttocentry[1]
              defmyimgname#1%
              setbox0=hboxbgroupbeginminipagemytextwdmytextenvstrutignorespaces
              %
              endminipage%
              kernmygap%
              raiseboxmyboxshift%
              expandafterincludegraphicsexpandafter[myboxopts]myimgname%
              egroup%
              centerlinefboxaddstackgap[myaddgap]copy0%
              showboxht%%%%% CAN GET RID OF THIS
              %

              %%%%% CAN GET RID OF THESE, ONCE HAPPY WITH RESULT
              newcommandshowboxht%
              rlap,rule[-.5boxht+.35htstrutbox-.35dpstrutbox]3ptboxht
              newcommandshowboxwdparcenterlinerule3.25in3pt
              %%%%%%%%%
              titleTitle
              begindocument
              beginalttocentryexample-image-a
              Lorem ipsum dolor sit amet,
              consectetur adipiscing elit,
              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%
              endalttocentry
              showboxwd%%%%% CAN GET RID OF THIS
              bigskip

              letshowboxhtrelax
              setlengthimgwd.45boxwd

              beginalttocentryexample-image-b
              This is a test of an toc entry smaller than the figure.
              textbackslash imgwd reduced.
              endalttocentry
              beginalttocentryexample-image-b
              This is a test of an toc entry larger than allowed vertical space.
              This is a test of an toc entry larger than allowed vertical space.
              This is a test of an toc entry larger than allowed vertical space.
              This is a test of an toc entry larger than allowed vertical space.
              endalttocentry
              enddocument


              enter image description here



              I'm not sure that the actual tocentry environment preserves the vertical dimension. But here is my attempt using the actual environment.



              documentclass[journal=apchd5,manuscript=letter]achemso
              titleTitle
              begindocument
              % ACS tocentry environment
              begintocentry
              vfill
              beginminipage0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit,
              sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. endminipage%
              raisebox-.5dimexprheight-htstrutbox+dpstrutboxrelax%
              includegraphics[width=0.5textwidth]example-image-a
              \vfill
              endtocentry
              enddocument


              enter image description here






              share|improve this answer



























                3












                3








                3







                Here is an alternate version called alttocentry that will keep the box size correct, unless the text becomes too much for the space. In the first instance, I show rules to the right and below to confirm the dimensions.



                Adjustable parameters include fboxsep, fboxrule, mygap, imgwd, boxwd, and boxht.



                documentclass[journal=apchd5,manuscript=letter]achemso
                usepackagestackengine
                newlengthmygap
                setlengthmygap5pt
                newlengthboxwd
                setlengthboxwd3.25in
                newlengthboxht
                setlengthboxht1.75in
                newlengthimgwd
                setlengthimgwd.5boxwd
                newcommandmytextwdboxwd-imgwd-fboxsep-fboxrule-mygap
                newcommandmytextenvsetstretch1.1sffamily
                newcommandmyboxshift-.5dimexprheight-.5htstrutbox+.5dpstrutboxrelax
                newcommandmyboxoptswidth=imgwd-fboxsep-fboxrule
                newcommandmyaddgap.5boxht-.5ht0-.5dp0-fboxsep-fboxrule
                newenvironmentalttocentry[1]
                defmyimgname#1%
                setbox0=hboxbgroupbeginminipagemytextwdmytextenvstrutignorespaces
                %
                endminipage%
                kernmygap%
                raiseboxmyboxshift%
                expandafterincludegraphicsexpandafter[myboxopts]myimgname%
                egroup%
                centerlinefboxaddstackgap[myaddgap]copy0%
                showboxht%%%%% CAN GET RID OF THIS
                %

                %%%%% CAN GET RID OF THESE, ONCE HAPPY WITH RESULT
                newcommandshowboxht%
                rlap,rule[-.5boxht+.35htstrutbox-.35dpstrutbox]3ptboxht
                newcommandshowboxwdparcenterlinerule3.25in3pt
                %%%%%%%%%
                titleTitle
                begindocument
                beginalttocentryexample-image-a
                Lorem ipsum dolor sit amet,
                consectetur adipiscing elit,
                sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%
                endalttocentry
                showboxwd%%%%% CAN GET RID OF THIS
                bigskip

                letshowboxhtrelax
                setlengthimgwd.45boxwd

                beginalttocentryexample-image-b
                This is a test of an toc entry smaller than the figure.
                textbackslash imgwd reduced.
                endalttocentry
                beginalttocentryexample-image-b
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                endalttocentry
                enddocument


                enter image description here



                I'm not sure that the actual tocentry environment preserves the vertical dimension. But here is my attempt using the actual environment.



                documentclass[journal=apchd5,manuscript=letter]achemso
                titleTitle
                begindocument
                % ACS tocentry environment
                begintocentry
                vfill
                beginminipage0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit,
                sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. endminipage%
                raisebox-.5dimexprheight-htstrutbox+dpstrutboxrelax%
                includegraphics[width=0.5textwidth]example-image-a
                \vfill
                endtocentry
                enddocument


                enter image description here






                share|improve this answer















                Here is an alternate version called alttocentry that will keep the box size correct, unless the text becomes too much for the space. In the first instance, I show rules to the right and below to confirm the dimensions.



                Adjustable parameters include fboxsep, fboxrule, mygap, imgwd, boxwd, and boxht.



                documentclass[journal=apchd5,manuscript=letter]achemso
                usepackagestackengine
                newlengthmygap
                setlengthmygap5pt
                newlengthboxwd
                setlengthboxwd3.25in
                newlengthboxht
                setlengthboxht1.75in
                newlengthimgwd
                setlengthimgwd.5boxwd
                newcommandmytextwdboxwd-imgwd-fboxsep-fboxrule-mygap
                newcommandmytextenvsetstretch1.1sffamily
                newcommandmyboxshift-.5dimexprheight-.5htstrutbox+.5dpstrutboxrelax
                newcommandmyboxoptswidth=imgwd-fboxsep-fboxrule
                newcommandmyaddgap.5boxht-.5ht0-.5dp0-fboxsep-fboxrule
                newenvironmentalttocentry[1]
                defmyimgname#1%
                setbox0=hboxbgroupbeginminipagemytextwdmytextenvstrutignorespaces
                %
                endminipage%
                kernmygap%
                raiseboxmyboxshift%
                expandafterincludegraphicsexpandafter[myboxopts]myimgname%
                egroup%
                centerlinefboxaddstackgap[myaddgap]copy0%
                showboxht%%%%% CAN GET RID OF THIS
                %

                %%%%% CAN GET RID OF THESE, ONCE HAPPY WITH RESULT
                newcommandshowboxht%
                rlap,rule[-.5boxht+.35htstrutbox-.35dpstrutbox]3ptboxht
                newcommandshowboxwdparcenterlinerule3.25in3pt
                %%%%%%%%%
                titleTitle
                begindocument
                beginalttocentryexample-image-a
                Lorem ipsum dolor sit amet,
                consectetur adipiscing elit,
                sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%
                endalttocentry
                showboxwd%%%%% CAN GET RID OF THIS
                bigskip

                letshowboxhtrelax
                setlengthimgwd.45boxwd

                beginalttocentryexample-image-b
                This is a test of an toc entry smaller than the figure.
                textbackslash imgwd reduced.
                endalttocentry
                beginalttocentryexample-image-b
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                This is a test of an toc entry larger than allowed vertical space.
                endalttocentry
                enddocument


                enter image description here



                I'm not sure that the actual tocentry environment preserves the vertical dimension. But here is my attempt using the actual environment.



                documentclass[journal=apchd5,manuscript=letter]achemso
                titleTitle
                begindocument
                % ACS tocentry environment
                begintocentry
                vfill
                beginminipage0.5textwidthLorem ipsum dolor sit amet, consectetur adipiscing elit,
                sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. endminipage%
                raisebox-.5dimexprheight-htstrutbox+dpstrutboxrelax%
                includegraphics[width=0.5textwidth]example-image-a
                \vfill
                endtocentry
                enddocument


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 10 hours ago

























                answered 11 hours ago









                Steven B. SegletesSteven B. Segletes

                160k9204413




                160k9204413



























                    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%2f481930%2fhow-can-i-center-a-text-and-figure-vertically-in-a-framed-box-of-fixed-size-id%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

                    Wikipedia:Contact us Navigation menu Navigation menuLeave a Reply Cancel reply Post navigationRecent PostsRecent CommentsArchivesCategoriesMeta

                    Farafra Inhaltsverzeichnis Geschichte | Badr-Museum Farafra | Nationalpark Weiße Wüste (as-Sahra al-baida) | Literatur | Weblinks | Navigationsmenü27° 3′ N, 27° 58′ OCommons: Farafra

                    Tórshavn Kliima | Partnerstääden | Luke uk diar | Nawigatsjuun62° 1′ N, 6° 46′ W62° 1′ 0″ N, 6° 46′ 0″ WWMOTórshavn