SuperAPI AI 工具集

latex-project-manager

通用与其它

查看项目

更新于 10-15 19:47

技能介绍

用途:把单个 .tex 文件按章节拆分成分层目录结构,并用 Git 管理,支持在同一仓库中切换多个 LaTeX 项目,也便于推送到 GitHub 或 Overleaf。

主要能力:命令一 structure,用法为 /latex-project-manager structure <tex_file> <output_dir> [project_name]。它会分析原文件,生成 main.tex(公共 preamble 与项目切换开关)、<project_name>/content.tex(\input 编排)、按 \section 拆分的 sections/ 文件、refs.bib 参考文献与 figures/ 目录,并生成 .gitignore。前置信息与摘要归入 00_frontmatter.tex,致谢与参考文献归入末尾文件。参考文献强制使用 BibTeX,会尝试把 inline \begin{thebibliography} 与 \bibitem 转为 @article/@inproceedings 条目,并把正文中的纯文本引用改为 \citep{} 或 \citet{}。编译按 pdflatex → bibtex → pdflatex → pdflatex 三遍执行并核对页数与引用告警;多项目通过 main.tex 中的 \newcommand{\professor}{...} 加 \input{\professor/content} 切换。命令二 push,用法为 /latex-project-manager push <project_dir> [remote_url],完成 git init、.gitignore、remote 配置、提交与推送,并检查追踪文件中是否含敏感信息。凭据优先读取 $GITHUB_TOKEN 或 $OVERLEAF_TOKEN。

限制:资料称转换只改结构、不改原文内容(存在 LaTeX 错误时除外)。Overleaf 推送遇 403 可能因免费方案不支持。资料未提供安装方式、界面截图与收费信息。