
Olargura completapacote (versão atual 0.1) porMarco Daniel "fornece o ambiente fullwidth
que permite definir as margens esquerda e direita de uma forma muito simples"(manual, pág. 1). De acordo com o manual, o pacote é baseado no algoritmo domdframedpacote (versão atual 1.0) do mesmo autor.
No entanto, tentar alterar as margens de parágrafos individuais fulllwidth
não produz os resultados desejados. Definir a leftmargin
opção com um valor positivo moverá todo o parágrafo para a direita (na margem direita da página), e definir rightmargin
um valor positivo não terá nenhum efeito. (O mdframed
pacote, por outro lado, altera as respectivas margens conforme esperado [e adiciona uma moldura ao redor do parágrafo].) fullwidth
O comportamento de s não pode estar correto, pode?
\documentclass{article}
\usepackage[linewidth=1.2pt]{mdframed}
\usepackage{fullwidth}
\newcommand*{\sometext}{Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
vehicula augue eu neque.}
\begin{document}
\section{\texttt{mdframed} works as expected}
\sometext
\begin{mdframed}[leftmargin=3em]
\sometext
\end{mdframed}
\begin{mdframed}[rightmargin=3em]
\sometext
\end{mdframed}
\section{But \texttt{fullwidth} doesn't}
\sometext
\begin{fullwidth}[leftmargin=3em]
\sometext
\end{fullwidth}
\begin{fullwidth}[rightmargin=3em]
\sometext
\end{fullwidth}
\end{document}
Responder1
@lockstep: Você acha que o comportamento a seguir é mais eficiente?
\documentclass{article}
\usepackage{showframe}
\usepackage[linewidth=1.2pt]{mdframed}
\usepackage{fullwidth}
\newcommand*{\sometext}{Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
vehicula augue eu neque.}
\makeatletter
\def\fullwidth@i[#1]{% default-Umgebung
\begingroup
\fullwidthsetup{#1}%%
\fwd@twoside@checklength%
\ifbool{fwd@twosidemode}%
{\advance\fwd@width@length by -\fwd@outermargin@length
\advance\fwd@width@length by -\fwd@outermargin@length}%
{\advance\fwd@width@length by -\fwd@leftmargin@length
\advance\fwd@width@length by -\fwd@rightmargin@length}%
\let\width\z@%
\let\height\z@%
\setlength{\topsep}{\fwd@skipabove@length}%
\begingroup%
\let\partopsep\z@%
\expandafter\endgroup%
\begin{fwd@trivlist}\item\relax%
\hsize=\fwd@width@length\relax%
\fwd@footnoteinput%
\begin{fwd@lrbox}{\@tempboxa}%
}
\makeatother
\begin{document}
\section{\texttt{mdframed} works as expected}
\sometext
\begin{mdframed}[leftmargin=3em]
\sometext
\end{mdframed}
\begin{mdframed}[rightmargin=3em]
\sometext
\end{mdframed}
\section{But \texttt{fullwidth} doesn't}
\sometext
\begin{fullwidth}[leftmargin=3em]
\sometext
\end{fullwidth}
\begin{fullwidth}[rightmargin=3em]
\sometext
\end{fullwidth}
\null\hfill\smash{\rule[1.5cm]{3em}{2pt}}
\end{document}