我基本上想在我的文檔中添加不可見的盲文本。列印粗略的佈局並記下我想在每個缺失段落中寫的內容。
我試過:
\phantom{\blindtext}
這只保留一行(很長)文字。
\vspace{10cm}
這不像文字。我可以添加很多小的\vspace
但也許有更好的解決方案?
答案1
您可以在 -macro 中使用 minipage 或 vbox\phantom
來取得實際大小。
使用小型頁面內的點字,您可能會在分頁時遇到問題,但 a\vbox
應該可以完成這項工作。
檢查這個例子:
\documentclass{scrartcl}
\usepackage{blindtext}
\begin{document}
%Wrong
\fbox{
\phantom{\blindtext}
}
%Problems on page breaks
\fbox{
\phantom{\begin{minipage}{\textwidth}\blindtext\end{minipage}}
}
% The solution?
\fbox{%
\phantom{\vbox{\blindtext}}%
}
\fbox{\phantom{\vbox{\blindtext}}}
\end{document}
添加es\fbox
是為了使空格可見。它們不是解決方案的一部分。
根據評論,我預計這是針對該問題的 MWE:
\documentclass[twocolumn,english]{scrartcl}
\usepackage{babel}
\usepackage{blindtext}
\begin{document}
pre1: \blindtext
pre2: \blindtext
% \phantom{\blindtext}% One long line
\phantom{\vbox{\blindtext}}%correct paragraph, but in one block.
after \blindtext
\end{document}
也許還有另一種解決方案,但我不希望它可以用 來解決\phantom
。也可以看看幻象和斷線
答案2
將文字顏色設定為白色實現了我想要做的事情。
正如萊德里斯在評論中寫道:
\textcolor{white}{\blindtext}