Chinaunix首页 | 论坛 | 博客
  • 博客访问: 893471
  • 博文数量: 113
  • 博客积分: 3160
  • 博客等级: 少校
  • 技术积分: 1801
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-19 10:09
文章分类

全部博文(113)

分类: Python/Ruby

2012-09-18 18:04:49

* 使用脚本直接beamer presentation


这个说来话长,因为用习惯了Emacs Org,平时不管是日程管理,写博客,写
Latex还有Beamer都是在org下面完成的。而org导出的beamer presentation是
pdf格式,用这个脚本可以直接幻灯片播放,很方便。



** shell脚本


  1. #!/bin/bash
  2. #
  3. #
  4. # AUTHOR: Lishuo
  5. # EMAIL: lishuo.os.ds@gmail.com
  6. # DATE: 2012-09-17
  7. #
  8. #
  9. # This Script Use Command Evince --presentation as Beamer-viewer.
  10. # Usage: Scriptname /path/to/your/pdf
  11. #
  12. ############################################################
  13. # DEFINE VARIABLES AND FUNCTIONS HERE
  14. ############################################################
  15. FILE=$1
  16. function view_beamer
  17. {
  18. evince --presentation $FILE
  19. }
  20. ############################################################
  21. # BEGIN OF MAIN
  22. ############################################################
  23. # If no argument, exit and print the usage.
  24. if [ $# != 1 ];then
  25. echo "Usage:Scriptname /path/to/your/pdf "
  26. exit 1
  27. fi
  28. echo "Begin Beamer Presentation! "
  29. # begin
  30. view_beamer
  31. exit 0
  32. ############################################################
  33. # END OF presentation.sh
  34. ############################################################

   
** 使用方法

第一步,仍旧是使其具有可执行权限:

: chmod 744 presentation.sh 


第二步,使用符号链接

: ln -s /path/to/your/presentation.sh  view_beamer


第三步,使用

使用下面的指令,即可直接显示幻灯片。

: view_beamer yourPDF

阅读(4365) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~