I'm creating a new document based on another being successful, but it's too long to use as a MWE.
Anyway, I'm trying to create a new environment, but it's missing something I do not know what to look for.
This new environment is to get something like this:
MWE
\documentclass[11pt,fleqn]{book}
\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry}
\usepackage{blindtext}
\usepackage[portuguese]{babel}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{xcolor}
\definecolor{ocre}{RGB}{243,102,25}
\RequirePackage[framemethod=default]{mdframed}
%-------Etapa Box------------
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=ocre!10,
linecolor=ocre,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{eBox}
%------------------------------------------
%-------Hyperref and BookMark-------
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{bookmark}
\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}
\renewcommand*{\thechapter}{%
\texorpdfstring{}{\chaptername\space}\arabic{chapter}%
\texorpdfstring{}{: }%
}
% Section numbers without prefix or the place for adding a prefix
% "Section".
\renewcommand*{\thesection}{%
\arabic{chapter}.\arabic{section}%
}
%------------------------------------------
%----------New Theorem---------------
\newtheorem{etapaT}{Passo}[section]
%------------------------------------------
%-------New Environment------------
\newenvironment{etapa}{\begin{eBox}\begin{etapaT}}{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{etapaT}\end{eBox}}
%------------------------------------------
\begin{document}
\tableofcontents
\chapter{Informações}
\section{Conversa informal}
\begin{etapa}
Texto
\end{etapa}
\end{document}
tcolorbox
package instead ofmdframed
here. Besides that, your example does not compile, and\RequirePackage
is 'reserved' for packages rather than documents; but in total, I don't understand what you're after here – user31729 Oct 26 '17 at 18:38\RequirePackage
with\usepackage
. Then, in order to use\blacksquare
, you have to load the packageamssymb
. Finally, you could shift the black square a bit, maybe with\raisebox{0.166em}{\blacksquare}
. – Jasper Habicht Oct 26 '17 at 19:08