在 RMarkdown 中右对齐一行文本

N B*_*wer 4 r knitr r-markdown

我知道当 RMarkdown 使用模板生成 Word 文档时,可以更改文本对齐方式和其他设置。在此处输入链接描述

是否可以更改单行的对齐方式?

例如,文本看起来像

  Some normal left justified text

                                                           some right justified text

  Some more left justified text
Run Code Online (Sandbox Code Playgroud)

JAQ*_*ent 5

如果您的输出格式是 .pdf 但不适用于 .html 或 word 文档,则 Flushright 有效。

Some normal left justified text

\begin{flushright}

some right justified text

\end{flushright}

Some normal left justified text
Run Code Online (Sandbox Code Playgroud)

将中间的线条留空似乎很重要。