bibファイルについて

bibファイルについて

- ueki ichiro の投稿
返信数: 4

Windows11の富士通ノートパソコンにTEX23年版をのせて論文をかいています。シュプリンガー社の雑誌に投稿しようとしたところ、bibファイルの使用を求められました。そこで美文書作成入門第8版11.7「BIBTEXの実行例」に見習って、下のようなサンプルファイル(infinit290.tex)とbibファイル(mini.bib)を作って、添付のスクリーンショットbib1~bib5のようにテスト
してみましたがうまくいきません。
(infinit290.tex)

\documentclass[sn-mathphys]{sn-jnl}

\setlength{\textwidth}{16cm}

\setlength{\oddsidemargin}{0cm}

%\setlength{\oddsidemargin}{0.5cm}

\setlength{\evensidemargin}{0cm}

\setlength{\topmargin}{-2cm}

\setlength{\textheight}{25cm}

%iicol,referee,,pdflatex

\usepackage{amsmath}

\usepackage{graphicx}

\usepackage{setspace}

\doublespacing

\begin{document}

\title{(manuscript)

The infinite and contradiction: The history of mathematical physics by dialectical approach}

\maketitle

keywords: infinity, contradiction, history, mathematical physics, dialectic, reverse mathematics

\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{sn-mathphys}

\bibliography{mini}

\end{document}


(mini.bib)

@book{Lakatos,

author = {Lakatos, Imre},

year = {1970},

title = {History of science and its rational reconstructions},

booktitle = {Proceedings of the Biennial Meeting of Philosophy of Science Association},

pages = {91-136},

publisher = {Springer},

}

@book{Wigner,

author = {Wigner, Eugene P},

year = {1967},

title = {The unreasonable effectiveness of mathematics in the natural sciences},

booktitle = {Symmetries and reflections},

publisher = {Indiana Univ. Press},

}

以下texworksで作業しました。まずinfinit290.texをpdfLATEXでタイプセットすると、スクリーンショットbib1のようにPDFのタイプセット前に\citeで文献を指示した箇所に???が入ります。次にスクリーンショットbib2のようにタスクバーのタイプセット欄にBIBTEXを入れてタイプセットし(タスクバー左端の三角形をクリックし)、続いてまたpdfLATEXでタイプセットすると、スクリーンショットbib3のようにエラーで中断されます。さらにまたpdfLATEXでタイプセットすると、スクリーンショットbib4のようにbib1と同じ画面になり、もう一度pdfLATEXでタイプセットすると、スクリーンショットbib5のようにbib3のようにエラーで中断されます。bibファイルについて教えていただければ幸いです。

参考にlogファイルを保存したもの(infinit290log.txt)と使用されたシュプリンガー社提供ファイル3件(sn-...)を添付します。(以前和田様にbibファイルについて教えて頂きましたがまた分からなくなりました。すみません。)

   植木

 
添付 bib1.png
添付 bib2.png
添付 bib3.png
添付 bib4.png
添付 bib5.png
ueki ichiro への返信

Re: bibファイルについて

- 和田 勇 の投稿

目次

  1. Springer ジャーナル投稿に必要な記述について
    1. 参考文献に関するものは
      1. infinit290.tex の修正
      2. mini.bib の修正

Springer ジャーナル投稿に必要な記述について

.bib ファイルについて(奥村さんの投稿記事 にあるLaTeX author support | Publish your research | Springer Nature にあるダウンロードボタンをたどっ て、 "Download+the+journal+article+template+package+(December+2024+version).zip" をダウンロードし、その中にある sn-article-template の配下にある sn-article.texuser-manual.pdf などを参考にしてください。

sn-article-template/
sn-article-template/bst
...snip...
sn-article-template/bst/sn-mathphys-ay.bst
sn-article-template/bst/sn-mathphys-num.bst
...snip...
sn-article-template/sn-article.pdf
sn-article-template/sn-article.tex ← 投稿テンプレートファイル
sn-article-template/sn-bibliography.bib ←必要な項目の確認などに
sn-article-template/sn-jnl.cls
sn-article-template/user-manual.pdf

参考文献に関するものは

\cite や \ref などを除けば以下の二箇所のみ。

  • \documentclass のオプションで指定
    • 今回の場合は sn-mathphys-ay あるいは sn-mathphys-num
  • \bibliography{mini} ←今回の場合は mini.bib なので

infinit290.tex の修正

提供していただいたソースの改修状況です。

diff --git a/infinit290.tex b/infinit290.tex
index 61519b3..588db99 100644
--- a/infinit290.tex
+++ b/infinit290.tex
@@ -1,4 +1,13 @@
-\documentclass[sn-mathphys]{sn-jnl}
+% ! コンパイル方法
+% pdflatex infinit290 % mini.bib を読み込むための準備など
+% bibtex   infinit290 % 参考文献情報を infinit290.bbl などに書き込む
+% pdflatex infinit290 % infinit290.bbl を読み込んで参照情報を更新
+% pdflatex infinit290 % 上記の情報を取り込んで参照情報を紐付ける
+%
+\documentclass[pdflatex,sn-mathphys-num]{sn-jnl}
+% documentclass のオプションで \bibliographystyle の指定が可能なようで
+%               すのでこのファイル末尾の \bibliographystyle は削除
+% また、pdflatex で処理するのでつけておいた方が良いでしょうね

 \setlength{\textwidth}{16cm}

@@ -47,8 +56,6 @@ 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{sn-mathphys}
-
 \bibliography{mini}

 \end{document}

mini.bib の修正

.bib ファイルに記述する項目は、@book などの種別によって いくつかは必須のものがあります。 sn-bibliography.bib を 参考に不足分を補い改修すると良いでしょう。

diff --git a/mini.bib b/mini.bib
index 5617f74..a05b380 100644
--- a/mini.bib
+++ b/mini.bib
@@ -12,7 +12,7 @@ Association},
 pages = {91-136},

 publisher = {Springer},
