我看到一个奇怪的字符,像一个非常扁平的 U,而那里应该有一个空格,但里面却有listings package
。请参见下面的示例。有人知道为什么会发生这种情况吗,或者如何消除或解决它?
\documentclass{standalone}
\usepackage{underscore}
\usepackage{listings}
\usepackage[usenames,dvipsnames, rgb, svgnames, x11names]{xcolor}
% Text layout
\topmargin 0.0cm
\oddsidemargin 0.5cm
\evensidemargin 0.5cm
\textwidth 16cm
\textheight 21cm
\lstnewenvironment{cmd}[1][]{%
\lstset{language=sh, backgroundcolor=\color{LightSteelBlue1}, #1}}
{}
\begin{document}
\begin{cmd}[caption=Configuration file section including filters]
[affy6]
[...]
[[hapmap]]
phenofiles = "data/Hapmap6.0/Pheno/hapmappheno_909.csv",
genofile = "/data/snppy/Hapmap6.0/Geno/birdseed-v2.calls.txt"
anno_filter = "chromosome = 5"
idlink_filter = "studyid = 'CEU'"
some_other_stuff = "foo = bar"
\end{cmd}
\end{document}
答案1
默认情况下,listings
将空格显示为字符串(引号之间)中的“squat-u”。将此选项添加showstringspaces=false
到选项列表中\lstset
以删除此选项。