I am trying to use \hspace
to align text inside mdframed
box. However, \hspace
seems to not working inside mdframed
box. Text in the mdframed
is somehow is aligned to center. Why is \hspace
not working here ?
\usepackage[framemethod=TikZ]{mdframed}
\usetikzlibrary{shadows}
\newmdenv[shadow=true,shadowcolor=black,font=\sffamily, align=right, leftmargin=10pt]{shadowbox}
\begin{shadowbox}
\hspace{2cm} 90 \hspace{1cm} [NOP] \newline
\hspace{2cm} 8bff \hspace{1cm} [MOV EDI, EDI] (FUNCTION ENTRY) \newline
\hspace{2cm} 90 \hspace{1cm} [NOP] \newline
\hspace{2cm} 90 \hspace{1cm} [NOP] \newline
\hspace{2cm} 90 \hspace{1cm} [NOP] \newline
\hspace{2cm} 90 \hspace{1cm} [NOP] \newline
\hspace{2cm} 8bff \hspace{1cm} [MOV EDI, EDI] (FUNCTION ENTRY) \newline
\hspace{2cm} 55 \hspace{1cm} [PUSH EBP] \newline
\hspace{2cm} 8bec \hspace{1cm} [MOV EBP, ESP] \newline
\end{shadowbox}
Following is the result I am getting now :
\hspace
should be\hspace*
, because there is no text before the command. Further it seems that your problem has to do with the align option of your mdframed environment. I personally would use a tabular inside the mdframed environment to align the op codes.