Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

equivalent for \code{} in R-markdown #10

Open
pbiecek opened this issue Apr 27, 2022 · 1 comment
Open

equivalent for \code{} in R-markdown #10

pbiecek opened this issue Apr 27, 2022 · 1 comment

Comments

@pbiecek
Copy link
Member

pbiecek commented Apr 27, 2022

An article prepared in LaTeX should have function names in the \code{} block.
But how to get such an effect for an Rmd file?
If I use backquotes then they are rendered incorrectly to \texttt in tex.
But if I use the \code{name} command in the Rmd file it is rendered to an empty text in the html file.

How do I get the effect of the `code{} command when preparing an Rmd file?

An example:

When calling `function` for the first time, the following three arguments are mandatory:  (this will be incorrectly rendered in tex)

When calling \code{function} for the first time, the following three arguments are mandatory: (this will be incorrectly rendered in html)
@pbiecek
Copy link
Member Author

pbiecek commented Apr 27, 2022

I have same problem with the \begin{example} \end{example} environment
triple backquotes are rendered to

\begin{Schunk}
\begin{Sinput}

instead of

\begin{example}

but if I use \begin{example} in the Rmd file then it will not be rendered in the HTML output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant