.bstファイルの入手法

.bstファイルの入手法

- ueki ichiro の投稿
返信数: 7

新年おめでとうございます。

Windows11をのせた富士通ノートパソコンで英文論文を作成しています。著者名のアルファベット順に並べた参考文献リストをつくるため
inf41.bibファイルを作り、美文書作成入門第8版184ページの例にならってプリアンブルを

\documentclass[12pt,fleqn,a4paper]{article}

\setlength{\textwidth}{16cm}

\setlength{\oddsidemargin}{0cm}

%\setlength{\oddsidemargin}{0.5cm}

\setlength{\evensidemargin}{0cm}

\setlength{\topmargin}{-2cm}

\setlength{\textheight}{25cm}

\usepackage{setspace}

\doublespacing

\usepackage{amsmath}

\usepackage{graphicx}

\begin{document}

\title{(anonymized manuscript)

The infinite and contradiction: The history of mathematical physics viewed from mathematical infinites.}

\maketitle

\section{Introduction}



として、末尾を

\bibliographystyle{basic}

\bibliography{inf41}

\end{document}

として、pdflatex と Bibtex で でコンパイルしたところ、下記のスクリーンショットss46左側のようなログが表示されました(生成されたログファイルを探したのですが見つかりませんでした)。

inf41.bib も添付しました。

basic.bst はTex に標準で添付されていると聞きましたが、texworks で探しても、Windowsの全ファイルを探しても見つかりませんでした。aps.bst や上の本にある jplain.bst も見つかりませんでした。Tex に標準で添付されているという.bst ファイルがダウンロードされていない場合は、ネットからダウンロードしたいのですが、その方法を教えてください。

  植木





添付 ss46.png
ueki ichiro への返信

Re: .bstファイルの入手法

- 奥村 晴彦 の投稿

あけましておめでとうございます。

basic.bst はTex に標準で添付されていると聞きましたが、

どこで聞かれたんでしょうか?

jplain.bst.../texlive/2025/texmf-dist/pbibtex/bst/jplain.bst みたいな所にあるはずです。

奥村 晴彦 への返信

Re: .bstファイルの入手法

- 和田 勇 の投稿

Table of Contents

  1. \maketitle 利用時の必須記述項目について
  2. 生成されるログファイルは何処に
  3. basic.bst aps.bst jplain.bst は何処に
    1. basic.bst … おそらく sn-basic.bst では?
    2. aps.bst(apsr.bst?) jplain.bst
  4. エラーログメッセージ「 INFINIt46.bbl ファイルにおける \bibcommenthead が未定義」に関して
  5. 暫定トラブル解消案

\maketitle 利用時の必須記述項目について

提供していただいた情報に \maketilte を利用する場合はの必須記述が欠落 しているので初っ端からエラーになります。

生成されるログファイルは何処に

基本的には INFINIt46.tex と同じディレクトリに INFINIt46.log として 保存されていますので、今一度お確かめください。

ただし pdflatex -output-directory=out のように、出力ディレクトリを指 定してコンパイルした場合は、out ディレクトリに保存されます。

また、bibtex を利用する場合 .bib を処理しますが、そのログの拡張子は .blg として .log と同じディレクトリに に記録されます。

bitex を利用する場合のトラブル対応には、このログファイルも必要となることあります。

なお、今回は、サンプル的に plain を使い、\cite{Weyl} を記述したとこ ろ、.bib ファイルの当該項目に publisher 記述不足の警告 が記録されています。

This is BibTeX, Version 0.99d (TeX Live 2025)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: 2026-01-01-INFINIt46.aux
The style file: plain.bst
Database file #1: inf41.bib
Warning--empty publisher in Weyl ← 見落としがちな警告メッセージ
You've used 10 entries,

...<snip>...

(There was 1 warning) ← 見落としがちな警告メッセージ

.bib ファイルの記述不足をチェックするときなどに利用してく ださい。

basic.bst aps.bst jplain.bst は何処に

basic.bst … おそらく sn-basic.bst では?

この項、奥村さんの回答と重複しています。

basic.bst はTex に標準で添付されていると聞きました というのは、おそ らく Springer で提供されている sn-basic.bst ではないでしょうか?

