# removing spaces between shaded frames and within it

I have written a a few latex lines to mimic the shaded boxes shown in the below picture:

However, my result so far looks like the following:

which doesn't look completely like the above image.

My lines are as follows:

\definecolor{bright_blue}{RGB}{31,127,198}
\definecolor{dark_red}{RGB}{176,31,31}

\textcolor{dark_red}{\textbf{SUMMARY: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.

\textcolor{bright_blue}{\textbf{RESULTS: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.


Does anyone know how I can make it more similar to the first image? In addition,how can I add the current chapter number like the above image.

I'm assuming this "shaded*" environment comes from framed.sty.

Best not to put one inside the other, but instead one after the other. Then the question becomes: how to prevent a gap between the two shaded environments.

The "extra" space can be eliminated by setting \OuterFrameSep, which is a parameter for framed.sty.

The remaining gap can be removed by suppressing the baseline skip. For this use a TeX command \nointerlineskip (which may not be officially LaTeX-ese).

\definecolor{shadecolor}{RGB}{246,243,226}
\setlength\OuterFrameSep{0pt}

\textcolor{dark_red}{\textbf{SUMMARY: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.
\nointerlineskip
\textcolor{bright_blue}{\textbf{RESULTS: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.


Oh, the remaining difference in appearance is due to\parindent and \parskip (you should choose a style consistently throughout the document).

A small improvement, manually adjusting the vertical spacing between the two shaded environments to make the blank space completely disappear.

For the problem of the chapter number,n you have the \oldstylenums command.

\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{framed}
\usepackage{xcolor}
\definecolor{bright_blue}{RGB}{31,127,198}
\definecolor{dark_red}{RGB}{176,31,31}

\begin{document}

\textcolor{dark_red}{\textbf{SUMMARY: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.
\textcolor{bright_blue}{\textbf{RESULTS: }}

Some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text, some text
, some text, some text, some text, some text.
, some text, some text, some text, some text.
, some text, some text, some text, some text, some text.

• @DonaldArseneau: For me, \nointerlineskip results in a blank line. I found no other way to remove it. I tried top play with lengths defined in your package, but there remained a thin white line. Maybe there's a trick, but I didn't find it. Oct 4, 2020 at 19:57