Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
ENV/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Django
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
media/
staticfiles/

# Generated documentation files
paper.pdf
paper.html
paper.docx
*.aux
*.bbl
*.blg
*.fdb_latexmk
*.fls
*.synctex.gz
*.out
*.toc

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Temporary files
/tmp/
*.tmp
100 changes: 100 additions & 0 deletions CITATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Solución al Problema de Citas / Citation Problem Solution

## Problema / Problem

Las citas en `paper.md` no se cargan correctamente cuando la bibliografía está en `bibliography.py`.

*Citations in `paper.md` are not loading correctly when the bibliography is in `bibliography.py`.*

## Causa / Cause

Los procesadores de citas para Markdown (como `pandoc-citeproc`) requieren que la bibliografía esté en formato **BibTeX** (archivo `.bib`), no en un archivo Python (`.py`).

*Citation processors for Markdown (such as `pandoc-citeproc`) require the bibliography to be in **BibTeX** format (`.bib` file), not in a Python file (`.py`).*

## Solución / Solution

### 1. Usar el archivo correcto / Use the correct file

El archivo de bibliografía debe ser:
- ✅ `bibliography.bib` (formato BibTeX)
- ❌ `bibliography.py` (formato Python)

*The bibliography file should be:*
- *✅ `bibliography.bib` (BibTeX format)*
- *❌ `bibliography.py` (Python format)*

### 2. Formato BibTeX / BibTeX Format

El archivo `bibliography.bib` debe contener entradas en formato BibTeX:

```bibtex
@article{clave2024,
title={Título del artículo},
author={Autor, Nombre},
journal={Nombre de la revista},
year={2024},
doi={10.xxxx/xxxxx}
}
```

### 3. Referenciar en paper.md / Reference in paper.md

En el encabezado YAML de `paper.md`, especificar:

```yaml
---
title: 'Título del paper'
bibliography: bibliography.bib
---
```

Dentro del texto, usar citas como: `[@clave2024]`

*In the YAML header of `paper.md`, specify:*
*Within the text, use citations like: `[@clave2024]`*

### 4. Compilar el documento / Compile the document

Para generar el PDF con las citas correctamente formateadas:

```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.pdf
```

*To generate the PDF with correctly formatted citations:*

## Archivos de ejemplo / Example files

- `paper.md` - Archivo de ejemplo con citas / Example file with citations
- `bibliography.bib` - Bibliografía en formato BibTeX correcto / Bibliography in correct BibTeX format
- `bibliography.py` - ❌ Formato incorrecto (solo para referencia) / Incorrect format (for reference only)

## Comandos útiles / Useful commands

### Generar PDF / Generate PDF
```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.pdf
```

### Generar HTML / Generate HTML
```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.html
```

### Generar DOCX / Generate DOCX
```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.docx
```

## Recursos adicionales / Additional resources

