¿Separación de palabras más inteligente para columnas estrechas?

¿Separación de palabras más inteligente para columnas estrechas?

Sé cómo desactivar la separación de palabras mediante \nohyphens{.....}(deguión). Pero lo que realmente me gustaría sería dividir con guiones de forma inteligente. Es de esperar que el siguiente ejemplo aclare lo que quiero decir con esto.

A la izquierda hay un fragmento de texto de una columna de una tabla, representado con el \nohyphens{...}comando. Esto deja mucho espacio en blanco abierto. A la derecha está el mismo texto escrito por Vanilla XeLaTeX. Como puedes ver,aúndeja un gran espacio en blanco en medio del texto y también introduce la extraña separación de palabras, "or-phaning", en lugar de, por ejemplo, las "correcciones" más naturales.
Sin separación de palabras Comportamiento por defecto

Aquí hay una versión más inteligente creada por mí introduciendo "correcciones" en el código fuente:

algunos retocando a mano

Al menos en mi opinión, esto parece mucho mejor que cualquiera de las versiones anteriores.

Entonces, la pregunta básica es: ¿Puedo hacer que LaTeX haga esto automáticamente, por ejemplo, especificando el espacio en blanco entre palabras más largo aceptable?

PD. Otra solución más compleja sería especificar un "ancho objetivo" para las columnas de mi tabla, por ejemplo, .25\textwidthy luego hacer que el sistema se optimice para producir una tabla que me acerque lo más posible a mi puntuación de espacios en blanco y ancho de tabla especificados, minimizando al mismo tiempo el cantidad de palabras con guiones... ¡pero no sé si LaTeX puede hacer este tipo de optimización dinámica en varias variables! Aquí hay una última imagen en la que me deshice por completo de la separación de palabras, moviéndome a .27\textwidthlas columnas. Esta parece ser la versión más legible hasta el momento.

ingrese la descripción de la imagen aquí

Respuesta1

Cuando se intenta componer texto en medidas muy limitadas, a veces es mejor (¡¿menos peor?!) usar la \sloppydirectiva, como se hace en el siguiente ejemplo.

También puede resultar útil en tales situaciones configurar \righthyphenmin2. (Para textos en inglés, el valor predeterminado de este parámetro es 3).

ingrese la descripción de la imagen aquí

\documentclass[12pt,letterpaper]{article}
\usepackage[showframe,margin=3.38in]{geometry} 
  % \textwidth = 8.5"-2*3.38" = 1.74"
\frenchspacing
\righthyphenmin2
\sloppy
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\begin{document}
\noindent
Quality control is handled with corrections and the ``orphaning'' mechanism in case 
of nonresponsive authors. Some articles are world-writeable, as in the wiki model.
\end{document}

Respuesta2

No estoy seguro de por qué lo estás usando. \nohyphensPensé que querías más y no menos. Al utilizar la tabla vinculada, ya que no proporciona código para el ejemplo de la pregunta, obtengo esto que no está tan mal, aunque obviamente podría modificarse un poco más.

ingrese la descripción de la imagen aquí

\documentclass[article,a4paper,12pt,twoside]{memoir}

\usepackage{hyphenat}

\setlrmarginsandblock{40mm}{20mm}{*}
\setulmarginsandblock{20mm}{20mm}{*}

\begin{document}

\renewcommand{\arraystretch}{1.5}
\begin{table}
\begin{center}
\raisebox{3in}{\small
\begin{tabular}{|*{3}{>{\hyphenpenalty0 }p{.25\textwidth}|}}
\hline
% \multicolumn{1}{p{.25\textwidth}}{\textbf{Relevance}}
\begin{center}(PM)
\end{center}

Ultimately relevance depends on peer review, and irrelevant content
may be deleted. Mechanisms to ensure that relevant content
\emph{will} be added could be improved. &
\begin{center}(WP)
\end{center}
People contribute articles about what
they're interested in; apart from this, rules like WP:WEIGHT come into
play.&
\begin{center}(DO)
\end{center}

Anyone can upload projects (for ``full projects'', one time approval
is needed), but getting changes into the core requires considerably
more vetting. \\
%\multicolumn{1}{p{.25\textwidth}}{\textbf{Quality}}
Quality control is handled with corrections and the ``orphaning'' mechanism
in case of nonresponsive authors. Some articles are world-writeable,
as in the wiki model. & Automated tools for spam and vandalism detection
combined with a system of editorial oversight, in which Jimmy Wales
has last say. & In addition to bug reports and feature requests handled
through the issue tracker, modules can make use of an automated patch
testing system.\\
%\multicolumn{1}{p{.25\textwidth}}{\textbf{Scalability}}
Peer review is distributed. Links are handled automatically. Caching
is deployed where relevant; in particular, interlinking features are
kept up to date. & The database and other infrastructure is massively
scaled. There are many bots that help with small tasks. & In theory,
anyone can join. Earl Miles, NYCCamp 2012 keynote: ``\emph{There are
no insiders, except Dries; there are no outsiders, only resumes.}''
\\
% \multicolumn{1}{p{.25\textwidth}}{\textbf{Consistency}}
Although automatic links and corrections can help with consistency,
mainly PM relies on standards for proof and expository quality.
&NPOV is the key rule, which works together with templates and other
process tools to maintain community standards about style and
content. & The project issue queues are the place to go when one
module's changes breaks another's. The core of the project has
considerable oversight in these
matters.\\
% \multicolumn{1}{p{.25\textwidth}}{\textbf{Motivation}}
People are solving some of their learning, exposition, and social
needs on the site by writing and reviewing articles and posting in the
forums.& As of 2006, over 50\% of the site had been written by less
than 1\% of the users; these days, paid editing is somewhat
notorious.& Miles continued: ``\emph{To build a resume, find someone
who needs help, and help them. Find something that needs doing, do
it.}'' \\ \hline
\end{tabular}
}
\end{center}
\caption{As typeset ``out of the box''}
\end{table}


\end{document}

Si permite un poco de flexibilidad en el margen derecho y agrega microtipo, obtendrá:

\usepackage{microtype}

...

\begin{tabular}{|*{3}{
   >{\hyphenpenalty0 \rightskip0pt plus .3em \emergencystretch2em}%
   p{.25\textwidth}|}}

ingrese la descripción de la imagen aquí

información relacionada