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

1.1.5.3这种纯数字序号改成国内论文适用的一、(一)(1)等标准代码 #151

Open
sf88ux opened this issue Sep 13, 2024 · 1 comment

Comments

@sf88ux
Copy link

sf88ux commented Sep 13, 2024

1.1.5.3这种纯数字序号能否改成国内论文适用的一、(一)(1)等标准代码,方便国内论文使用

@Keldos-Li
Copy link
Owner

CSS中约154~185行处改为:

/* 侧边大纲标题 */
.sidebar-content .outline-h1 {
  counter-reset: outline-h2;
}
.sidebar-content .outline-h2 {
  counter-reset: outline-h3;
}
.sidebar-content .outline-h2 .outline-label:before {
  counter-increment: outline-h2;
  content: counter(outline-h2, cjk-decimal) "、";
}
.sidebar-content .outline-h3 {
  counter-reset: outline-h4;
}
.sidebar-content .outline-h3 .outline-label:before {
  counter-increment: outline-h3;
  content: "(" counter(outline-h3, cjk-decimal) ")";
}
.sidebar-content .outline-h4 {
  counter-reset: outline-h5;
}
.sidebar-content .outline-h4 .outline-label:before {
  counter-increment: outline-h4;
  content: counter(outline-h4) ". ";
}
.sidebar-content .outline-h5 {
  counter-reset: outline-h6;
}
.sidebar-content .outline-h5 .outline-label:before {
  counter-increment: outline-h5;
  content: "(" counter(outline-h5) ")"
}
.sidebar-content .outline-h6 .outline-label:before {
  counter-increment: outline-h6;
  content: counter(outline-h6) ")"
}

约284~312行处改为:

#write h2:before, h2.md-focus.md-heading:before {
  counter-increment: h2;
  /* use Chinese counter 一、二、三、 */
  content: counter(h2, cjk-decimal) "、";
  margin-right: 0;
}

#write h3:before, h3.md-focus.md-heading:before {
  counter-increment: h3;
  /* use Chinese counter (一)(二)(三) */
  content: "(" counter(h3, cjk-decimal) ")";
  margin-right: 0;
}

#write h4:before, h4.md-focus.md-heading:before {
  counter-increment: h4;
  /* use 1. 2. 3. */
  content: counter(h4) ". ";
  margin-right: 0;
}

#write h5:before, h5.md-focus.md-heading:before {
  counter-increment: h5;
  /* use (1)(2)(3) */
  content: "(" counter(h5) ")";
  margin-right: 0;
}

#write h6:before, h6.md-focus.md-heading:before {
  counter-increment: h6;
  /* use 1)2)3) */
  content: counter(h6) ")";
  margin-right: 0;
}

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

No branches or pull requests

2 participants