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
{.tabset}
does not support Chinese
#1149
Comments
You have to assign ID's manually to the tab titles, e.g.
This is because Pandoc cannot generate an ID when there are no alphanumeric characters in a section heading. |
@yihui Thank you for you quick response. I wonder if these tab titles can be further used, too; e.g., cross-reference? |
Without tabsets, you can use ID's to reference a section, e.g. |
I think I know it now. I will add a tab title to every tabs in a tabset, but I cannot reference these tabs (I think it okay for now); if I want to refence a tab, change it to a section (do not append And by now it is also very useful even without reference. Thank you for developing these inspiring packages! @yihui |
Your understanding is correct. |
Thank you. After one-day trying this feature, I found that the tab titles could not be repeated, just as intuition, which is quite annoying when the number of tabs to display increases. I am wondering whether a better support for Chinese without tab names is possible or not, although acceptable if not. |
I don't know what you mean by "the tab titles could not be repeated". I think tab titles should be different by definition, and I don't know why someone wants to use the same title for two different tabs. |
I agree with you. But there is a misunderstanding. I meant to say that if there are more and more tabs to display, one have to add a unique tab title to each of them, which is an otherwise unnecessary demanding task. |
Do you mean a unique ID or a unique title? |
Unique ID. To be clearer, what I expected is just the support of Chinese tabs without adding ID's. |
That is not possible, because Pandoc cannot generate automatic ID's for headers that do not contain any alphanumeric characters (e.g. pure Chinese): http://pandoc.org/MANUAL.html#header-identifiers You will have to file a feature request to Pandoc. |
I got it! And thank you very much for your kind response. |
@yihui I am sorry to disturb you again, but I have filed an issue (jgm/pandoc#4452) at the Here is the result: % pandoc -t html
# 标题 {.tabset}
## 标签一
内容
## 标签二
内容
^D
<h1 id="标题" class="tabset">标题</h1>
<h2 id="标签一">标签一</h2>
<p>内容</p>
<h2 id="标签二">标签二</h2>
<p>内容</p> Now I wonder what the true issue is. |
Actually we enabled the
|
Thank you. @yihui It is of great help! 👍 |
This is inspired by rstudio/rmarkdown#1149.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Here I include an example
rmarkdown
text:And the output is as follows:
But interestingly, when I substitute "一" and "二" with 1 and 2 respectively, it works!
Then the output is right. Further trials indicate that there must be one visible
alphanum
character at the end of each tab title if you want it be right.SessionInfo:
The text was updated successfully, but these errors were encountered: