Skip to content

Insert article or inbook citation #75

@ludenticus

Description

@ludenticus

In mappings, you can define a key to insert a citation. For instance:

require"telescope".setup {
  extensions = {
    bibtex = {
      global_files = { 'mybib.bib' },
      mappings = {
          i = {
            ["<CR>"] = bibtex_actions.citation_append( '@{{label}}: {{author}}, _{{title}}_, {{publisher}}, {{address}}, {{year}}.' ),
          },
      },
    },
  },
}

and

@book{Luthor2024,
  author = {Luthor, Lex},
  title = {My years with Superman},
  publisher = {Kripton},
  address = {Metropolis},
  year = {2024},
}

will produce: @Luthor2024: Luthor, L,. _My years with Superman_, Kripton, Metropolis, 2024.

However, things get complicated whenever your bibtex entries use @article or @inbook, to name a few. Is there any "automatic" formatting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions