Exemplo de ambiente com duas caixas

Exemplo de ambiente com duas caixas

Estou tentando fazer com que meu ambiente de "exemplo" tenha esta aparência:

insira a descrição da imagem aqui

com as duas caixas antes da palavra "Exemplo". Você pode me ajudar a conseguir esse efeito?

Aqui está um código:

\documentclass[11pt,fleqn,table]{book}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\definecolor{ocre}{RGB}{0,173,239}

%======================================================================================
%  EXAMPLE ENVIRONMENT
%======================================================================================

\newtheorem{exampleT}{Example}[chapter]
\newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}

\makeatletter
\newtheoremstyle{blacknumexocresq}
{5pt}
{5pt}
{\normalfont}
{} 
{\small\bf\sffamily}
{\;}
{0.25em}
{\small\sffamily{\textcolor{ocre}{\tiny\ensuremath{\blacksquare}}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% 
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}
\makeatother

\theoremstyle{blacknumexocresq}
\newtheorem{exampleM}{Example}[chapter]

\renewenvironment{example}{\begin{exampleM}}{\hfill{\textcolor{ocre}{\tiny\ensuremath{\blacksquare}}}\end{exampleM}}

\begin{document}

\chapter{This is where the example is}
\begin{example}
This is where the example will take place
\end{example}

\end{document}

Responder1

Você pode substituir \ensuremath{\blacksquare}por \ensuremath{\square\raise0.2em\hbox to 0.2em{\hss$\blacksquare$}}para criar as duas caixas.

\documentclass[11pt,fleqn,table]{book}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\definecolor{ocre}{RGB}{0,173,239}

%======================================================================================
%  EXAMPLE ENVIRONMENT
%======================================================================================

\newtheorem{exampleT}{Example}[chapter]
\newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}

\makeatletter
\newtheoremstyle{blacknumexocresq}
{5pt}
{5pt}
{\normalfont}
{} 
{\small\bf\sffamily}
{\;}
{0.25em}
{\small\sffamily{\color{ocre}\tiny\ensuremath{\square\raise0.2em\hbox to 0.2em{\hss$\blacksquare$}}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% 
\thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}
\makeatother

\theoremstyle{blacknumexocresq}
\newtheorem{exampleM}{Example}[chapter]

\renewenvironment{example}{\begin{exampleM}}{\hfill{\textcolor{ocre}{\tiny\ensuremath{\blacksquare}}}\end{exampleM}}

\begin{document}

\chapter{This is where the example is}
\begin{example}
This is where the example will take place
\end{example}

\end{document}

insira a descrição da imagem aqui

Responder2

Acho que a maneira mais fácil é colocar as caixas no título do teorema e desenhá-las com tikz.

\documentclass{book}
\usepackage{amsthm}
\usepackage{tikz}
\newcommand{\boxes}{%
\begin{tikzpicture}
    \draw [black] (0,0) rectangle (1.2ex,1.2ex);%
    \fill [black] (0.4ex,0.4ex) rectangle (1.6ex,1.6ex);%
\end{tikzpicture}
}
\newtheorem{example}{\boxes Example}[chapter]

\begin{document}

\chapter{This is where the example is}
\begin{example}
This is where the example will take place
\end{example}

\end{document}

informação relacionada