I am a very beginner in LaTeX trying to generate references using style AMA (American Medical Association) and here is sample code. UM.bib contains reference p1.




I am using BibTeX, Version 0.99d (MiKTeX 2.9 64-bit) on Windows 10, TeXstudio. I am getting compile time error as

I couldn't open style file ama.bst
---line 3 of file UM.aux
 : \bibstyle{ama
 :              }
I'm skipping whatever remains of this command
I found no style file---while reading file UM.aux
(There were 2 error messages)

I tried copying file ama.bst from https://www.ctan.org/tex-archive/biblio/bibtex/contrib/misc?lang=en. Then created a folder ama at ...\MiKTeX 2.9\bibtex\bst and put this file ama.bst there. Still, no luck.

Can anyone help? By the way, the ama.bst file is still in alpha version, could not find a newer file.


2 Answers 2


1) You should never install files not in the distribution in the main TeXMF root. Instead, you should create a local TeXMF root, say C:\LocalTeXMF, preferably as Administrator if you want everyone using your computer has access to these files.

This can be done via MiKTeX Settings (Admin), Roots tab. Such a local root must be organised to repect the TDS (TeX Directory Structure). In the present case, copying the localisation on CTAN, it should be in LocalTeXRoot\bibtex/contrib/misc/ama.bst

enter image description here

2) Refresh the file names database used by TeX to find the files used at compilation time (MiKTeX Settings, General tab, Refresh FNDB button). enter image description here

  • Thanks for your answer. However, I could not understand it. It seems that I need to check from beginning, local TeXMF root and how to create it. In the meanwhile, I just copied the file in the working directory and seems working. If you have a beginner procedure to follow your answer, please write that.
    – wey273824
    Jul 9, 2016 at 23:40
  • 1
    Of course, if ama.bst is in the working directory, it will compile. But what for a new document in another directory? You'll have to make another copy in the new working directory? You just have to create a new directory from Windows explorer, then declare it to MiKTeX as a new root, just clicking on the Add button in MiKTeX Settings (1st image). I can assure you it's very simple. What's not so simple for beginners is to understand the TeX Directory Structure, but in the present case, I wrote wher to put your file.
    – Bernard
    Jul 9, 2016 at 23:50

I will quickly clarify @Bernard's answer for beginners to grasp it.This is only for windows users with MiKTex sorry :) Steps

1)Go to your C drive and create the folder LocalTexMF you then have the complete path name as C:\LocalTexMF

2) Go to run and run the command "mo_admin.exe" (or you could just search for MiKTeX Settings (Admin), you will get the following image. enter image description here

Click on the Roots tab and below you can add the folder you created in 1), i.e, C:\LocalTexMF

3) Put the ama.bst in this root folder, so that MiKTeX will find it when it searches for this file.

4) Go to the General tab per the image below enter image description here

Click on refresb FNDB to refresh all files so that the changes you have made to the file system are known to MiKTeX.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .