agentsclimarketplace

Sync tex

Skill brycewang-stanford/Auto-Empirical-Research-Skills/skills/29-quarcs-lab-project20XXy/dot-claude/skills/sync-tex

Transfers prose edits from latex/index.tex (Overleaf) back into index.qmd. Use after pulling LaTeX edits from a collaborator.From its SKILL.md

Install
npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill sync-tex

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

3.0 KB, 719 tokens by cl100k_base, as published. Nobody here has run it

Sync LaTeX Edits to QMD

Transfer prose changes made by collaborators in latex/index.tex (e.g., via Overleaf) back into index.qmd.

Prerequisites

  • latex/.baseline.tex must exist (auto-created by bash scripts/render.sh)
  • latex/index.tex must contain collaborator edits (pulled from Overleaf / GitHub)

Steps

  1. Read these three files:

    • latex/.baseline.tex — the LaTeX snapshot from the last render (before edits)
    • latex/index.tex — the LaTeX after collaborator edits
    • index.qmd — the current QMD manuscript source
  2. Compare latex/.baseline.tex vs latex/index.tex to identify changes. Focus on the document body only (everything between \begin{document} and \end{document}). Ignore the preamble (lines before \begin{document}) — these are auto-generated by Quarto.

  3. For each section (identified by \section{...}\label{...} and \subsection{...}\label{...} markers), check if the prose text changed between baseline and modified.

  4. For each changed section, apply the edits to the corresponding section in index.qmd:

    • Convert LaTeX formatting to QMD equivalents:
      • \textbf{...}**...**
      • \textit{...} or \emph{...}*...*
      • \href{url}{text}[text](url)
      • Section~\ref{sec-id}@sec-id
      • Figure~\ref{fig-id}@fig-id
      • Table~\ref{tbl-id}@tbl-id
      • \cite{key} or \citep{key}[@key]
      • \citet{key}@key
      • Footnotes: \footnote{...}^[...]
    • CRITICAL: Preserve all {{< embed >}} shortcodes exactly as they are in the QMD. Do NOT replace them with \includegraphics, \begin{figure}, \begin{longtable}, or any LaTeX equivalents. These shortcodes pull live outputs from notebooks and must remain intact.
    • If a collaborator edited a figure/table caption in LaTeX (\caption{...}), note the change in the summary report but do NOT modify the embed shortcodes — captions are defined in the notebook source cells.
  5. After applying all changes, show a summary:

    • List each section that was modified
    • For each, show a brief description of what changed (e.g., "Added two sentences to Introduction", "Rewrote paragraph 2 in Methods")
    • Note any changes that could NOT be transferred (e.g., caption edits, preamble changes, new LaTeX packages)
  6. Render the manuscript with bash scripts/render.sh to verify the round-trip is clean (no warnings, no errors).

Error handling

  • If latex/.baseline.tex does not exist, tell the user to run /project:render first.
  • If latex/.baseline.tex and latex/index.tex are identical, report "No changes detected" and stop.
  • If a section label in the LaTeX does not match any section in index.qmd, flag it and skip.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.