- [Pandoc Citation Syntax](https://pandoc.org/MANUAL.html#citations)
- [BibTeX Format](http://www.bibtex.org/Format/)
- [JOSS Paper Guidelines](https://joss.readthedocs.io/en/latest/submitting.html)

## Nota importante / Important note

El archivo `bibliography.py` ha sido incluido solo para demostrar el formato **incorrecto**. En un proyecto real, este archivo debe ser eliminado o renombrado a `bibliography.bib` con el formato BibTeX apropiado.

*The `bibliography.py` file has been included only to demonstrate the **incorrect** format. In a real project, this file should be deleted or renamed to `bibliography.bib` with the appropriate BibTeX format.*
80 changes: 80 additions & 0 deletions DEMONSTRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Demostración del Problema y Solución / Problem and Solution Demonstration

## Prueba con bibliography.bib (✅ CORRECTO / CORRECT)

### Comando / Command:
```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.html
```

### Resultado / Result:
✅ **SUCCESS**: Las citas se procesan correctamente / Citations are processed correctly

El archivo HTML generado muestra:
- Citas en el texto con el formato apropiado: `(Albaladejo González et al. 2024)`
- Lista de referencias completa al final del documento
- Todos los metadatos de las publicaciones correctamente formateados

*The generated HTML file shows:*
- *Citations in the text with proper format: `(Albaladejo González et al. 2024)`*
- *Complete reference list at the end of the document*
- *All publication metadata correctly formatted*

---

## Prueba con bibliography.py (❌ INCORRECTO / INCORRECT)

### Comando / Command:
```bash
pandoc paper.md --bibliography=bibliography.py --citeproc -o paper.html
```

### Resultado / Result:
❌ **ERROR**: `Could not determine bibliography format for bibliography.py`

Pandoc no puede procesar el archivo porque no reconoce el formato `.py` como un formato de bibliografía válido.

*Pandoc cannot process the file because it doesn't recognize the `.py` format as a valid bibliography format.*

---

## Formatos de Bibliografía Soportados / Supported Bibliography Formats

Pandoc soporta los siguientes formatos de bibliografía:

*Pandoc supports the following bibliography formats:*

| Formato / Format | Extensión / Extension | Descripción / Description |
|------------------|----------------------|---------------------------|
| BibTeX | `.bib` | Formato estándar para LaTeX / Standard format for LaTeX |
| BibLaTeX | `.bib` | Versión extendida de BibTeX / Extended version of BibTeX |
| CSL JSON | `.json` | Citation Style Language JSON format |
| CSL YAML | `.yaml` | Citation Style Language YAML format |
| RIS | `.ris` | Research Information Systems format |
| EndNote | `.enl` | EndNote library format |

## Conclusión / Conclusion

Para que las citas funcionen correctamente en `paper.md`, **debe** usar `bibliography.bib` con formato BibTeX, **no** `bibliography.py`.

*For citations to work correctly in `paper.md`, you **must** use `bibliography.bib` with BibTeX format, **not** `bibliography.py`.*

### Pasos para corregir el problema / Steps to fix the problem:

1. Renombrar o convertir `bibliography.py` a `bibliography.bib`
*Rename or convert `bibliography.py` to `bibliography.bib`*

2. Asegurar que el contenido esté en formato BibTeX válido
*Ensure the content is in valid BibTeX format*

3. Actualizar la referencia en el encabezado YAML de `paper.md`:
*Update the reference in the YAML header of `paper.md`:*
```yaml
bibliography: bibliography.bib
```

4. Compilar el documento con pandoc:
*Compile the document with pandoc:*
```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.pdf
```
154 changes: 154 additions & 0 deletions SOLUTION_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Resumen de la Solución / Solution Summary

## Problema Original / Original Problem

**Español:** Las citas en `paper.md` no se cargan correctamente cuando la bibliografía está almacenada en `bibliography.py`.

**English:** Citations in `paper.md` are not loading correctly when the bibliography is stored in `bibliography.py`.

---

## Causa Raíz / Root Cause

Los procesadores de citas para documentos Markdown (como `pandoc-citeproc`) **solo reconocen formatos estándar de bibliografía**:

*Citation processors for Markdown documents (like `pandoc-citeproc`) **only recognize standard bibliography formats**:*

- ✅ BibTeX (`.bib`)
- ✅ CSL JSON (`.json`)
- ✅ CSL YAML (`.yaml`)
- ✅ RIS (`.ris`)
- ❌ **NO** Python (`.py`)

---

## Solución Implementada / Implemented Solution

### 1. Archivos Creados / Files Created

#### `bibliography.bib` ✅
Archivo de bibliografía en formato BibTeX correcto. Este es el formato que pandoc puede procesar.

*Bibliography file in correct BibTeX format. This is the format that pandoc can process.*

```bibtex
@article{clave2024,
title={Título del artículo},
author={Autor, Nombre},
journal={Nombre de la revista},
year={2024}
}
```

#### `paper.md` ✅
Documento de ejemplo configurado correctamente para usar `bibliography.bib`:

*Example document correctly configured to use `bibliography.bib`:*

```yaml
---
title: 'BioStream: An open-source solution...'
bibliography: bibliography.bib
---
```

#### `bibliography.py` ❌
Ejemplo del formato **incorrecto** (incluido solo con fines demostrativos).

*Example of the **incorrect** format (included for demonstration purposes only).*

### 2. Documentación / Documentation

- **CITATION_GUIDE.md**: Guía completa bilingüe sobre cómo usar correctamente las citas
*Complete bilingual guide on how to properly use citations*

- **DEMONSTRATION.md**: Pruebas que demuestran la diferencia entre el formato correcto e incorrecto
*Tests demonstrating the difference between correct and incorrect formats*

- **.gitignore**: Excluye archivos generados (PDF, HTML, DOCX)
*Excludes generated files (PDF, HTML, DOCX)*

---

## Verificación / Verification

### ✅ Prueba Exitosa / Successful Test

```bash
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.html
```

**Resultado / Result:**
- Las citas se procesan correctamente en el texto: `(Albaladejo González et al. 2024)`
- Las referencias se generan automáticamente al final del documento
- *Citations are processed correctly in text: `(Albaladejo González et al. 2024)`*
- *References are automatically generated at the end of the document*

### ❌ Prueba Fallida / Failed Test

```bash
pandoc paper.md --bibliography=bibliography.py --citeproc -o paper.html
```

**Error:** `Could not determine bibliography format for bibliography.py`

---

## Cómo Usar / How to Use

### Paso 1: Preparar la bibliografía / Step 1: Prepare the bibliography

Crear o mantener el archivo `bibliography.bib` con entradas en formato BibTeX.

*Create or maintain the `bibliography.bib` file with entries in BibTeX format.*

### Paso 2: Configurar paper.md / Step 2: Configure paper.md

Asegurar que el encabezado YAML incluya:

*Ensure the YAML header includes:*

```yaml
bibliography: bibliography.bib
```

### Paso 3: Usar citas en el texto / Step 3: Use citations in text

Referenciar las citas usando la sintaxis: `[@clave]`

*Reference citations using the syntax: `[@clave]`*

```markdown
Este es un hecho importante [@smith2023].
*This is an important fact [@smith2023].*
```

### Paso 4: Compilar el documento / Step 4: Compile the document

```bash
# Generar PDF
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.pdf

# Generar HTML
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.html

# Generar DOCX
pandoc paper.md --bibliography=bibliography.bib --citeproc -o paper.docx
```

---

## Recursos Adicionales / Additional Resources

- [Pandoc Manual - Citations](https://pandoc.org/MANUAL.html#citations)
- [BibTeX Format Documentation](http://www.bibtex.org/Format/)
- [JOSS Submission Guidelines](https://joss.readthedocs.io/en/latest/submitting.html)
- [Citation Style Language](https://citationstyles.org/)

---

## Conclusión / Conclusion

**Español:** Para que las citas funcionen en documentos Markdown, la bibliografía **debe** estar en formato BibTeX (`.bib`), no en formato Python (`.py`). El problema se ha resuelto proporcionando el archivo `bibliography.bib` correcto y documentación completa.

**English:** For citations to work in Markdown documents, the bibliography **must** be in BibTeX format (`.bib`), not Python format (`.py`). The problem has been resolved by providing the correct `bibliography.bib` file and comprehensive documentation.
Loading