GithubHelp home page GithubHelp logo

Comments (10)

yihui avatar yihui commented on June 16, 2024 1

我还没来得及看你的例子,但我昨晚自己突击了一个简单的例子:https://github.com/yihui/bookdown-chinese 不是很酷,但好歹中文 PDF 可以编出来了。

from r-ninja.

XiangyunHuang avatar XiangyunHuang commented on June 16, 2024 1

我发现使用 rticles::ctex 也是可以达到同样目的的

title: "在R Markdown文档中使用中文"
author:
  - 谢益辉
  - 邱怡轩
  - 于淼
documentclass: ctexbook
output:
  rticles::ctex:
    fig_caption: yes
    citation_package: natbib
    number_sections: yes
    toc: yes
    toc_depth: 4
    pandoc_args: "--top-level-division=chapter"
lot: true
lof: true    
classoption: "hyperref,"
bibliography: [book.bib, packages.bib]
biblio-style: apalike
biblio-title: 参考文献

rticles-ctexbook

from r-ninja.

yihui avatar yihui commented on June 16, 2024

好问题,这个我暂时还没有研究,不过应该不会很困难。你可以研究一下我在 rticles 包中的 ctex 模板。

from r-ninja.

weijy026a avatar weijy026a commented on June 16, 2024

我对于latex只是简单会用,不太熟,希望能够得到大神的帮助,我把问题已发你的邮箱,多谢!

from r-ninja.

yihui avatar yihui commented on June 16, 2024

暂时木有时间 😭

from r-ninja.

weijy026a avatar weijy026a commented on June 16, 2024

多谢!

from r-ninja.

xiaoyao177147 avatar xiaoyao177147 commented on June 16, 2024

李东风老师在R语言教程 22.12一节提到:为了能够生成中文的PDF,不要指定doclass为ctexbook, 而是指定为book,然后在preamble.tex中引入ctex包。请问ctexbook的缺陷是什么,我现在准备采用bookdownplus的pku_zh模板来写毕业论文,而该模板基于ctexbook。

from r-ninja.

XiangyunHuang avatar XiangyunHuang commented on June 16, 2024

@xiaoyao177147 可以指定 ctexbook 的,比如 @yihuihttps://github.com/yihui/bookdown-chinese
可能你需要看看 Pandoc 对 LaTeX 提供的模版 https://github.com/jgm/pandoc-templates/blob/master/default.latex
然后做一些修改去掉如下的冲突

! LaTeX Error: Option clash for package fontspec. 

from r-ninja.

XiangyunHuang avatar XiangyunHuang commented on June 16, 2024

@yihui 感觉这个issues可以关闭了

from r-ninja.

yihui avatar yihui commented on June 16, 2024

好,谢谢。

from r-ninja.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.