1

I have a shaded text box looking as:

enter image description here

which is generated by the following code?

\documentclass{memoir}

\usepackage{titling}

\usepackage{algorithm,algpseudocode} \usepackage{bm} % bold greek variables (boldmath) \usepackage{tikz} \usetikzlibrary{positioning} % use: above left of, etc \usetikzlibrary{calc}

% Required for the ToDo list. \usepackage{ifthen}

\usepackage[protrusion=true,expansion=true, kerning]{microtype} \usepackage{enumitem}

\usepackage{booktabs} \usepackage{lipsum} \usepackage{wrapfig}

\newcommand{\secref}[1]{Section~\ref{#1}} \newcommand{\chapref}[1]{Chapter~\ref{#1}} \renewcommand{\eqref}[1]{Equation~(\ref{#1})} \newcommand{\figref}[1]{Figure~\ref{#1}} \newcommand{\tabref}[1]{Table~\ref{#1}}

\begin{document}

\definecolor{shadecolor}{RGB}{176,224,230}%{246,243,226} \setlength\OuterFrameSep{0pt} \begin{shaded} % \medskip \textcolor{gray}{}\ \textcolor{gray}{\textbf{Chapter 1}}\ \textcolor{dark_red}{\textbf{SUMMARY: }} \medskip \
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,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, \end{shaded
}

\setlength\OuterFrameSep{0pt} \begin{shaded} % \medskip \textcolor{gray}{}\ \textcolor{gray}{\textbf{Chapter 2}}\ \textcolor{dark_red}{\textbf{SUMMARY: }} \medskip \
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,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, \end{shaded
}

\end{document}

Is there a way to round the corners while keeping rest of the visual features intact?

Alejandro
  • 211
  • 2
    Please extend your code snippets to complete but small document beginning with \documentclass and ending with \end{document} which we can test as they are. Do you look to tcolorbox package? – Zarko Nov 30 '20 at 09:00
  • The updated code given does not compile. Please correct it so that it reproduces the problem. – Peter Grill Nov 30 '20 at 09:52
  • 1
    A possible approach can be found in https://tex.stackexchange.com/questions/151532/could-not-get-round-corner-working-in-mdframed. – Marijn Nov 30 '20 at 11:12

1 Answers1

1

Perhaps tcolorbox makes things easier.

https://ctan.org/pkg/tcolorbox?lang=en

% !TeX TS-program = pdflatex

\documentclass{memoir} \usepackage{titling}

\usepackage{algorithm,algpseudocode} \usepackage{bm} % bold greek variables (boldmath) \usepackage{tikz} \usetikzlibrary{positioning} % use: above left of, etc \usetikzlibrary{calc}

% Required for the ToDo list. \usepackage{ifthen}

\usepackage[protrusion=true,expansion=true, kerning]{microtype} \usepackage{enumitem}

\usepackage{booktabs} \usepackage{lipsum} \usepackage{wrapfig}

\usepackage{tcolorbox}

\newcommand{\secref}[1]{Section~\ref{#1}} \newcommand{\chapref}[1]{Chapter~\ref{#1}} \newcommand{\eqref}[1]{Equation~(\ref{#1})} \newcommand{\figref}[1]{Figure~\ref{#1}} \newcommand{\tabref}[1]{Table~\ref{#1}}

\begin{document}

\definecolor{shadecolor}{RGB}{176,224,230}%{246,243,226} %\setlength\OuterFrameSep{0pt} %\begin{shaded} % % \medskip % \textcolor{gray}{}\ % \textcolor{gray}{\textbf{Chapter 1}}\ % \textcolor{dark_red}{\textbf{SUMMARY: }} % \medskip \
% 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,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, %\end{shaded
} % % % %\setlength\OuterFrameSep{0pt} %\begin{shaded} % % \medskip % \textcolor{gray}{}\ % \textcolor{gray}{\textbf{Chapter 2}}\ % \textcolor{dark_red}{\textbf{SUMMARY: }} % \medskip \
% 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,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, %\end{shaded
}

\begin{tcolorbox} \lipsum[3] \end{tcolorbox}

\begin{tcolorbox}[colback=white, colframe=blue!20, arc=10pt, title=\color{gray} \textbf{Chapter 1}\ \color{red} \textbf{SUMMARY:}] \lipsum[1] \end{tcolorbox}

\end{document}

out2

You did not include the environment shaded (perhaps from framed ?) in your code, so I commented these lines.

Simon Dispa
  • 39,141