-
+address   = {WADA-memo Address is required}, % この address は必須
 }

 @book{Wigner,
@@ -27,5 +27,5 @@ sciences},
 booktitle = {Symmetries and reflections},

 publisher = {Indiana Univ. Press},
-
+address   = {WADA-memo Address is required},% この address は必須
 }
和田 勇 への返信

Re: bibファイルについて

- ueki ichiro の投稿
和田様
ご教示ありがとうございます。サンプルファイル(infinit290.tex)と文献ファイル(mini.bib)をご教示のとおりに修正して、texworksからpdfLaTeXでタイプセットし、続いてBIBTEXを実行したところ、添付のスクリーンショットbib6のようにエラーが出て止まりました。style file が開けないということなので、シュプリンガー社のサイトからもう一度bstフォルダーをダウンロードして、style fileを更新しましたが、結果は同じでした。コマンドプロンプトからBIBTEXを実行してみましたが、添付のスクリーンショットbib7のようにinfinit290.auxが見つからないということで失敗しました。念のためお送り頂いた修正例のファイルに同じ作業をしましたが、BIBTEXを実行したところ同じエラーで終わりました。
お手数をおかけして申し訳ありませんが、原因と思われるものがありましたらご指摘ください。お送り頂いた修正例についてのlogファイルをinfinit290dlog.texという名前で添付します。(texworksで作業する際に私のオリジナルファイルと重ならないよう、修正例をinfinit290dl.texとしました。)
  植木
 
 
 
 
添付 bib6.png
添付 bib7.png
ueki ichiro への返信

Re: bibファイルについて

- 和田 勇 の投稿

お詫び&訂正

bibfile mini.bst で引用論文内にはコメントは書けないようです。 詳しくは [bibtexでコメントアウト をご覧ください。

修正したものを再度アップしますので置き換えてください。

sn-mathphys-num.bstファイルの置き場所

bibtex を実行した時以下のメッセージにヒントがあります。

      The top-level auxiliary file: infinit290.aux
     I couldn't open style file sn-mathphys-num.bst

概略は infinit290.auxに記述されている内容を参考にsn-mathphys-num.bst を利用しよう(open)としたけど所定の場所(今回はおそらくカレントディレクトリ) に無かったと言うことだと思います。

対策は、 infinit290.tex と同じディレクトリに sn-mathphys-num.bst を おいてください。

想像するに Splinter Journal 投稿用テンプレート zip ファイルから sn-jnl.cls を 持ってきただけでは? sn-article-template/bst/sn-mathphys-num.bst を infinit290.tex と同字じディレクトリにおいてください。 各ファイルの配置状況は以下を参考にしてください。

     ├── infinit290.tex
     ├── mini.bib
     ├── sn-jnl.cls
     └── sn-mathphys-num.bst

この対策を施しても同字エラーになる場合は、 このディレクトリの状況がわかるスクリーンショットなどを 示してください。

生成される関連ファイル

今回ように bibtex を利用するといくつかの関連ファイルが参照されたり生成されます。 エラーを解消できない場合は、..tex や log の他に以下のファイルが必要になることがあります。

  • .aux latex を実行すると基本的には存在すれば読み込むし、連携する bibtex や latex に情報を引き渡すため 各種情報を書き込みます。
  • .bbl 指定された .bib(今回は min.bib) から生成される参考文献情報
  • .blg bibtex の処理ロフファイル。.bbl を作成するにあたっての処理状況などが記録されている

コマンドプロンプトなどターミナル環境で LaTeX を実行するには

今回のケースで回答すれば、1infinit290.tex` が存在するディレクトリへ移動してから pidflatex infinit290 とか bibtex infinit290 を実施してください。

和田 勇 への返信

Re: bibファイルについて

- ueki ichiro の投稿
和田様
ご指摘に従って、styleファイル sn-mathphys-num.bst の場所を確認したところ、サンプルファイルinfinit290 のあるフォルダーgsの中のサブフォルダbstにあったので、これを親フォルダーgsに移してBIBTEXを実行したところ、完全なpdfファイルの作成に成功しました。お手数をおかけして申し訳ありません。ありがとうございました。
  植木