I would like to create a custom BibTeX(like) entry, say @businesscard with a name a phone number and an age. I imagine it looks something like this

name = {Boss Sir},
phonenumber = {1234567890},
age = {61}}

name = {Boss Lady},
phonenumber = {0987654321},
age = {35}}

And then when I cite the business card (or refer to it in some way) I would like a businesscard to show in the document

so the following code

first text

second text

Would yield the following result:

enter image description here

Is there any way to do this? It doesn't have to involve bibtex or cite really, just anyway to make bundles of information and format the information in a bundle would be great!


This can be done with biblatex, but it requires some machinery.

Ulrike Fischer wrote a TUGBoat article about using biblatex for 'non-standard' applications, where she does something similar. In Using BibLaTeX for D&D I show an example of using biblatex for character data in D&D. From there it is only a small step to a business card.

The details of creating a new entry type and using it are explained in How can I create entirely new data types with BibLaTeX/Biber?. With the help of that answer it should be possible to understand what happens in the following code.

Roughly speaking, you need to define a new entry type with new fields and make them known to Biber via the datamodel (.dbx) file.

Then it is only a matter of printing the available data in a nice format. Specifically we define a new citation command that prints a tcolorbox with the business card details.

\DeclareDatamodelFields[type=list, datatype=name]{
\DeclareDatamodelFields[type=field, datatype=integer]{
\usepackage[datamodel=businesscard, backend=biber]{biblatex}


  name        = {name},
  phonenumber = {phonenumber},
  age         = {age},





  name        = {Boss Sir},
  phonenumber = {1234567890},
  age         = {61},
  name        = {Boss Lady},
  phonenumber = {0987654321},
  age         = {35},



Two business cards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.