LaTeX Templates New Box 1

\documentclass[a4paper, oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[spanish,activeacute]{babel}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{theorems, skins, breakable}
\colorlet{naranja}{Peach!70!}
\newcounter{ejemplo}
\tcbset{
base/.style={
empty, breakable,
fonttitle=\bfseries\sffamily,
fontupper=\normalsize\slshape,
theorem style=standard,
separator sign={},
extras={frame engine=path},
colframe=yellow!10,
drop fuzzy shadow,
sharp corners,
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
boxed title style={size=minimal, top=4pt, left=4pt},
after skip=0.5cm, before skip balanced=0.5cm
}
}
\newtcbtheorem[number within=chapter]{ejem}{Ejemplo}{
base, coltitle=black,
attach boxed title to top left={xshift=-3mm, yshift*=-\tcboxedtitleheight/2},
boxed title style={right=3pt, bottom=3pt, overlay={
\draw[draw=naranja, fill=naranja, line join=round]
(frame.south west) -- (frame.north west) -- (frame.north east) --
(frame.south east) -- cycle;
}},
overlay unbroken={
\scoped \shade[left color=naranja!10!black, right color=naranja]
([yshift=-0.2pt]title.south west) -- ([xshift=-1.5pt, yshift=-0.2pt]title.south-|frame.west) -- ++(0, -6pt) -- cycle;
}
}{ejem}
\usepackage{lipsum}
\begin{document}
\begin{ejem}{}{}
\lipsum[1]
\end{ejem}
\begin{ejem}{}{}
\lipsum[2]\\\\
\lipsum[1]
\end{ejem}
\end{document}

Nguồn : Latex templates pro

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *