update eisvogel

This commit is contained in:
Ming Su 2025-07-28 10:59:20 +08:00
parent 6dc74392eb
commit 9d8ba67c36
6 changed files with 112 additions and 3 deletions

6
dwev/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/*.pdf
/*_files

View File

@ -361,6 +361,48 @@ $highlighting-macros$
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
$endif$
% 为中文添加支持 by Ming Su
$if(CJK)$
\usepackage[fallback]{xeCJK}
\setCJKmainfont{Noto Serif CJK SC}[BoldFont=NotoSerifCJKsc-Bold, ItalicFont=NotoSansCJKsc-Light]
\setCJKfallbackfamilyfont{rm}{Noto Serif CJK SC}
$if(book)$
\usepackage{ctex} %调用中文字体宏包
\usepackage{indentfirst} %调用首行缩进宏包
\usepackage{ctex} % 确保中文字体支持
\usepackage{zhnumber}
% 修改 chapter 格式为 "第X章"
% \renewcommand{\chapterformat}{第~\thechapter~章}
% \renewcommand{\chapterformat}{\zhnumber{\thechapter}}
\renewcommand{\chaptermarkformat}{第~\zhnumber{\thechapter}~章}
\renewcommand{\chapterformat}{\zhnumber{\thechapter}}
\renewcommand*{\chapterlinesformat}[3]{%
\parbox{\linewidth}{\centering #2~\quad~#3} % 居中 + "·" 分隔
% 或改用冒号分隔:
% \parbox{\linewidth}{\centering #2#3}
}
\RedeclareSectionCommand[
beforeskip=1.5em plus 0.5em minus 0.5em,
afterskip=1em plus 0.2em,
font=\large\bfseries
]{section}
\usepackage{zhnumber} % 确保已加载(或直接用 ctex
% 修改目录中的章节编号为中文
\addtokomafont{chapterentry}{\normalfont} % 可选:调整目录字体
\renewcommand*{\chapterformat}{\zhnumber{\thechapter}} % 正文标题格式
\renewcommand*{\chaptermarkformat}{\zhnumber{\thechapter}} % 页眉标题格式
% 关键!覆盖目录中的章节编号
\renewcommand{\addchaptertocentry}[2]{%
\addtocentrydefault{chapter}{\zhnumber{#1}}{#2}%
}
\RedeclareSectionCommand[
tocentryindent=0pt,
tocentrynumwidth=3.5em % 确保编号区域足够宽
]{chapter}
$endif$
$endif$
$if(tables)$
\usepackage{longtable,booktabs,array}
$if(multirow)$
@ -814,10 +856,17 @@ $endif$
%
% remove paragraph indentation
%
% \setlength{\parindent}{0pt}
$if(parindent)$
\setlength{\parindent}{2em} %设置首行缩进为2字符
$else$
\setlength{\parindent}{0pt}
$endif$
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
%
%
% Listings

Binary file not shown.

View File

@ -1,12 +1,11 @@
---
title: "中文报告模板"
author: "苏命"
date: "2017-02-20"
date: "today"
subject: "Markdown"
keywords: [Markdown, Example]
book: true
# top-level-division: chapter
documentclass: ctexbook # 使用ctexbook文档类专门处理中文
top-level-division: chapter
classoption:
- fntef
- UTF8
@ -19,6 +18,7 @@ classoption:
- titlestyle=hang
# classoption: [oneside]
titlepage: true
keep-tex: false
# titlepage-rule-color: "360049"
titlepage-text-color: "360049"
titlepage-rule-height: 0
@ -28,9 +28,11 @@ title-size: "Huge"
author-vskip: -4em
date-vskip: -1em
numbersections: true
parindent: true
# titlepage-logo: "inst/rceeslogo.pdf"
# logo-width: 30mm
lang: zh-CN
CJK: true
fig-pos: "!t"
colorlinks: true
urlcolor: blue
@ -48,6 +50,7 @@ CJKsansfont: "Noto Sans CJK SC"
CJKmonofont: "Noto Sans Mono CJK SC"
CJKoptions: |
AutoFakeBold=true
# include-in-header: header.tex
format: dwev-pdf
---
@ -71,6 +74,8 @@ rmdify::rmd_init()
# 项目背景与国内外现状介绍
*asdfsd* *你好* 阿斯顿发 **你好** asdf
::: callout-warning
Book in early development. Planned release in 202X.
:::

View File

@ -361,6 +361,48 @@ $highlighting-macros$
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
$endif$
% 为中文添加支持 by Ming Su
$if(CJK)$
\usepackage[fallback]{xeCJK}
\setCJKmainfont{Noto Serif CJK SC}[BoldFont=NotoSerifCJKsc-Bold, ItalicFont=NotoSansCJKsc-Light]
\setCJKfallbackfamilyfont{rm}{Noto Serif CJK SC}
$if(book)$
\usepackage{ctex} %调用中文字体宏包
\usepackage{indentfirst} %调用首行缩进宏包
\usepackage{ctex} % 确保中文字体支持
\usepackage{zhnumber}
% 修改 chapter 格式为 "第X章"
% \renewcommand{\chapterformat}{第~\thechapter~章}
% \renewcommand{\chapterformat}{\zhnumber{\thechapter}}
\renewcommand{\chaptermarkformat}{第~\zhnumber{\thechapter}~章}
\renewcommand{\chapterformat}{\zhnumber{\thechapter}}
\renewcommand*{\chapterlinesformat}[3]{%
\parbox{\linewidth}{\centering #2~\quad~#3} % 居中 + "·" 分隔
% 或改用冒号分隔:
% \parbox{\linewidth}{\centering #2#3}
}
\RedeclareSectionCommand[
beforeskip=1.5em plus 0.5em minus 0.5em,
afterskip=1em plus 0.2em,
font=\large\bfseries
]{section}
\usepackage{zhnumber} % 确保已加载(或直接用 ctex
% 修改目录中的章节编号为中文
\addtokomafont{chapterentry}{\normalfont} % 可选:调整目录字体
\renewcommand*{\chapterformat}{\zhnumber{\thechapter}} % 正文标题格式
\renewcommand*{\chaptermarkformat}{\zhnumber{\thechapter}} % 页眉标题格式
% 关键!覆盖目录中的章节编号
\renewcommand{\addchaptertocentry}[2]{%
\addtocentrydefault{chapter}{\zhnumber{#1}}{#2}%
}
\RedeclareSectionCommand[
tocentryindent=0pt,
tocentrynumwidth=3.5em % 确保编号区域足够宽
]{chapter}
$endif$
$endif$
$if(tables)$
\usepackage{longtable,booktabs,array}
$if(multirow)$
@ -814,10 +856,17 @@ $endif$
%
% remove paragraph indentation
%
% \setlength{\parindent}{0pt}
$if(parindent)$
\setlength{\parindent}{2em} %设置首行缩进为2字符
$else$
\setlength{\parindent}{0pt}
$endif$
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
%
%
% Listings

Binary file not shown.