babel
当使用带有 norwegian 选项 ( )的包时,如果出现在某些字母(例如、和)之前的\usepackage[norsk]{babel}
双引号 ( "
)会消失,但出现在其他字母之前的双引号不会消失。有没有什么解决办法?\texttt{}
b
d
f
最小工作示例:
\documentclass[]{article}
\usepackage[norsk]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}
\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}
和\usepackage[norsk]{babel}
("
有时会删除前导)
没有\usepackage[norsk]{babel}
(这就是我想要的)
答案1
你可以完全禁用简写
\documentclass[]{article}
\usepackage[norsk,shorthands=off]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}
\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}
或本地
\documentclass[]{article}
\usepackage[norsk]{babel}
\begin{document}
\texttt{"a" "b" "c" "d" "e" "f"}
\shorthandsoff{"}
\texttt{"a"} \texttt{"b"} \texttt{"c"} \texttt{"d"} \texttt{"e"} \texttt{"f"}
\end{document}