Getting the width of the current container

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Does an object always see its latest internal state irrespective of thread?

Can a Cauchy sequence converge for one metric while not converging for another?

Why do I get two different answers for this counting problem?

Can a monk's single staff be considered dual wielded, as per the Dual Wielder feat?

Which country benefited the most from UN Security Council vetoes?

"You are your self first supporter", a more proper way to say it

Can I make popcorn with any corn?

Why is consensus so controversial in Britain?

Convert two switches to a dual stack, and add outlet - possible here?

Revoked SSL certificate

Horror movie about a virus at the prom; beginning and end are stylized as a cartoon

How can bays and straits be determined in a procedurally generated map?

LaTeX: Why are digits allowed in environments, but forbidden in commands?

How much of data wrangling is a data scientist's job?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

Rock identification in KY

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Is it possible to run Internet Explorer on OS X El Capitan?

Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?

Is it inappropriate for a student to attend their mentor's dissertation defense?

Do I have a twin with permutated remainders?

How much RAM could one put in a typical 80386 setup?

Are astronomers waiting to see something in an image from a gravitational lens that they've already seen in an adjacent image?



Getting the width of the current container














0















I'm trying to create a generic command to write a solid heading. The width of the heading should fit into the containing environment in which the heading it rendered.



In the example below, the orange heading flows outside the table.



What command should I use to replace textwidthin the solidheading so that it will always print a width that fits into either a paragraph width or inside a table column?



enter image description here



The code to produce this is as follows:



documentclass[12pt]article

usepackagexcolor

newcommandsolidheading[2][yellow]
noindent colorbox#1parbox[t]textwidth#2
vskip1ex


usepackagecolortbl
usepackagefontawesome5

newenvironmentnotes
noindent
begintabular!colorblackvrule width 0.01textwidthp0.85textwidth
cellcolorgray
LargefaEdit[regular] bfseriesNotes\
cellcolorlightgray


endtabular



begindocument

solidheading[pink]Heading outside Table

beginnotes
solidheading[orange]Don't forget
Smile and say hello.newline
Happy makes happy.
endnotes

enddocument








share


























    0















    I'm trying to create a generic command to write a solid heading. The width of the heading should fit into the containing environment in which the heading it rendered.



    In the example below, the orange heading flows outside the table.



    What command should I use to replace textwidthin the solidheading so that it will always print a width that fits into either a paragraph width or inside a table column?



    enter image description here



    The code to produce this is as follows:



    documentclass[12pt]article

    usepackagexcolor

    newcommandsolidheading[2][yellow]
    noindent colorbox#1parbox[t]textwidth#2
    vskip1ex


    usepackagecolortbl
    usepackagefontawesome5

    newenvironmentnotes
    noindent
    begintabular!colorblackvrule width 0.01textwidthp0.85textwidth
    cellcolorgray
    LargefaEdit[regular] bfseriesNotes\
    cellcolorlightgray


    endtabular



    begindocument

    solidheading[pink]Heading outside Table

    beginnotes
    solidheading[orange]Don't forget
    Smile and say hello.newline
    Happy makes happy.
    endnotes

    enddocument








    share
























      0












      0








      0








      I'm trying to create a generic command to write a solid heading. The width of the heading should fit into the containing environment in which the heading it rendered.



      In the example below, the orange heading flows outside the table.



      What command should I use to replace textwidthin the solidheading so that it will always print a width that fits into either a paragraph width or inside a table column?



      enter image description here



      The code to produce this is as follows:



      documentclass[12pt]article

      usepackagexcolor

      newcommandsolidheading[2][yellow]
      noindent colorbox#1parbox[t]textwidth#2
      vskip1ex


      usepackagecolortbl
      usepackagefontawesome5

      newenvironmentnotes
      noindent
      begintabular!colorblackvrule width 0.01textwidthp0.85textwidth
      cellcolorgray
      LargefaEdit[regular] bfseriesNotes\
      cellcolorlightgray


      endtabular



      begindocument

      solidheading[pink]Heading outside Table

      beginnotes
      solidheading[orange]Don't forget
      Smile and say hello.newline
      Happy makes happy.
      endnotes

      enddocument








      share














      I'm trying to create a generic command to write a solid heading. The width of the heading should fit into the containing environment in which the heading it rendered.



      In the example below, the orange heading flows outside the table.



      What command should I use to replace textwidthin the solidheading so that it will always print a width that fits into either a paragraph width or inside a table column?



      enter image description here



      The code to produce this is as follows:



      documentclass[12pt]article

      usepackagexcolor

      newcommandsolidheading[2][yellow]
      noindent colorbox#1parbox[t]textwidth#2
      vskip1ex


      usepackagecolortbl
      usepackagefontawesome5

      newenvironmentnotes
      noindent
      begintabular!colorblackvrule width 0.01textwidthp0.85textwidth
      cellcolorgray
      LargefaEdit[regular] bfseriesNotes\
      cellcolorlightgray


      endtabular



      begindocument

      solidheading[pink]Heading outside Table

      beginnotes
      solidheading[orange]Don't forget
      Smile and say hello.newline
      Happy makes happy.
      endnotes

      enddocument






      width





      share












      share










      share



      share










      asked 1 min ago









      JackJack

      433159




      433159




















          0






          active

          oldest

          votes












          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%2f483452%2fgetting-the-width-of-the-current-container%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f483452%2fgetting-the-width-of-the-current-container%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

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm