Create custom note boxes The Next CEO of Stack OverflowCreate Custom tabularcreate a framed...

Finitely generated matrix groups whose eigenvalues are all algebraic

Prodigo = pro + ago?

Why doesn't Shulchan Aruch include the laws of destroying fruit trees?

How to find if SQL server backup is encrypted with TDE without restoring the backup

Can I cast Thunderwave and be at the center of its bottom face, but not be affected by it?

Direct Implications Between USA and UK in Event of No-Deal Brexit

How do I secure a TV wall mount?

MT "will strike" & LXX "will watch carefully" (Gen 3:15)?

Why was Sir Cadogan fired?

How do I keep Mac Emacs from trapping M-`?

Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?

Are British MPs missing the point, with these 'Indicative Votes'?

Read/write a pipe-delimited file line by line with some simple text manipulation

Free fall ellipse or parabola?

Horror film about a man brought out of cryogenic suspension without a soul, around 1990

Is it possible to create a QR code using text?

What does it mean 'exit 1' for a job status after rclone sync

Avoiding the "not like other girls" trope?

Is it okay to majorly distort historical facts while writing a fiction story?

Calculating discount not working

Gauss' Posthumous Publications?

How to pronounce fünf in 45

Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?

Upgrading From a 9 Speed Sora Derailleur?



Create custom note boxes



The Next CEO of Stack OverflowCreate Custom tabularcreate a framed environment for a margin noteHow to create nested custom environment with different kind of frames?How to create theorem boxesCreate custom note environment with tcolorboxCreate custom tabular environment“Author's note”How do I create colored table note enviroment?Making an environment for personal noteHow to create custom formatting command












1















I am trying to create custom info boxes (very similar as in awesomebox package).



The and everything sims is fine except when the box is not surrounded with some text. Then I get an error There's no line here to end.



I guess the error is because of bigskipnewline in my macros. I used it to create extra paddings on top and bottom of the environment and macros



documentclass[12pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage[margin=2cm]{geometry}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{graphicx}
usepackage{fontawesome}
parindent=0ex
usepackage{xcolor}

% RED
definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

% ORANGE
definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

% BANS ----------------------------------------------------------------------

newcommand{banBox}[2][ban]{%
bigskipnewline
begin{minipage}{.1textwidth}centering
textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
end{minipage}%
textcolor{redSeven}{vrule width 3pt hspace{14pt}}
begin{minipage}{.8textwidth}
textcolor{redNine}{#2}
end{minipage}
smallskipnewline
}

newenvironment{banEnv}[1][ban]%
{bigskipnewline%
begin{minipage}{.1textwidth}centering%
textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
end{minipage}%
textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
begin{minipage}{.8textwidth}
color{redNine}}
{end{minipage}bigskipnewline}

% WARNINGS ------------------------------------------------------------------

newcommand{warningBox}[2][exclamation-triangle]{%
bigskip newline
begin{minipage}{.1textwidth}centering
textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
end{minipage}%
textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
begin{minipage}{.8textwidth}
textcolor{orangeNine}{#2}
end{minipage}
newline
}

newenvironment{warningEnv}[1][exclamation-triangle]%
{bigskipnewline
begin{minipage}{.1textwidth}centering%
textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
end{minipage}%
textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
begin{minipage}{.8textwidth}
color{orangeNine}}
{end{minipage}bigskipnewline}

%-------------------------------------------------------------------------------

begin{document}

Comment this line or Delete any commented line bellow
banBox{Ban box.}
% A
begin{banEnv}
Ban environment.\
Lorem ipsum dolor sit amet.\
Earum odit quia maiores nisi illum reiciendis aspernatur.
end{banEnv}
% B
warningBox{Warning box.}
% C
begin{warningEnv}
Warning environment.\
Lorem ipsum dolor sit amet\
Earum odit quia maiores nisi illum reiciendis aspernatur.
end{warningEnv}
% D

end{document}


Updated:
The worst case if is no line in between.



begin{document}

banBox{Ban box.}

begin{banEnv}
Ban environment.\
Lorem ipsum dolor sit amet.\
Earum odit quia maiores nisi illum reiciendis aspernatur.
end{banEnv}

warningBox{Warning box.}

begin{warningEnv}
Warning environment.\
Lorem ipsum dolor sit amet\
Earum odit quia maiores nisi illum reiciendis aspernatur.
end{warningEnv}


end{document}









share|improve this question





























    1















    I am trying to create custom info boxes (very similar as in awesomebox package).



    The and everything sims is fine except when the box is not surrounded with some text. Then I get an error There's no line here to end.



    I guess the error is because of bigskipnewline in my macros. I used it to create extra paddings on top and bottom of the environment and macros



    documentclass[12pt,a4paper]{article}
    usepackage[utf8]{inputenc}
    usepackage[margin=2cm]{geometry}
    usepackage{amsmath}
    usepackage{amsfonts}
    usepackage{amssymb}
    usepackage{graphicx}
    usepackage{fontawesome}
    parindent=0ex
    usepackage{xcolor}

    % RED
    definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
    definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

    % ORANGE
    definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
    definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

    % BANS ----------------------------------------------------------------------

    newcommand{banBox}[2][ban]{%
    bigskipnewline
    begin{minipage}{.1textwidth}centering
    textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
    end{minipage}%
    textcolor{redSeven}{vrule width 3pt hspace{14pt}}
    begin{minipage}{.8textwidth}
    textcolor{redNine}{#2}
    end{minipage}
    smallskipnewline
    }

    newenvironment{banEnv}[1][ban]%
    {bigskipnewline%
    begin{minipage}{.1textwidth}centering%
    textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
    end{minipage}%
    textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
    begin{minipage}{.8textwidth}
    color{redNine}}
    {end{minipage}bigskipnewline}

    % WARNINGS ------------------------------------------------------------------

    newcommand{warningBox}[2][exclamation-triangle]{%
    bigskip newline
    begin{minipage}{.1textwidth}centering
    textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
    end{minipage}%
    textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
    begin{minipage}{.8textwidth}
    textcolor{orangeNine}{#2}
    end{minipage}
    newline
    }

    newenvironment{warningEnv}[1][exclamation-triangle]%
    {bigskipnewline
    begin{minipage}{.1textwidth}centering%
    textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
    end{minipage}%
    textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
    begin{minipage}{.8textwidth}
    color{orangeNine}}
    {end{minipage}bigskipnewline}

    %-------------------------------------------------------------------------------

    begin{document}

    Comment this line or Delete any commented line bellow
    banBox{Ban box.}
    % A
    begin{banEnv}
    Ban environment.\
    Lorem ipsum dolor sit amet.\
    Earum odit quia maiores nisi illum reiciendis aspernatur.
    end{banEnv}
    % B
    warningBox{Warning box.}
    % C
    begin{warningEnv}
    Warning environment.\
    Lorem ipsum dolor sit amet\
    Earum odit quia maiores nisi illum reiciendis aspernatur.
    end{warningEnv}
    % D

    end{document}


    Updated:
    The worst case if is no line in between.



    begin{document}

    banBox{Ban box.}

    begin{banEnv}
    Ban environment.\
    Lorem ipsum dolor sit amet.\
    Earum odit quia maiores nisi illum reiciendis aspernatur.
    end{banEnv}

    warningBox{Warning box.}

    begin{warningEnv}
    Warning environment.\
    Lorem ipsum dolor sit amet\
    Earum odit quia maiores nisi illum reiciendis aspernatur.
    end{warningEnv}


    end{document}









    share|improve this question



























      1












      1








      1


      0






      I am trying to create custom info boxes (very similar as in awesomebox package).



      The and everything sims is fine except when the box is not surrounded with some text. Then I get an error There's no line here to end.



      I guess the error is because of bigskipnewline in my macros. I used it to create extra paddings on top and bottom of the environment and macros



      documentclass[12pt,a4paper]{article}
      usepackage[utf8]{inputenc}
      usepackage[margin=2cm]{geometry}
      usepackage{amsmath}
      usepackage{amsfonts}
      usepackage{amssymb}
      usepackage{graphicx}
      usepackage{fontawesome}
      parindent=0ex
      usepackage{xcolor}

      % RED
      definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
      definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

      % ORANGE
      definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
      definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

      % BANS ----------------------------------------------------------------------

      newcommand{banBox}[2][ban]{%
      bigskipnewline
      begin{minipage}{.1textwidth}centering
      textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
      end{minipage}%
      textcolor{redSeven}{vrule width 3pt hspace{14pt}}
      begin{minipage}{.8textwidth}
      textcolor{redNine}{#2}
      end{minipage}
      smallskipnewline
      }

      newenvironment{banEnv}[1][ban]%
      {bigskipnewline%
      begin{minipage}{.1textwidth}centering%
      textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
      end{minipage}%
      textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
      begin{minipage}{.8textwidth}
      color{redNine}}
      {end{minipage}bigskipnewline}

      % WARNINGS ------------------------------------------------------------------

      newcommand{warningBox}[2][exclamation-triangle]{%
      bigskip newline
      begin{minipage}{.1textwidth}centering
      textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
      end{minipage}%
      textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
      begin{minipage}{.8textwidth}
      textcolor{orangeNine}{#2}
      end{minipage}
      newline
      }

      newenvironment{warningEnv}[1][exclamation-triangle]%
      {bigskipnewline
      begin{minipage}{.1textwidth}centering%
      textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
      end{minipage}%
      textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
      begin{minipage}{.8textwidth}
      color{orangeNine}}
      {end{minipage}bigskipnewline}

      %-------------------------------------------------------------------------------

      begin{document}

      Comment this line or Delete any commented line bellow
      banBox{Ban box.}
      % A
      begin{banEnv}
      Ban environment.\
      Lorem ipsum dolor sit amet.\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{banEnv}
      % B
      warningBox{Warning box.}
      % C
      begin{warningEnv}
      Warning environment.\
      Lorem ipsum dolor sit amet\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{warningEnv}
      % D

      end{document}


      Updated:
      The worst case if is no line in between.



      begin{document}

      banBox{Ban box.}

      begin{banEnv}
      Ban environment.\
      Lorem ipsum dolor sit amet.\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{banEnv}

      warningBox{Warning box.}

      begin{warningEnv}
      Warning environment.\
      Lorem ipsum dolor sit amet\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{warningEnv}


      end{document}









      share|improve this question
















      I am trying to create custom info boxes (very similar as in awesomebox package).



      The and everything sims is fine except when the box is not surrounded with some text. Then I get an error There's no line here to end.



      I guess the error is because of bigskipnewline in my macros. I used it to create extra paddings on top and bottom of the environment and macros



      documentclass[12pt,a4paper]{article}
      usepackage[utf8]{inputenc}
      usepackage[margin=2cm]{geometry}
      usepackage{amsmath}
      usepackage{amsfonts}
      usepackage{amssymb}
      usepackage{graphicx}
      usepackage{fontawesome}
      parindent=0ex
      usepackage{xcolor}

      % RED
      definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
      definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

      % ORANGE
      definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
      definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

      % BANS ----------------------------------------------------------------------

      newcommand{banBox}[2][ban]{%
      bigskipnewline
      begin{minipage}{.1textwidth}centering
      textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
      end{minipage}%
      textcolor{redSeven}{vrule width 3pt hspace{14pt}}
      begin{minipage}{.8textwidth}
      textcolor{redNine}{#2}
      end{minipage}
      smallskipnewline
      }

      newenvironment{banEnv}[1][ban]%
      {bigskipnewline%
      begin{minipage}{.1textwidth}centering%
      textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
      end{minipage}%
      textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
      begin{minipage}{.8textwidth}
      color{redNine}}
      {end{minipage}bigskipnewline}

      % WARNINGS ------------------------------------------------------------------

      newcommand{warningBox}[2][exclamation-triangle]{%
      bigskip newline
      begin{minipage}{.1textwidth}centering
      textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
      end{minipage}%
      textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
      begin{minipage}{.8textwidth}
      textcolor{orangeNine}{#2}
      end{minipage}
      newline
      }

      newenvironment{warningEnv}[1][exclamation-triangle]%
      {bigskipnewline
      begin{minipage}{.1textwidth}centering%
      textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
      end{minipage}%
      textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
      begin{minipage}{.8textwidth}
      color{orangeNine}}
      {end{minipage}bigskipnewline}

      %-------------------------------------------------------------------------------

      begin{document}

      Comment this line or Delete any commented line bellow
      banBox{Ban box.}
      % A
      begin{banEnv}
      Ban environment.\
      Lorem ipsum dolor sit amet.\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{banEnv}
      % B
      warningBox{Warning box.}
      % C
      begin{warningEnv}
      Warning environment.\
      Lorem ipsum dolor sit amet\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{warningEnv}
      % D

      end{document}


      Updated:
      The worst case if is no line in between.



      begin{document}

      banBox{Ban box.}

      begin{banEnv}
      Ban environment.\
      Lorem ipsum dolor sit amet.\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{banEnv}

      warningBox{Warning box.}

      begin{warningEnv}
      Warning environment.\
      Lorem ipsum dolor sit amet\
      Earum odit quia maiores nisi illum reiciendis aspernatur.
      end{warningEnv}


      end{document}






      macros environments






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 hours ago







      Igor

















      asked 4 hours ago









      IgorIgor

      204




      204






















          1 Answer
          1






          active

          oldest

          votes


















          5














          I have added a space character before bigskipnewline for newline command. Such as:



          documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline % <----------------- added and space
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          {bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          {bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          %Comment this line or Delete any commented line bellow
          banBox{Ban box.}
          A
          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}
          B
          warningBox{Warning box.}
          C
          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}
          D
          end{document}


          enter image description here



          ADDENDUM:



          If we remove the A, B, C and D lines, output is follow:



              documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          { bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          { bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          banBox{Ban box.}

          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}

          warningBox{Warning box.}

          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}

          end{document}


          enter image description here






          share|improve this answer


























          • it does'n work if you remove the text in between (A, B, C, D)

            – Igor
            3 hours ago






          • 1





            It works. Check out my addendum.

            – ferahfeza
            2 hours ago






          • 1





            @ferahfeza I like it. My congratulations.

            – Sebastiano
            2 hours ago






          • 1





            @Sebastiano, thank you very much.

            – ferahfeza
            2 hours ago











          • @Igor, add to each bigskipnewline

            – ferahfeza
            2 hours ago












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482643%2fcreate-custom-note-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









          5














          I have added a space character before bigskipnewline for newline command. Such as:



          documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline % <----------------- added and space
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          {bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          {bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          %Comment this line or Delete any commented line bellow
          banBox{Ban box.}
          A
          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}
          B
          warningBox{Warning box.}
          C
          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}
          D
          end{document}


          enter image description here



          ADDENDUM:



          If we remove the A, B, C and D lines, output is follow:



              documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          { bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          { bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          banBox{Ban box.}

          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}

          warningBox{Warning box.}

          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}

          end{document}


          enter image description here






          share|improve this answer


























          • it does'n work if you remove the text in between (A, B, C, D)

            – Igor
            3 hours ago






          • 1





            It works. Check out my addendum.

            – ferahfeza
            2 hours ago






          • 1





            @ferahfeza I like it. My congratulations.

            – Sebastiano
            2 hours ago






          • 1





            @Sebastiano, thank you very much.

            – ferahfeza
            2 hours ago











          • @Igor, add to each bigskipnewline

            – ferahfeza
            2 hours ago
















          5














          I have added a space character before bigskipnewline for newline command. Such as:



          documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline % <----------------- added and space
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          {bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          {bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          %Comment this line or Delete any commented line bellow
          banBox{Ban box.}
          A
          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}
          B
          warningBox{Warning box.}
          C
          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}
          D
          end{document}


          enter image description here



          ADDENDUM:



          If we remove the A, B, C and D lines, output is follow:



              documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          { bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          { bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          banBox{Ban box.}

          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}

          warningBox{Warning box.}

          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}

          end{document}


          enter image description here






          share|improve this answer


























          • it does'n work if you remove the text in between (A, B, C, D)

            – Igor
            3 hours ago






          • 1





            It works. Check out my addendum.

            – ferahfeza
            2 hours ago






          • 1





            @ferahfeza I like it. My congratulations.

            – Sebastiano
            2 hours ago






          • 1





            @Sebastiano, thank you very much.

            – ferahfeza
            2 hours ago











          • @Igor, add to each bigskipnewline

            – ferahfeza
            2 hours ago














          5












          5








          5







          I have added a space character before bigskipnewline for newline command. Such as:



          documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline % <----------------- added and space
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          {bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          {bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          %Comment this line or Delete any commented line bellow
          banBox{Ban box.}
          A
          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}
          B
          warningBox{Warning box.}
          C
          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}
          D
          end{document}


          enter image description here



          ADDENDUM:



          If we remove the A, B, C and D lines, output is follow:



              documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          { bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          { bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          banBox{Ban box.}

          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}

          warningBox{Warning box.}

          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}

          end{document}


          enter image description here






          share|improve this answer















          I have added a space character before bigskipnewline for newline command. Such as:



          documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline % <----------------- added and space
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          {bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          {bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          %Comment this line or Delete any commented line bellow
          banBox{Ban box.}
          A
          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}
          B
          warningBox{Warning box.}
          C
          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}
          D
          end{document}


          enter image description here



          ADDENDUM:



          If we remove the A, B, C and D lines, output is follow:



              documentclass[12pt,a4paper]{article}
          usepackage[utf8]{inputenc}
          usepackage[margin=2cm]{geometry}
          usepackage{amsmath}
          usepackage{amsfonts}
          usepackage{amssymb}
          usepackage{graphicx}
          usepackage{fontawesome}
          parindent=0ex
          usepackage{xcolor}

          % RED
          definecolor{redSeven}{rgb}{0.94, 0.24, 0.24}
          definecolor{redNine}{rgb}{0.79, 0.16, 0.16}

          % ORANGE
          definecolor{orangeSeven}{rgb}{0.97, 0.4, 0.03}
          definecolor{orangeNine}{rgb}{0.85, 0.28, 0.06}

          % BANS ----------------------------------------------------------------------

          newcommand{banBox}[2][ban]{%
          bigskipnewline
          begin{minipage}{.1textwidth}centering
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{redNine}{#2}
          end{minipage}
          smallskipnewline
          }

          newenvironment{banEnv}[1][ban]%
          { bigskipnewline%
          begin{minipage}{.1textwidth}centering%
          textcolor{redSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{redSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{redNine}}
          {end{minipage}bigskipnewline}

          % WARNINGS ------------------------------------------------------------------

          newcommand{warningBox}[2][exclamation-triangle]{%
          bigskip newline
          begin{minipage}{.1textwidth}centering
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}
          begin{minipage}{.8textwidth}
          textcolor{orangeNine}{#2}
          end{minipage}
          newline
          }

          newenvironment{warningEnv}[1][exclamation-triangle]%
          { bigskipnewline
          begin{minipage}{.1textwidth}centering%
          textcolor{orangeSeven}{fontsize{16}{24}faicon{#1}}%
          end{minipage}%
          textcolor{orangeSeven}{vrule width 3pt hspace{14pt}}%
          begin{minipage}{.8textwidth}
          color{orangeNine}}
          {end{minipage}bigskipnewline}

          %-------------------------------------------------------------------------------

          begin{document}

          banBox{Ban box.}

          begin{banEnv}
          Ban environment.\
          Lorem ipsum dolor sit amet.\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{banEnv}

          warningBox{Warning box.}

          begin{warningEnv}
          Warning environment.\
          Lorem ipsum dolor sit amet\
          Earum odit quia maiores nisi illum reiciendis aspernatur.
          end{warningEnv}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 3 hours ago









          ferahfezaferahfeza

          7,29411933




          7,29411933













          • it does'n work if you remove the text in between (A, B, C, D)

            – Igor
            3 hours ago






          • 1





            It works. Check out my addendum.

            – ferahfeza
            2 hours ago






          • 1





            @ferahfeza I like it. My congratulations.

            – Sebastiano
            2 hours ago






          • 1





            @Sebastiano, thank you very much.

            – ferahfeza
            2 hours ago











          • @Igor, add to each bigskipnewline

            – ferahfeza
            2 hours ago



















          • it does'n work if you remove the text in between (A, B, C, D)

            – Igor
            3 hours ago






          • 1





            It works. Check out my addendum.

            – ferahfeza
            2 hours ago






          • 1





            @ferahfeza I like it. My congratulations.

            – Sebastiano
            2 hours ago






          • 1





            @Sebastiano, thank you very much.

            – ferahfeza
            2 hours ago











          • @Igor, add to each bigskipnewline

            – ferahfeza
            2 hours ago

















          it does'n work if you remove the text in between (A, B, C, D)

          – Igor
          3 hours ago





          it does'n work if you remove the text in between (A, B, C, D)

          – Igor
          3 hours ago




          1




          1





          It works. Check out my addendum.

          – ferahfeza
          2 hours ago





          It works. Check out my addendum.

          – ferahfeza
          2 hours ago




          1




          1





          @ferahfeza I like it. My congratulations.

          – Sebastiano
          2 hours ago





          @ferahfeza I like it. My congratulations.

          – Sebastiano
          2 hours ago




          1




          1





          @Sebastiano, thank you very much.

          – ferahfeza
          2 hours ago





          @Sebastiano, thank you very much.

          – ferahfeza
          2 hours ago













          @Igor, add to each bigskipnewline

          – ferahfeza
          2 hours ago





          @Igor, add to each bigskipnewline

          – ferahfeza
          2 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482643%2fcreate-custom-note-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

          Gersau Kjelder | Navigasjonsmeny46°59′0″N 8°31′0″E46°59′0″N...

          Hestehale Innhaldsliste Hestehale på kvinner | Hestehale på menn | Galleri | Sjå òg |...

          What is the “three and three hundred thousand syndrome”?Who wrote the book Arena?What five creatures were...