Paragraphs won't indent

by Tyler Peckenpaugh   Last Updated September 11, 2019 15:23 PM - source

I'm issuing rstudio and bookdown to cross-compile rmarkdown to TeX and make a PDF for my dissertation. I've got everything formatted how I need it, but I'd like an indent to start each of my paragraphs. I've tried the indent: true setting in rmarkdown yaml, and I've tried including a few different variations on this latex command in my preamble: setlength\parindent{24pt}\setlength{\parskip}{0.0pt}. I've also tried moving that command to the last in_header item in the rmarkdown yaml, so I don't think it's an issue with a later pkg overriding it (but maybe I'm wrong).

The resulting pdf:

Does anyone see what I am doing wrong?

Here is everything before begin{document} in the resulting TeX file.

Links to the full tex file, _site.yml, preamble.tex, and index.Rmd follow the code block. I'll provide a MWE tonight.

\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\else % if luatex or xelatex
% use upquote if available, for straight quotes in verbatim environments
% use microtype if available
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
            pdfborder={0 0 0},
\urlstyle{same}  % don't use monospace font for urls
\def\maxwidth{\ifdim\[email protected]@width>\linewidth\linewidth\else\[email protected]@width\fi}
\def\maxheight{\ifdim\[email protected]@height>\textheight\textheight\else\[email protected]@height\fi}
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
}{% else
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
% Redefines (sub)paragraphs to behave more like sections

%%% Use protect on footnotes to avoid problems with footnotes in titles

%%% Change title format to be more compact

% Create subtitle command for use in maketitle



\newcommand{\myframebox}[2][Dia]{\setlength{\fboxsep}{2.5ex}\raisebox{\dimexpr-\height + 1.0ex}{\fcolorbox{black}{white}{\eqmakebox[#1]{\enspace #2\enspace}}}}

\setlength\parindent{24pt}\setlength{\parskip}{0.0pt plus 1.0pt}


Full tex file

_site.yml (used by bookdown for rstudio)



Tags : xetex rstudio

Related Questions

Running xelatex programmatically from R script

Updated March 04, 2018 22:23 PM

Changing lisoffigures color in Rmarkdown

Updated June 12, 2015 11:10 AM

half-space in Rstudio for utf8

Updated July 31, 2017 15:23 PM