latex-project-manager
LaTeX Project Manager
LaTeX 프로젝트를 섹션별 폴더 구조로 분리하고 Git으로 관리하는 스킬입니다.
When to Use
- 단일
.tex파일을 섹션별로 분리하고 싶을 때 - 여러 LaTeX 프로젝트를 하나의 repo에서 스위치 방식으로 관리할 때
- LaTeX 프로젝트를 GitHub 또는 Overleaf에 push할 때
- 기존 inline
\begin{thebibliography}를 BibTeX.bib으로 전환할 때
Command 1: structure
Usage
/latex-project-manager structure <tex_file> <output_dir> [project_name]
What It Does
단일 .tex 파일을 분석하여 아래 구조로 분리합니다:
output_dir/
├── main.tex # 공통 preamble + 프로젝트 선택 스위치
├── <project_name>/
│ ├── content.tex # \input 오케스트레이터
│ ├── refs.bib # BibTeX 참고문헌
│ ├── figures/ # 이미지 저장 폴더
│ │ └── .gitkeep
│ └── sections/
│ ├── 00_frontmatter.tex # \title, \author, \maketitle, \abstract
│ ├── 01_<section_name>.tex # 각 \section별 파일
│ ├── ...
│ └── NN_bibliography.tex # \bibliography{project/refs}
└── .gitignore
Workflow
Phase 1: 분석
├── .tex 파일 읽기
├── preamble 추출 (documentclass ~ \begin{document})
├── \section 경계 식별
├── bibliography 방식 확인 (inline vs bibtex)
└── 패키지 목록 수집
Phase 2: 분리
├── main.tex 생성 (preamble + \professor 스위치)
├── content.tex 생성 (\input 목록)
├── 섹션별 .tex 파일 생성
├── refs.bib 생성 (inline bib → BibTeX 변환)
└── figures/ 디렉토리 생성
Phase 3: 검증
├── pdflatex 컴파일 (에러 0 확인)
├── bibtex 실행 + 재컴파일 (3-pass)
├── 원본 대비 페이지 수 일치 확인
├── citation 경고 0건 확인
└── 컨텐츠 유실 없음 확인 (diff)
Phase 4: Critique Loop
├── Round 1: 에러/경고 확인 → 수정
├── Round 2: 재검증 → 이슈 없으면 통과
└── 2회 연속 이슈 없을 때까지 반복
Rules
Preamble Handling
\documentclass~\begin{document}사이의 모든 내용을main.tex로 추출- 여러 프로젝트가 있을 경우 패키지의 합집합을 사용
\graphicspath{{\professor/figures/}}로 프로젝트별 이미지 경로 설정
Section Splitting
\section{...}단위로 분리 (subsection은 해당 section 파일에 포함)- 파일명:
NN_<section_name>.tex(번호 + 스네이크케이스) \title,\author,\date,\maketitle,\begin{abstract}~\end{abstract}→00_frontmatter.tex\section*{Acknowledgments}+ bibliography → 마지막 번호_bibliography.tex
Bibliography (CRITICAL)
- 반드시 BibTeX
.bib파일로 관리 — inline\begin{thebibliography}금지 refs.bib를 프로젝트 폴더 루트에 생성\bibliographystyle{plainnat}+\bibliography{<project>/refs}사용- inline
\bibitem이 있으면 자동으로@article/@inproceedings엔트리로 변환 - 모든 텍스트 참조를
\citep{}또는\citet{}로 변환 — "(Author et al., Year)" 같은 plain text 참조를 찾아\citep{key}로 교체 - 3-pass 컴파일:
pdflatex → bibtex → pdflatex → pdflatex
Multi-Project Switch
% main.tex
\newcommand{\professor}{goodman} % Change to: goodman | andreas | lake
% ... shared preamble ...
\begin{document}
\input{\professor/content}
\end{document}
Content Preservation
- 원본 내용을 한 글자도 변경하지 않음 (구조 변경만)
- 단, LaTeX 에러가 있는 경우 수정 (예: pgfplots xticklabel
\\문제)
Command 2: push
Usage
/latex-project-manager push <project_dir> [remote_url]
Token Authentication
우선순위:
- 환경변수
$GITHUB_TOKEN또는$OVERLEAF_TOKEN - 사용자에게 직접 입력 요청
Git URL Formats
| 서비스 | URL 형식 |
|---|---|
| GitHub | https://<user>:<token>@github.com/<user>/<repo>.git |
| Overleaf | https://git:<token>@git.overleaf.com/<project_id> |
Workflow
Phase 1: 초기화
├── git init (없는 경우)
├── .gitignore 생성/확인
├── remote 설정
└── user.name / user.email 설정
Phase 2: 커밋
├── git add (tex, bib, gitkeep, gitignore만)
├── 커밋 메시지 자동 생성
└── git commit
Phase 3: Push
├── git push (또는 force push for 초기 설정)
└── 결과 확인
Phase 4: Critique
├── git ls-files로 tracked 파일 확인
├── 민감 정보 (토큰 등) 커밋에 포함되지 않았는지 확인
└── remote 연결 상태 확인
.gitignore Template
*.aux
*.log
*.out
*.toc
*.bbl
*.blg
*.synctex.gz
*.fls
*.fdb_latexmk
*.pdf
.DS_Store
Common Issues & Fixes
| 문제 | 원인 | 해결 |
|---|---|---|
pgfplots xticklabel \\ 에러 |
LR mode에서 \\ 사용 불가 |
{Label Text} 형태로 변경, align=center 추가 |
| Overfull hbox (table) | lcccc 열이 너무 넓음 |
Xcccc (tabularx) 또는 헤더 축약 |
| Citation undefined | \cite 없이 텍스트로 참조 |
\citep{key} 또는 \citet{key}로 변환 |
| BibTeX 엔트리 누락 | .bib에 key 없음 |
refs.bib에 엔트리 추가 |
| Overleaf git 403 | 무료 플랜 | Premium 플랜 필요, 또는 GitHub 사용 |
\legend에서 $\to$ 에러 |
pgfplots legend의 math mode 제한 | \textrightarrow{} 사용 |
Related Skills
academic-latex-pipeline— MD→LaTeX 변환, Korean font, Format reviewiterative-academic-writer— 학술 문서 품질 개선 루프
More from iamseungpil/claude-for-dslab
update-study
This skill should be used when the user asks to "update study", "analyze new experiments", "update experiment document", or "refresh study notes". Produces academic-paper-quality experiment reports with matplotlib plots, executive summary with comparison tables, implementation structure, experimental results with figure interpretation, proposed improvements with code examples, hypotheses, limitations, and LaTeX PDF export with figures. Features incremental detection (only analyze NEW experiments), data extraction to DataFrame, automated plot generation, iterative writing improvement loop with quality criteria, zero-hallucination verification, and LaTeX PDF export. Usage - `/update-study logs/experiment.log study.md` or `/update-study "logs/exp1.log logs/exp2.log" results/ablation_study.md`
55paper-digest
Generate shareable paper summaries for Discord/Slack/Twitter. Use when user provides arxiv paper(s) and wants a digestible summary to share. Triggers on phrases like "논문 요약", "paper summary", "share this paper", "디스코드에 공유", "summarize for sharing". Produces insight-centered single-paragraph summaries that explain WHY research matters, not just WHAT it does.
29hwpx
Comprehensive HWPX (Korean Hancom Office) document creation, editing, and analysis. When Claude needs to work with Korean word processor documents (.hwpx files) for: (1) Reading and extracting content, (2) Creating new documents, (3) Modifying or editing content, (4) Extracting tables to CSV, (5) Modifying tables or table cells, or any other HWPX document tasks. MANDATORY TRIGGERS: hwpx, hwp, 한글, 한컴, Hancom, Korean document
18survey-paper
|
10iterative-code-review
Iteratively improve code quality by using task-planner-analyzer for planning, modular-code-architect agent to fix issues, code-reviewer agent to validate quality, and running tests to verify correctness. Use when implementing new features, after bug fixes, during refactoring, or when preparing code for production deployment. Loops until code-reviewer reports no critical issues AND tests pass.
10codex-iterative-solver
Collaborate with Codex CLI to iteratively analyze, plan, and solve complex coding problems through multiple rounds of expert feedback. Use when analyzing complex codebases with multiple approaches, validating implementation plans, or solving problems that benefit from expert validation.
8