> ## Documentation Index
> Fetch the complete documentation index at: https://docs.docwriter.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Example projects

> Use research, publishing, diagrams, and Git in a writing project.

## Research with web sources

Open a draft and ask the agent to research one claim without editing. Review the sources in the activity log. Then ask it to add a short supported statement and citation. Accept the edit only after opening the cited source and checking that it supports the sentence.

Attach an image to Chat when the image itself is evidence or needs a caption. Place reusable project images under `assets/`.

<Frame>
  <img src="https://mintcdn.com/ucberkeley-8d9be701/E_ddd2kJwp-Usx8W/images/blog-post-open.png?fit=max&auto=format&n=E_ddd2kJwp-Usx8W&q=85&s=888f293d37ceb34f511056a0d6eed8ad" alt="A research draft with inline requests before the agent runs" width="1400" height="900" data-path="images/blog-post-open.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/ucberkeley-8d9be701/E_ddd2kJwp-Usx8W/images/blog-pending-edit.png?fit=max&auto=format&n=E_ddd2kJwp-Usx8W&q=85&s=429cad9fa30592ae8877a55020c8a861" alt="Research results and proposed citations beside the draft" width="1400" height="900" data-path="images/blog-pending-edit.png" />
</Frame>

## LaTeX and Overleaf

Clone the Overleaf Git repository, run DocWriter with `--watch`, and configure the pdflatex hook. Pull before a writing session and push only accepted source changes.

Use [LaTeX and SyncTeX](/automation/latex-and-synctex) for the build and preview setup. DocWriter does not pull or push the Overleaf repository automatically unless you enable a Git hook.

<Frame>
  <img src="https://mintcdn.com/ucberkeley-8d9be701/E_ddd2kJwp-Usx8W/images/overleaf-tex-open.png?fit=max&auto=format&n=E_ddd2kJwp-Usx8W&q=85&s=ec1b1cea72c06ab11189f03eb1223697" alt="A TeX project open in the source editor" width="1400" height="900" data-path="images/overleaf-tex-open.png" />
</Frame>

## Pandoc

Install Pandoc before enabling either template. PDF output also needs a PDF engine supported by the local Pandoc installation.

The Pandoc HTML template runs:

```sh theme={null}
pandoc "draft.md" --standalone --output "draft.html"
```

Set the hook output to `{{stem}}.html`. Use the Pandoc PDF template and `{{stem}}.pdf` when a PDF engine is installed.

The templates run after matching Edit or Write tool calls, so generated output can refresh during an agent turn.

## Mermaid

Install `@mermaid-js/mermaid-cli`, which provides `mmdc`, then choose the Mermaid hook template:

```sh theme={null}
mmdc -i "diagram.mmd" -o "diagram.svg"
```

Set the output to `{{stem}}.svg`.

The template matches Edit or Write tool calls for Mermaid source files.

## Git

Choose one of the Git templates when accepted changes should be committed and pushed at the end of a turn. The private variant excludes `.docwriter/`, `.claude/`, and `CLAUDE.md`.

The templates run at **Stop** and require a configured remote and upstream branch. Review the command and repository state before enabling an automatic push.
