在组织模式下导出为PDF时,如何对齐源代码块?

时间:2019-09-21 01:21:16

标签: emacs latex org-mode pdflatex

使用org-mode将源代码导出到PDF文件时,源代码与文本的缩进不对齐。

.org文件如下:

enter image description here

输出结果如下:

enter image description here

是否可以对齐代码块的缩进或使其集中化?

非常感谢您!


添加原始组织文本

for (let index = 0; index < theStringLength; ++index) {  // Only increment by 1
    let val = letterArray[index];  // Read out value
    if (index % 2 === 1) val = val.toUpperCase();  // Convert to upper case for odd indices
    newArray += val;  // Append to result
}

0 个答案:

没有答案