# Inserting very wide paragraphs or pictures…

The questions and answers regarding wide paragraphs are rather popular. What I would like to have is a new kind of "element" in my documents which would allow me to display wide paragraphs which can contain text, picture or tables... The layout is shown on the picture. My own solution is rather trivial - it works but it has two major issues:

• It throws ton of overfull hboxes
• It could "mix" with marginpar text (puts it one above the other)

The Look and Feel of new element

-------------
|         | |
|         | |
|         | |
|-----------|
|new element|
|-----------|
|         | |
-------------

%PREAMBLE STUFF
\newlength{\wideparwidth} %The width of our new element
\setlength{\wideparwidth}{\textwidth}        %Initializing to textwidth...

\newcommand{\widepar}[1]{\parbox{\wideparwidth}{#1}} %The actual command

%USAGE
\begin{document}
...
\widepar{The text which appears in the very wide paragraph...}
...
\end{document}


Is anybody aware of some existing package where such layout is supported? If not, please give me some tip how I could prevent marginpar text to overlap (I assume this is not trivial). And the last but not the least, how could I make "overfull hbox" ignored (for this element only)?

-
You can avoid the overfull hbox warnings by using \makebox[\textwidth]{...} as shown in my answer to Place figures side by side, spill into outer margin. No idea about the marginpars. –  Martin Scharrer Apr 18 '11 at 13:05
Thanks a lot for your comment! Unfortunately, I really do want to make paragraph which is as wide as textwidth+marginsep+margin so I can't stick to textwidth... Actually my major headache here is potential overlapping of this "element" and marginpars... Shell see maybe some idea comes over the net. Thanks a lot anyway! –  Zoran Apr 18 '11 at 13:24
Read the linked answer! You use \makebox[\textwidth]{...} and then place something wider than \textwidth inside. This way the overfull hbox warnings are avoided. –  Martin Scharrer Apr 18 '11 at 13:29
Oops! May bad! I'm getting your point now. Think, I have one issue less now. Thanks again! –  Zoran Apr 18 '11 at 13:44

You can use the tufte-book class which has a fullwidth environment or you can roll your own adjustmargins environment. The image below is from a document of mine using this class. The class will take care for most of the problems with marginpars.

If you want to roll your own, just add a comment and I will post the code.

Edit (posted minimal)

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum,ifmtarg}
\begin{document}
\lipsum[1]
\makeatletter
\begin{list}{}{%
\topsep\z@%
\listparindent\parindent%
\parsep\parskip%
\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
{\setlength{\leftmargin}{#1}}%
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
{\setlength{\rightmargin}{#2}}%
}
\item[]}{\end{list}}

\begin{list}{}{%
\topsep\z@%
\listparindent\parindent%
\parsep\parskip%
\checkoddpage
\ifoddpage % odd numbered page
\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
{\setlength{\leftmargin}{#1}}%
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
{\setlength{\rightmargin}{#2}}%
\else % even numbered page
\@ifmtarg{#2}{\setlength{\leftmargin}{\z@}}%
{\setlength{\leftmargin}{#2}}%
\@ifmtarg{#1}{\setlength{\rightmargin}{\z@}}%
{\setlength{\rightmargin}{#1}}%
\fi
}
\item[]}{\end{list}}

\makeatother

\vfill
\rule{17.2cm}{.4pt}

There are no engineers in the hottest parts of hell, because the existence of a 'hottest part' implies a temperature difference, and any marginally competent engineer would immediately use this to run a heat engine and make some other part of hell comfortably cool.  This is obviously impossible.

\end{document}

-
Hello, thank you for this superb idea! Please, post some sample code if possible. That would be great. –  Zoran Apr 18 '11 at 19:03
@Zoran have a look at this tex.stackexchange.com/questions/6402/… and the code above. –  Yiannis Lazarides Apr 18 '11 at 19:38
Perfect, thanks! –  Zoran Apr 19 '11 at 6:50
Besides using \makebox (as has been suggested in the comments), you can use the adjustwidth environment from the changepage package.