打印密码:如何区分 l/1、o/O/0 等并可视化空间?

KIA*_*aze 11 fonts printing passwords

我想打印随机生成的密码,以便像零和字母“o”或一和字母“l”这样的相似字符可以清楚地区分。我还想找到一种可视化空间的方法,即我正在寻找一种可以做到这一点的字体或下划线的替代品(因为密码可能包含下划线)

到目前为止,我发现的最好的是 openoffice 中的“Bitstream vera sans mono”,基于这个:http : //forums.overclockers.co.uk/showthread.PHP?p=16215032 (奇怪的是它没有列在字体列表中,但是如果我输入它,它就可以工作。:/) openoffice/libreoffice 中似乎不存在“Lucida Console”。

我当然可以重新生成没有相似字符和空格的密码,但我想知道是否有人知道这个问题的一个很好的解决方案,理想情况下只是一种带有斜线零和可见空格字符的字体。

KIA*_*aze 2

抱歉反馈较晚。我最终使用了这个解决方案(乳胶中的比特流 vera 字体与逐字*):

\documentclass{article}

\usepackage{bera}

\begin{document}

% text using bera font (Bitstream Vera), which has dotted zeroes
% the * after verbatim adds visible spaces
\begin{verbatim*}'1 l oO0}4 _i6D-WtF#q\end{verbatim*}

% visible space
hello\textvisiblespace world

% slashed zero
\o

\end{document}
Run Code Online (Sandbox Code Playgroud)

我也留下了一些我尝试过的其他东西。

要从中创建 pdf:

pdflatex password_printing_4.tex
Run Code Online (Sandbox Code Playgroud)

如果出现任何错误,请尝试简单地安装 texmaker。这取决于最必要的乳胶包:

sudo apt-get install texmaker
Run Code Online (Sandbox Code Playgroud)

我也尝试了latex中的inconsolata字体,但似乎不一样:

\documentclass{article}

\usepackage{inconsolata}
%\usepackage{bera}

% requires texlive-xetex package:
\usepackage[xetex]{graphicx}
%\usepackage{fontspec,xunicode}
%\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
%\setmainfont[Scale=.95]{Inconsolata}

\begin{document}

% text using bera font (Bitstream Vera), which has dotted zeroes
% the * after verbatim adds visible spaces
\begin{verbatim*}`!=}k o6~-cRR1loO0\end{verbatim*}

%\renewcommand{\bera}{\inconsolata}
\texttt{This is Inconsolata. zero: 0}

%\renewcommand{\inconsolata}{\bera}
\texttt{This is Bera. zero: 0}

% visible space
hello\textvisiblespace world

% slashed zero
\o

\end{document}
Run Code Online (Sandbox Code Playgroud)