Old style “caution” boxesNicer wavy line with TikZReplace the zigzag decoration by wave decoration in tcolorboxTabular border styleTikZ draw-Putting old calendar style date in left marginUsing a pgfplots-style legend in a plain-old tikzpictureArranging connected boxesFormatting answer boxesRounded boxes around textFlowchart of Nested BoxesOverlay multiple boxes in tikzReplicating a fancy bordered text style in LaTeX

Is any device installed on airplane to measure wind speed relative to the ground, and its direction?

Do Chain Devils' Animated Chains restrain creatures on a grapple?

Collect results of a map operation in a Map using Collectors.toMap or groupingBy

Modify real part and leaves imaginary part unchanged

An employee has low self-confidence, and is performing poorly. How can I help?

Should I withdraw my paper because the editor is delaying the report?

How effective are nunchaku as a choking weapon?

Why can I ping 10.0.0.0/8 addresses from a 192.168.1.0/24 subnet?

D&D Monsters and Copyright

How to temporarily replace Latin characters with Greek

Why is the intercept changing in a logistic regression when all predictors are standardized?

What powers an aircraft prior to the APU being switched on?

70's/80's story about a high ranking prisoner of war on a prison planet

How to not lose focus after each disruption in flow

A Society Built Around Theft?

How to discipline overeager engineer

Why do English transliterations of Arabic names have so many Qs in them?

Is there a way to make a Minor key sound "less dark"?

How long should a test wait to assume that the result remains fixed

My first random password generator

one-liner vs script

Consecutive numbers that are Manhattan distance 3 apart

Can you decide not to sneak into a room after seeing your roll?

Why did a young George Washington sign a document admitting to assassinating a French military officer?



Old style “caution” boxes


Nicer wavy line with TikZReplace the zigzag decoration by wave decoration in tcolorboxTabular border styleTikZ draw-Putting old calendar style date in left marginUsing a pgfplots-style legend in a plain-old tikzpictureArranging connected boxesFormatting answer boxesRounded boxes around textFlowchart of Nested BoxesOverlay multiple boxes in tikzReplicating a fancy bordered text style in LaTeX






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









9

















Technical manuals from the 1960s and 1970s sometimes had eye-catching CAUTION boxes surrounded by wavy or curly lines.



CAUTIONCAUTION



My best attempt at re-creating this is not ideal as I can't get the snake to line up on all corners:



begintikzpicture
draw[very thick,decorate,
decoration=snake,segment length=9.5pt]
(0,0) rectangle (140pt,40pt)
node[pos=0.5] textbfCAUTION;
endtikzpicture


CAUTION bad



I would also be willing to use any other package which can produce fancy boxes with borders.










