Files

130 lines
3.2 KiB
Markdown
Raw Permalink Normal View History

2026-11-01 08:52:54 +08:00
# 科技报告
2026-11-01 08:52:54 +08:00
科技报告、实验讲义、教程、说明文档,A4 多页,含封面、摘要、目录、正文。
2026-11-01 08:52:54 +08:00
## 编译
2026-11-01 08:52:54 +08:00
```bash
cd 科技报告
xelatex report.tex
xelatex report.tex % 跑两遍,目录与交叉引用才正确
```
2026-11-01 08:52:54 +08:00
或仓库根:`bash build.sh 科技报告`(自动跑两遍)
2026-11-01 08:52:54 +08:00
## 文件
```
科技报告/
├── report.tex 主文件(一般不改,只做 \input)
├── input/ 内容与设置
│ ├── info.tex ← 标题、作者等信息,改这里
│ ├── setting.tex ← 页面、水印等设置
│ ├── cover.tex 封面
│ ├── toc.tex 目录
│ ├── abstract.tex 摘要
│ └── main/ 正文各章
├── cls/ 版式模块(11 个)
├── figs/ 插图
└── logos/ 校徽等标识
```
## 改标题信息
编辑 `input/info.tex`:
```latex
\newcommand{\themaintitle}{这是一个很好用的LaTex模板} % 标题
\newcommand{\thesubtitle}{这里是副标题} % 副标题
\newcommand{\theauthor}{作者名字} % 作者
\newcommand{\thedate}{\today} % 时间
\newcommand{\theaffiliation}{中国海洋大学} % 工作单位
\newcommand{\thedept}{计算机科学与技术学院} % 部门
```
| 参数 | 说明 |
|---|---|
| `\themaintitle` | 标题 |
| `\thesubtitle` | 副标题 |
| `\theauthor` | 作者 |
| `\thedate` | 日期,可写 `\today` 或具体日期 |
| `\theaffiliation` | 工作单位 |
| `\thedept` | 部门 |
## 改正文
`input/main/` 下按章分文件,`report.tex` 里按顺序 `\input`。
```latex
\chapter{第一章标题}
正文内容。
\section{节标题}
\subsection{小节标题}
```
标准 LaTeX 章节命令。增删章节时改 `report.tex` 里的 `\input` 列表。
## 改封面与摘要
- `input/cover.tex` — 封面版式,一般不改
- `input/abstract.tex` — 摘要内容,替换其中的文字
## 页面设置
`input/setting.tex` 里可调:
```latex
\SetWatermarkText{\theaffiliation\thedept} % 水印文字
```
水印颜色在同一文件里:
```latex
ouwblue!4!white % 想更淡改成 3,想明显改成 8
```
## 版式模块
`cls/` 下 11 个模块各管一块,需要改版式时按名字找:
| 模块 | 管什么 |
|---|---|
| `global.cls` | 全局设置 |
| `geometry.cls` | 页面尺寸与边距 |
| `font.cls` | 字体与字号 |
| `color.cls` | 配色(海大蓝等) |
| `title.cls` | 标题页 |
| `headandfoot.cls` | 页眉页脚 |
| `boxes.cls` | 盒子环境 |
| `code.cls` | 代码块 |
| `figs.cls` | 插图设置 |
| `chinesename.cls` | 中文名称(图、表、参考文献等) |
| `hyperref.cls` | 超链接设置 |
## 插图
图片放 `figs/`,正文里:
```latex
\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\textwidth]{figs/xxx.png}
\caption{图标题}
\label{fig:xxx}
\end{figure}
```
## 版式
```
A4,多页
封面 + 摘要 + 目录 + 正文
页眉页脚含章节名与页码
整页带极浅水印(单位名称)
正文宋体,标题黑体
```
## 注意
示例内容为占位文字,使用时全部替换。