实验:

在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. nyoj 881 小M的区间公约数

    点击打开链接 首先给的范围很大,是10^9.暴力解肯定超时(单用for循环到10^9都大约要2s-3s),首先写了个程序暴力的把两个数所有的约数都打印出来,最后发现所有的公约数都是最大公约数的约数,并 ...

  2. Linux常用命令集合

    常用的Linux命令,备忘 1 pwd 显示当前目录 命令格式: pwd [选项] 2 cd 更换目录 命令格式: cd [目录名] 例: 3 ls 显示当前目录内容 命令格式: ls [选项] [目 ...

  3. 用直接路径(direct-path)insert提升性能的两种方法

    1.传统串行insert方式 常见的insert方式有两种: (1) insert into table_name values(....) (2) insert into target_table ...

  4. QT不同版本编译

    QT发布了不同版本,有一些语法修改,需要修改代码.同时旧版本代码转换需要在pro文件中添加代码greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

  5. session保存用户信息

    前台jsp-------------- <%@ page import="com.manager.form.User" %><%User user = reque ...

  6. linux sed 添加 删除 一行

    find . -type f -name "*.lua" | xargs sed -i '1 i \#!\/usr\/bin\/lua' #一行前添加(文件至少有一行) 复制自: ...

  7. Hibernate单元测试工具junit

    相关注解 @Text :测试方法 @Before :初始化方法 @After : 释放资源

  8. 提权GrantPrivilege

    大概一个多月前学习了提权的知识,当时一直不知道提权到底具体是为了干什么.只是模糊的知道提高权限,获得别的进程的一些东西.后来慢慢的学习的多了,知道了一个叫做ReadProcessMemory的函数,第 ...

  9. Ninject之旅之六:Ninject约定

    摘要 在小的应用系统中一个一个注册一些服务类型不怎么困难.但是,如果是一个实际的有上百个服务的应用程序呢?约定配置允许我们使用约定绑定一组服务,而不用一个一个分别绑定. 要使用约定配置,需要添加Nin ...

  10. CSV文件的规范

    CSV文件,全程Comma-separated values,就是逗号分隔的数据文件.常用于数据集成的数据交换部分标准部分. 最近看到一个项目组在讨论接口文件CSV的规范,真是替他们着急.讨论点: 文 ...