Keldos-Li / typora-latex-theme

将Typora伪装成LaTeX的中文样式主题,本科生轻量级课程论文撰写的好帮手。This is a theme disguising Typora into Chinese LaTeX style.
GNU General Public License v3.0
4.83k stars 313 forks source link

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

Open sf88ux opened 1 month ago

sf88ux commented 1 month ago

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

Keldos-Li commented 1 month ago

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;
}