2

I have downloaded these macros from this page. How to use it? I copy the macros to my file macros.tex. Also, I tried to save to a separate file and use \include{}. In both cases, I obtained an error about missing begin{document}.

Mico
  • 506,678
  • 3
    Don't use \include in the preamble. For .sty files use \usepackage, for .tex files use \input. http://cdsads.u-strasbg.fr/abs_doc/aas_macros.sty is a .sty file so you want to use \usepackage{aas_macros} (without file extension!). (If you want to copy the contents of that file into your preamble directly, you probably need \makeatletter...\makeatother because of the @s: https://tex.stackexchange.com/q/8351/35864) – moewe Apr 04 '21 at 09:58
  • Thank you very much. It works – Elena Greg Apr 04 '21 at 10:28

1 Answers1

6

If I understand your objective correctly, you're looking to define a number of BibTeX string constants. E.g., if you have a bib entry of type @article that has the field

   journal = "Astronomical Journal",

you'd like to be able to provide this piece of information more succinctly as

   journal = aj,

i.e., by replacing "Astronomical Journal" with aj.

If this understanding is correct, I'd like to suggest you create a file called, say, strings.bib (the extension bib is important) and fill it with lines such as

@string{ aj    = "Astronomical Journal" }
@string{ actaa = "Acta Astronomica" }
@string{ araa  = "Annual Review of Astron and Astrophys" }

etc.

Next, if your main bib file is called, say, mybib.bib, you'd change

\bibliography{mybib}

to

\bibliography{strings,mybib}
Mico
  • 506,678