有没有办法在Pandoc markdown中设置内联逐字摘录(```)的默认颜色?例如,文档中的所有动词都是红色而不是黑色?
我知道,我可以做,例如
$(selector).mCustomScrollbar({
mouseWheel: {
scrollAmount: 500,
preventDefault: true
},
callbacks: {
advanced: {
updateOnContentResize: true
},
onScroll: function() {
// this.mcs.topPct contains the current scroll position (when scroll animation is completed.
// it can be between 0-100, where 100 is bottom and 0 is top
//
// my scroll starts on the bottom, and when this.mcs.topPct is 0
// I load dynamic content and place it on the very top of all content
// this causes the scroll to display this content immediately,
// and I would like the user to manually scroll up to see the added content.
}
}
});
用于语法高亮显示逐字摘录。但是,我想要的是所有逐字摘要的简单默认颜色。
我使用pandoc通过LaTeX转换为PDF,并使用LaTeX模板。我可以对LaTeX模板进行任何更改,如果这允许启用此行为。
答案 0 :(得分:6)
Pandoc将verbatim
内容转换为LaTeX中的\texttt{}
。您可以重新定义此命令以对其进行样式设置:
\usepackage[usenames, dvipsnames]{color}
% overwrite \texttt command to use coloring
\let\oldTexttt\texttt
\renewcommand{\texttt}[1]{\oldTexttt{\textcolor{red}{#1}}}
如果您在LaTeX模板中包含上述代码段,则您的pdf将包含红色verbatim
内容。