
我正在編寫一份文檔,需要將某些文本與其他文本區分開來。在上面的例子中,我想區分文本'密碼1'和's723ja0xp' 來自剩餘的文字。我使用了命令{\fontfamily{lmtt9}\selectfont\large password1}
和{\fontfamily{lmtt9}\selectfont\large s723ja0xp}
},效果很好。然而,兩者密碼1和s723ja0xp比其餘文本更蒼白。請問有辦法解決這個問題嗎?另外,有沒有辦法讓密碼1和s723ja0xp斜體?我已經嘗試過這些命令{\fontfamily{lmtt9}\selectfont\large\textit {password1}}
,{\fontfamily{lmtt9}\selectfont\large\itshape {password1}}
但它們都失敗了。
答案1
您的問題不清楚,因為您沒有提供範例,但 lm 打字機可以傾斜和傾斜粗體顯示。
\documentclass{article}
\renewcommand\familydefault{\sfdefault}
\renewcommand{\sfdefault}{phv}% Helvetica (clone)
\renewcommand\ttdefault{lmtt}
\begin{document}
is incorrect because
\texttt{\large password1}
\texttt{\slshape\large password2}
\texttt{\slshape\bfseries\large password3}
is weaker than ...
\end{document}