linux下编译bib、tex生成pdf文件
实验:
在linux环境下,编译(英文)*.bib和*.tex文件,生成pdf文件。
环境:
fedora 20(uname -a : Linux localhost.localdomain 3.19.8-100.fc20.i686+PAE #1 SMP Tue May 12 17:27:49 UTC 2015 i686 i686 i386 GNU/Linux)
texlive(yum info texlive :
...
名称 :texlive
架构 :i686
时期 :3
版本 :2013
发布 :6.20131226_r32488.fc20)
...)
文件及内容:
1.
@article{DK89,
author = "Donald Knuth",
title = "Typesetting Concrete Mathematics",
journal = "TUGboat",
volume = 10,
number = 1,
pages = "31--36",
month = Apr,
year = 1989
}
tex.bib
2.
\documentclass{article}
\begin{document}
\section*{Recommended texts}
To study \TeX\ in depth, set \cite{DK89}.
\bibliographystyle{alpha}
\bibliography{tex}
\end{document}
bb.tex
编译命令及输出
1 . pdflatex bb.tex
This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev)
restricted \write18 enabled.
entering extended mode
(./bb.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
No file bb.aux. LaTeX Warning: Citation `DK89' on page 1 undefined on input line 5. No file bb.bbl.
[1{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}] (./bb.aux
) LaTeX Warning: There were undefined references. )</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on bb.pdf (1 page, 31680 bytes).
Transcript written on bb.log.
输出
目录下会生成bb.aux、bb.log、bb.pdf三个个文件。bb.aux有用。 bb.pdf文件内参考文献,没有正确显示出来。只显示"?",表明还没有引用。
2. bibtex bb
This is BibTeX, Version 0.99d (TeX Live 2014/dev)
The top-level auxiliary file: bb.aux
The style file: alpha.bst
Database file #1: tex.bib
输出
生成 bb.bbl,bb.blg两个文件。这两个文件都是字符文件,可查看。其中*.bbl内容就是要插入到*.tex中去的。注意命令中,文件名字是bb,而不是bb.tex。
3. pdflatex bb.tex
This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev)
restricted \write18 enabled.
entering extended mode
(./bb.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./bb.aux) LaTeX Warning: Citation `DK89' on page 1 undefined on input line 5. (./bb.bbl
Underfull \hbox (badness 1383) in paragraph at lines 4--7
[]\OT1/cmr/m/n/10 Donald Knuth. Type-set-ting con-crete math-e-mat-ics. \OT1/
cmr/m/it/10 TUG-boat\OT1/cmr/m/n/10 ,
) [1{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
(./bb.aux) LaTeX Warning: There were undefined references. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. )
(see the transcript file for additional information)</usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/ty
pe1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/pub
lic/amsfonts/cm/cmti10.pfb>
Output written on bb.pdf (1 page, 44894 bytes).
Transcript written on bb.log.
输出
无新文件生成,但查看bb.pdf,其中的参考文献已经显示出来,但正文中对参考文献的引用依然显示为"?",没有正确(产生交叉)引用。
4. pdflatex bb.tex
This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev)
restricted \write18 enabled.
entering extended mode
(./bb.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./bb.aux) (./bb.bbl Underfull \hbox (badness 1383) in paragraph at lines 4--7
[]\OT1/cmr/m/n/10 Donald Knuth. Type-set-ting con-crete math-e-mat-ics. \OT1/
cmr/m/it/10 TUG-boat\OT1/cmr/m/n/10 ,
) [1{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
(./bb.aux) )
(see the transcript file for additional information)</usr/share/texlive/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/typ
e1/public/amsfonts/cm/cmti10.pfb>
Output written on bb.pdf (1 page, 36047 bytes).
Transcript written on bb.log.
输出
此时,用evince bb.pdf查看生成的pdf,已经是一份正式的档了。
总结:
为了编译出出正确的pdf文件,需要执行4条命令完成整个编译过程。
留意:
只试了英文,没试中文。中文需要cjk等支持,没有实验。
参考文献条目内的空格似乎过大。不知是否有插件可以显示得更好。
linux下编译bib、tex生成pdf文件的更多相关文章
- Linux下编译java并生成jar包
下面是WordCount.java类 package com.ll; import java.io.IOException; import java.util.Iterator; import jav ...
- Linux 下编译 有多个子程序文件的Fortran程序
第一种方法 ifort -o outprogram Source1.f90 Source2.f90 第二种 在主程序中include 'Source2.f90' program main call p ...
- linux下编译tex,bib成pdf文件
参考linux下编译bib.tex生成pdf文件 为了编译出出正确的pdf文件,需要执行4条命令完成整个编译过程. 编译命令及输出 $ pdflatex bb.tex #目录下会生成bb.aux.bb ...
- linux下编译qt5.6.0静态库(使用./configure --help来看看都有哪些参数。超详细,有每一个模块的说明。如果改变了安装的目录,需要到安装目录下的bin目录下创建文件qt.conf)(乌合之众)good
linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项 Configure选项 第三方库: 附加选项: QNX/Blackberr ...
- linux下编译make文件报错“/bin/bash^M: 坏的解释器,使用grep快速定位代码位置
一.linux下编译make文件报错“/bin/bash^M: 坏的解释器 参考文章:http://blog.csdn.net/liuqiyao_01/article/details/41542101 ...
- Itext生成pdf文件
来源:https://my.oschina.net/lujianing/blog/894365 1.背景 在某些业务场景中,需要提供相关的电子凭证,比如网银/支付宝中转账的电子回单,签约的电子合同等. ...
- linux下编译gcc6.2.0
linux下编译gcc6.2.0 在archlinx的下gcc已经更新到6.2.1了,win10的WSL下还是gcc4.8.官方源没有比较新的版本,于是自己编译使用. GCC6的几个新特性 GCC 6 ...
- linux下编译安装vim7.4并安装clang_complete插件
linux下编译安装vim7.4并安装clang_complete插件 因为debian里软件仓库中下载安装的vim是不支持python写的插件的(可以打开vim,在命令模式先输入:py测试一下),导 ...
- linux下编译安装curl
linux下编译安装curl 1.下载curl git clone https://github.com/curl/curl.git 2.在curl目录下生成configure文件 ./buldcon ...
随机推荐
- C++11 thread
//这里使用c++的thread创建了5个线程,并支持传递多个参数 void thread1(int aa,int bb) { cout << aa << bb << ...
- CuteSTL——跟着感觉造轮子
置顶推荐: CuteSTL:https://github.com/jxd134/algorithm/tree/master/CuteSTL TinySTL:https://github.com/zou ...
- sqlserver 2008 建立订阅发布时 报错 解决方案 “错误 2812” 无法创建存储过程
11月10日早上 一大早,还在地铁14号线上 ,接到同事给的信息 说我们的XX系统宕机了,本想没什么问题,一般服务器 只要硬件没有问题 重启一下就可以了, 但是事与愿违,偏偏最后检测到服务器磁盘阵列 ...
- delphi.指针.PChar
此文是delphi.指针.应用姊妹篇,想细化一下PChar应用,所以有了此文. 注意: 1:此文讲的是PChar与字符串相关操作,其它方法暂不多讲. 2:由于D分开Ansi/Unicode的两种完全不 ...
- 十二、shapes
1. The control points are attributes on the shape which are usually arrays of points. Control points ...
- DAO跨事物调用---转账
第一步创建实体类:Entity package com.beiwo.epet.entity; public class Account { private int id; private String ...
- 在MFC中使用GDI+的一般方法,以VC6.0编译器为例
1.载解压GDI+开发包: 2.正确设置include & lib 目录: 设置如下:VC6.0编译器菜单Tools->Options->Directories中添加inlude ...
- LeetCode 135 Candy(贪心算法)
135. Candy There are N children standing in a line. Each child is assigned a rating value. You are g ...
- Find out files transfered via Bluetooth
The case was about business secret and forensic guy did a physical acquisition from a smart phone. H ...
- 标准bootstrap html 页面
<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8&qu ...