Error: Not in outer par mode: table inside tcolorboxHow to influence the position of float environments like figure and table in LaTeX?How to make a Table/tabular appears in a tcolorbox?Conflict between main.tex and input child.texRotate table with caption: “Not in outer par mode. begintable[h]”Input a table into a subfigure, get the error “Not in outer par mode”Outer margin of tcolorboxfigure with figure caption showing outer par mode errorError: Not in outer par mode with estwide tableNot in outer par mode error with tableFaced “Not in outer par mode” error when I want to add table into my CVtabular + table results in “Not in outer par mode”Tcolorbox: Outer style doesn't worktabularx inside tcolorbox not centered properly

Why does Japan use the same type of AC power outlet as the US?

What are these panels underneath the wing root of a A380?

Are there any cons in using rounded corners for bar graphs?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

Why do we use low resistance cables to minimize power losses?

The space of cusp forms for GL_2 over F_q(T)

Is there a word for returning to unpreparedness?

Is Fourier series a sampled version of Fourier transform?

Is nullptr falsy?

What's the relationship betweeen MS-DOS and XENIX?

Visa on arrival to exit airport in Russia

How do I ask for 2-3 days per week remote work in a job interview?

May the tower use the runway while an emergency aircraft is inbound?

Physical Interpretation of an Overdamped Pendulum

Weird resistor with dots around it on the schematic

What allows us to use imaginary numbers?

How do ultra-stable oscillators for spacecraft work?

Is this true for all polynomials

6502: is BCD *fundamentally* the same performance as non-BCD?

What is the spellcasting ability of a Barbarian Totem Warrior?

Would molten tin solidify and coat an organic horn?

Unconventional examples of mathematical modelling

When did Bilbo and Frodo learn that Gandalf was a Maia?

What is the opposite of "hunger level"?



Error: Not in outer par mode: table inside tcolorbox


How to influence the position of float environments like figure and table in LaTeX?How to make a Table/tabular appears in a tcolorbox?Conflict between main.tex and input child.texRotate table with caption: “Not in outer par mode. begintable[h]”Input a table into a subfigure, get the error “Not in outer par mode”Outer margin of tcolorboxfigure with figure caption showing outer par mode errorError: Not in outer par mode with estwide tableNot in outer par mode error with tableFaced “Not in outer par mode” error when I want to add table into my CVtabular + table results in “Not in outer par mode”Tcolorbox: Outer style doesn't worktabularx inside tcolorbox not centered properly






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















i use code from topic: How to make a Table/tabular appears in a tcolorbox?



But error "Not in outer par mode" and table does not appear.



Minimal Code:



documentclass[12pt,a4paper]article
usepackagemwe
usepackage[utf8]inputenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackage[x11names,table]xcolor % dddd%
usepackageeurosym

usepackagedatetime
settimeformatampmtime

usepackagehyperref
hypersetupcolorlinks=true, urlcolor=blue

usepackagegraphicx,subcaption
usepackagetcolorbox

begindocument

begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]

begintable[h!]
centering
begintabularc
hline
% after \: hline or clinecol1-col2 clinecol3-col4 ...
a& b & T/F & dif\ hline
1 & 2 & False & -1\
2 & 4 & False & -2\
hline
endtabular\
captionCaption Tablelabeltab:table-out
endtable
endtcolorbox

enddocument


enter image description here
How can i fix it?
Thanks










