I'm working with Rmarkdown and my output is a pdf document. When reading the text, I noticed that so many words are printed incomplete such as "ar- rojan" and "progra- mación" (which should be "arrojan" and "programación"):
Los operadores <, >, <=, >=, == y != se denominan “lógicos” o “booleanos” porque nos ar-
rojan como resultado TRUE si se cumple la condición o comparación o FALSE en caso contrario.
Sin embargo, R, al igual que la mayoría de los lenguajes de progra-
mación distingue entre mayúsculas y minúsculas (“case sensitive”),
Based on my little experience with Rmarkdown, I guess in the YAML section I must include some option to prevent for incomplete words but I can't find any documentation related with my needs. This is my YAML:
---
title: "--"
author: ""
date: "--"
output:
pdf_document:
latex_engine: xelatex
mainfont: Times New Roman
header-includes:
- \usepackage{titling}
- \pretitle{\begin{flushleft}\huge\bfseries}
- \posttitle{\end{flushleft}}
- \preauthor{\begin{flushleft}\Large}
- \postauthor{\end{flushleft}}
- \predate{\begin{flushleft}\large}
- \postdate{\end{flushleft}}
fontsize: 12pt
urlcolor: blue
linestretch: 1.15
---
Thanks in advance for any suggestion or comment.
\raggedrightto your document preamble (However that is done in R markdown) so that tex does not try to justify the right margin. possibly just needs- \raggedrightin that header includes yml block – David Carlisle Mar 04 '20 at 19:20microtypepackage. This slightly changes the characters to help fit every thing without hyphenating as much as possible. If you want to complete prevent hyphenation (athough not advisable as output will be rather ugly, have a look at this question https://tex.stackexchange.com/questions/5036/how-to-prevent-latex-from-hyphenating-the-entire-document/5039 – ArTourter Mar 04 '20 at 20:12\hypenpenalty=10000but don't do that!!!) – David Carlisle Mar 04 '20 at 20:15You must detoxify from bad defaultstyle of Word documents... leave the hyphens, hundreds of thousands of books can't be wrong!:)– Fran Mar 04 '20 at 21:26