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

# arXiv Integration

> Submit papers to arXiv directly from Hubify Labs, packaging, validation, and submission.

# arXiv Integration

Hubify Labs streamlines the arXiv submission process by packaging your paper, validating it against arXiv requirements, and preparing the submission tarball.

## Submission Workflow

<Steps>
  <Step title="Compile your paper">
    Ensure the paper compiles cleanly with zero undefined references:

    ```bash theme={null}
    hubify paper compile paper-1
    ```

    Verify:

    * PDF file size is 15-25 MB (figures embedded)
    * Zero undefined references
    * Bibliography is complete
  </Step>

  <Step title="Validate for arXiv">
    Run the arXiv validation check:

    ```bash theme={null}
    hubify paper validate paper-1 --target arxiv
    ```

    ```
    arXiv Validation: PASS
      LaTeX source: revtex4-2 ✓
      Figures: 11 PNG files, all < 10 MB ✓
      Bibliography: 63 entries, all resolved ✓
      File size: 22.4 MB total ✓
      No absolute paths ✓
      No system-specific packages ✓
    ```
  </Step>

  <Step title="Choose a category">
    Select the appropriate arXiv category:

    | Category      | Description                              |
    | ------------- | ---------------------------------------- |
    | `astro-ph.CO` | Cosmology and Nongalactic Astrophysics   |
    | `gr-qc`       | General Relativity and Quantum Cosmology |
    | `hep-th`      | High Energy Physics - Theory             |
    | `hep-ph`      | High Energy Physics - Phenomenology      |
    | `astro-ph.GA` | Astrophysics of Galaxies                 |

    ```bash theme={null}
    hubify paper submit paper-1 --category astro-ph.CO
    ```
  </Step>

  <Step title="Package the submission">
    Hubify creates a submission-ready tarball:

    ```bash theme={null}
    hubify paper package paper-1 --output submission.tar.gz
    ```

    The package includes:

    * `main.tex`, LaTeX source
    * `references.bib`, Bibliography
    * `fig_*.png`, All figures
    * `00README.XXX`, arXiv processing instructions
  </Step>

  <Step title="Upload to arXiv">
    Upload the tarball at [arxiv.org/submit](https://arxiv.org/submit):

    1. Log in to your arXiv account
    2. Start a new submission
    3. Upload `submission.tar.gz`
    4. Verify the preview renders correctly
    5. Submit

    <Note>
      Direct API submission to arXiv is not yet available. The packaging step ensures your submission is correctly formatted for manual upload.
    </Note>
  </Step>
</Steps>

## Metadata Preparation

Hubify generates arXiv-compatible metadata:

```bash theme={null}
hubify paper metadata paper-1
```

```
Title: Observational Constraints on Bounce Cosmology from Multi-Survey Analysis
Authors: Houston Golden
Abstract: We present constraints on bounce cosmology models from...
Category: astro-ph.CO
Comments: 24 pages, 11 figures, 63 references
```

Copy this metadata into the arXiv submission form.

## Common Issues

<AccordionGroup>
  <Accordion title="Figures appear as empty boxes">
    Figures must be in the same directory as the `.tex` file. The packaging step handles this, but if compiling manually, ensure all PNGs are co-located.
  </Accordion>

  <Accordion title="revtex4-2 not recognized">
    arXiv supports `revtex4-2`. If you see errors, ensure you are not using `aastex631` commands like `\citep` or `\deluxetable`. Use `\cite{}` and standard `tabular` environments.
  </Accordion>

  <Accordion title="File too large">
    arXiv has a 50 MB limit. Compress figures:

    ```bash theme={null}
    hubify paper optimize paper-1 --max-figure-size 5MB
    ```
  </Accordion>
</AccordionGroup>

## Post-Submission

After your paper is accepted on arXiv:

```bash theme={null}
# Record the arXiv ID
hubify paper update paper-1 --arxiv-id "2604.12345"

# Update the lab site with the arXiv link
hubify site sync
```

The lab site will automatically display the arXiv link and abstract.
