-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Western fonts cannot be changed in the output docx #7022
Comments
I don't know. To my knowledge, we don't do anything to change the font depending on the |
After nearly 18 months, I’ve tried to look into this issue again. Sorry for the long time… With the option
The first change is the cause for this issue, as the Chinese language is not the Latin Language but the East Asian Language. And why the western font (Latin font) cannot be changed in Microsoft Word after For a general docx document created by hand in Microsoft Word, the language properties are set as below: <lang w:val="en-US" w:eastAsia="zh-CN" w:bidi="ar-SA" /> While the Pandoc’s default ouput is (with <lang w:val="zh-CN" w:eastAsia="en-US" w:bidi="ar-SA" /> As a consequence, I think when the option |
Thanks @TomBener |
This suggests that we should determine whether the language is an East Asian language in |
East Asian languages, also known as CJK, according to Microsoft, are defined as Chinese (Simplified), Chinese (Traditional), Japanese and Korean. And sometimes Vietnamese can be included. In the list of BCP 47, these language tags are included:
However, Hope this could be a reference for the list of langs. |
Okay, thanks for diagnosing this. I've pushed a fix that seems to work, but more testing would be helpful. A nightly with this change should be available within 24 hours. |
I just found that the language option also affects the behavior of the citation. I want to cite both English and Chinese bibliographies in an article. Furthermore, I’d like to:
For this purpose, this command is executed according to the manual: pandoc main.md -o main.docx --metadata lang=zh-u-co-pinyin -C So far, the sorting works perfectly. However, there are bad effects for the localization of the bibliography. There is an example below:
Here, As a comparison, the output with the default language
I guess this is the result of the citeproc localization, but I have no idea how to avoid the problem. What I desireWhen enabling |
I'm not sure if citeproc offers a way to use different locale-dependent quoting styles for entries in different languages. @denismaier do you know? Have you set the Note that it would not be desirable behavior, in general, for citeproc to use the quote style appropriate to the language of each source. For example, if you're writing an article in English and citing a French source, you wouldn't want to use French quotes for the title. Chinese/English might be an exception, but we'll need to ask the citeproc people if there's a way to do this. |
Nope. My bibliography file was exported as BibLaTeX from Better BibTeX for Zotero. The
I think so. Generally, when writing papers in Chinese, we would like to cite the English reference as it is. |
Vanilla CSL does not support this. There's an extended variant CSL-M that supports that kind of stuff, and a lot more. You can have multiple variants of a field (translations, transliteration, original script). Some of that stuff will make its way into the next version of CSL, but, IIRC, complete support for multilingual citations is still out if scope. |
@fbennett has solved this in CSL-M by allowing multiple layout nodes. One argument against this was always that this may add too much complexity. As a citeproc author, do you think that would be feasible in your citeproc, or would that indeed be too complicated? |
I use Pandoc 2.11.3.2 on macOS 11.1.
When the
lang
is set aszh-CN
in yaml block:Then run the command:
The western fonts in the output
main.docx
is the same as the Chinese fonts宋体
like the screen below. In addition, it seems the western fonts are frozen which can’t be changed, although the default fonts in the template of Pandoc for western fonts areCalibri
andCambria
.If the
lang: zh-CN
is removed, the issue will disappear, but some other problems emerge. For example, the Chinese quotation marks“”
and‘’
are set as western fonts, which should be avoided.So I'd like the western fonts are with different fonts from Chinese fonts
宋体
. Is it possible whenlang: zh-CN
is added or other solutions? Thank you!The text was updated successfully, but these errors were encountered: