From 23eac331fb9853e796b0d0e02c81ec22a0b9e361 Mon Sep 17 00:00:00 2001 From: shenyuxiang Date: Fri, 24 Jul 2026 12:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=20README=20=E7=9A=84=20Overleaf=20=E5=9C=A8=E7=BA=BF=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 +++++++++++++++++++++------ README_en.md | 27 +++++++++++++++++++++------ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0d1f306..9d36ead 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ 这是一个面向中文技术报告的 LaTeX 模板,适合整理项目设计、实现说明、测试结果、问题排查、常见问题和后续规划等内容。仓库同时提供空白模板与两个完整示例,可直接复制后修改。 +如果不想在本地安装和配置 LaTeX 环境,推荐直接使用 [Overleaf](https://www.overleaf.com/) 在线编辑和编译。Overleaf 提供免费版,无需安装软件,注册后上传模板即可使用。 + ## 模板特点 - A4 纸张、12 pt 字号、2.5 cm 页边距和 1.5 倍行距 @@ -33,9 +35,23 @@ └─ README_en.md ``` -## 环境要求 +## 推荐方式:Overleaf 在线编译 -请安装带有 XeLaTeX 的 LaTeX 发行版,例如 TeX Live 或 MiKTeX。模板使用 `ctex` 处理中文,并依赖以下宏包: +对于初次使用 LaTeX 或不方便配置本地环境的用户,Overleaf 免费版通常足以编辑和编译本模板。 + +1. 将 `模板` 目录中的 `main.tex` 压缩为 ZIP 文件。请让 `main.tex` 位于压缩包根目录。 +2. 登录 Overleaf,选择 **New Project → Upload Project**,上传 ZIP 文件。 +3. 打开项目左上角的 **Menu**,将 **Compiler** 设置为 **XeLaTeX**。 +4. 修改 `main.tex`,然后点击 **Recompile** 生成 PDF。 +5. 需要本地保存时,在 Overleaf 中下载生成的 PDF 或整个项目源码。 + +使用示例文档时,应将对应目录下的 `main.tex` 和 PNG 图片一起压缩上传,否则图片无法显示。具体上传方法可参考 [Overleaf 官方上传指南](https://www.overleaf.com/learn/latex/Kb/Uploading_a_project)。 + +> Overleaf 免费版存在编译时长等资源限制,但对本仓库中的普通技术报告通常已经够用。较大的图片、复杂内容或较长文档如果触发限制,可以压缩图片或改用本地编译。 + +## 本地编译环境 + +只有需要离线编译时,才需要安装带有 XeLaTeX 的 LaTeX 发行版,例如 TeX Live 或 MiKTeX。模板使用 `ctex` 处理中文,并依赖以下宏包: ```text ctex, geometry, titlesec, titletoc, fancyhdr, listings, @@ -60,7 +76,7 @@ tcolorbox, fontawesome5, setspace, hyperref ``` 3. 按需修改、复制或删除正文中的示例章节。 -4. 使用 XeLaTeX 编译两次,以正确生成目录和交叉引用: +4. 将文档上传至 Overleaf,并将编译器设置为 XeLaTeX;或者在本地使用 XeLaTeX 编译两次,以正确生成目录和交叉引用: ```powershell xelatex main.tex @@ -73,7 +89,7 @@ tcolorbox, fontawesome5, setspace, hyperref latexmk -xelatex main.tex ``` -5. 编译完成后,在当前目录查看 `main.pdf`。 +5. 编译完成后,在 Overleaf 的 PDF 预览区查看或下载结果;本地编译时可在当前目录查看 `main.pdf`。 ## 常用内容 @@ -139,7 +155,7 @@ def main(): ### 中文无法正常显示 -优先确认使用的是 XeLaTeX,而不是直接使用传统 LaTeX 命令;同时确认 TeX 发行版已安装中文支持和 `ctex`。 +在 Overleaf 项目菜单或本地编译命令中确认使用的是 XeLaTeX,而不是传统 LaTeX 编译器。本地编译时还需确认 TeX 发行版已安装中文支持和 `ctex`。 ### 提示找不到宏包 @@ -156,4 +172,3 @@ def main(): ## 说明 仓库中未提供许可证文件。使用或分发前,请根据实际归属补充许可证或内部使用说明。 - diff --git a/README_en.md b/README_en.md index 2cf7b22..8d30d7f 100644 --- a/README_en.md +++ b/README_en.md @@ -4,6 +4,8 @@ This repository provides a LaTeX template for Chinese technical reports. It is suitable for documenting project design, implementation details, test results, troubleshooting records, FAQs, and future plans. A blank template and two complete examples are included for direct reuse. +If you prefer not to install and configure LaTeX locally, use [Overleaf](https://www.overleaf.com/) to edit and compile the template online. Overleaf offers a free plan and requires no local installation: create an account, upload the template, and start editing. + ## Features - A4 paper, 12 pt text, 2.5 cm margins, and 1.5 line spacing @@ -33,9 +35,23 @@ This repository provides a LaTeX template for Chinese technical reports. It is s └─ README_en.md ``` -## Requirements +## Recommended: Compile Online with Overleaf -Install a LaTeX distribution that includes XeLaTeX, such as TeX Live or MiKTeX. The template uses `ctex` for Chinese typesetting and depends on the following packages: +For new LaTeX users or anyone who does not want to configure a local toolchain, the Overleaf free plan is generally sufficient for editing and compiling this template. + +1. Create a ZIP archive containing `main.tex` from the `模板` directory. Keep `main.tex` at the root of the archive. +2. Sign in to Overleaf and select **New Project → Upload Project** to upload the ZIP file. +3. Open **Menu** in the upper-left corner and set **Compiler** to **XeLaTeX**. +4. Edit `main.tex`, then click **Recompile** to generate the PDF. +5. Download the generated PDF or the complete project source when a local copy is needed. + +When using an example document, include its `main.tex` and PNG images in the same ZIP archive; otherwise, the images will be missing. See the [official Overleaf upload guide](https://www.overleaf.com/learn/latex/Kb/Uploading_a_project) for details. + +> The Overleaf free plan has resource limits such as a compile timeout, but it is normally sufficient for the technical reports in this repository. If a long document, complex content, or large images reach those limits, optimize the images or compile locally. + +## Local Compilation Requirements + +Install a LaTeX distribution only if offline compilation is required. Use a distribution that includes XeLaTeX, such as TeX Live or MiKTeX. The template uses `ctex` for Chinese typesetting and depends on the following packages: ```text ctex, geometry, titlesec, titletoc, fancyhdr, listings, @@ -60,7 +76,7 @@ A full TeX Live installation normally includes these packages. With a minimal in ``` 3. Edit, duplicate, or remove the sample sections as needed. -4. Run XeLaTeX twice so that the table of contents and cross-references are updated: +4. Upload the document to Overleaf and select XeLaTeX as the compiler, or run XeLaTeX locally twice so that the table of contents and cross-references are updated: ```powershell xelatex main.tex @@ -73,7 +89,7 @@ A full TeX Live installation normally includes these packages. With a minimal in latexmk -xelatex main.tex ``` -5. Open `main.pdf` in the current directory. +5. View or download the result from Overleaf's PDF preview. For local compilation, open `main.pdf` in the current directory. ## Common Elements @@ -139,7 +155,7 @@ Both example directories include compiled PDF files, allowing the final layout t ### Chinese text is not rendered correctly -Make sure the document is compiled with XeLaTeX rather than the traditional LaTeX command, and verify that Chinese language support and `ctex` are installed. +Make sure XeLaTeX is selected in the Overleaf project menu or used by the local compile command. For local compilation, also verify that Chinese language support and `ctex` are installed. ### A package cannot be found @@ -156,4 +172,3 @@ Check the file name, extension, and relative path. When moving or copying an exa ## License Note No license file is currently included in this repository. Add an appropriate license or an internal-use notice before redistribution. -