1

Here what I captured so far, and I tried to use \tcbset to draw the box... and I got a bunch of errors.

enter image description here

enter image description here

EDIT: My current code

\tcbset{/ .style={
colback=yellow2!, 
enlarge top by=1cm, 
enhance,    
breakable,
boxrule=0pt,        
top=7mm,
drop fuzzy shadow,
overlay unbroken = {\draw[color=red!80!yellow, line width =3pt]
 ([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
    \draw[color=red!80!yellow, line width =1pt]
        ( frame.north west)--(frame.north east);
            \node[rectangle] at ([[xshift=1cm, yshift=0.45cm ] frame.north west)
        {\includegraphics[scale=0.06]{imagesInskscape/caracol}};
        \node[rectangle, draw=DeepSkyBlue1, fill=DeepSkyBlue1, 
        font=\LARGE\bfseries, text=white, rounded corners=8pt, minimum width =3cm,
        inner sep=1mm, anchor=north west] at ( [xshift=4cm, yshift=0.3cm] frame.north west){ Example};
    },overlay first ={\draw[color=red!80!yellow, line width =3pt]
        ([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
        \draw[color=red!80!yellow, line width =1pt] 
            ( frame.north west)--( frame.north east);
    \node[rectangle] at ([xshift=1cm, yshift=0.45cm ] frame.north west)
{\includegraphics[scale=0.06]{imagesInskscape/caracol}};
    \node[rectangle, draw=DeepSkyBlue1, fill=DeepSkyBlue1, 
font=\LARGE\bfseries, text=white, rounded corners=8pt, minimum width =3cm,
inner sep=1mm, anchor=north west] at ( [xshift=4cm, yshift=0.3cm] frame.north west){ Example};
}, 
overlay middle ={ \draw[color=red!80!yellow!50, line width =3pt]
         ([xshift=2pt] frame.north west)--([xshift=2pt] frame.south west);
        },
overlay last ={\draw[color=red!50!black!50, line width =3pt]
        ( [xshift=3pt] frame.north west)--( [xshift=2pt] frame.north west); }}}
\begin{tcolorbox}[]
    \begin{enumerate}

    \end{enumerate}
\end{tcolorbox}
percusse
  • 157,807
  • 3
    Sorry, I'm not quite sure I understand the question. Are you saying that somebody else has produced this and you would like a way to work backwards from the image to the code used to produce it (no that's not possible with current technology, you may have to wait for the singularity) or you would like us to tell you how to do it (in which case ... that's asking kind of a lot) – Au101 Oct 10 '16 at 01:50
  • I would like to be able to do it and change the code to my way if possible. Thank you to point it out to me. – Ousseynou Diagne Oct 10 '16 at 02:01
  • It would help if you posted the errors as well. – Null Oct 10 '16 at 02:10
  • 1
    Welcome! Please post the code you have got so far - the document which we can compile to reproduce the error. How can we help you change code we have never seen? All we know it contains is \tcbsetand produces errors-we-know-not-which and which may or may not be related. What is the relation between the two images and those images and your code? – cfr Oct 10 '16 at 02:18
  • sorry this is the code below – Ousseynou Diagne Oct 10 '16 at 02:39
  • Can you expand your code to a complete minimal working example. In particular, the MWE should compile. –  Oct 10 '16 at 04:21
  • 1
    The code is using tcolorbox package, so you can start trying to understand similar examples: http://tex.stackexchange.com/a/184530/1952, http://tex.stackexchange.com/a/115605/1952, – Ignasi Oct 10 '16 at 07:36
  • Well ! I am going to try it and pace my code afterwards. – Ousseynou Diagne Oct 10 '16 at 12:18
  • Please tell me you used a template for that \tcbset. And wherever you got it, don't go there again. – John Kormylo Oct 10 '16 at 14:51
  • I got it from a Latex book written in spanish and I used this manual to have inspiration to my documents. – Ousseynou Diagne Oct 10 '16 at 15:21

1 Answers1

5

You can start with:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{mathtools,amsfonts}
\usepackage{enumitem}
\usepackage[svgnames]{xcolor}
\usepackage[most]{tcolorbox}
\usepackage[spanish]{babel}

\tcbset{
    exstyle/.style={enhanced, colback=Indigo!5, colframe=Indigo, 
                   fonttitle=\bfseries,  
                   colbacktitle=Indigo, coltitle=white,    
                   top=\tcboxedtitleheight,
                   boxed title style={},
                   attach boxed title to top left={yshift=-\tcboxedtitleheight/2,
                                                   xshift=4mm}%
                   },
    teostyle/.style={enhanced, colback=DarkOrchid!15, colframe=DarkOrchid, 
                   fonttitle=\bfseries, sharp corners, boxrule=0pt,
                   colbacktitle=DarkOrchid, coltitle=white,
                   drop fuzzy shadow,    
                   top=\tcboxedtitleheight,
                   boxed title style={sharp corners},
                   attach boxed title to top left={}%
                   },
}

\newtcbtheorem[number within=section]{miEjemplo}{Ejemplo}{exstyle}{ex}
\newtcbtheorem[number within=section]{miTeorema}{Teorema}{teostyle}{teo}

\begin{document}

\section{Ejemplos}

\begin{miEjemplo}{Un ejemplo}{label}
\begin{enumerate}[label=\emph{\alph*}.)]
\item Si $a=144$ y $b=99$,
\begin{align*}
144 & = 89\cdot 1+55, \text{con resto}\ r_2=55<b=89\\
144 & = 89\cdot 2-34, \text{con resto}\ r_1=34<b=89
\end{align*}
\end{enumerate}
\end{miEjemplo}

\section{Teoremas}

\begin{miTeorema}{Un teorema}{label}
Sean $a, b\in \mathbb{Z}$ con $b\neq 0$. Sea $q\in \mathbb{Z}$ \dots
\end{miTeorema}

\end{document}

enter image description here

Ignasi
  • 136,588