TeX - LaTeX Asked by Cube on March 28, 2021
I am trying to use lstinline
to style filenames in my document, but it puts some random whitespace befor the dot. I presume it has to do with autosettings for punctuation?
Can I deactivate this with listings or is it a generall Latex Thing?
MWE:
documentclass[11pt]{scrreprt}
usepackage{color}
usepackage{listings}
lstset{basicstyle=color{blue}} % just to demo
begin{document}
I use the file lstinline{file.ext}, which is nice.
end{document}
using a monospaced font solves the problem, which doesn't aswer the quetion for why, but works.
documentclass[11pt]{scrreprt}
usepackage{color}
usepackage{listings}
lstset{basicstyle=color{blue}ttfamily}
begin{document}
I use the file lstinline{file.ext}, which is nice.
end{document}
Correct answer by Cube on March 28, 2021
using leandriis suggestion to make the dot a letter does remove the space inside the expretion, but creates wird space after. Any Ideas?
documentclass[11pt]{scrreprt}
usepackage{color}
usepackage{listings}
lstset{
basicstyle=color{blue},
alsoletter={.}
} % just to demo
begin{document}
I use the file lstinline{file.ext}, which is nice.
end{document}
Answered by Cube on March 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP