Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 250 additions & 0 deletions .claude/commands/add-pub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
---
description: Add a new publication to CV files (main CV, short CV, and BibTeX)
allowed-tools: Read, Edit, Write, Bash(grep:*), Bash(wc:*), Bash(date:*)
argument-hint: [bibtex-text] [type: preprint|published]
---

# Add Publication to CV

Interactively add a new publication to all CV files with proper formatting.

**Arguments**: `$ARGUMENTS`

## Quick Reference

### Key Files
- **Main CV**: `./Vatsal_CV.tex`
- **Short CV**: `./Vatsal_CV-shortCV.tex`
- **Publications Only**: `./Vatsal_CV-publicationsOnly.tex`
- **BibTeX**: `./mypublications.bib`

### Current State
- Date: !`date +%Y-%m-%d`

## Workflow

### Step 1: Parse Input or Request BibTeX

If no BibTeX provided in arguments, ask:

> Please provide the BibTeX entry for the publication you want to add.

Parse the BibTeX entry to extract:
- Authors (all names)
- Title
- Journal
- Volume
- Article number/pages
- Year
- DOI

### Step 2: Determine Publication Type

If not specified in arguments, ask:

> Is this publication:
> 1. **preprint** - Add to "Works Under Review / In Preparation" section
> 2. **published** - Add to "Peer-Reviewed Publications" section

### Step 3: Gather Additional Information

Ask for any missing information:

**For all publications:**
- Page count: "How many pages is this publication? (e.g., 32 pages)"
- GitHub repository URL (optional): "Is there a GitHub repository? If yes, provide the URL"

**For published papers:**
- Is this Open Access (OA)? If not OA:
- Ask for preprint/archived PDF URL for OA link

**For preprints:**
- Status: "What is the submission status?"
- `submitted to [Journal]`
- `arXiv preprint`
- `to be submitted to [Journal]`
- `in preparation`

**For special features:**
- Is this a journal cover?
- Is this an Editor's Suggestion/Choice?
- Any other special recognition?

### Step 4: Format for Main CV (Vatsal_CV.tex)

#### Published Paper Format (add to beginning of Peer-Reviewed section):

```latex
\item [Authors with \textbf{Vatsal Sanjay} for self],\\
[Title],\\
[Journal abbrev.], [volume], [article#] ([year]) [[X pages]];\\
\faFile\hspace{0.2em}DOI: \href{[DOI URL]}{[DOI number]};\\
\faGithub\hspace{0.2em}\href{[GitHub URL]}{Repository}.
```

**For non-OA papers:**
```latex
\faLock\hspace{0.2em}DOI: \href{[DOI URL]}{[DOI number]}, \faFile\hspace{0.2em}OA: \href{[OA URL]}{[OA DOI or "archived pdf"]};\\
```

**For special features, add sub-items:**
```latex
see also
\begin{itemize}
\item \faStar\hspace{0.2em}\textbf{Cover} of that volume of [Journal].
\item \faStar\hspace{0.2em}Editor's Suggestion of that issue.
\end{itemize}
```

#### Preprint Format (add to Works Under Review section):

```latex
\item [Authors with \textbf{Vatsal Sanjay} for self],\\
[Title],\\
[Status: "submitted to \textit{Journal}" or "arXiv preprint" or "to be submitted to [Journal]"],\\
\faFile\hspace{0.2em}DOI: \href{[DOI URL]}{[DOI number]};\\
\faGithub\hspace{0.2em}\href{[GitHub URL]}{Repository}.
```

### Step 5: Check for Existing Preprint (Published papers only)

For published papers, search the "Works Under Review" section for an **exact title match**.

**Matching criteria:**
- Normalize both titles: trim whitespace, compare case-insensitively
- Do NOT match on authors alone (to avoid false positives)
- Only remove on exact title match

If exact title match found:
1. Remove the entry from "Works Under Review" section
2. Inform user: "Removed preprint entry '[title]' from Works Under Review section"

If no exact match found, do not remove any entries.

### Step 6: Update Short CV (Vatsal_CV-shortCV.tex)

The short CV should contain ONLY the 7 most recent publications (by publication date).

1. Read current publications list from short CV
2. Determine if new publication should be in top 7 (based on year)
3. If yes, add new entry and remove oldest one

**Short CV format:**
```latex
\item [First Author] et al., \textbf{V. Sanjay}[if not first], [Short title], \textit{[Journal]} [volume], [article#] ([year]).
```

Or if Vatsal is first author:
```latex
\item \textbf{V. Sanjay}, [co-authors], [Short title], \textit{[Journal]} [volume], [article#] ([year]).
```

**Special notes in short CV:**
- Add `; \textbf{Cover}` after year if journal cover
- Keep entries concise (one line each)

### Step 7: Update Publications-Only CV (Vatsal_CV-publicationsOnly.tex)

**For published papers only** (skip this step for preprints):

1. Add the new publication to the beginning of the enumerate list
2. Use the **same full format** as the main CV (not condensed)

**Format (identical to main CV):**
```latex
\item [Authors with \textbf{Vatsal Sanjay} for self],\\
[Title],\\
[Journal abbrev.], [volume], [article#] ([year]) [[X pages]];\\
\faFile\hspace{0.2em}DOI: \href{[DOI URL]}{[DOI number]};\\
\faGithub\hspace{0.2em}\href{[GitHub URL]}{Repository}.
```

### Step 8: Update BibTeX (mypublications.bib)

Add the BibTeX entry at the beginning of the file (after the header comments).

Ensure proper formatting:
- Use standard BibTeX field names
- Include DOI field
- Use abbreviated journal names

### Step 9: Update Metrics

After adding a published paper, remind user to check:
- Total publication count in short CV: "Selected publications (X total, Y+ citations)"
- Any citation count updates needed

### Step 10: Compile and Verify

Remind user:
```bash
make all # Compile both CVs
make lint # Check for errors
```

## Author Formatting Rules

1. Use `\textbf{Vatsal Sanjay}` for self-citations in main CV
2. Use `\textbf{V. Sanjay}` in short CV
3. Full names for co-authors (First M. Last format)
4. Use "et al." in short CV for papers with many authors

## Journal Abbreviations

Common abbreviations used:
- Journal of Fluid Mechanics -> J. Fluid Mech.
- Physical Review Letters -> Phys. Rev. Lett.
- Physical Review Fluids -> Phys. Rev. Fluids
- Nature Communications -> Nat. Commun.
- Science Advances -> Sci. Adv.
- AIChE Journal -> AIChE J.
- Chemical Engineering Science -> Chem. Eng. Sci.
- Physics of Fluids -> Phys. Fluids
- Soft Matter -> Soft Matter
- PNAS -> PNAS
- Journal of Computational Physics -> J. Comput. Phys.

## Example Transformation

**Input BibTeX:**
```bibtex
@article{dixit2025viscoelastic,
title={Viscoelastic Worthington jets and droplets produced by bursting bubbles},
author={Dixit, Ayush K and Oratis, Alexandros T and Zinelis, Konstantinos and Lohse, Detlef and Sanjay, Vatsal},
journal={J. Fluid Mech.},
volume={1010},
pages={A2},
doi = {10.1017/jfm.2025.237},
year={2025}
}
```

**Output for Main CV:**
```latex
\item Ayush K. Dixit, Alexandros T. Oratis, Konstantinos Zinelis, Detlef Lohse, and \textbf{Vatsal Sanjay},\\
Viscoelastic Worthington jets and droplets produced by bursting bubbles,\\
J. Fluid Mech., 1010, A2 (2025) [32 pages];\\
\faFile\hspace{0.2em}DOI: \href{https://doi.org/10.1017/jfm.2025.237}{10.1017/jfm.2025.237};\\
\faGithub\hspace{0.2em}\href{https://github.com/comphy-lab/Viscoelastic-Worthington-jets-and-droplets-produced-by-bursting-bubbles}{Repository}.
```

**Output for Short CV:**
```latex
\item A.K. Dixit et al., \textbf{V. Sanjay}, Viscoelastic Worthington jets, \textit{J. Fluid Mech.} 1010, A2 (2025).
```

## Error Handling

- If DOI is missing: Warn and request DOI
- If journal not recognized: Ask for proper abbreviation
- If page count missing: Ask for page count
- If duplicate entry found: Warn and ask for confirmation

## Success Criteria

