
有没有办法(终端命令?)获取 TeX 文件(可能带有外部链接的宏、bibstyle 文件、bibTeX 源等)并自动生成单个自包含的 TeX 文件?例如,我可以生成 bbl 文件,将条目复制并粘贴到那里并添加到源中,但这很繁琐。有人解决了这个问题吗?
答案1
本文档将本地 latex 包和本地 bibtex 数据库捆绑为单个文件 usimg filecontents
,生成
\begin{filecontents}{mypackage.sty}
\def\zzzz{Hello}
\end{filecontents}
\begin{filecontents}{zzz.bib}
@article{zz99,
title={something},
author={M. Eee and Y. Ouoo},
journal={TugBoat},
volume={14},
number={2},
pages={200--100},
year={1884},
publisher={example.org}
}
\end{filecontents}
\documentclass{article}
\usepackage{mypackage}
\begin{document}
\zzzz, \cite{zz99}
\bibliographystyle{plain}
\bibliography{zzz}
\end{document}