
我被以下問題困擾,不知道該如何解決。這是我的問題:
\documentclass{article}
\begin{document}
\begin{verbatim}'\hfill\end{verbatim} MKS' which puts the word 'MKS' at the far right of the page where as \begin{verbatim}'\noindent \end{verbatim}MKS' which
puts 'MKS ' at the far left of the page in the same line.
\end{document}
生產:
但我想製作:
\begin{verbatim}
和中的文字\end{verbatim}
建立一個新行,並僅在其中為該文字佔據一整行。這看起來很難看。我想把它和其他文本一起得到。我怎樣才能做到這一點?
答案1
環境的內聯(或簡寫)使用verbatim
是\verb<char><stuff><char>
指您指定<char>
為*
.選擇一個不在 內出現的字元<stuff>
。在您的實例中,您將使用:
\documentclass{article}
\begin{document}
\verb|'\hfill| MKS' which puts the word `MKS' at the far right of the page where as
\verb|'\noindent| MKS' which puts `MKS' at the far left of the page in the same line.
\end{document}
*
- 變體也\verb*
列印空格。