Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Available settings for CJK manuscripts and some requested features. #260

Open
SCgeeker opened this issue Jan 16, 2019 · 2 comments
Open

Comments

@SCgeeker
Copy link

Hi
I found the available settings to generate the Chinese articles in plain Rmarkdown and papaja template. This way should be available for Korea and Japan as well, because it employed xeCJK package. Here is the settings in my YAML:

## Get the header from http://newsletter.ascc.sinica.edu.tw/news/read_news.php?nid=2198
## ptt latex board
## Section begin: this section has to be above 'output:'
header-includes:
  - \usepackage{fontspec}
  - \usepackage{xeCJK}
  - \setCJKmainfont{微軟正黑體}    ## by installed fonts
  - \XeTeXlinebreaklocale "zh"  
  - \XeTeXlinebreakskip = 0pt plus 1pt
## Section end: this section has to be above 'output:'

output            : 
  papaja::apa6_pdf:
## Get this setting from https://stackoverflow.com/questions/36806255/rstudio-on-windows-not-using-xelatex
## This option forced Rstudio use xelatex compile this document
        latex_engine: xelatex

Use this setting, anyone have full-installed MikTex is able to generate the Chinese article in a single file. That means if I have the appendix files out of the main body, kntir process will crash. In addition, there are some features to be supported. CJK papers cited the English and CJK papers in respective citation/bibliography styles. I got some Latex packages are able to deal with this. Could papaja integrate them?

Because CJK papers have many particular settings, a specific template for CJK papers could be the best solution. Here is my sample to help your improvement.

CJK_test.zip

@crsh
Copy link
Owner

crsh commented Jan 17, 2019

Thanks for posting your partial solution here. I need to think a little more about whether I want to create a separate template for CJK papers. Maybe there is another approach.

I think the problems you are experiencing with the appendix is most likely the same as the one you are describing here and I suggest we keep that part of the discussion to the other issue.

Regarding the citations, I think I need some additional information. I don't quite understand the problem, yet. Is there a different APA citation style for CJK citations? I'm asking because citation styles are, by default, handled by pandoc-citeproc and not by LaTeX. Maybe there are CSL files for pandoc-citeproc that resolve the issue you are referring to. But again, I'd need a more detailed explanation of what the problem is (what are you seeing and what would you expect/like to see?). It is, of course, possible to let biblatex or natbib take care of the citations as described here. If the LaTeX packages that deal with your issue work with biblatex or natbib than you should be able to integrate them with header-includes.

If this is enough to get this to work I'd be very interested to see it, so I can either refer to it in the documentation or include it in a separate template.

@SCgeeker
Copy link
Author

Thank you @crsh I'm going to following the problem in that issue.

There were the issues regarding the citations discussed by pandoc-citeproc developers. Like this and this. In CSL-M, a CSL file with supports multilingual reference style. Here is the example. This way is workable in Zotero, but I'm not sure how pandoc-citeproc use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants