\documentclass{article}
\begin{document}
Normal margin here. Normal margin here. Normal margin here.
Normal margin here. Normal margin here. Normal margin here. Normal margin here.
Abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh abcd: \texttt{float[][]} and
\texttt{double[][]}.
\end{document}
如您所见,[]
与其他相距甚远[]
。我怎样才能使它们彼此更接近?更重要的是,double[][]
超出了边缘线。如何写得更好?
我正在使用 minted 包。是否可以使用它来内联编写小代码示例?
答案1
如果它不经常出现或者您可以使用搜索和替换,您可以自己添加负空间来弥补它:
\documentclass{article}
\begin{document}
Normal margin here. Normal margin here. Normal margin here.
Normal margin here. Normal margin here. Normal margin here. Normal margin here.
Abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh abcd: \texttt{float[]$\!$[]} and
\texttt{double[]\kern-.2em[]}.
\end{document}
理论上,也应该可以更改]
和的字距[
,但我不能告诉你这是否可以通过一些合理的工作来实现。也许这个microtype
包可以帮到你?