# add_whitespaces_to_seperate_chunks: Add whitespace after single tex chunk. In markheckmann/mat2tex: Tools to combine R matrices and LaTeX code for use with knitr or sweave

The LaTeX commands need to be seperated by whitespaces or linebreaks. But after the $evironment delimiter they are not allowed. The function: - adds a whitespace at the end of every chunk except after chunks beginning or ending with$ - adds no whitespace at the end of chunks followed by a chunk onyl containing $## Usage  1 add_whitespaces_to_seperate_chunks(x)  ## Arguments  x texcode object. ## Details A cleaner approach would use objects that come along with the space to insert but that would mean reprogramming everything. ## Value A textcode object with whitespace added where needed. ## Examples  1 x <- "$" + lex(10) + lex("a") + "\$\\n" 

markheckmann/mat2tex documentation built on May 21, 2019, 12:06 p.m.