TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For another question here, I am trying to create a minimal BibTeX style that writes something into the output file.

I am following the instructions from the manual (page 35), where a minimal example is indicated as

ENTRY {}{}{}

{"de la Cierva y Codorn{\’\i}u, Juan"
#1 "{ff - }{vv - }{ll}" format.name$ top$}



So, as a minimal setup, I created these files:




This is a statement backed with a reference~\cite{Example}.




% This file was created with JabRef 2.6.
% Encoding: UTF8

  author = {Sally Sample and Eddie Example},
  title = {An Example Paper For Your Bibliography},
  journal = {International Journal of Exemplary Text Fragments},
  year = {2012},
  volume = {3},
  pages = {42--49},
  owner = {haagfn},
  timestamp = {2014.05.02}


ENTRY {}{}{}

FUNCTION {output.something}
  "test" write$


EXECUTE {output.something}

According to the manual, the write$ command

write[s] S in the output .bbl file.

(with S being the item on the stack right below write$)

For compilation, I'm using these commands:

pdflatex test.tex
bibtex test.aux
pdflatex test.tex
bibtex test.aux
pdflatex test.tex

However, my .bbl file remains empty. Oddly, when I replace write$ with top$ (as in the example from the manual), test does get output in the terminal. However, to make my example as true to the real use case as possible (and also because I want to know how it works), I would like to output my example string to the .bbl file.

Why does my .bbl file remain empty and what do I have to change so test gets output there?

share|improve this question
Your demo shows test.bbl: I assume you mean the input is in test.bst – Joseph Wright May 2 '14 at 7:09
@JosephWright: Whoops, of course. Thanks, corrected. Got confused with the file extensions while writing the question, the actual file is indeed named test.bst. – O. R. Mapper May 2 '14 at 7:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.