Contributing
Thank you for your interest in contributing to tikz-feyn! This document provides guidelines for contributing to the project.
Ways to Contribute
There are many ways to contribute to tikz-feyn:
Report bugs - If you find a bug, please report it on the issue tracker
Suggest features - We welcome feature requests and ideas for improvement
Improve documentation - Help make the documentation clearer and more comprehensive
Submit code - Fix bugs or implement new features
Share examples - Contribute example diagrams to help other users
Getting Started
Setting Up Development Environment
Fork the repository on GitHub
Clone your fork:
git clone https://github.com/YOUR_USERNAME/tikz-feyn.git cd tikz-feyn
Create a feature branch:
git checkout -b feature/my-new-feature
Building Documentation Locally
To build the examples:
pdflatex tikz-feyn.tex
To build the test suite:
pdflatex test-suite.tex
To build the Sphinx documentation:
cd docs
pip install -r requirements.txt
make html
Reporting Bugs
Before Reporting
Check the issue tracker to see if the bug has already been reported
Verify the bug exists in the latest version
Try to create a minimal example that reproduces the bug
Bug Report Template
When reporting a bug, please include:
Description: Clear description of the bug
Minimal Example: Minimal LaTeX code that reproduces the issue
Expected Behavior: What you expected to happen
Actual Behavior: What actually happened
Environment: - LaTeX distribution and version (e.g., TeXLive 2023) - tikz-feyn version - Operating system
Example:
**Bug**: Vertex positioning incorrect with negative offsets
**Minimal Example**:
```latex
\\begin{tfeyn}
\\tfcol(0, -1cm){a, b}
\\tfcol{c, d}
\\tf[f]{a, c}
\\end{tfeyn}
```
**Expected**: Column shifted down by 1cm
**Actual**: Column shifted up instead
**Environment**:
- TeXLive 2023
- tikz-feyn 1.0
- Ubuntu 22.04
Suggesting Features
Feature requests are welcome! Please:
Check if the feature has already been requested
Provide a clear use case for the feature
Include example code showing how you’d like it to work
Consider whether it could be implemented using existing TikZ features
Submitting Pull Requests
Code Guidelines
Follow the existing code style
Add comments explaining complex logic
Update documentation for new features
Include examples demonstrating new features
Testing Requirements
Before submitting a pull request:
Ensure all examples compile without errors:
pdflatex tikz-feyn.tex pdflatex test-suite.tex
Add tests to
test-suite.texfor new featuresVerify backward compatibility with existing diagrams
Test with both pdfLaTeX and XeLaTeX if possible
Pull Request Process
Create a feature branch from
developMake your changes
Test thoroughly
Commit with clear, descriptive messages
Push to your fork
Open a pull request against the
developbranch
Pull Request Template
Your pull request should include:
Description: What does this PR do?
Motivation: Why is this change needed?
Testing: How was this tested?
Documentation: Are docs updated?
Examples: Include example usage if applicable
Documentation Contributions
Documentation improvements are always welcome! This includes:
Fixing typos and grammar
Clarifying confusing sections
Adding examples
Improving organization
Translating documentation
To contribute documentation:
Edit the relevant
.rstfiles indocs/source/Build locally to verify formatting:
cd docs make html # Open docs/build/html/index.html in browser
Submit a pull request
Code Style
LaTeX Package Code
Use meaningful macro names
Add comments for non-obvious code
Use consistent indentation (2 spaces)
Group related functionality
Include error checking where appropriate
Documentation
Use proper reStructuredText formatting
Include code examples for all features
Provide both simple and advanced examples
Cross-reference related sections
Use consistent terminology
Commit Messages
Write clear commit messages:
Short summary (50 chars or less)
More detailed explanation if needed. Wrap at 72 characters.
Explain what and why, not how.
- Bullet points are okay
- Use present tense ("Add feature" not "Added feature")
- Reference issues: "Fixes #123"
Examples:
Good:
Add support for curved propagatorsGood:
Fix vertex positioning with negative offsets (fixes #42)Bad:
fixed stuffBad:
WIP
Branching Model
main/master- Stable releases onlydevelop- Main development branchfeature/*- New featuresfix/*- Bug fixesdocs/*- Documentation updates
Release Process
Releases are managed by maintainers:
Update version in
tikz-feyn.styUpdate
CHANGES.mdMerge to
main/masterTag release:
git tag v1.0Push tag:
git push origin v1.0GitHub Actions automatically creates release
Community Guidelines
Be respectful and constructive
Welcome newcomers
Provide helpful feedback on pull requests
Focus on the issue, not the person
Assume good intentions
License
By contributing to tikz-feyn, you agree that your contributions will be licensed under the same license as the project (see LICENSE.txt).
Getting Help
If you need help contributing:
Open an issue with your question
Tag it with the
questionlabelBe specific about what you’re trying to do
Thank You!
Every contribution, no matter how small, is appreciated and helps make tikz-feyn better for everyone.