diff --git a/README.md b/README.md new file mode 100644 index 0000000..50b0331 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Typora 中文学术风格主题 + +## 关于主题 + +基于Typora官方的Academic以及[zh-academic](https://github.com/ZJUGuoShuai/zh-academic)主题,正文字体采用华文中宋,等宽字体采用CamingoCode。 + +和Academic的区别主要在代码块上,我更偏爱带有外边框的代码样式,示例可参看`README.pdf`。 + +```python +# This is a useless sample code +import taichi as ti +ti.init(debug=False, arch=ti.cuda) +``` + +## 安装方式 + +直接下载本仓库为 ZIP,将内容(`academic-zh/` 和 `academic-zh.css`)解压缩至 Typora 主题文件夹内(Typora主题文件夹打开方式:菜单→主题→打开主题文件夹)。 + +## 其他说明: + +- 可使用`
`的方式右对齐 +- 可使用`
`的方式居中对齐 +- 可使用`
`在输出PDF时分页 + diff --git a/README.pdf b/README.pdf new file mode 100644 index 0000000..d942a42 Binary files /dev/null and b/README.pdf differ diff --git a/academic-zh.css b/academic-zh.css new file mode 100644 index 0000000..49f10a9 --- /dev/null +++ b/academic-zh.css @@ -0,0 +1,310 @@ +@import './academic-zh/fonts.css'; + +:root { + --side-bar-bg-color: white; + --window-border: none; + --search-select-bg-color: #575c61; + --active-file-bg-color: #f1f4f5; + --item-hover-bg-color: #f1f4f5; + --item-hover-text-color: black; + --control-text-color: #555; +} + +html { + font-size: 12pt; +} + +/* Frame */ +body { + -webkit-font-smoothing: antialiased; + line-height: 1.8rem; + letter-spacing: 0; + margin: 0; + overflow-x: hidden; +} + +#write { + font-family: "STIX2Text", "Times New Roman", "华文中宋", "serif"; + line-height: 1.5em; + padding: 10%; + padding-top: 5%; +} + +.file-list-item-summary { + height: 36px; +} + +.file-list-item { + padding-top: 18px !important; + padding-bottom: 18px; +} + +#sidebar-loading-template.file-list-item { + padding-top: 0 !important; +} + +a, a:visited { + color: #a00; +} + +h1, h2, h3, h4, h5, h6 { + font-family: inherit; + line-height: 1.5em; + margin-bottom: 1em; + margin-top: 1em; +} + +h1 { + font-size: 2.4em; +} + +#write h1 { + text-align: center; +} + +h2 { + font-size: 1.8em; +} + +h3 { + font-size: 1.4em; +} + +h4 { + font-size: 1.2em; +} + +h5 { + font-size: 1em; +} + +h6 { + font-size: 1em; + color: #777; +} + +p { + margin-top: 1em; + margin-bottom: 1em; + text-align: justify; +} + +pre, code { + font-family: "CamingoCodeRegular", "Times New Roman", "华文中宋", "serif", monospace !important; +} + +.cm-s-inner .CodeMirror-cursor { + border-left: solid rgba(128, 128, 255, 0.8) !important; +} + +/* 代码框 */ + +#write .md-fences { + border: 1px solid #7a7a7a; + -webkit-font-smoothing: initial; + margin: 1rem 0 !important; + padding: 3px 3px; + line-height: 1.55rem; + border-radius: 2px; + font-size: 0.9rem; + word-wrap: normal; +} + +#write [mdtype="math_block"] { + font-size: 1.2rem; +} + +#write .CodeMirror-wrap .CodeMirror-code pre { + padding-left: 12px; + line-height: 1.55rem; +} + +.cm-s-inner .CodeMirror-linenumber { + width: 2ch !important; + color: rgba(128, 128, 255, 0.8); +} + +#write .CodeMirror-cursors .CodeMirror-cursor { + border-left: 2px solid var(--main-4); +} + +#write code, +tt { + padding: 2px 4px; + border-radius: 2px; + font-size: 0.92rem; + color: #6b6b6b; + /* color: #c7254e; + background-color: #f9f2f4; */ +} + +tt { + margin: 0 2px; +} + +#write .md-footnote { + background-color: #ffffff; + color: #a00 !important; +} + + +.footnotes { + display: list-item; + margin-left: 1em; +} + +.md-fences { + border: 1px solid; +} + +.md-fences.md-fences-with-lineno { + border: none; +} + +.CodeMirror-linenumber { + color: #333; +} + +*.in-text-selection, +::selection, +.CodeMirror-selected { + background: var(--search-select-bg-color); + color: var(--search-select-text-color) !important; + text-shadow: none; +} + +a.md-toc-inner { + color: var(--text-color); +} + +.cm-s-typora-default .cm-link { + color: #a00; + text-decoration: underline; +} + +.cm-s-typora-default .cm-header, .cm-s-typora-default .cm-property { + color: black; +} + +#typora-source .CodeMirror-lines { + -webkit-font-smoothing: auto; + max-width: 1000px; +} + +.md-def-name:before, +.md-def-name:after { + color: #2d2d2d; +} + +sup.md-footnote { + background-color: initial; + color: inherit; +} + +mark { + background: #fff387; +} + +td, th { + border: 1px solid; + padding-left: 1ch; + padding-right: 1ch; +} + +/*table tr[cid]:first-child > td { + border-top: 3px double; +}*/ + +th { + border-bottom: 0; + padding-top: 2px; + background: #575c61; + border-color: #333; + color: #f3f3f3; +} + +pre.md-meta-block { + border: 1px solid #a2a9b1; + background-color: #f8f9fa; + padding: 5px; + margin-bottom: 1em; +} + +.task-list-item input:before { + content: '\221A'; + display: inline-block; + width: 1.25rem; + height: 1.6rem; + vertical-align: middle; + text-align: center; + color: #bbb; + background-color: inherit; +} + +.task-list-item input:checked:before, +.task-list-item input[checked]:before{ + color: inherit; +} + +.md-task-list-item > input { + top: auto; + margin-left: -1.1em; + font-size: 1.3em; + margin-top: 0px; + -webkit-appearance: none; +} + +.md-task-list-item input:before { + content: '\2610'; + display: inline-block; + width: 1.25rem; + height: 1.6rem; + vertical-align: middle; + text-align: center; + color: #bbb; + background-color: inherit; +} + +.md-task-list-item input:checked:before, +.md-task-list-item input[checked]:before{ + color: inherit; + content: '\2611'; +} + +.task-list-item { + padding-left: 1.5em; +} + +blockquote { + font-style: italic; + padding: 0.25em 24px; + position: relative; + color: #383838; + border-left: 2px solid; + +} + + +#write > blockquote { + padding: 0.25em 30px; + margin-left: -32px; + width: calc(100% + 32px); +} + +#write > .md-fences-with-lineno { + margin-left: -33px; + color: black; +} +/* +img { + max-height: 20em; +}*/ + +.CodeMirror-linenumber { + min-width: 25px; +} + +.md-header { + font-size: inherit !important; +} + diff --git a/academic-zh/CamingoCode-Regular-1.woff b/academic-zh/CamingoCode-Regular-1.woff new file mode 100644 index 0000000..8174888 Binary files /dev/null and b/academic-zh/CamingoCode-Regular-1.woff differ diff --git a/academic-zh/GUST e-foundry License.txt b/academic-zh/GUST e-foundry License.txt new file mode 100644 index 0000000..ad80c74 --- /dev/null +++ b/academic-zh/GUST e-foundry License.txt @@ -0,0 +1,29 @@ +This is a preliminary version (2006-09-30), barring acceptance from +the LaTeX Project Team and other feedback, of the GUST Font License. +(GUST is the Polish TeX Users Group, http://www.gust.org.pl) + +For the most recent version of this license see +http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt +or +http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt + +This work may be distributed and/or modified under the conditions +of the LaTeX Project Public License, either version 1.3c of this +license or (at your option) any later version. + +Please also observe the following clause: +1) it is requested, but not legally required, that derived works be + distributed only after changing the names of the fonts comprising this + work and given in an accompanying "manifest", and that the + files comprising the Work, as listed in the manifest, also be given + new names. Any exceptions to this request are also given in the + manifest. + + We recommend the manifest be given in a separate file named + MANIFEST-.txt, where is some unique identification + of the font family. If a separate "readme" file accompanies the Work, + we recommend a name of the form README-.txt. + +The latest version of the LaTeX Project Public License is in +http://www.latex-project.org/lppl.txt and version 1.3c or later +is part of all distributions of LaTeX version 2006/05/20 or later. \ No newline at end of file diff --git a/academic-zh/STIX2Math.woff b/academic-zh/STIX2Math.woff new file mode 100644 index 0000000..188d600 Binary files /dev/null and b/academic-zh/STIX2Math.woff differ diff --git a/academic-zh/STIX2Text-Bold.woff b/academic-zh/STIX2Text-Bold.woff new file mode 100644 index 0000000..629f122 Binary files /dev/null and b/academic-zh/STIX2Text-Bold.woff differ diff --git a/academic-zh/STIX2Text-BoldItalic.woff b/academic-zh/STIX2Text-BoldItalic.woff new file mode 100644 index 0000000..f1ee39c Binary files /dev/null and b/academic-zh/STIX2Text-BoldItalic.woff differ diff --git a/academic-zh/STIX2Text-Italic.woff b/academic-zh/STIX2Text-Italic.woff new file mode 100644 index 0000000..908aaf1 Binary files /dev/null and b/academic-zh/STIX2Text-Italic.woff differ diff --git a/academic-zh/STIX2Text-Regular.woff b/academic-zh/STIX2Text-Regular.woff new file mode 100644 index 0000000..8c79ab9 Binary files /dev/null and b/academic-zh/STIX2Text-Regular.woff differ diff --git a/academic-zh/STIX_2.0.0_license.pdf b/academic-zh/STIX_2.0.0_license.pdf new file mode 100644 index 0000000..d247f26 Binary files /dev/null and b/academic-zh/STIX_2.0.0_license.pdf differ diff --git a/academic-zh/STZHONGS.woff b/academic-zh/STZHONGS.woff new file mode 100644 index 0000000..e4f3cb2 Binary files /dev/null and b/academic-zh/STZHONGS.woff differ diff --git a/academic-zh/STZHONGS_Bold.woff b/academic-zh/STZHONGS_Bold.woff new file mode 100644 index 0000000..10b6059 Binary files /dev/null and b/academic-zh/STZHONGS_Bold.woff differ diff --git a/academic-zh/fonts.css b/academic-zh/fonts.css new file mode 100644 index 0000000..bf60ac6 --- /dev/null +++ b/academic-zh/fonts.css @@ -0,0 +1,60 @@ +@font-face { + font-family: 'STIX2Text'; + font-style: normal; + font-weight: normal; + src: local('STIX2Text Regular'), + url('./STIX2Text-Regular.woff') format('woff'), + url('ttps://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff') format('woff') +} + +@font-face { + font-family: 'STIX2Text'; + font-style: italic; + font-weight: normal; + src: local('STIX2Text Italic'), + url('./STIX2Text-Italic.woff') format('woff'), + url('ttps://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff') format('woff') +} + +@font-face { + font-family: 'STIX2Text'; + font-style: normal; + font-weight: bold; + src: local('STIX2Text Bold'), + url('./STIX2Text-Bold.woff') format('woff'), + url('ttps://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff') format('woff') +} + +@font-face { + font-family: 'STIX2Text'; + font-style: italic; + font-weight: bold; + src: local('STIX2Text Bold Italic'), + url('./STIX2Text-BoldItalic.woff') format('woff'), + url('ttps://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/fonts/HTML-CSS/TeX/woff/MathJax_Main-BoldItalic.woff') format('woff') +} + +@font-face { + font-family: 'STIX2Math'; + font-style: italic; + font-weight: bold; + src: local('STIX2Math'),url('./academic/STIX2Math.woff') format('woff') +} + +@font-face { + font-family: '华文中宋'; + src: url('./STZHONGS.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: '华文中宋'; + src: url('./STZHONGS_Bold.woff') format('woff'); + font-weight: bold; + font-style: bold; +} + +@font-face { + font-family: "CamingoCodeRegular"; + src: url('./CamingoCode-Regular-1.woff') format('woff'); +} \ No newline at end of file