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?

  • 1
    Your demo shows test.bbl: I assume you mean the input is in test.bst
    – Joseph Wright
    May 2, 2014 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. May 2, 2014 at 7:10

1 Answer 1


You should write in the .bst file

"test" write$ newline$

not only

"test" write$
  • 2
    Indeed! Welcome to TeX.SX!
    – egreg
    Jul 23, 2017 at 21:53

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.