0

This question already has an answer here:

My problem is when I use documentclass{book} leftmargin and rightmargin has no reaction, but It works with documentclass{article}. How I can fix this? I have to use documentclass{book}.

enter code here\begin{mdframed}[backgroundcolor=lightgray, leftmargin=1cm,rightmargin=1cm,roundcorner=8pt] 

marked as duplicate by Ludovic C., Torbjørn T., Stefan Kottwitz Oct 16 '13 at 14:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please post a full , minimal compilable example such that we do not have to guess about the rest of the document. – daleif Oct 16 '13 at 12:01
  • Include \documentclass, \usepackage{} and \end{document} commands in your minimal working example (MWE) – masu Oct 16 '13 at 12:18
1

Book is twosided, so in that case what is left and right? especially when they have different values.

See the section 6.7 in the mdframed manual. This works

\documentclass[a4paper]{book}
\usepackage{mdframed,lipsum}
\begin{document}

\lipsum[1]

\begin{mdframed}[innermargin=3cm,outermargin=1cm]
  \lipsum[2]
\end{mdframed}

\end{document}

Not the answer you're looking for? Browse other questions tagged or ask your own question.