center vertically the content and absolute position of tcolorbox, tcbrasterMissing vertical line when insert...

LTSpice: When running a linear AC simulation, how to view the voltage ratio between two voltages?

Why is working on the same position for more than 15 years not a red flag?

4 Spheres all touching each other??

How do I make a gun alignment to camera matrix in OpenGL GLSL?

Auto Insert date into Notepad

Why is c4 a better move in this position?

Finding ratio of the area of triangles

What is better: yes / no radio, or simple checkbox?

Connecting top and bottom of adjacent circles

How to mitigate "bandwagon attacking" from players?

c++ How can I make an algorithm for finding variations of a set without repetition (i.e. n elements, choose k)?

Do any poskim exempt 13-20-year-olds from Mussaf?

Meth dealer reference in Family Guy

What can I substitute for soda pop in a sweet pork recipe?

Can luacode be used in the preamble of a standalone-type document?

What was the population of late Pre-Islamic Arabia and the population of Arabic speakers before Islam?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Finding the number of integers that are a square and a cube at the same time

How to prepare vegetables for a sandwich that can last for several days in a fridge?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Is the theory of the category of topological spaces computable?

Where is this triangular-shaped space station from?

What is Crew Dragon approaching in this picture?

How to roast potatoes in the oven to make them crispy?



center vertically the content and absolute position of tcolorbox, tcbraster


Missing vertical line when insert column width in tabularxtcolorbox equation and fleqn: not vertically centeredtcolorbox & text vertically center aligntcolorbox: `height fill` as option to `tcbraster`controlling position of tcolorboxPosition tcolorbox in an absolute mannerTcolorbox overzoom positiontcolorbox title above contentCenter enumerate in tcolorboxAdjusting the width of a tcolorbox to its content?Subtitle position of a tcolorbox













2















I would like to create a tcolorbox, but now I need your help:




  1. Centering vertically the content


  2. Absolute position of tcolorbox: when I change position x or y



My minimal code:



documentclass{article}
usepackage[usenames,dvipsnames]{xcolor}
usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
tcbuselibrary{most}
usepackage{makecell,tabularx}
setcellgapes{12pt}
usepackage{array}
usepackage{colortbl}
tcbuselibrary{skins}

usepackage{tikz}
newcolumntype{Y}{>{centeringarraybackslash}X}

tcbset{tableA/.style={
enhanced,
fonttitle=bfseries,
fontupper=normalsizesffamily,
colback=blue!10!white,
colframe=green!50!black,
colbacktitle=red!40!white,
coltitle=black,center title}}

begin{document}
begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
fonttitle=bfseries,fontlower=itshape] %
{
makegapedcells
begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
A & B \hline
A & includegraphics[width = 2cm]{"example-image-a"} \hline
A & AAA \hline
B & BBB \hline
A & includegraphics[width = 2cm]{"example-image-b"}
end{tcolorbox}
}
end{tcbraster}


end{document}


enter image description here



Thanks so much