share|improve this question


































    9

















    Technical manuals from the 1960s and 1970s sometimes had eye-catching CAUTION boxes surrounded by wavy or curly lines.



    CAUTIONCAUTION



    My best attempt at re-creating this is not ideal as I can't get the snake to line up on all corners:



    begintikzpicture
    draw[very thick,decorate,
    decoration=snake,segment length=9.5pt]
    (0,0) rectangle (140pt,40pt)
    node[pos=0.5] textbfCAUTION;
    endtikzpicture


    CAUTION bad



    I would also be willing to use any other package which can produce fancy boxes with borders.










    share|improve this question






























      9












      9








      9


      2






      Technical manuals from the 1960s and 1970s sometimes had eye-catching CAUTION boxes surrounded by wavy or curly lines.



      CAUTIONCAUTION



      My best attempt at re-creating this is not ideal as I can't get the snake to line up on all corners:



      begintikzpicture
      draw[very thick,decorate,
      decoration=snake,segment length=9.5pt]
      (0,0) rectangle (140pt,40pt)
      node[pos=0.5] textbfCAUTION;
      endtikzpicture


      CAUTION bad



      I would also be willing to use any other package which can produce fancy boxes with borders.










      share|improve this question
















      Technical manuals from the 1960s and 1970s sometimes had eye-catching CAUTION boxes surrounded by wavy or curly lines.



      CAUTIONCAUTION



      My best attempt at re-creating this is not ideal as I can't get the snake to line up on all corners:



      begintikzpicture
      draw[very thick,decorate,
      decoration=snake,segment length=9.5pt]
      (0,0) rectangle (140pt,40pt)
      node[pos=0.5] textbfCAUTION;
      endtikzpicture


      CAUTION bad



      I would also be willing to use any other package which can produce fancy boxes with borders.







      tikz-pgf border






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question



      share|improve this question








      edited Apr 18 at 6:00









      Peter Mortensen

      5683 silver badges7 bronze badges




      5683 silver badges7 bronze badges










      asked Apr 17 at 23:27









      MassMass

      3401 silver badge9 bronze badges




      3401 silver badge9 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          14


















          I would employ Jake's complete sines here to modify your proposal to something that can also be used in a tcolorbox



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationcomplete sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength / int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal


          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=complete sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt

          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          draw[oldfashioned sines]
          (frame.south west) rectangle (frame.north east);
          draw[oldfashioned sines]
          ([xshift=1pt,yshift=0.4pt]frame.south west) rectangle ([xshift=1pt,yshift=0.4pt]frame.north east);
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCaution
          endCaution

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          endtikzpicture

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          draw[oldfashioned sines]
          (1pt,0.4pt) rectangle (141pt,40.4pt) ;
          endtikzpicture
          enddocument


          enter image description here



          I'd like to thank quark67 for the great suggestion to add line cap=rect.



          ADDENDUM: An attempt to address your request. It comes with a "new" decoration symmetric sines that differ from Jake's complete sines in that the number of oscillations is half-integer. Therefore the result is symmetric under reflections about an axis that runs through the middle of the path.



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationsymmetric sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=
          pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength /
          (int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)+0.5)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude



          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=symmetric sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt
          defLstAnchors"south west","south east","north east","north west"
          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          foreach XX [count=YY,remember=XX as LastXX (initially north west)]
          in south west,south east,north east,north west
          ifoddYY
          draw[oldfashioned sines] (frame.LastXX) -- (frame.XX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.LastXX) -- ([xshift=1pt,yshift=0.4pt]frame.XX);
          else
          draw[oldfashioned sines] (frame.XX) -- (frame.LastXX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.XX) -- ([xshift=1pt,yshift=0.4pt]frame.LastXX);
          fi
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCAUTION
          endCaution
          enddocument


          enter image description here






          share|improve this answer




























          • The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

            – user121799
            Apr 18 at 2:57






          • 1





            For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

            – quark67
            Apr 18 at 2:58











          • @quark67 That's an excellent suggestion, thanks!

            – user121799
            Apr 18 at 3:01











          • Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

            – Mass
            Apr 22 at 18:29











          • @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

            – user121799
            Apr 22 at 21:14












          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/4.0/"u003ecc by-sa 4.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%2f485387%2fold-style-caution-boxes%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









          14


















          I would employ Jake's complete sines here to modify your proposal to something that can also be used in a tcolorbox



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationcomplete sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength / int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal


          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=complete sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt

          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          draw[oldfashioned sines]
          (frame.south west) rectangle (frame.north east);
          draw[oldfashioned sines]
          ([xshift=1pt,yshift=0.4pt]frame.south west) rectangle ([xshift=1pt,yshift=0.4pt]frame.north east);
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCaution
          endCaution

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          endtikzpicture

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          draw[oldfashioned sines]
          (1pt,0.4pt) rectangle (141pt,40.4pt) ;
          endtikzpicture
          enddocument


          enter image description here



          I'd like to thank quark67 for the great suggestion to add line cap=rect.



          ADDENDUM: An attempt to address your request. It comes with a "new" decoration symmetric sines that differ from Jake's complete sines in that the number of oscillations is half-integer. Therefore the result is symmetric under reflections about an axis that runs through the middle of the path.



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationsymmetric sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=
          pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength /
          (int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)+0.5)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude



          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=symmetric sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt
          defLstAnchors"south west","south east","north east","north west"
          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          foreach XX [count=YY,remember=XX as LastXX (initially north west)]
          in south west,south east,north east,north west
          ifoddYY
          draw[oldfashioned sines] (frame.LastXX) -- (frame.XX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.LastXX) -- ([xshift=1pt,yshift=0.4pt]frame.XX);
          else
          draw[oldfashioned sines] (frame.XX) -- (frame.LastXX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.XX) -- ([xshift=1pt,yshift=0.4pt]frame.LastXX);
          fi
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCAUTION
          endCaution
          enddocument


          enter image description here






          share|improve this answer




























          • The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

            – user121799
            Apr 18 at 2:57






          • 1





            For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

            – quark67
            Apr 18 at 2:58











          • @quark67 That's an excellent suggestion, thanks!

            – user121799
            Apr 18 at 3:01











          • Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

            – Mass
            Apr 22 at 18:29











          • @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

            – user121799
            Apr 22 at 21:14















          14


















          I would employ Jake's complete sines here to modify your proposal to something that can also be used in a tcolorbox



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationcomplete sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength / int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal


          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=complete sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt

          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          draw[oldfashioned sines]
          (frame.south west) rectangle (frame.north east);
          draw[oldfashioned sines]
          ([xshift=1pt,yshift=0.4pt]frame.south west) rectangle ([xshift=1pt,yshift=0.4pt]frame.north east);
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCaution
          endCaution

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          endtikzpicture

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          draw[oldfashioned sines]
          (1pt,0.4pt) rectangle (141pt,40.4pt) ;
          endtikzpicture
          enddocument


          enter image description here



          I'd like to thank quark67 for the great suggestion to add line cap=rect.



          ADDENDUM: An attempt to address your request. It comes with a "new" decoration symmetric sines that differ from Jake's complete sines in that the number of oscillations is half-integer. Therefore the result is symmetric under reflections about an axis that runs through the middle of the path.



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationsymmetric sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=
          pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength /
          (int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)+0.5)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude



          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=symmetric sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt
          defLstAnchors"south west","south east","north east","north west"
          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          foreach XX [count=YY,remember=XX as LastXX (initially north west)]
          in south west,south east,north east,north west
          ifoddYY
          draw[oldfashioned sines] (frame.LastXX) -- (frame.XX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.LastXX) -- ([xshift=1pt,yshift=0.4pt]frame.XX);
          else
          draw[oldfashioned sines] (frame.XX) -- (frame.LastXX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.XX) -- ([xshift=1pt,yshift=0.4pt]frame.LastXX);
          fi
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCAUTION
          endCaution
          enddocument


          enter image description here






          share|improve this answer




























          • The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

            – user121799
            Apr 18 at 2:57






          • 1





            For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

            – quark67
            Apr 18 at 2:58











          • @quark67 That's an excellent suggestion, thanks!

            – user121799
            Apr 18 at 3:01











          • Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

            – Mass
            Apr 22 at 18:29











          • @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

            – user121799
            Apr 22 at 21:14













          14














          14










          14









          I would employ Jake's complete sines here to modify your proposal to something that can also be used in a tcolorbox



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationcomplete sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength / int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal


          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=complete sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt

          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          draw[oldfashioned sines]
          (frame.south west) rectangle (frame.north east);
          draw[oldfashioned sines]
          ([xshift=1pt,yshift=0.4pt]frame.south west) rectangle ([xshift=1pt,yshift=0.4pt]frame.north east);
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCaution
          endCaution

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          endtikzpicture

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          draw[oldfashioned sines]
          (1pt,0.4pt) rectangle (141pt,40.4pt) ;
          endtikzpicture
          enddocument


          enter image description here



          I'd like to thank quark67 for the great suggestion to add line cap=rect.



          ADDENDUM: An attempt to address your request. It comes with a "new" decoration symmetric sines that differ from Jake's complete sines in that the number of oscillations is half-integer. Therefore the result is symmetric under reflections about an axis that runs through the middle of the path.



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationsymmetric sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=
          pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength /
          (int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)+0.5)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude



          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=symmetric sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt
          defLstAnchors"south west","south east","north east","north west"
          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          foreach XX [count=YY,remember=XX as LastXX (initially north west)]
          in south west,south east,north east,north west
          ifoddYY
          draw[oldfashioned sines] (frame.LastXX) -- (frame.XX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.LastXX) -- ([xshift=1pt,yshift=0.4pt]frame.XX);
          else
          draw[oldfashioned sines] (frame.XX) -- (frame.LastXX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.XX) -- ([xshift=1pt,yshift=0.4pt]frame.LastXX);
          fi
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCAUTION
          endCaution
          enddocument


          enter image description here






          share|improve this answer
















          I would employ Jake's complete sines here to modify your proposal to something that can also be used in a tcolorbox



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationcomplete sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength / int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal


          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=complete sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt

          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          draw[oldfashioned sines]
          (frame.south west) rectangle (frame.north east);
          draw[oldfashioned sines]
          ([xshift=1pt,yshift=0.4pt]frame.south west) rectangle ([xshift=1pt,yshift=0.4pt]frame.north east);
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCaution
          endCaution

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          endtikzpicture

          begintikzpicture
          draw[oldfashioned sines]
          (0,0) rectangle (140pt,40pt)
          node[pos=0.5] textbfCAUTION;
          draw[oldfashioned sines]
          (1pt,0.4pt) rectangle (141pt,40.4pt) ;
          endtikzpicture
          enddocument


          enter image description here



          I'd like to thank quark67 for the great suggestion to add line cap=rect.



          ADDENDUM: An attempt to address your request. It comes with a "new" decoration symmetric sines that differ from Jake's complete sines in that the number of oscillations is half-integer. Therefore the result is symmetric under reflections about an axis that runs through the middle of the path.



          documentclass[a4paper,12pt]article
          usepackage[many]tcolorbox
          usetikzlibrarydecorations
          begindocument

          pgfdeclaredecorationsymmetric sinesinitial

          stateinitial[
          width=+0pt,
          next state=sine,
          persistent precomputation=
          pgfmathsetmacromatchinglength
          pgfdecoratedinputsegmentlength /
          (int(pgfdecoratedinputsegmentlength/pgfdecorationsegmentlength)+0.5)
          setlengthpgfdecorationsegmentlengthmatchinglength pt
          ]
          statesine[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude

          statefinal[width=pgfdecorationsegmentlength]
          pgfpathsinepgfpoint0.25pgfdecorationsegmentlength0.5pgfdecorationsegmentamplitude
          pgfpathcosinepgfpoint0.25pgfdecorationsegmentlength-0.5pgfdecorationsegmentamplitude



          tikzsetoldfashioned sines/.style=very thick,line cap=rect,% <- thanks to quark67!
          decorate,decoration=symmetric sines,segment length=#1,path has corners,
          oldfashioned sines/.default=9.5pt
          defLstAnchors"south west","south east","north east","north west"
          newtcolorboxCaution%
          width=140pt,height=40pt,
          colback=white,halign=flush center,valign=center,
          enhanced,% jigsaw, breakable, % allow page breaks
          frame hidden, % hide the default frame
          overlay=%
          foreach XX [count=YY,remember=XX as LastXX (initially north west)]
          in south west,south east,north east,north west
          ifoddYY
          draw[oldfashioned sines] (frame.LastXX) -- (frame.XX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.LastXX) -- ([xshift=1pt,yshift=0.4pt]frame.XX);
          else
          draw[oldfashioned sines] (frame.XX) -- (frame.LastXX);
          draw[oldfashioned sines] ([xshift=1pt,yshift=0.4pt]frame.XX) -- ([xshift=1pt,yshift=0.4pt]frame.LastXX);
          fi
          ,
          % paragraph skips obeyed within tcolorbox
          parbox=false,


          beginCaution
          textbfCAUTION
          endCaution
          enddocument


          enter image description here







          share|improve this answer















          share|improve this answer




          share|improve this answer



          share|improve this answer








          edited Apr 23 at 16:10

























          answered Apr 17 at 23:47







          user121799






















          • The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

            – user121799
            Apr 18 at 2:57






          • 1





            For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

            – quark67
            Apr 18 at 2:58











          • @quark67 That's an excellent suggestion, thanks!

            – user121799
            Apr 18 at 3:01











          • Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

            – Mass
            Apr 22 at 18:29











          • @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

            – user121799
            Apr 22 at 21:14

















          • The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

            – user121799
            Apr 18 at 2:57






          • 1





            For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

            – quark67
            Apr 18 at 2:58











          • @quark67 That's an excellent suggestion, thanks!

            – user121799
            Apr 18 at 3:01











          • Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

            – Mass
            Apr 22 at 18:29











          • @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

            – user121799
            Apr 22 at 21:14
















          The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

          – user121799
          Apr 18 at 2:57





          The question is what you want to achieve. Do you want to have such boxes in the text? If so, I will be happy to turn this into a tcolorbox.

          – user121799
          Apr 18 at 2:57




          1




          1





          For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

          – quark67
          Apr 18 at 2:58





          For a slightly better end of the decoration on the bottom left corner (when you magnified the picture), add line cap=rect in the options of draw.

          – quark67
          Apr 18 at 2:58













          @quark67 That's an excellent suggestion, thanks!

          – user121799
          Apr 18 at 3:01





          @quark67 That's an excellent suggestion, thanks!

          – user121799
          Apr 18 at 3:01













          Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

          – Mass
          Apr 22 at 18:29





          Looks very nice. Indeed I am interested in headers, not inline with text. Is it possible to have the ends line up symmetrically (like in the first picture of the question) instead of in a counter-clockwise fashion?

          – Mass
          Apr 22 at 18:29













          @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

          – user121799
          Apr 22 at 21:14





          @Mass I am not sure I understand your request but I added something which I thought may be what you want. If not, please try to explain it in more detail.

          – user121799
          Apr 22 at 21:14


















          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%2f485387%2fold-style-caution-boxes%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

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?