In connection with the attempt to find a solution for myself regarding this issue , I was immersed in an attempt to write a valid Rd markup. I want to add a section with a name Raw Function Codeand put the function code in it. I have achieved limited success in this regard by writing a script to modify Rd files to include
\section{Raw Function Code}{\code{
}}
However, even if I manually placed the text in the .Rd file correctly (using spaces or tabs), the initial empty space of each line seems to be deleted, leaving an unwanted search function. I noticed that if I provide the leading character before the space, the space is saved. However, I did not want to provide a start character, because I would like people to be able to copy and paste directly from the generated PDF file.
I looked at parseRd and I know that there are three types of LaTeX text - for example, R-like and verbatim. I tried to put my function code in \ code and in \ verb, and none of them gave the desired results. What can I do to keep the original empty space?
source
share