share|improve this question





























    2















    I would like to create a tcolorbox, but now I need your help:




    1. Centering vertically the content


    2. Absolute position of tcolorbox: when I change position x or y



    My minimal code:



    documentclass{article}
    usepackage[usenames,dvipsnames]{xcolor}
    usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
    tcbuselibrary{most}
    usepackage{makecell,tabularx}
    setcellgapes{12pt}
    usepackage{array}
    usepackage{colortbl}
    tcbuselibrary{skins}

    usepackage{tikz}
    newcolumntype{Y}{>{centeringarraybackslash}X}

    tcbset{tableA/.style={
    enhanced,
    fonttitle=bfseries,
    fontupper=normalsizesffamily,
    colback=blue!10!white,
    colframe=green!50!black,
    colbacktitle=red!40!white,
    coltitle=black,center title}}

    begin{document}
    begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
    fonttitle=bfseries,fontlower=itshape] %
    {
    makegapedcells
    begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
    A & B \hline
    A & includegraphics[width = 2cm]{"example-image-a"} \hline
    A & AAA \hline
    B & BBB \hline
    A & includegraphics[width = 2cm]{"example-image-b"}
    end{tcolorbox}
    }
    end{tcbraster}


    end{document}


    enter image description here



    Thanks so much










    share|improve this question



























      2












      2








      2


      0






      I would like to create a tcolorbox, but now I need your help:




      1. Centering vertically the content


      2. Absolute position of tcolorbox: when I change position x or y



      My minimal code:



      documentclass{article}
      usepackage[usenames,dvipsnames]{xcolor}
      usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
      tcbuselibrary{most}
      usepackage{makecell,tabularx}
      setcellgapes{12pt}
      usepackage{array}
      usepackage{colortbl}
      tcbuselibrary{skins}

      usepackage{tikz}
      newcolumntype{Y}{>{centeringarraybackslash}X}

      tcbset{tableA/.style={
      enhanced,
      fonttitle=bfseries,
      fontupper=normalsizesffamily,
      colback=blue!10!white,
      colframe=green!50!black,
      colbacktitle=red!40!white,
      coltitle=black,center title}}

      begin{document}
      begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
      fonttitle=bfseries,fontlower=itshape] %
      {
      makegapedcells
      begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
      A & B \hline
      A & includegraphics[width = 2cm]{"example-image-a"} \hline
      A & AAA \hline
      B & BBB \hline
      A & includegraphics[width = 2cm]{"example-image-b"}
      end{tcolorbox}
      }
      end{tcbraster}


      end{document}


      enter image description here



      Thanks so much










      share|improve this question
















      I would like to create a tcolorbox, but now I need your help:




      1. Centering vertically the content


      2. Absolute position of tcolorbox: when I change position x or y



      My minimal code:



      documentclass{article}
      usepackage[usenames,dvipsnames]{xcolor}
      usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
      tcbuselibrary{most}
      usepackage{makecell,tabularx}
      setcellgapes{12pt}
      usepackage{array}
      usepackage{colortbl}
      tcbuselibrary{skins}

      usepackage{tikz}
      newcolumntype{Y}{>{centeringarraybackslash}X}

      tcbset{tableA/.style={
      enhanced,
      fonttitle=bfseries,
      fontupper=normalsizesffamily,
      colback=blue!10!white,
      colframe=green!50!black,
      colbacktitle=red!40!white,
      coltitle=black,center title}}

      begin{document}
      begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
      fonttitle=bfseries,fontlower=itshape] %
      {
      makegapedcells
      begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
      A & B \hline
      A & includegraphics[width = 2cm]{"example-image-a"} \hline
      A & AAA \hline
      B & BBB \hline
      A & includegraphics[width = 2cm]{"example-image-b"}
      end{tcolorbox}
      }
      end{tcbraster}


      end{document}


      enter image description here



      Thanks so much







      tcolorbox






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 12 hours ago









      Bernard

      172k775203




      172k775203










      asked 21 hours ago









      tisaigontisaigon

      1997




      1997






















          1 Answer
          1






          active

          oldest

          votes


















          3














          It's very simple if you load usepackage[export]{adjustbox} and use the option valign=c in includegraphics.



          documentclass{article}
          usepackage[usenames,dvipsnames]{xcolor}
          usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
          tcbuselibrary{most}
          usepackage{makecell,tabularx}
          setcellgapes{12pt}
          usepackage{array}
          usepackage{colortbl}
          tcbuselibrary{skins}

          usepackage{tikz}
          newcolumntype{Y}{>{centeringarraybackslash}X}

          tcbset{tableA/.style={
          enhanced,
          fonttitle=bfseries,
          fontupper=normalsizesffamily,
          colback=blue!10!white,
          colframe=green!50!black,
          colbacktitle=red!40!white,
          coltitle=black,center title}}

          usepackage[export]{adjustbox}

          begin{document}
          begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
          fonttitle=bfseries,fontlower=itshape] %
          {
          makegapedcells
          begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
          A & B \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-a"} \hline
          A & AAA \hline
          B & BBB \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-b"}
          end{tcolorbox}
          }
          end{tcbraster}


          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks for your help. It look beautiful

            – tisaigon
            14 hours ago






          • 2





            @tisaigon You're welcome! Thank you for accepting my answer.

            – CarLaTeX
            14 hours ago











          • When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

            – tisaigon
            13 hours ago








          • 1





            @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

            – CarLaTeX
            13 hours ago













          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%2f477498%2fcenter-vertically-the-content-and-absolute-position-of-tcolorbox-tcbraster%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














          It's very simple if you load usepackage[export]{adjustbox} and use the option valign=c in includegraphics.



          documentclass{article}
          usepackage[usenames,dvipsnames]{xcolor}
          usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
          tcbuselibrary{most}
          usepackage{makecell,tabularx}
          setcellgapes{12pt}
          usepackage{array}
          usepackage{colortbl}
          tcbuselibrary{skins}

          usepackage{tikz}
          newcolumntype{Y}{>{centeringarraybackslash}X}

          tcbset{tableA/.style={
          enhanced,
          fonttitle=bfseries,
          fontupper=normalsizesffamily,
          colback=blue!10!white,
          colframe=green!50!black,
          colbacktitle=red!40!white,
          coltitle=black,center title}}

          usepackage[export]{adjustbox}

          begin{document}
          begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
          fonttitle=bfseries,fontlower=itshape] %
          {
          makegapedcells
          begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
          A & B \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-a"} \hline
          A & AAA \hline
          B & BBB \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-b"}
          end{tcolorbox}
          }
          end{tcbraster}


          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks for your help. It look beautiful

            – tisaigon
            14 hours ago






          • 2





            @tisaigon You're welcome! Thank you for accepting my answer.

            – CarLaTeX
            14 hours ago











          • When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

            – tisaigon
            13 hours ago








          • 1





            @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

            – CarLaTeX
            13 hours ago


















          3














          It's very simple if you load usepackage[export]{adjustbox} and use the option valign=c in includegraphics.



          documentclass{article}
          usepackage[usenames,dvipsnames]{xcolor}
          usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
          tcbuselibrary{most}
          usepackage{makecell,tabularx}
          setcellgapes{12pt}
          usepackage{array}
          usepackage{colortbl}
          tcbuselibrary{skins}

          usepackage{tikz}
          newcolumntype{Y}{>{centeringarraybackslash}X}

          tcbset{tableA/.style={
          enhanced,
          fonttitle=bfseries,
          fontupper=normalsizesffamily,
          colback=blue!10!white,
          colframe=green!50!black,
          colbacktitle=red!40!white,
          coltitle=black,center title}}

          usepackage[export]{adjustbox}

          begin{document}
          begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
          fonttitle=bfseries,fontlower=itshape] %
          {
          makegapedcells
          begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
          A & B \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-a"} \hline
          A & AAA \hline
          B & BBB \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-b"}
          end{tcolorbox}
          }
          end{tcbraster}


          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks for your help. It look beautiful

            – tisaigon
            14 hours ago






          • 2





            @tisaigon You're welcome! Thank you for accepting my answer.

            – CarLaTeX
            14 hours ago











          • When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

            – tisaigon
            13 hours ago








          • 1





            @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

            – CarLaTeX
            13 hours ago
















          3












          3








          3







          It's very simple if you load usepackage[export]{adjustbox} and use the option valign=c in includegraphics.



          documentclass{article}
          usepackage[usenames,dvipsnames]{xcolor}
          usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
          tcbuselibrary{most}
          usepackage{makecell,tabularx}
          setcellgapes{12pt}
          usepackage{array}
          usepackage{colortbl}
          tcbuselibrary{skins}

          usepackage{tikz}
          newcolumntype{Y}{>{centeringarraybackslash}X}

          tcbset{tableA/.style={
          enhanced,
          fonttitle=bfseries,
          fontupper=normalsizesffamily,
          colback=blue!10!white,
          colframe=green!50!black,
          colbacktitle=red!40!white,
          coltitle=black,center title}}

          usepackage[export]{adjustbox}

          begin{document}
          begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
          fonttitle=bfseries,fontlower=itshape] %
          {
          makegapedcells
          begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
          A & B \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-a"} \hline
          A & AAA \hline
          B & BBB \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-b"}
          end{tcolorbox}
          }
          end{tcbraster}


          end{document}


          enter image description here






          share|improve this answer













          It's very simple if you load usepackage[export]{adjustbox} and use the option valign=c in includegraphics.



          documentclass{article}
          usepackage[usenames,dvipsnames]{xcolor}
          usepackage[skins,listings,breakable,listingsutf8,theorems,hooks,fitting]{tcolorbox}%
          tcbuselibrary{most}
          usepackage{makecell,tabularx}
          setcellgapes{12pt}
          usepackage{array}
          usepackage{colortbl}
          tcbuselibrary{skins}

          usepackage{tikz}
          newcolumntype{Y}{>{centeringarraybackslash}X}

          tcbset{tableA/.style={
          enhanced,
          fonttitle=bfseries,
          fontupper=normalsizesffamily,
          colback=blue!10!white,
          colframe=green!50!black,
          colbacktitle=red!40!white,
          coltitle=black,center title}}

          usepackage[export]{adjustbox}

          begin{document}
          begin{tcbraster}[colback=red!5!white,colframe=red!75!black,
          fonttitle=bfseries,fontlower=itshape] %
          {
          makegapedcells
          begin{tcolorbox}[tableA,tabularx*={renewcommand{arraystretch}{1.5}}{Y|Y|},title={This is a table},boxrule=0.8pt]
          A & B \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-a"} \hline
          A & AAA \hline
          B & BBB \hline
          A & includegraphics[width = 2cm, valign=c]{"example-image-b"}
          end{tcolorbox}
          }
          end{tcbraster}


          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 16 hours ago









          CarLaTeXCarLaTeX

          32.4k551134




          32.4k551134













          • Many thanks for your help. It look beautiful

            – tisaigon
            14 hours ago






          • 2





            @tisaigon You're welcome! Thank you for accepting my answer.

            – CarLaTeX
            14 hours ago











          • When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

            – tisaigon
            13 hours ago








          • 1





            @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

            – CarLaTeX
            13 hours ago





















          • Many thanks for your help. It look beautiful

            – tisaigon
            14 hours ago






          • 2





            @tisaigon You're welcome! Thank you for accepting my answer.

            – CarLaTeX
            14 hours ago











          • When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

            – tisaigon
            13 hours ago








          • 1





            @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

            – CarLaTeX
            13 hours ago



















          Many thanks for your help. It look beautiful

          – tisaigon
          14 hours ago





          Many thanks for your help. It look beautiful

          – tisaigon
          14 hours ago




          2




          2





          @tisaigon You're welcome! Thank you for accepting my answer.

          – CarLaTeX
          14 hours ago





          @tisaigon You're welcome! Thank you for accepting my answer.

          – CarLaTeX
          14 hours ago













          When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

          – tisaigon
          13 hours ago







          When i edit {Y|Y|} => {|Y{2cm}|Y{5cm}|}, the center vertical line between 2 columns is hidden. Please help. imgur.com/zfiFj9s

          – tisaigon
          13 hours ago






          1




          1





          @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

          – CarLaTeX
          13 hours ago







          @tisaigon I have no time at the moment, sorry. Please post another question, someone else will help before me.

          – CarLaTeX
          13 hours ago




















          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%2f477498%2fcenter-vertically-the-content-and-absolute-position-of-tcolorbox-tcbraster%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

          Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

          (1602) Indiana Índice Designación y nombre Características orbitales Véase...

          Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...