friendly / VCDR

Visualizing categorical data with R
0 stars 0 forks source link

\code{} often sticks out in right margin #56

Closed friendly closed 8 years ago

friendly commented 8 years ago

This has long been a problem. \code{} and \func{} use \sloppy...\ttfamily and are designed to protect special characters, but still give overwide lines. e.g., see p. 40.

I don't know how to fix this globally. Should such lines be broken manually?

philchalmers commented 8 years ago

Related to #36. I think the best option is to nest bad chunks in \begin{sloppypar} ... \end{sloppypar} blocks on an as-per-needed basis.

friendly commented 8 years ago

Chunks are easy, because they can be manually reformatted as necessary. I'm talking about \code{} in paragraphs, like this:

For small frequency tables, it is often convenient to enter them in frequency form
using \func{expand.grid} for the factors and \func{c} to list the counts in a vector.
The example below, from \cite{Agresti:2002}, gives results for the 1991 General Social Survey,
with respondents classified by sex and party identification.
As a table, the data look like this:

Ah, just tried \begin{sloppypar} ... \end{sloppypar} and it works! Will do this. Thx.

friendly commented 8 years ago

I believe @davidjohannesmeyer 's edits closes this issue