答案1
\documentclass{article}
\usepackage{lipsum,stackengine}
\setstackEOL{\\}
\begin{document}
\lipsum[1]
\begin{center}
{\textbf{\Longstack[l]{
Question 1: Can we archive the blacked out text\\
so that it can be left aligned?\\\\
Question 2: Can we archive the blacked out text\\
so that it can also be centered?
}}}
\end{center}
\lipsum[2]
\end{document}
答案2
使用hl
命令(在soul
包中)突出显示文本。为了达到您的目的,只需将突出显示颜色设置为黑色\sethlcolor{black}
。默认突出显示颜色为黄色。
\documentclass{article}
\usepackage{xcolor,soul}
\sethlcolor{black}
%\sethlcolor{green}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{center}
\begin{minipage}{.8\textwidth}
\noindent\bfseries Question 1: Can we archive \hl{text texttext text text text text text text text text text text text } ?\\
\noindent\bfseries Question 2: Can we archive \hl{text texttext text text text text text text text text text } ?
\end{minipage}
\end{center}
\lipsum[1]
\end{document}