ラテックスファイルから略語と参照を含むファイルを作成するために使用するバッチファイルを作成しました。それは非常にうまく機能します。私はこれをnotepad++Runメニュー内から使用します。私の問題は、毎回バッチファイル内からファイル名を変更する必要があることです。どのファイルでも動作するユニバーサルファイルを作成したいと思います。
これが私の作業スクリプトです
:: Called from Notepad++ Run
:: [path_to_bat_file] "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
:: Change Drive and to File Directory
%~d1
cd %1
:: Run Cleanup
call:cleanup
tskill acrobat
pdflatex thesis.tex
bibtex thesis
pdflatex thesis.tex
pdflatex thesis.tex
makeindex.exe thesis.nlo -s nomencl.ist -o thesis.nls
pdflatex thesis.tex
START "" thesis.pdf
:cleanup
:: del *.log
del *.dvi
del *.aux
del *.bbl
del *.blg
del *.brf
del *.out
goto:eof
これが私の試みです
:: Called from Notepad++ Run
:: [path_to_bat_file] "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
:: Change Drive and to File Directory
%~d1
cd %1
:: Run Cleanup
call:cleanup
tskill acrobat
pdflatex %2
bibtex thesis
pdflatex %2
pdflatex %2
makeindex.exe thesis.nlo -s nomencl.ist -o thesis.nls
pdflatex %2
START "" %2.pdf
:cleanup
:: del *.log
del *.dvi
del *.aux
del *.bbl
del *.blg
del *.brf
del *.out
goto:eof
ただし、ご覧のとおり、bibtexとmakeindex.exeコマンドラインには問題があります。これは、拡張子がbibtexに提供されることを想定していないため、メモ帳++で現在開いているファイルを参照する%2が機能しないためです。また、mnakeindexがtexファイル名に対応する正しいファイル名を見つけることができるようにグローバル.nloと.nlsを指定する方法もわかりません。
textworksを使用して命名法を生成できなかったため、notepad++からバッチでこれを行っています!!
助けてくれてありがとう
thesis
バッチファイル内のすべての発生率を実際に置き換えることが%2
実際に機能することがわかりました。私は早すぎると思いますが、誰かが同様の問題を抱えている場合は、ここで解決策があります:
:: Called from Notepad++ Run
:: [path_to_bat_file] "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
:: Change Drive and to File Directory
%~d1
cd %1
:: Run Cleanup
call:cleanup
tskill acrobat
pdflatex %2.tex
bibtex %2
pdflatex %2.tex
pdflatex %2.tex
makeindex.exe %2.nlo -s nomencl.ist -o %2.nls
pdflatex %2.tex
START "" %2.pdf
:cleanup
:: del *.log
del *.dvi
del *.aux
del *.bbl
del *.blg
del *.brf
del *.out
goto:eof