实验:

在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文件的更多相关文章

  1. Linux下编译java并生成jar包

    下面是WordCount.java类 package com.ll; import java.io.IOException; import java.util.Iterator; import jav ...

  2. Linux 下编译 有多个子程序文件的Fortran程序

    第一种方法 ifort -o outprogram Source1.f90 Source2.f90 第二种 在主程序中include 'Source2.f90' program main call p ...

  3. linux下编译tex,bib成pdf文件

    参考linux下编译bib.tex生成pdf文件 为了编译出出正确的pdf文件,需要执行4条命令完成整个编译过程. 编译命令及输出 $ pdflatex bb.tex #目录下会生成bb.aux.bb ...

  4. linux下编译qt5.6.0静态库(使用./configure --help来看看都有哪些参数。超详细,有每一个模块的说明。如果改变了安装的目录,需要到安装目录下的bin目录下创建文件qt.conf)(乌合之众)good

    linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项 Configure选项 第三方库: 附加选项: QNX/Blackberr ...

  5. linux下编译make文件报错“/bin/bash^M: 坏的解释器,使用grep快速定位代码位置

    一.linux下编译make文件报错“/bin/bash^M: 坏的解释器 参考文章:http://blog.csdn.net/liuqiyao_01/article/details/41542101 ...

  6. Itext生成pdf文件

    来源:https://my.oschina.net/lujianing/blog/894365 1.背景 在某些业务场景中,需要提供相关的电子凭证,比如网银/支付宝中转账的电子回单,签约的电子合同等. ...

  7. linux下编译gcc6.2.0

    linux下编译gcc6.2.0 在archlinx的下gcc已经更新到6.2.1了,win10的WSL下还是gcc4.8.官方源没有比较新的版本,于是自己编译使用. GCC6的几个新特性 GCC 6 ...

  8. linux下编译安装vim7.4并安装clang_complete插件

    linux下编译安装vim7.4并安装clang_complete插件 因为debian里软件仓库中下载安装的vim是不支持python写的插件的(可以打开vim,在命令模式先输入:py测试一下),导 ...

  9. linux下编译安装curl

    linux下编译安装curl 1.下载curl git clone https://github.com/curl/curl.git 2.在curl目录下生成configure文件 ./buldcon ...

随机推荐

  1. disposition

    该文为堕落的天使不再来原创.欢迎转载. 在尽心web开发时,可能遇到以下几种需求:(disposition配置) 希望某类或者某已知MIME 类型的文件(比如:*.gif;*.txt;*.htm)能够 ...

  2. java中static 和 final 的一些使用规则

    一.final 1.final变量: 当你在类中定义变量时,在其前面加上final关键字,那便是说,这个变量一旦被初始化便不可改变,这里不可改变的意思对基本类型来说是其值不可变,而对于对象变量来说其引 ...

  3. prototype.js简介

    prototype.js简介 2007-11-21 14:22 prototype.js是一个很强大的Javascript函数库,它可以让你很轻松的使用一些特效,实现AJAX的功能.虽然prototy ...

  4. xfce4 启用回收站

    Userspace virtual filesystem implemented as a pluggable module for gio # pacman -S gvfs

  5. ebs双节点webservice部署问题

    出现异常: oracle.webservices.mdds.MddsException: java.io.IOException: Failed to read WSDL from http://eb ...

  6. CACTI表结构和数据被动获取

    cacti我们也用了很久了,但是它的表结构一直都没有去关心过,得空抽了半个晚上的时间,把它的库表结构大概看了下,某些字段的含义跟大家分享下:cacti的数据都是存放在rrdtool中的,数据库存放的其 ...

  7. Chrome Dev Tools :成为更高效的开发人员

    原文出处 http://blog.jobbole.com/22065/ 实时CSS Style编辑 选择一个Dom,可以对Dom进行编辑和操作,实时修改Css Style, 同时CssStyle可以保 ...

  8. 关于MAC

    以太LAN网中发送的分组称做帧,包含7个字段 MAC帧格式 前同步码 SFD DA SA 长度或类型 数据域 CRC 7字节,物理层加入 帧首定界符,1字节 目的地址,6字节 源地址,6字节 2字节 ...

  9. 冲刺一 (Day 3)

    冲刺一 (Day 3) 用户表 uid int 8 用户ID username varchar 20 用户名 password varchar 20 密码 email varchar 30 邮箱 ph ...

  10. MySQL 第十天(视图、存储过程、函数、触发器)

    MySql高级-视图.函数.存储过程.触发器 目录 一.视图    1 1.视图的定义    1 2.视图的作用    1 (1)可以简化查询.    1 (2)可以进行权限控制,    3 3.查询 ...