ただし、sn-basic を利用するには \documentclass も Springer スタイル に変更しないと処理できません。また現時点では方針が不明ですので、 【LaTeX】BibTeXのスタイル76個一覧 を参考に plain で暫定検証したとこ ろ、問題なく処理できました。(とはいえ、提供されている情報から生成した 検証用の INFINIt46.tex を参考にし inf41.bib を使っての検証ですが)

念の為、 inf41.bib に登録されているエントリー全てを \cite{xxx} で取り 込みましたが、同 .bib ファイルには現状致命的な問題は無いようでした。

aps.bst(apsr.bst?) jplain.bst

aps.bst は apsr.bst かしら?

参考までに、今回関係しそうな .bst ファイルのパス情報および留意事項 については、以下を参考にしてください。

パス プリアンブル追記事項 [p]bibtex
texmf-dist/bibtex/bst/harvard/apsr.bst \usepackage{harvard} bibtex
texmf-dist/bibtex/bst/base/plain.bst   bibtex
texmf-dist/pbibtex/bst/jplain.bst   pbibtex

apsr.bst および jplain.bst は、上記表の留意事項を考慮すれば、問題無く処理できます。

エラーログメッセージ「 INFINIt46.bbl ファイルにおける \bibcommenthead が未定義」に関して

(./INFINIt46.bbl [30]
! Undefined control sequence.
1.32 \bibcommenthead  ← sn-basic.bst を利用した時に生成されるもののようです。

フルインストールされた TeXLive で提供される .bst ファイルに関して、 bcommenthead の文字列検索しましたが、検索できませんでした。

一方、 Springer の提供する少なくとも sn-basic.bst には同文字はありますので、エ ラー時点で存在する INFINIt46.bbl は sn-basic.bst を利用して処理した時 のものだと思います。

(想像ではありますが) \documentclass で Springer を利用するための記述を すれば、\bibcommenthead マクロも利用できるようになると思います。

ちなみに提供された通り basic.bst を利用した場合、bibtex を実行した時点で、 basic.bst は見つからない旨、以下のようにエラーになります。

This is BibTeX, Version 0.99d (TeX Live 2025)
The top-level auxiliary file: INFINIt46.aux
I couldn't open style file basic.bst ← basic.bst は見つけれなかったとエラー
---line 12 of file INFINIt46.aux
 : \bibstyle{basic
 :                }
I'm skipping whatever remains of this command
I found no style file---while reading file INFINIt46.aux
(There were 2 error messages)

暫定トラブル解消案

  1. INFINIt46.bbl を読み込まないよう INFINIt46.tex をリネーム

    もちろん、INFINIt46.bbl を 削除ないし、別ディレクトリへ退避して良いです。

    念の為、検証に使用し添付するファイルの名称は 2026-01-01-INFINIt46.tex としています。

    また、.tex ないし .bib ファイルを編集した際に確実にコンパイルするためには、 latexmk -C ないし llmk -C を 利用して、コンパイル時に生成されるファイルを一掃するように手順を考慮してください。

  2. \maketitle 宣言文の前に \author{xxxx} を追加

  3. \bibliographystyle{basic} → \bibliographystyle{plain}

    apsr.bst や jplain.bst を利用する場合は、前述の記述を参考にしてください。

和田 勇 への返信

Re: .bstファイルの入手法

- ueki ichiro の投稿

和田様

いろいろ詳しく教えて下さってありがとうございます。私の目的は参考文献リストをアルファベット順に並べることでした。しかし添付していただいた2026-01-1-INFINIt46.pdfを見ると、plain.bstでは参考文献リストをアルファベット順に並べられていません。美文書作成入門第8版の187ページには(bibtexを使うと?)「文献リストは、著者の姓・名のアルファベット順に並びます」とありますが、参考文献リストをアルファベット順に並べるにはどうしたらいいのでしょうか。

ご指摘に従ってINFINIt46.texを書き直して、下記のINFINIt46+.texを作ってコンパイルしましたが、添付のスクリーンショットss46+のようなエラーメッセージが出て、bibtexのコンパイルに失敗しました。私の使っている2023年版のTexにplain.bstがあることは、添付のスクリーンショットss-plainのようにコマンドプロンプトで確認しました。このほか3個の補助ファイルを添付しました。大変お手数をかけてすみませんが、どのように直したらbibtexでコンパイルできるのか教えていただければ幸いです。

  植木

\documentclass[12pt,fleqn,a4paper,texmf-dist/bibtex/bst/base/plain.bst]{article}

\setlength{\textwidth}{16cm}

\setlength{\oddsidemargin}{0cm}

\setlength{\evensidemargin}{0cm}

\setlength{\topmargin}{-2cm}

\setlength{\textheight}{25cm}

\usepackage{setspace}

\doublespacing

\usepackage{amsmath}

\usepackage{graphicx}

\begin{document}

\title{(anonymized manuscript)

The infinite and contradiction: The history of mathematical physics viewed from mathematical infinites.}

\author{Ichiro Ueki}

\maketitle

\section{Introduction}

\ \

'Philosophy of science without history of science is empty; history of science without philosophy of science is blind' (Lakatos 1970).

E Wigner said, 'The first point is that the enormous usefulness of mathematics in the natural sciences is something bordering on the mysterious and that there is no rational explanation for it' (Wigner 1967). This quotation from the pioneer of quantum physics shows that elucidating the essential nature of mathematics is important for the natural science.

\bibliographystyle{plain}

\bibliography{inf41}

\end{document}

添付 ss-plain.bst.png
添付 ss46+.png
ueki ichiro への返信

Re: .bstファイルの入手法

- 和田 勇 の投稿

Table of Contents

  1. 参考文献リストがアルファベット順でない
  2. 参考文献リストをアルファベット順に並べる
  3. INFINIt46+.tex でコンパイルできない
  4. kpsewhich コマンドを利用した plain.bst などの探し方

参考文献リストがアルファベット順でない

2026-01-01-INFINIt46.pdfを見ると、plain.bstでは参考文献リストをアルファベット順に並べられていません。 とのご指摘ですが、(Last-name ) (First-name ) の順に並べています。

以下は .pdf 作成に先立って処理されて作成された 2026-01-01-INFINIt46.bbl から関連情報を抽出し表にまとめたものです。

  first-name last-name
\bibitem{Cantor2} Georg Cantor.
\bibitem{Galilei} Galileo Galilei.
\bibitem{Goedel} Kurt G\"{o}del.
\bibitem{Heath} Thomas~L Heath.
\bibitem{Lakatos} Imre Lakatos.
\bibitem{Poincar1} Henri Poincar\'{e}.
\bibitem{Poincar2} Henri Poincar\'{e}.
\bibitem{Russel} Bertrand Russel.
\bibitem{Weyl} Hermann Weyl.
\bibitem{Wigner} Eugene Wigner.

参考文献リストをアルファベット順に並べる

通常、Last-name First-name の順ですが、 First-name Last-name の順 がお望みの場合は、「latex 参考文献リストを first-name last-name の順に並べる」などでインターネット検索するとカス タマイズ案が示されると思います。

INFINIt46+.tex でコンパイルできない

2026-01-01-INFINIt46.tex をそのまま利用した場合でもエラーになるのでしょうか?

INFINIt46+.tex のソース全体が示されていないのでなんともいえませんが、 考えられるエラー原因を述べます。

  • BiBTeX で処理した際の添付画像のログや INFINIt46+.blg の以下の記録について

    I found no \citation commands---while reading file INFINIt46t.aux
    
    • 上記の原因と考えられるもの

      • INFINIt46t+.tex\cite{xxx} などの記述がなかった

      • INFINIt46+.tex の一行目 documentclass article の指定オプションミス

        \documentclass[12pt,fleqn,a4paper,texmf-dist/bibtex/bst/base/plain.bst]{article}
        ... 以下省略 ...
        

        texmf-dist/bibtex/bst/base/plain.bst なんてオプションは無いと思います。

        INFINIt46t+.log の情報が明示されていませんが、そもそもコンパイルすらできないので、 INFINIt46+.aux で参考文献作成に必要な情報が十二分書き込まれなかった

    • INFINIt46+.aux と 2026-01-01-INFINIt46.aux の比較

      • 2026-01-01-INFINIt46.aux には \citation がいくつか記録され てますが、INFINIt46+.aux には何もありません。

kpsewhich コマンドを利用した plain.bst などの探し方

TeXLive には kpsewhich というコマンドプロンプトなどで利用可能なコマ ンドが同梱されています。

これは \documentclass や \usepackage などで読み込み予定のファイルの有 無やそのパス情報を教えてくれます。

以下は、 ueki ichiro さんの環境に合わせてパス情報を手動で編集してあります。

  • plain.bst

    コマンド例 出力例
    kpsewhich plain.bst C:/texlive/2023/texmf-dist/bibtex/bst/base/plain.bst
  • jplain.bst … pbibtex を利用する旨 -progname=pbibtex オプションが必要です

    コマンド例 出力例
    kpsewhich jplain.bst 何も表示されない
    kpsewhich -progname=pbibtex jplain.bst C:/texlive/2023/texmf-dist/pbibtex/bst/jplain.bst
和田 勇 への返信

Re: .bstファイルの入手法

- 和田 勇 の投稿

参考文献リストを無理やり に並べ替える方法を試みてみました。

参考文献リストをアルファベット順に並べる ... 補足

通常、Last-name First-name の順ですが、 First-name Last-name の順 お望みの場合は、「latex 参考文献リストを first-name last-name の 順に並べる」などでインターネット検索するとカスタマイズ案が示される と思います。

別解もあるとは思いますが、ueki さんの示されたソースを可能な限り、修正 しない対処策を検討してみました。

方針

  1. \usepackage{biblatex} は利用しない
  2. plain.bst を叩き台にカレントディレクトリに ueki-plain.bst を作成
  3. ueki さんのソース改修は、\bibliographystyle{plain}plainueki-plain のみに留める

作業

  1. plain.bst 叩き台に ueki-plain.bst をカレントディレクトリに作成
  2. ueki-plain.bst 内に記述されている FUNCTION {sort.format.title} 内のソート用データ生成部分を以下のように改修

     --- C:/texlive/2025/texmf-dist/bibtex/bst/base/plain.bst
     +++ ueki-plain.bst
     @@ -923,25 +923,25 @@
    
      FUNCTION {sort.format.names}
      { 's :=
        ... 省略 ...
            if$
     -      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
     +      s nameptr "{vv{ } }{ff{ }}{  ll{ }}{  jj{ }}" format.name$ 't :=
            nameptr numnames = t "others" = and
        ... 省略 ...
        while$
      }
    
      FUNCTION {sort.format.title}
      { 't :=
    
  3. 検証用 .tex ファイル 2026-01-01-INFINIt46.tex の \bibliographystyle で指定した plainueki-plain に改修

和田 勇 への返信

Re: .bstファイルの入手法

- ueki ichiro の投稿

和田様

ご教示ありがとうございます。貴前便に添付されていたpdfファイルの文献リストは確かに姓のアルファベット順に配列されていました。不注意をお詫びします。

私の.texファイルは下記のように書き直してコンパイルしたところ、bibtexにも成功して、姓のアルファベット順に配列された文献リストができました。今後ともよろしくお願いいたします。

 植木

\documentclass[12pt,fleqn,a4paper]{article}

\setlength{\textwidth}{16cm}

\setlength{\oddsidemargin}{0cm}

\setlength{\evensidemargin}{0cm}

\setlength{\topmargin}{-2cm}

\setlength{\textheight}{25cm}

\usepackage{setspace}

\doublespacing

\usepackage{amsmath}

\usepackage{graphicx}

\begin{document}

\title{(anonymized manuscript)

The infinite and contradiction: The history of mathematical physics viewed from mathematical infinites.}

\author{Ichiro Ueki}

\maketitle

\section{Introduction}

'Philosophy of science without history of science is empty; history of science without philosophy of science is blind' \cite{Lakatos}.

E Wigner said, 'The first point is that the enormous usefulness of mathematics in the natural sciences is something bordering on the mysterious and that there is no rational explanation for it' \cite{Wigner}. This quotation from the pioneer of quantum physics shows that elucidating the essential nature of mathematics is important for the natural science.

\bibliographystyle{plain}

\bibliography{inf41}

\end{document}

奥村 晴彦 への返信

Re: .bstファイルの入手法

- ueki ichiro の投稿

奥村先生

ご返信ありがとうございました。いろいろ調べていたので返信が遅れてしまいました。

basic.bstのTex標準搭載は誤りでした。訂正してお詫びします。

jplain.bstがご指摘のdirectryにあることはコマンドプロンプトで確認しました。

 植木一郎