博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Tex与PDF
阅读量:7295 次
发布时间:2019-06-30

本文共 1571 字,大约阅读时间需要 5 分钟。

由Knuth Donald开发的tex.web会生成DVI文件,也是Knuth自己实现的(虽然概念是其他人提出的)一种文件格式,目标是与设备无关。

通过dvips程序可以将DVI格式转化成PostScript格式,而PostScript格式是Adobe公司起家的产品,也是PDF格式的前身,甚至PDF现在的绘画机制与PostScript也相差无几。

可以使用ps2pdf将PostScript文件转化成PDF格式文件。

 

Tex的机制基本上就可以这样描述。

因为Tex的产生比较早,当时PostScript还只是个雏形,因此tex没有直接输出PostScript文件格式也是情理之中,不过Knuth还真是有远见,选择了一种与PDF的Portable类似的思想,生成DVI格式。然后,接下来的事其实也理所当然,PostScript以至PDF成了行业的标准,Tex就在不断地向PDF靠拢,直到最后出现了。

The main difference between TeX and pdfTeX is that whereas TeX outputs files, pdfTeX can output  files directly.

 

Pdftex能够直接将tex程序输出成PDF格式。

 

那么事情发展到这个地步已经很完美了,但是问题出在tex脚本语言本身,它太自限了,很难扩展或者与其他语言兼容,因此出现了。

The main objective of the project is to provide a version of TeX where all internals are accessible from Lua.

是一门很容易嵌入到其他语言中的语言,那么它应该可以成为tex与其他语言结合的桥梁。

LuaTex之间的结合方式参考:

There are two main ways to execute Lua code in a ConTeXt document: The command \ctxlua, and the environment \startluacode...\stopluacode. Both are wrappers around the LuaTeX primitive\directlua, which you should never need to use. In general, you will define a function inside a\startluacode block, and then define a TeX command that calls the function using \ctxlua, especially because \ctxlua has a few idiosyncracies.

 

Most commands that you would type with a backslash in plain ConTeXt, you can access from Lua withcontext.command. Unadorned strings end up in TeX as arguments in curly braces; Lua tables end up in TeX as paramater blocks in square brackets. 

不过看起来,Lua只是被嵌入到了tex中去,毕竟Lua只有一个比较小的核心,也基本上无法自己独立生存。

所以LuaTex只是tex自身的一个提升,而并不是向外界的开放接口。

转载于:https://www.cnblogs.com/long123king/p/3924055.html

你可能感兴趣的文章
Citrix XenServer 优化
查看>>
js仿京东轮播图效果
查看>>
x-manager 管理 kvm虚拟机
查看>>
MySQL同步时,出现的ERROR 1201 (HY000)错误解决方法
查看>>
TurboMail邮件系统异地分布式部署方案
查看>>
我的友情链接
查看>>
Executors.newFixedThreadPool和ArrayBlockingQueue一点使用心得
查看>>
Android异步从网络下载图片并且缓存图片到本地的demo
查看>>
Linux Shell编程入门
查看>>
JAVA调用返回XML格式数据的WebService,并通过XPath解析XML的应用
查看>>
虚拟机windows中编译环境的分辨率能否固定
查看>>
Python-函数
查看>>
全排列
查看>>
android音乐播放器(2)
查看>>
iOS presentedViewController的基本使用
查看>>
LNMP整合安装Redmine2.3实录
查看>>
易宝典文章——怎样管理Exchange Server 2013安全组
查看>>
erlang 简单例子的编译运行
查看>>
HyperV 中Windows Server 2012 非共享存储的在线迁移
查看>>
安装 CentOS 7 后必做的七件事
查看>>