rbbeamer 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +15 -6
- data/bin/rbbeamer +50 -16
- data/changes.txt +10 -0
- metadata +17 -7
data/README.md
CHANGED
@@ -61,13 +61,14 @@ rbbeamer compiles .rbt-files into .tex-files. If you want to create your PDF, yo
|
|
61
61
|
|
62
62
|
rbbeamer ist a script written in [Ruby][ruby]. You need a running Ruby-Installation (tested: 1.9.3, 2.0.0p0), most modern operating systems include one. rbbeamer ist developed and tested under Linux - it should run under MAC OS/X and Windows too - but I didn' t test it until now. Drop me a mail if you have additional info.
|
63
63
|
|
64
|
-
Creating pictures you will need *graphviz* in your path
|
64
|
+
Creating pictures you will need *graphviz* in your path.
|
65
65
|
### Commands
|
66
66
|
|
67
|
-
Commands start with a "#" as first char in a line. Every line not starting with # is ignored (so a blank as the first char means: this is a comment). You can use this to specify additional informations not shown on slide or just to
|
67
|
+
Commands start with a "#" as first char in a line. Every line not starting with # is ignored (so a blank as the first char means: this is a comment). You can use this to specify additional informations not shown on slide or just to deactivate a command for testing purposes. The end of a command is defined by line break or seperator-char (default: |)
|
68
68
|
|
69
69
|
#sd|<Title Of Presentation> | <Author> | <Date> [ | sources]
|
70
|
-
start definition-command: Defines a titlepage with three entities. If you want to use citations with biblatex, just give a fourth option with name of .bib-file (specify without extension), i.e. `#sd| My Title Of Presentation | John Doe | April 2013 | sources
|
70
|
+
start definition-command: Defines a titlepage with three entities. If you want to use citations with biblatex, just give a fourth option with name of .bib-file (specify without extension), i.e. `#sd| My Title Of Presentation | John Doe | April 2013 | sources`.
|
71
|
+
rbbeamer will then try to include a file named `sources.bib`.
|
71
72
|
|
72
73
|
#toc [| Agenda | <DEPTH>]
|
73
74
|
Table-Of-Content: includes a TOC-page based on defined sections and subsections. Optional: you can specify a title (default: Agenda) and a depth for building TOC (default: 1).
|
@@ -128,6 +129,9 @@ Using [Graphviz][graphviz]-package you can include pictures into your presentati
|
|
128
129
|
#input|<filename>
|
129
130
|
If you have large presentations, sometimes it is easier to use different source-files for different parts. Using `input`-command you can include another .rbt-file into your presentation (and yes, this one also can input a third one and so on).
|
130
131
|
|
132
|
+
#attn
|
133
|
+
Using #attn one can mark some slides as very important. This mark is an red triangle at lower left corner (on handouts) or a small blue dot at same corner (on slides, it is only a signal for your talk).
|
134
|
+
|
131
135
|
### Commandline Options
|
132
136
|
Starting rbbeamer at least you will have to specify your .rbt-file to compile. But beside this you can specify a lot of options. Try option `--help` or `-x` to see a short description.
|
133
137
|
|
@@ -138,6 +142,7 @@ Starting rbbeamer at least you will have to specify your .rbt-file to compile. B
|
|
138
142
|
--handout, -h: build a handout (no animations in pdf, add _handout
|
139
143
|
to filename)
|
140
144
|
--theme, -t <s>: Beamer-Theme to use (see Beamer-Doc for more info)
|
145
|
+
--handoutcolor, -n <s>: Colortheme for printing handouts (try DOVE to save ink) (default: default)
|
141
146
|
(default: Luebeck)
|
142
147
|
--babel, -b <s>: Language-option for babel-Package (default: english)
|
143
148
|
--backend, -a <s>: Backend for biblatex setting up references (default:
|
@@ -153,13 +158,16 @@ Starting rbbeamer at least you will have to specify your .rbt-file to compile. B
|
|
153
158
|
--help, -x: Show all options (this page)
|
154
159
|
|
155
160
|
|
156
|
-
### Config-directory
|
157
|
-
During startup rbbeamer tries to find config-dir (Linux: `~/.rbbeamer`). If it doesn't exist, it will be created. You can save some files used by a
|
161
|
+
### Global Config-directory
|
162
|
+
During startup rbbeamer tries to find config-dir (Linux: `~/.rbbeamer`). If it doesn't exist, it will be created. You can save some files used by a majority of your presentations in this dir (i.e. logo-files, bibtex-sources). rbbeamer tries to find this files in this dir, if you do not specify another directory. In my case, I store my bibtex-sourcefile with all entries I usually cite from in this dir. So I don't have to bother with copies of this file in different directories.
|
163
|
+
|
164
|
+
### Local Config-directory
|
165
|
+
In some cases you will prefer configs on a per-project basis. You can now use an additional config-file named `.rbbeamer.conf` in your working dir (where your `rbt-files` are stored. In this file you change perhaps your logo-file to a different one only used in this project. At startup rbbeamer will read global config file first and then tries to read a local config file in your working dir, which will overrule global settings.
|
158
166
|
|
159
167
|
### rbbeamer.conf
|
160
168
|
Nearly all options regarding rbbeamer can be specified in command-line. But most times you don' t change your options. So ist is easier to use a config-file to save them. During startup rbbeamer sets all options to default values. If it finds rbbeamer.conf, options are overriden by those specified in config-file. If you also specified options in command-line, these values will override the former ones.
|
161
169
|
|
162
|
-
To create your config-file, just specify all options needed for your work and add `--writeconfigfile (or -w)`. rbbeamer will then create a config (Linux: `~/.rbbeamer/rbbeamer.conf`) to save all options within. Next time just start rbbeamer and specify your .rbt-file. Thats it. You can edit your config-file with any editor.
|
170
|
+
To create your global config-file, just specify all options needed for your work and add `--writeconfigfile (or -w)`. rbbeamer will then create a config (Linux: `~/.rbbeamer/rbbeamer.conf`) to save all options within. Next time just start rbbeamer and specify your .rbt-file. Thats it. You can edit your config-file with any editor.
|
163
171
|
|
164
172
|
handout = false
|
165
173
|
pdf = true
|
@@ -172,6 +180,7 @@ To create your config-file, just specify all options needed for your work and ad
|
|
172
180
|
logo = rbb_logo
|
173
181
|
addpackage =
|
174
182
|
theme = Luebeck
|
183
|
+
handoutcolor = dove
|
175
184
|
latexpath =
|
176
185
|
latexbinary = pdflatex
|
177
186
|
backend = bibtex
|
data/bin/rbbeamer
CHANGED
@@ -23,11 +23,12 @@ require 'parseconfig.rb'
|
|
23
23
|
require 'open3'
|
24
24
|
require 'pathname'
|
25
25
|
|
26
|
-
Version = "0.5.
|
26
|
+
Version = "0.5.5 (2014-02-21)"
|
27
27
|
|
28
28
|
sep = '|' # seperator-string to split different parts of a line / command
|
29
29
|
SAVESEP = '<-saveThisAsSeperatorForLaterUse->'
|
30
30
|
Defaulttheme = 'Luebeck'
|
31
|
+
Defaulthandoutcolor = 'default' #'dove'
|
31
32
|
DefaultLanguage = 'english'
|
32
33
|
Backend = 'bibtex'
|
33
34
|
Logofile = 'logo' # should be .png or .jpg or ...
|
@@ -77,6 +78,7 @@ intro = <<-'EOF'
|
|
77
78
|
\usepackage{eurosym}
|
78
79
|
\usepackage[style=authortitle,backend=/<-KVAR-TBR->/]{biblatex}
|
79
80
|
\usetheme{/<-KVAR-TBR->/}
|
81
|
+
\usecolortheme{/<-KVAR-TBR->/}
|
80
82
|
\usepackage{tikz}
|
81
83
|
\usetikzlibrary{shapes,arrows}
|
82
84
|
/<-KVAR-TBR->/
|
@@ -91,17 +93,32 @@ intro = <<-'EOF'
|
|
91
93
|
\definecolor{red}{rgb}{0.99,0.25,0.5}
|
92
94
|
\definecolor{blue}{rgb}{0.1,0.25,0.95}
|
93
95
|
\definecolor{green}{rgb}{0.1,0.95,0.1}
|
94
|
-
% Usage: \cellcolor{
|
96
|
+
% Usage: \cellcolor{grey}
|
97
|
+
% placing marks on some pages
|
98
|
+
\usepackage{textpos}
|
99
|
+
\newcommand{\attn}{
|
100
|
+
\mode<handout>{
|
101
|
+
\begin{textblock}{1}(-1,6.5)
|
102
|
+
\begin{tikzpicture}
|
103
|
+
\draw[line width=2pt,color=red] (7,0)--(8,0)--(7.5,1)--cycle; % triangle on handouts
|
104
|
+
\end{tikzpicture}
|
105
|
+
\end{textblock}
|
106
|
+
}
|
107
|
+
\mode<beamer>{
|
108
|
+
\begin{textblock}{1}(-1,8.5)
|
109
|
+
\begin{tikzpicture}
|
110
|
+
\draw[line width=2pt,color=red] (7,0)--(7.1,0); % small dot on slides
|
111
|
+
\end{tikzpicture}
|
112
|
+
\end{textblock}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
95
116
|
\begin{document}
|
96
117
|
\title[{\makebox[.45\paperwidth]{/<-KVAR-TBR->/\hfill%
|
97
118
|
\insertframenumber/\inserttotalframenumber}}]{/<-KVAR-TBR->/}
|
98
119
|
\titlegraphic{\includegraphics[height=1.5cm]{/<-LOGOFILE->/}}
|
99
120
|
\author{/<-KVAR-TBR->/}
|
100
121
|
\date{/<-KVAR-TBR->/}
|
101
|
-
%\setbeamerfont{parent A}{size=\Large}
|
102
|
-
%\setbeamerfont{parent B}{size=\small}
|
103
|
-
%\setbeamerfont{parent B}{size=\footnotesize}
|
104
|
-
%\setbeamerfont{parent Z}{size=\normalsize}
|
105
122
|
\logo{\pgfimage[height=0.7cm]{/<-LOGOFILE->/}}
|
106
123
|
\frame [plain]{
|
107
124
|
\titlepage
|
@@ -173,7 +190,7 @@ end
|
|
173
190
|
|
174
191
|
#######################################################################################
|
175
192
|
|
176
|
-
|
193
|
+
fprgname = File.basename(__FILE__)
|
177
194
|
firstname = File.basename(__FILE__,'.*')
|
178
195
|
pathname = File.dirname(File.expand_path(__FILE__))
|
179
196
|
pathname_lib = Pathname.new(pathname).parent.to_s + '/lib'
|
@@ -182,20 +199,23 @@ homedir = Dir.home + '/'
|
|
182
199
|
# Config-dir will be:
|
183
200
|
ccfg_dir = homedir + '.' + firstname
|
184
201
|
Dir.mkdir(ccfg_dir) unless Dir.exists?(ccfg_dir)
|
185
|
-
# Configfile will be:
|
202
|
+
# global Configfile will be:
|
186
203
|
ccfg = ccfg_dir + '/' + firstname + '.conf'
|
204
|
+
# additional Configfile could be stored in our working dir as hidden file
|
205
|
+
ccfga = '.' + firstname + '.conf'
|
187
206
|
|
188
207
|
opts = Trollop::options do
|
189
208
|
opt :seperator, "use this pattern as seperator", :type => :string, :default => sep
|
190
209
|
opt :logo, "Logo-File (without extension) for slides", :type => :string, :short => 'o', :default => Logofile
|
191
210
|
opt :pdf, "Start pdflatex after creating tex-file", :default => false
|
192
211
|
opt :handout, "build a handout (no animations in pdf, add _handout to filename)", :default => false
|
193
|
-
opt :
|
212
|
+
opt :handoutcolor, "Colortheme for printing handouts (try DOVE to save ink)", :type => :string, :short => 'n', :default => Defaulthandoutcolor
|
213
|
+
opt :theme, "Beamer-Theme to use (see Beamer-Doc for more info)", :type => :string, :default => Defaulttheme
|
194
214
|
opt :babel, "Language-option for babel-Package", :type => :string, :short => 'b', :default => DefaultLanguage
|
195
215
|
opt :backend, "Backend for biblatex setting up references", :type => :string, :default => Backend
|
196
216
|
opt :addpackage, "add latex-packages (i.e. [myoption=true]{testpackage},{otherpackage})", :type => :string, :short => 'a', :default => ''
|
197
217
|
opt :configfile, "Use this file as configfile", :short => "c", :default => ccfg
|
198
|
-
opt :deleteworkfiles, "Delete
|
218
|
+
opt :deleteworkfiles, "Delete workfiles after producing pdf: "+delLatexFiles.join(','), :default => false
|
199
219
|
opt :writeconfigfile, "write default config into #{ccfg} (overwrite)", :default => false
|
200
220
|
opt :debug, "Start in debugging mode", :default => false
|
201
221
|
opt :debugpdf, "Show latex-output during compilation", :default => false
|
@@ -211,6 +231,7 @@ cfg[:deleteworkfiles] = false
|
|
211
231
|
cfg[:debug] = false
|
212
232
|
cfg[:debugpdf] = false
|
213
233
|
cfg[:seperator] = sep
|
234
|
+
cfg[:handoutcolor] = Defaulthandoutcolor
|
214
235
|
cfg[:babel] = DefaultLanguage
|
215
236
|
cfg[:logo] = pathname_lib + '/' + Logofile
|
216
237
|
cfg[:addpackage] = ''
|
@@ -220,15 +241,27 @@ cfg[:latexbinary] = DefaultLatexBinary
|
|
220
241
|
cfg[:backend] = Backend
|
221
242
|
cfg[:license] = false
|
222
243
|
|
244
|
+
#read global Configfile if present:
|
223
245
|
if File.exists?(ccfg)
|
224
246
|
# Reading Config-File
|
225
|
-
ccfgexist = " (
|
247
|
+
ccfgexist = " (Global Configfile exists)"
|
226
248
|
config = ParseConfig.new(ccfg)
|
227
249
|
cfg.keys.each do |k|
|
228
250
|
cfg[k] = config[k.to_s] if config.get_params().include?(k.to_s)
|
229
251
|
end
|
230
252
|
else
|
231
|
-
ccfgexist = " (
|
253
|
+
ccfgexist = " (Global Configfile doesn't exist)"
|
254
|
+
end
|
255
|
+
#read project Configfile if present (these specification will overrule global ones):
|
256
|
+
if File.exists?(ccfga)
|
257
|
+
# Reading Config-File
|
258
|
+
ccfgexistL = " (Local Configfile exists)"
|
259
|
+
config = ParseConfig.new(ccfga)
|
260
|
+
cfg.keys.each do |k|
|
261
|
+
cfg[k] = config[k.to_s] if config.get_params().include?(k.to_s)
|
262
|
+
end
|
263
|
+
else
|
264
|
+
ccfgexistL = " (Local Configfile doesn't exist)"
|
232
265
|
end
|
233
266
|
|
234
267
|
# Reading options from commandline:
|
@@ -292,7 +325,6 @@ if ARGV.size <= 0
|
|
292
325
|
end
|
293
326
|
|
294
327
|
raise "Please specify only one rbt-file: " + ARGV.join(', ') if ARGV.size > 1
|
295
|
-
# puts "Zu bearbeiten: "+ARGV.join(', ')
|
296
328
|
filename = sanitize_path(ARGV.first)
|
297
329
|
fbasename = File.basename(filename,'.rbt')
|
298
330
|
fbasename += '_handout' if cfg[:handout]
|
@@ -314,6 +346,7 @@ end
|
|
314
346
|
lines.map!{|l| l.gsub(Regexp.new(Regexp.escape('\\'+sep)),SAVESEP)}
|
315
347
|
# Any graphviz-pics?
|
316
348
|
fh = 1
|
349
|
+
fname = '' # will store our pic-filename
|
317
350
|
0.step(lines.size-1) do |n|
|
318
351
|
line = lines[n]
|
319
352
|
sp = line.split(sep).reverse
|
@@ -394,9 +427,8 @@ numsfi.reverse!
|
|
394
427
|
textfi.reverse!
|
395
428
|
counter = 1
|
396
429
|
|
397
|
-
# only for testing purposes: File.open('ftest.txt','w'){|f| lines.each{|x| f.puts x}}
|
398
430
|
File.open(fn,'w') do |out|
|
399
|
-
out.puts "% File created by #{
|
431
|
+
out.puts "% File created by #{fprgname}, Version #{Version}"
|
400
432
|
out.puts "% File created at #{Time.now}"
|
401
433
|
out.puts "% DO NOT CHANGE MANUALLY, FILE WILL BE OVERWRITTEN\n% "
|
402
434
|
counter = 1 # Start every frame empty; after first click first item will appear
|
@@ -462,7 +494,7 @@ File.open(fn,'w') do |out|
|
|
462
494
|
vorspann = intro_beamer
|
463
495
|
vorspann.gsub!('%','/PROZENT!/')
|
464
496
|
vorspann.gsub!('/<-KVAR-TBR->/','%s')
|
465
|
-
vorspann = vorspann % [opt_handout,cfg[:babel],cfg[:backend],cfg[:theme],addpackage,bibline,Titel,Titel,Autor,Datum]
|
497
|
+
vorspann = vorspann % [opt_handout,cfg[:babel],cfg[:backend],cfg[:theme],cfg[:handoutcolor],addpackage,bibline,Titel,Titel,Autor,Datum]
|
466
498
|
vorspann.gsub!('/<-LOGOFILE->/',cfg[:logo])
|
467
499
|
vorspann.gsub!('/PROZENT!/','%')
|
468
500
|
out.puts vorspann
|
@@ -550,6 +582,8 @@ File.open(fn,'w') do |out|
|
|
550
582
|
when '#Fx'
|
551
583
|
out.puts '\end{frame}'
|
552
584
|
counter = 1
|
585
|
+
when '#attn' # mark this slide as important (handout)
|
586
|
+
out.puts '\attn'
|
553
587
|
else
|
554
588
|
raise "(RBB) Error, don't know this command: " + code
|
555
589
|
end
|
data/changes.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
0.5.5:
|
2
|
+
added a solution to marke some slides as very important (see #attn in documentation)
|
3
|
+
modified helptext
|
4
|
+
Configfile .rbbeamer in your config-dir is now called Global Configfile. You can use
|
5
|
+
a second configfile (local configfile) in every working dir, where you specify special configs
|
6
|
+
only used in this project (perhaps a special logo).
|
7
|
+
Fixed a problem determining the filename of running instance when creating the .tex-file.
|
8
|
+
|
1
9
|
0.5.4:
|
2
10
|
added new command #bi,#Bi and #bd,#Bd for blocks with itemize or description elements (see Readme)
|
3
11
|
added a .chomp after reading a line from rbt-file before processing content
|
@@ -6,8 +14,10 @@ changes in Latex-header:
|
|
6
14
|
added package colortbl with some colordefs
|
7
15
|
added package eurosym
|
8
16
|
added new fontsize (Fontvi for tables)
|
17
|
+
|
9
18
|
0.5.3:
|
10
19
|
fixed a problem in section #{| : Did not restore sep-symbols in tables
|
20
|
+
|
11
21
|
0.5.2:
|
12
22
|
added error-message in case of missing #fx-frametitle
|
13
23
|
fixed problem using #{| to include additional frames
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbeamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trollop
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '2.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: parseconfig
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: 1.0.2
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.0.2
|
36
46
|
description: Helps you building beamer-presentations
|
37
47
|
email: rbbeamer@gmail.com
|
38
48
|
executables:
|
@@ -67,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
77
|
version: '0'
|
68
78
|
requirements: []
|
69
79
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.8.
|
80
|
+
rubygems_version: 1.8.25
|
71
81
|
signing_key:
|
72
82
|
specification_version: 3
|
73
83
|
summary: rbbeamer is a preprocessor script for latex-beamer
|