share|improve this question






























    3















    i use code from topic: How to make a Table/tabular appears in a tcolorbox?



    But error "Not in outer par mode" and table does not appear.



    Minimal Code:



    documentclass[12pt,a4paper]article
    usepackagemwe
    usepackage[utf8]inputenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackage[x11names,table]xcolor % dddd%
    usepackageeurosym

    usepackagedatetime
    settimeformatampmtime

    usepackagehyperref
    hypersetupcolorlinks=true, urlcolor=blue

    usepackagegraphicx,subcaption
    usepackagetcolorbox

    begindocument

    begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]

    begintable[h!]
    centering
    begintabularc
    hline
    % after \: hline or clinecol1-col2 clinecol3-col4 ...
    a& b & T/F & dif\ hline
    1 & 2 & False & -1\
    2 & 4 & False & -2\
    hline
    endtabular\
    captionCaption Tablelabeltab:table-out
    endtable
    endtcolorbox

    enddocument


    enter image description here
    How can i fix it?
    Thanks










    share|improve this question


























      3












      3








      3








      i use code from topic: How to make a Table/tabular appears in a tcolorbox?



      But error "Not in outer par mode" and table does not appear.



      Minimal Code:



      documentclass[12pt,a4paper]article
      usepackagemwe
      usepackage[utf8]inputenc
      usepackageamsmath
      usepackageamsfonts
      usepackageamssymb
      usepackage[x11names,table]xcolor % dddd%
      usepackageeurosym

      usepackagedatetime
      settimeformatampmtime

      usepackagehyperref
      hypersetupcolorlinks=true, urlcolor=blue

      usepackagegraphicx,subcaption
      usepackagetcolorbox

      begindocument

      begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]

      begintable[h!]
      centering
      begintabularc
      hline
      % after \: hline or clinecol1-col2 clinecol3-col4 ...
      a& b & T/F & dif\ hline
      1 & 2 & False & -1\
      2 & 4 & False & -2\
      hline
      endtabular\
      captionCaption Tablelabeltab:table-out
      endtable
      endtcolorbox

      enddocument


      enter image description here
      How can i fix it?
      Thanks










      share|improve this question














      i use code from topic: How to make a Table/tabular appears in a tcolorbox?



      But error "Not in outer par mode" and table does not appear.



      Minimal Code:



      documentclass[12pt,a4paper]article
      usepackagemwe
      usepackage[utf8]inputenc
      usepackageamsmath
      usepackageamsfonts
      usepackageamssymb
      usepackage[x11names,table]xcolor % dddd%
      usepackageeurosym

      usepackagedatetime
      settimeformatampmtime

      usepackagehyperref
      hypersetupcolorlinks=true, urlcolor=blue

      usepackagegraphicx,subcaption
      usepackagetcolorbox

      begindocument

      begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]

      begintable[h!]
      centering
      begintabularc
      hline
      % after \: hline or clinecol1-col2 clinecol3-col4 ...
      a& b & T/F & dif\ hline
      1 & 2 & False & -1\
      2 & 4 & False & -2\
      hline
      endtabular\
      captionCaption Tablelabeltab:table-out
      endtable
      endtcolorbox

      enddocument


      enter image description here
      How can i fix it?
      Thanks







      tables tcolorbox






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 5 at 1:28









      latexfortilatexforti

      7751 silver badge8 bronze badges




      7751 silver badge8 bronze badges























          3 Answers
          3






          active

          oldest

          votes


















          2














          enter image description here



          You should not insert float table into box. Remove it and for caption use captionof (defined in the caption and in capt-of package) command:



          documentclass[12pt,a4paper,
          x11names,table]article
          usepackagetcolorbox
          usepackage[skip=1ex]caption

          begindocument

          begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]
          centering
          begintabularc
          hline
          % after \: hline or clinecol1-col2 clinecol3-col4 ...
          a& b & T/F & dif\ hline
          1 & 2 & False & -1\
          2 & 4 & False & -2\
          hline
          endtabular\
          captionoffigureCaption Tablelabeltab:table-out
          endtcolorbox
          enddocument





          share|improve this answer
































            4














            tcolorbox allows to convert your figures and tables into nice floating colourful boxes. blend into=tables option uses the tcolorbox title as caption and adds the table counter and the caption into listoftables. If you prefer that tcolorbox adjust to table size, capture=hbox does it.



            documentclass[12pt,a4paper]article

            usepackagetcolorbox
            usepackagehyperref

            hypersetupcolorlinks=true, urlcolor=blue

            newtcolorbox[blend into=tables]mytable[2][]float=htb, title=#2,
            every float=centering, before upper=centering, #1

            begindocument

            listoftables

            beginmytableA nice floating table in tcolorbox format
            begintabularc
            hline
            % after \: hline or clinecol1-col2 clinecol3-col4 ...
            a& b & T/F & dif\ hline
            1 & 2 & False & -1\
            2 & 4 & False & -2\
            hline
            endtabular
            endmytable

            beginmytable[capture=hbox, colback=red!10, colframe=red!40!black]Another nice floating table in tcolorbox format
            begintabularc
            hline
            % after \: hline or clinecol1-col2 clinecol3-col4 ...
            a& b & T/F & dif\ hline
            1 & 2 & False & -1\
            2 & 4 & False & -2\
            hline
            endtabular
            endmytable

            enddocument


            enter image description here






            share|improve this answer






















            • 2





              Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

              – frougon
              Aug 5 at 9:24












            • @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

              – Ignasi
              Aug 5 at 9:33






            • 2





              Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

              – frougon
              Aug 5 at 9:41












            • Regarding this edit, didn't you want before upper rather than after upper?

              – frougon
              Aug 5 at 9:46











            • @frougon Ups! you're right again! Thank you.

              – Ignasi
              Aug 5 at 10:18


















            2














            You want to float the tcolorbox:



            documentclass[12pt,a4paper]article
            usepackage[utf8]inputenc
            usepackageamsmath
            usepackageamsfonts
            usepackageamssymb
            usepackage[x11names,table]xcolor % dddd%
            usepackageeurosym

            usepackagedatetime
            usepackagegraphicx,subcaption
            usepackagetcolorbox


            usepackagehyperref

            hypersetupcolorlinks=true, urlcolor=blue
            settimeformatampmtime

            begindocument

            begintable[htp!]
            begintcolorbox[
            colback=gray!5!white,
            colframe=gray!75!black,
            title=largeIn the next lines I'm trying to insert the same in a box
            ]
            centering
            begintabularc
            hline
            % after \: hline or clinecol1-col2 clinecol3-col4 ...
            a& b & T/F & dif\ hline
            1 & 2 & False & -1\
            2 & 4 & False & -2\
            hline
            endtabular

            captionCaption Tablelabeltab:table-out
            endtcolorbox
            endtable

            enddocument


            enter image description here



            And no, you don't want just h!, because it's highly unlikely that a table will fit at the “right spot”. Don't worry if it goes somewhere else, see How to influence the position of float environments like figure and table in LaTeX?






            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%2f502860%2ferror-not-in-outer-par-mode-table-inside-tcolorbox%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              enter image description here



              You should not insert float table into box. Remove it and for caption use captionof (defined in the caption and in capt-of package) command:



              documentclass[12pt,a4paper,
              x11names,table]article
              usepackagetcolorbox
              usepackage[skip=1ex]caption

              begindocument

              begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]
              centering
              begintabularc
              hline
              % after \: hline or clinecol1-col2 clinecol3-col4 ...
              a& b & T/F & dif\ hline
              1 & 2 & False & -1\
              2 & 4 & False & -2\
              hline
              endtabular\
              captionoffigureCaption Tablelabeltab:table-out
              endtcolorbox
              enddocument





              share|improve this answer





























                2














                enter image description here



                You should not insert float table into box. Remove it and for caption use captionof (defined in the caption and in capt-of package) command:



                documentclass[12pt,a4paper,
                x11names,table]article
                usepackagetcolorbox
                usepackage[skip=1ex]caption

                begindocument

                begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]
                centering
                begintabularc
                hline
                % after \: hline or clinecol1-col2 clinecol3-col4 ...
                a& b & T/F & dif\ hline
                1 & 2 & False & -1\
                2 & 4 & False & -2\
                hline
                endtabular\
                captionoffigureCaption Tablelabeltab:table-out
                endtcolorbox
                enddocument





                share|improve this answer



























                  2












                  2








                  2







                  enter image description here



                  You should not insert float table into box. Remove it and for caption use captionof (defined in the caption and in capt-of package) command:



                  documentclass[12pt,a4paper,
                  x11names,table]article
                  usepackagetcolorbox
                  usepackage[skip=1ex]caption

                  begindocument

                  begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]
                  centering
                  begintabularc
                  hline
                  % after \: hline or clinecol1-col2 clinecol3-col4 ...
                  a& b & T/F & dif\ hline
                  1 & 2 & False & -1\
                  2 & 4 & False & -2\
                  hline
                  endtabular\
                  captionoffigureCaption Tablelabeltab:table-out
                  endtcolorbox
                  enddocument





                  share|improve this answer













                  enter image description here



                  You should not insert float table into box. Remove it and for caption use captionof (defined in the caption and in capt-of package) command:



                  documentclass[12pt,a4paper,
                  x11names,table]article
                  usepackagetcolorbox
                  usepackage[skip=1ex]caption

                  begindocument

                  begintcolorbox[colback=gray!5!white,colframe=gray!75!black,title=largeIn the next lines I'm trying to insert the same in a box]
                  centering
                  begintabularc
                  hline
                  % after \: hline or clinecol1-col2 clinecol3-col4 ...
                  a& b & T/F & dif\ hline
                  1 & 2 & False & -1\
                  2 & 4 & False & -2\
                  hline
                  endtabular\
                  captionoffigureCaption Tablelabeltab:table-out
                  endtcolorbox
                  enddocument






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 5 at 1:44









                  ZarkoZarko

                  144k8 gold badges81 silver badges192 bronze badges




                  144k8 gold badges81 silver badges192 bronze badges


























                      4














                      tcolorbox allows to convert your figures and tables into nice floating colourful boxes. blend into=tables option uses the tcolorbox title as caption and adds the table counter and the caption into listoftables. If you prefer that tcolorbox adjust to table size, capture=hbox does it.



                      documentclass[12pt,a4paper]article

                      usepackagetcolorbox
                      usepackagehyperref

                      hypersetupcolorlinks=true, urlcolor=blue

                      newtcolorbox[blend into=tables]mytable[2][]float=htb, title=#2,
                      every float=centering, before upper=centering, #1

                      begindocument

                      listoftables

                      beginmytableA nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      beginmytable[capture=hbox, colback=red!10, colframe=red!40!black]Another nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      enddocument


                      enter image description here






                      share|improve this answer






















                      • 2





                        Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                        – frougon
                        Aug 5 at 9:24












                      • @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                        – Ignasi
                        Aug 5 at 9:33






                      • 2





                        Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                        – frougon
                        Aug 5 at 9:41












                      • Regarding this edit, didn't you want before upper rather than after upper?

                        – frougon
                        Aug 5 at 9:46











                      • @frougon Ups! you're right again! Thank you.

                        – Ignasi
                        Aug 5 at 10:18















                      4














                      tcolorbox allows to convert your figures and tables into nice floating colourful boxes. blend into=tables option uses the tcolorbox title as caption and adds the table counter and the caption into listoftables. If you prefer that tcolorbox adjust to table size, capture=hbox does it.



                      documentclass[12pt,a4paper]article

                      usepackagetcolorbox
                      usepackagehyperref

                      hypersetupcolorlinks=true, urlcolor=blue

                      newtcolorbox[blend into=tables]mytable[2][]float=htb, title=#2,
                      every float=centering, before upper=centering, #1

                      begindocument

                      listoftables

                      beginmytableA nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      beginmytable[capture=hbox, colback=red!10, colframe=red!40!black]Another nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      enddocument


                      enter image description here






                      share|improve this answer






















                      • 2





                        Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                        – frougon
                        Aug 5 at 9:24












                      • @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                        – Ignasi
                        Aug 5 at 9:33






                      • 2





                        Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                        – frougon
                        Aug 5 at 9:41












                      • Regarding this edit, didn't you want before upper rather than after upper?

                        – frougon
                        Aug 5 at 9:46











                      • @frougon Ups! you're right again! Thank you.

                        – Ignasi
                        Aug 5 at 10:18













                      4












                      4








                      4







                      tcolorbox allows to convert your figures and tables into nice floating colourful boxes. blend into=tables option uses the tcolorbox title as caption and adds the table counter and the caption into listoftables. If you prefer that tcolorbox adjust to table size, capture=hbox does it.



                      documentclass[12pt,a4paper]article

                      usepackagetcolorbox
                      usepackagehyperref

                      hypersetupcolorlinks=true, urlcolor=blue

                      newtcolorbox[blend into=tables]mytable[2][]float=htb, title=#2,
                      every float=centering, before upper=centering, #1

                      begindocument

                      listoftables

                      beginmytableA nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      beginmytable[capture=hbox, colback=red!10, colframe=red!40!black]Another nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      enddocument


                      enter image description here






                      share|improve this answer















                      tcolorbox allows to convert your figures and tables into nice floating colourful boxes. blend into=tables option uses the tcolorbox title as caption and adds the table counter and the caption into listoftables. If you prefer that tcolorbox adjust to table size, capture=hbox does it.



                      documentclass[12pt,a4paper]article

                      usepackagetcolorbox
                      usepackagehyperref

                      hypersetupcolorlinks=true, urlcolor=blue

                      newtcolorbox[blend into=tables]mytable[2][]float=htb, title=#2,
                      every float=centering, before upper=centering, #1

                      begindocument

                      listoftables

                      beginmytableA nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      beginmytable[capture=hbox, colback=red!10, colframe=red!40!black]Another nice floating table in tcolorbox format
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular
                      endmytable

                      enddocument


                      enter image description here







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Aug 5 at 10:18

























                      answered Aug 5 at 8:50









                      IgnasiIgnasi

                      98.9k6 gold badges181 silver badges331 bronze badges




                      98.9k6 gold badges181 silver badges331 bronze badges










                      • 2





                        Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                        – frougon
                        Aug 5 at 9:24












                      • @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                        – Ignasi
                        Aug 5 at 9:33






                      • 2





                        Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                        – frougon
                        Aug 5 at 9:41












                      • Regarding this edit, didn't you want before upper rather than after upper?

                        – frougon
                        Aug 5 at 9:46











                      • @frougon Ups! you're right again! Thank you.

                        – Ignasi
                        Aug 5 at 10:18












                      • 2





                        Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                        – frougon
                        Aug 5 at 9:24












                      • @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                        – Ignasi
                        Aug 5 at 9:33






                      • 2





                        Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                        – frougon
                        Aug 5 at 9:41












                      • Regarding this edit, didn't you want before upper rather than after upper?

                        – frougon
                        Aug 5 at 9:46











                      • @frougon Ups! you're right again! Thank you.

                        – Ignasi
                        Aug 5 at 10:18







                      2




                      2





                      Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                      – frougon
                      Aug 5 at 9:24






                      Nice solution in the tcolorbox spirit, but your screenshot doesn't correspond to your code. Indeed, your code has capture=hbox unconditionally in the options for newtcolorbox[blend into=tables]mytable..., thus both boxes have capture=hbox. Besides, I would simplify the preamble a lot: documentclassarticle usepackagetcolorbox newtcolorbox[blend into=tables]mytable[2][] float=htb, title=#2, every float=centering, #1 is enough for the sample code inside the document environment.

                      – frougon
                      Aug 5 at 9:24














                      @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                      – Ignasi
                      Aug 5 at 9:33





                      @frougon You're right. I modified the code on my computer but I did no copy the whole code on this site. I've corrected it. About the preamble, you are also right, but I just used the original one.

                      – Ignasi
                      Aug 5 at 9:33




                      2




                      2





                      Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                      – frougon
                      Aug 5 at 9:41






                      Users often write their whole preamble in the questions, but I generally clean these up when answering (unless there is really document contents that depends on the preamble). Otherwise, it's really difficult to exploit answers with an overly complex preamble: it takes time to filter out what is useless, and the users who need answers most don't even know they have to do so nor how to do it; they will copy huge preambles to their documents, and in the end they will load 100 packages, of which they use 10. You know the problems this creates.

                      – frougon
                      Aug 5 at 9:41














                      Regarding this edit, didn't you want before upper rather than after upper?

                      – frougon
                      Aug 5 at 9:46





                      Regarding this edit, didn't you want before upper rather than after upper?

                      – frougon
                      Aug 5 at 9:46













                      @frougon Ups! you're right again! Thank you.

                      – Ignasi
                      Aug 5 at 10:18





                      @frougon Ups! you're right again! Thank you.

                      – Ignasi
                      Aug 5 at 10:18











                      2














                      You want to float the tcolorbox:



                      documentclass[12pt,a4paper]article
                      usepackage[utf8]inputenc
                      usepackageamsmath
                      usepackageamsfonts
                      usepackageamssymb
                      usepackage[x11names,table]xcolor % dddd%
                      usepackageeurosym

                      usepackagedatetime
                      usepackagegraphicx,subcaption
                      usepackagetcolorbox


                      usepackagehyperref

                      hypersetupcolorlinks=true, urlcolor=blue
                      settimeformatampmtime

                      begindocument

                      begintable[htp!]
                      begintcolorbox[
                      colback=gray!5!white,
                      colframe=gray!75!black,
                      title=largeIn the next lines I'm trying to insert the same in a box
                      ]
                      centering
                      begintabularc
                      hline
                      % after \: hline or clinecol1-col2 clinecol3-col4 ...
                      a& b & T/F & dif\ hline
                      1 & 2 & False & -1\
                      2 & 4 & False & -2\
                      hline
                      endtabular

                      captionCaption Tablelabeltab:table-out
                      endtcolorbox
                      endtable

                      enddocument


                      enter image description here



                      And no, you don't want just h!, because it's highly unlikely that a table will fit at the “right spot”. Don't worry if it goes somewhere else, see How to influence the position of float environments like figure and table in LaTeX?






                      share|improve this answer





























                        2














                        You want to float the tcolorbox:



                        documentclass[12pt,a4paper]article
                        usepackage[utf8]inputenc
                        usepackageamsmath
                        usepackageamsfonts
                        usepackageamssymb
                        usepackage[x11names,table]xcolor % dddd%
                        usepackageeurosym

                        usepackagedatetime
                        usepackagegraphicx,subcaption
                        usepackagetcolorbox


                        usepackagehyperref

                        hypersetupcolorlinks=true, urlcolor=blue
                        settimeformatampmtime

                        begindocument

                        begintable[htp!]
                        begintcolorbox[
                        colback=gray!5!white,
                        colframe=gray!75!black,
                        title=largeIn the next lines I'm trying to insert the same in a box
                        ]
                        centering
                        begintabularc
                        hline
                        % after \: hline or clinecol1-col2 clinecol3-col4 ...
                        a& b & T/F & dif\ hline
                        1 & 2 & False & -1\
                        2 & 4 & False & -2\
                        hline
                        endtabular

                        captionCaption Tablelabeltab:table-out
                        endtcolorbox
                        endtable

                        enddocument


                        enter image description here



                        And no, you don't want just h!, because it's highly unlikely that a table will fit at the “right spot”. Don't worry if it goes somewhere else, see How to influence the position of float environments like figure and table in LaTeX?






                        share|improve this answer



























                          2












                          2








                          2







                          You want to float the tcolorbox:



                          documentclass[12pt,a4paper]article
                          usepackage[utf8]inputenc
                          usepackageamsmath
                          usepackageamsfonts
                          usepackageamssymb
                          usepackage[x11names,table]xcolor % dddd%
                          usepackageeurosym

                          usepackagedatetime
                          usepackagegraphicx,subcaption
                          usepackagetcolorbox


                          usepackagehyperref

                          hypersetupcolorlinks=true, urlcolor=blue
                          settimeformatampmtime

                          begindocument

                          begintable[htp!]
                          begintcolorbox[
                          colback=gray!5!white,
                          colframe=gray!75!black,
                          title=largeIn the next lines I'm trying to insert the same in a box
                          ]
                          centering
                          begintabularc
                          hline
                          % after \: hline or clinecol1-col2 clinecol3-col4 ...
                          a& b & T/F & dif\ hline
                          1 & 2 & False & -1\
                          2 & 4 & False & -2\
                          hline
                          endtabular

                          captionCaption Tablelabeltab:table-out
                          endtcolorbox
                          endtable

                          enddocument


                          enter image description here



                          And no, you don't want just h!, because it's highly unlikely that a table will fit at the “right spot”. Don't worry if it goes somewhere else, see How to influence the position of float environments like figure and table in LaTeX?






                          share|improve this answer













                          You want to float the tcolorbox:



                          documentclass[12pt,a4paper]article
                          usepackage[utf8]inputenc
                          usepackageamsmath
                          usepackageamsfonts
                          usepackageamssymb
                          usepackage[x11names,table]xcolor % dddd%
                          usepackageeurosym

                          usepackagedatetime
                          usepackagegraphicx,subcaption
                          usepackagetcolorbox


                          usepackagehyperref

                          hypersetupcolorlinks=true, urlcolor=blue
                          settimeformatampmtime

                          begindocument

                          begintable[htp!]
                          begintcolorbox[
                          colback=gray!5!white,
                          colframe=gray!75!black,
                          title=largeIn the next lines I'm trying to insert the same in a box
                          ]
                          centering
                          begintabularc
                          hline
                          % after \: hline or clinecol1-col2 clinecol3-col4 ...
                          a& b & T/F & dif\ hline
                          1 & 2 & False & -1\
                          2 & 4 & False & -2\
                          hline
                          endtabular

                          captionCaption Tablelabeltab:table-out
                          endtcolorbox
                          endtable

                          enddocument


                          enter image description here



                          And no, you don't want just h!, because it's highly unlikely that a table will fit at the “right spot”. Don't worry if it goes somewhere else, see How to influence the position of float environments like figure and table in LaTeX?







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Aug 5 at 7:58









                          egregegreg

                          762k90 gold badges1993 silver badges3340 bronze badges




                          762k90 gold badges1993 silver badges3340 bronze badges






























                              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%2f502860%2ferror-not-in-outer-par-mode-table-inside-tcolorbox%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

                              Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                              Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                              Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form