latex-report

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LaTeX Report Generator

LaTeX报告生成器

Convert content to professionally formatted PDF reports using LaTeX.
将内容转换为使用LaTeX排版的专业格式PDF报告。

Workflow

工作流程

  1. Read the input file to understand the content structure
  2. Create a LaTeX document based on the template in templates/report.tex
  3. Compile to PDF using the tectonic script
  1. 读取输入文件以了解内容结构
  2. 基于templates/report.tex中的模板创建LaTeX文档
  3. 使用tectonic脚本编译为PDF

Key Instructions

关键说明

LaTeX Document Structure

LaTeX文档结构

Use the template structure from
templates/report.tex
. Key elements:
  • Professional title page with metadata
  • Table of contents for longer documents
  • Color-coded sections and priorities
  • Code listings with syntax highlighting (use generic style, avoid
    language=
    for unsupported languages)
  • Well-formatted tables using booktabs
  • Headers/footers with document info
使用
templates/report.tex
中的模板结构。核心元素:
  • 包含元数据的专业标题页
  • 长文档的目录
  • 颜色编码的章节和优先级标识
  • 带语法高亮的代码列表(使用通用样式,对不支持的语言避免使用
    language=
    参数)
  • 使用booktabs排版的格式规范的表格
  • 包含文档信息的页眉/页脚

Code Listings

代码列表

Important: Tectonic has limited language support for listings. Use these safe options:
  • \begin{lstlisting}[]
    - generic code (safest)
  • \begin{lstlisting}[caption=Description]
    - with caption only
  • Avoid
    language=SQL
    ,
    language=JavaScript
    etc. as they may fail
重要提示: Tectonic对列表的语言支持有限。请使用以下安全选项:
  • \begin{lstlisting}[]
    - 通用代码(最安全)
  • \begin{lstlisting}[caption=Description]
    - 仅带标题
  • 避免使用
    language=SQL
    language=JavaScript
    等,因为它们可能会编译失败

Compiling

编译

Run the compile script to ensure tectonic is available and compile:
bash
~/.claude/skills/latex-report/scripts/compile.sh <input.tex>
This script:
  1. Downloads tectonic to /tmp if not present
  2. Compiles the LaTeX file to PDF
  3. Reports success/failure
运行编译脚本以确保tectonic可用并执行编译:
bash
~/.claude/skills/latex-report/scripts/compile.sh <input.tex>
该脚本会:
  1. 如果不存在,将tectonic下载到/tmp目录
  2. 将LaTeX文件编译为PDF
  3. 返回成功/失败报告

Output

输出

  • Place the
    .tex
    file in the same directory as the input
  • Name the output based on the input filename or user preference
  • Verify the PDF was created successfully
  • .tex
    文件放在与输入文件相同的目录中
  • 根据输入文件名或用户偏好命名输出文件
  • 验证PDF是否成功生成

Template Reference

模板参考

See templates/report.tex for the full template with:
  • Document class and package setup
  • Color definitions
  • Header/footer configuration
  • Section formatting
  • Code listing styles
  • Table formatting examples
查看templates/report.tex获取完整模板,其中包含:
  • 文档类和包设置
  • 颜色定义
  • 页眉/页脚配置
  • 章节格式
  • 代码列表样式
  • 表格排版示例

Common Sections for Reports

报告常用章节

Adapt based on content type:
Technical Reports / RCAs:
  • Executive Summary
  • Timeline
  • Key Metrics
  • Root Cause Analysis
  • Contributing Factors
  • Recommendations
  • Appendix
General Reports:
  • Introduction
  • Background
  • Findings
  • Analysis
  • Conclusions
  • Recommendations
Documentation:
  • Overview
  • Getting Started
  • Usage
  • API Reference
  • Examples
  • Troubleshooting
根据内容类型调整:
技术报告/根本原因分析(RCA):
  • 执行摘要
  • 时间线
  • 关键指标
  • 根本原因分析
  • 促成因素
  • 建议
  • 附录
通用报告:
  • 引言
  • 背景
  • 调查结果
  • 分析
  • 结论
  • 建议
文档类:
  • 概述
  • 快速入门
  • 使用方法
  • API参考
  • 示例
  • 故障排除