添加 preamble.tex 和/或修改 css [英] Adding preamble.tex and/or modifying css

查看:49
本文介绍了添加 preamble.tex 和/或修改 css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢制作木瓜.真的很棒!

Thanks for making papaja. It's really terrific!

我刚刚使用它提交了我的第一篇期刊文章,但遇到了问题.布局人员不知道如何处理在单列、整页格式中很好但在 2 列格式中没有的代码块和列表.我正在尝试使用 class 'jou' 选项来制作 2 列,但我无法弄清楚如何控制代码的大小和列出字体(可能通过修改 css,这里推荐),或者如何使用乳胶包listings"来设置listing包装(此处推荐).

I just submitted my first journal article using it and ran into problems. The layout staff don't know what to do with the code chunks and listings that are fine in single-column, full page format, but not in their 2-column format. I'm trying use the class 'jou' option to make 2 columns, but I can't figure out how to control the size of code and listing fonts (possibly by modifying the css, as recommended here), or how to using the latex package 'listings' to set listings to wrap (as recommended here).

我将不胜感激,如果我在文档中遗漏了如何做到这一点,我深表歉意.

I'd be grateful for any advice, and my apologies if I've missed how one might do this in the documentation.

推荐答案

如果只是为了让 listings 包工作,您可以修改 YAML 标头,使其看起来类似于以下内容:

If it's only about getting the listings package to work, you can modify the YAML header that it looks similar to the following:

documentclass     : "apa6"
classoption       : "jou"
output            :
  papaja::apa6_pdf:
    pandoc_args: --listings
header-includes:
  - \lstset{breaklines=true}

但是,请注意,使用自动换行符很可能会在某些地方破坏代码.因此,值得考虑替代方案:例如,您可以尝试使用使用更多换行符的代码样式.styler 包和加载项可能有助于完成此操作:https://styler.r-lib.org/

However, note that using automatic line breaks will most likely break the code at some points. Therefore, it is worthwhile to consider alternatives: For instance, you could try to use a code style that uses more line breaks. The styler package and add-in might be helpful accomplishing this: https://styler.r-lib.org/

这篇关于添加 preamble.tex 和/或修改 css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