- [ ] BibTeX entry added to mypublications.bib
- [ ] Main CV updated with properly formatted entry
- [ ] Short CV updated if publication is in top 7 most recent
- [ ] Publications-only CV updated (for published papers only)
- [ ] If published: checked and removed any preprint version
- [ ] User reminded to compile and verify
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ Thumbs.db
*.mtc1
*.out
*.synctex.gz
.windsurfrules
**/.claude

# Linting artifacts
chktex.log
Expand All @@ -76,5 +74,3 @@ package-lock.json
*_bibertool.bib
*.blg

# Cursor AI agent configuration
**/.cursor
69 changes: 32 additions & 37 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,11 @@ make lint # Run all linters

## Publication Update Workflow

### Adding New Publications
**Canonical reference:** See `.claude/commands/add-pub.md` for complete formatting templates, icon usage (`\faFile`, `\faLock`, `\faGithub`, `\faStar`), and examples. Use the `/add-pub` slash command for adding publications.

For **Vatsal_CV.tex** (Main CV), use this exact format:
### Short CV Rule

```latex
\item [Authors with \textbf{Vatsal Sanjay} for self],\\
[Title without quotes],\\
[Journal abbrev.], [volume], [article#] ([year]) [[pages] pages];\\
(OA) DOI: \href{[DOI URL]}{[DOI number]}.
```

**Example:**
```latex
\item Ayush K. Dixit, Alexandros T. Oratis, Konstantinos Zinelis, Detlef Lohse, and \textbf{Vatsal Sanjay},\\
Viscoelastic Worthington jets and droplets produced by bursting bubbles,\\
J. Fluid Mech., 1010, A2 (2025) [32 pages];\\
(OA) DOI: \href{https://doi.org/10.1017/jfm.2025.237}{10.1017/jfm.2025.237}.
```

### Critical Formatting Rules

- Use `\\` at end of each line except the last
- Page count always in format `[X pages]`
- Semicolon `;` before final `\\` on journal line
- For non-OA papers with preprints: `DOI: \href{...}{...}, OA: \href{...}{...}`

### Short CV Updates

**IMPORTANT:** For **Vatsal_CV-shortCV.tex**, always select the **7 LATEST publications** (chronologically most recent, not by impact):

```latex
\item \textbf{V. Sanjay}, [coauthors], [Short title], \textit{[Journal]} [volume], [article] ([year]).
```

**Example:**
```latex
\item \textbf{V. Sanjay} \& D. Lohse, Unifying theory of scaling in drop impact, \textit{Phys. Rev. Lett.}, 134, 104003 (2025).
```
For **Vatsal_CV-shortCV.tex**, always select the **7 LATEST publications** (chronologically most recent, not by impact).

## Common Update Scenarios

Expand Down Expand Up @@ -112,10 +79,38 @@ For journal covers or editor's suggestions, add as sub-items:
- **Compilation issues**: Try `make clean` then recompile
- **Formatting problems**: Double-check `\\` placement and spacing

## Slash Commands

### `/add-pub` - Add Publication to CV

**Location:** `.claude/commands/add-pub.md`

**Usage:**

```
/add-pub [bibtex-text] [type: preprint|published]
```

**What it does:**
1. Parses BibTeX input and extracts publication metadata
2. Routes by publication type:
- **Preprints** → "Works Under Review / In Preparation" section
- **Published** → "Peer-Reviewed Publications" section (auto-removes from preprints if previously listed)
3. Formats entries matching existing CV style:
- `\textbf{Vatsal Sanjay}` for self-citations
- Proper icons (`\faFile`, `\faLock`, `\faGithub`, `\faStar`)
- DOI/OA links, GitHub repos, page counts
4. Updates all three files:
- `Vatsal_CV.tex` (main CV)
- `Vatsal_CV-shortCV.tex` (keeps 7 most recent)
- `mypublications.bib` (BibTeX archive)
5. Asks for missing info (page count, GitHub URL, Open Access status, special features)

## Notes for Claude

- Repository uses moderncv LaTeX package with custom darkmagenta color (#68236D)
- Both CVs share styling but display publications differently
- Short CV is exactly 2 pages and shows ONLY the 7 most recent publications
- All icons and symbols are documented in README.md
- Publications are hardcoded in .tex files (not pulled from .bib file)
- Publications are hardcoded in .tex files (not pulled from .bib file)
- Use `/add-pub` slash command for adding new publications (handles all formatting automatically)
Loading