Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

La bibliografía no funciona #2

Closed
Tchy258 opened this issue Apr 2, 2024 · 0 comments
Closed

La bibliografía no funciona #2

Tchy258 opened this issue Apr 2, 2024 · 0 comments
Assignees

Comments

@Tchy258
Copy link

Tchy258 commented Apr 2, 2024

Al intentar cargar la bibliografía mediante #bibliography("bibliografia.bib") o #bibliography("bibliografia.yml") (no importa cuál), el compilador reclama que hay un error en conf.typ en la línea 138 porque it.body no tiene un atributo children

  show selector(outline.entry): it => {
    let num = it.body.children.first() // <------ esta línea
    let title = link(it.element.location())[#for i in it.body.children.slice(1) {i}]
    box(width: numbering-indent, num)
    title
    box(width: 1fr, repeat[.])
    box(width: page-num-indent, align(right, it.page))
  }

La forma en que yo lo solucioné fue cambiando el fragmento anterior (con conf.typ:137) por esto:

  show selector(outline.entry): it => {
    let num = if it.body.has("children") [#it.body.children.first()] else []
    box(width: numbering-indent, num)
    if it.body.has("children") [
      #link(it.element.location())[#for i in it.body.children.slice(1) {i}]
    ] else [#link(it.element.location())[ #it.element.body]]
    box(width: 1fr, repeat[.])
    box(width: page-num-indent, align(right, it.page))
  }

Con esto si compila y aparece la bibliografía en el índice sin un número, no se me ocurrió una solución más elegante, pero ahí está

@PuntitOwO PuntitOwO self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants