pages/.github/instructions/bibtex-bibliography.instructions.md
George 25b758805c
Added copilot instructions, AGENTS.md, improved README files (#3486)
This pull request introduces several documentation improvements and adds
comprehensive Copilot and agent instruction files to the al-folio
repository. The most significant changes are the addition of
repository-wide and path-specific Copilot instructions, updates to agent
documentation to reference these instructions, and improvements to the
documentation structure and clarity regarding file purposes and
workflows.

**Copilot and Agent Instruction Enhancements:**

- Added a new `.github/copilot-instructions.md` file providing detailed,
repository-wide setup, build, CI/CD, troubleshooting, and file format
guidance for Copilot coding agents.
- Introduced `.github/instructions/bibtex-bibliography.instructions.md`
with specific instructions for editing and validating BibTeX files,
including custom keywords, formatting rules, and integration with
Jekyll-Scholar.
- Updated agent documentation files (`customize.agent.md`,
`docs.agent.md`) to reference the new Copilot instruction files and
explain their purpose and usage for both repository-wide and
path-specific scenarios.
[[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65)
[[2]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L107-R122)
[[3]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51)
[[4]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137)

**Documentation Structure and Clarity Improvements:**

- Clarified and reorganized the documentation file list in agent files,
removing references to deprecated or merged files (e.g.,
`MAINTENANCE.md`, `ACCESSIBILITY.md`) and updating descriptions to
reflect current usage.
[[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65)
[[2]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L21-R21)
[[3]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137)
- Enhanced documentation on the purpose and application of each
documentation file, and added detailed explanations of Copilot
instruction files and their role in project development.

**Workflow and Validation Updates:**

- Updated references and descriptions for GitHub Actions workflows in
agent documentation to include the Copilot environment setup and clarify
pre-commit and CI/CD requirements.
[[1]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65)
[[2]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51)
- Corrected references for accessibility guidance, now directing users
to `TROUBLESHOOTING.md` instead of the removed `ACCESSIBILITY.md`.

These changes collectively improve the onboarding experience for both
human contributors and AI agents, ensuring consistent adherence to
project conventions and reducing errors.

**References:**  

[[1]](diffhunk://#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5R1-R253)
[[2]](diffhunk://#diff-6fd2827fb8d9c2dd6dc973572201853487ecbbd1120b00425d4f1c21dfdcf35fR1-R174)
[[3]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L57-R65)
[[4]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L107-R122)
[[5]](diffhunk://#diff-15864f2655921f50a97689076e3b8feba0da320463750845be6a76eb2e30bfe4L550-R562)
[[6]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L21-R21)
[[7]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L49-R51)
[[8]](diffhunk://#diff-961a46180ce568ce43c20bf7129dc5e4926a9aa4e0d7bc19926ca5ee3ff95cd0L106-R137)

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-28 22:55:05 -03:00

175 lines
5.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
applyTo: "**/*.bib,_bibliography/**"
excludeAgent: "code-review"
---
# BibTeX Bibliography Instructions
## BibTeX Format Basics
The al-folio repository uses BibTeX for managing publications. All entries are stored in `_bibliography/papers.bib`.
### Standard BibTeX Entry Types
```bibtex
@article{key,
title={Title},
author={Author, A. and Author, B.},
journal={Journal Name},
volume={10},
pages={1--20},
year={2023},
publisher={Publisher Name}
}
@inproceedings{key,
title={Title},
author={Author, A.},
booktitle={Proceedings of Conference},
year={2023}
}
@book{key,
title={Book Title},
author={Author, A.},
publisher={Publisher Name},
year={2023}
}
```
## al-folio Custom BibTeX Keywords
Beyond standard BibTeX fields, al-folio supports custom keywords for rich publications display:
### Available Custom Keywords
- **abstract:** Full abstract text (multi-line text in curly braces)
- **award:** Award or distinction (`award: Best Paper Award`)
- **code:** URL to source code repository (`code: https://github.com/user/repo`)
- **dimensions:** Dimensions badge ID for citation metrics
- **doi:** Digital Object Identifier (`doi: 10.1234/example`)
- **html:** URL to full text or project page (`html: https://example.com`)
- **pdf:** URL or path to PDF file (`pdf: /assets/papers/2023-paper.pdf`)
- **poster:** URL to conference poster (`poster: /assets/posters/poster.pdf`)
- **preview:** URL to preview image (`preview: /assets/img/papers/paper-preview.jpg`)
- **selected:** Boolean to feature on publications page (`selected: true`)
- **slides:** URL to presentation slides (`slides: /assets/slides/2023.pdf`)
### Example Entry with Custom Keywords
```bibtex
@article{smith2023important,
title={Important Research},
author={Smith, John and Doe, Jane},
journal={Nature},
volume={100},
pages={1--10},
year={2023},
publisher={Nature Publishing Group},
abstract={This is the full abstract text. It can span multiple lines.},
pdf={smith2023.pdf},
code={https://github.com/example/repo},
preview={smith2023.jpg},
doi={10.1234/nature.12345},
selected={true}
}
```
## Formatting Rules
### Key Considerations
1. **Unique keys:** Each entry must have a unique key (first parameter)
2. **Author names:** Separate multiple authors with `and`
3. **Curly braces:** Protect capitalized words in titles with `{Curly Braces}` to preserve capitalization
4. **Special characters:** Use LaTeX escape sequences (`{\`e}`for é,`{\~n}` for ñ)
5. **URLs:** Place URLs in `{curly braces}` to prevent issues
6. **Alphabetical order:** Keep entries alphabetically sorted by key
### Common Mistakes to Avoid
-`author=Smith, John` → ✅ `author={Smith, John}`
-`journal=Science` → ✅ `journal={Science}` or `journal = "Science"`
-`title=Deep Learning` (loses capitalization) → ✅ `title={Deep Learning}` or `title={{D}eep {L}earning}`
-`pdf=http://...` → ✅ `pdf={http://...}`
## Jekyll-Scholar Integration
The `jekyll-scholar` plugin processes BibTeX and generates bibliography pages.
### How it Works
1. Entries in `_bibliography/papers.bib` are read
2. Pages marked with `layout: bib` render the bibliography
3. Posts/pages can reference entries using `{% cite key %}`
4. Custom keywords control what displays on publication entries
### Displaying Publications
In pages/posts, use:
- `{% cite key %}` Cite an entry inline
- `{% bibliography %}` Display full bibliography
## File Paths in BibTeX
When using `pdf`, `poster`, `preview`, or similar fields:
- **PDF files:** Use just the filename (automatically resolved to `assets/pdf/`)
- Example: `pdf={smith2023.pdf}` → resolves to `assets/pdf/smith2023.pdf`
- **Preview images:** Use just the filename (automatically resolved to `assets/img/publication_preview/`)
- Example: `preview={smith2023.jpg}` → resolves to `assets/img/publication_preview/smith2023.jpg`
- **Absolute URLs:** Include full URL for external resources
- Example: `code={https://github.com/user/repo}`
- Example: `html={https://example.com/paper}`
## Validation
### Before Committing BibTeX Changes
1. **Syntax check:** Verify no unclosed braces or quotes
2. **Build test:**
```bash
docker compose down
docker compose up
# Check output for "ERROR" or "Invalid bibtex"
# Publications should render at http://localhost:8080/publications/
```
3. **Publication page:** Open publications page and verify entries display correctly
### Common BibTeX Build Errors
- `Invalid bibtex reference 'key'` Key doesn't exist in papers.bib
- `Unmatched braces` Missing closing brace in entry
- `Unknown entry type` Entry type (after @) is misspelled
- `PDF not found` Path in pdf field is incorrect
## Editing and Maintenance
### Adding New Entries
1. Add entry to `_bibliography/papers.bib`
2. Use consistent key naming (e.g., `LastnameYear` or `Lastname2023details`)
3. Ensure all required fields are present
4. Test build: `docker compose up`
### Modifying Existing Entries
- Can change any BibTeX field without breaking Jekyll
- Adding custom keywords (pdf, code, etc.) enriches display
- Test build after modifications to verify display
### Removing Entries
- Delete or comment out (prefix with `%`) the entire entry
- No broken reference check needed; Jekyll-Scholar handles missing keys gracefully
## Trust These Instructions
When working with BibTeX:
- Follow the standard format shown in examples above
- Always test locally with `docker compose up` after changes
- Check the publications page at http://localhost:8080/publications to verify display
- Only search for additional details if encountering error messages not mentioned here