[Logilogi-svn] SF.net SVN: logilogi:[1733] tools/b-rex/b-rex
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2010-06-25 17:11:17
|
Revision: 1733
http://logilogi.svn.sourceforge.net/logilogi/?rev=1733&view=rev
Author: wybow
Date: 2010-06-25 17:11:08 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
Updated b-rex for baposters
Modified Paths:
--------------
tools/b-rex/b-rex
Modified: tools/b-rex/b-rex
===================================================================
--- tools/b-rex/b-rex 2010-06-25 14:22:16 UTC (rev 1732)
+++ tools/b-rex/b-rex 2010-06-25 17:11:08 UTC (rev 1733)
@@ -210,10 +210,10 @@
base_path = File.dirname(base_path)
end
contents = File.open(File.expand_path(filename, base_path)).read
- contents.gsub!(/(^|\n)[ \t]*\\input\{.*?\}/) do |inc|
+ contents.gsub!(/(^|\n)[ \t]*\\input\{.*?\}(\n|$)/) do |inc|
inc =~ /input\{(.*?)\}/
match = $~
- "\n" + assemble_text_file(base_path + '/' + filename, match[1])
+ assemble_text_file(base_path + '/' + filename, match[1])
end
return contents
end
@@ -419,6 +419,40 @@
end
end
+ def frame_h(title, options = {})
+ if options[:open]
+ options.delete(:open)
+ @hstack ||= []
+ if options[:column]
+ @hcolumn = options[:column]
+ options.delete(:column)
+ else
+ @hcolumn ||= 0 # sets to zero if unset, only on first call
+ end
+ pass_options = ",column=" + @hcolumn.to_s
+ @hstack[@hcolumn] ||= []
+ if !options[:below] and !options[:above]
+ if !@hstack[@hcolumn].empty?
+ pass_options += ",below=" + @hstack[@hcolumn].last
+ else
+ pass_options += ",row=0"
+ end
+ end
+ if !options.empty?
+ options.each_pair do |key, value|
+ pass_options += ',' + key.to_s + '=' + value.to_s
+ end
+ end
+
+ name = title.downcase.gsub(' ','-')
+ @hstack[@hcolumn] << name
+ ' \headerbox{' + title + '}{name=' + name + pass_options + '}{'
+ else
+ ' \vspace{0.3em}' + "\n" +
+ ' }'
+ end
+ end
+
def step_down_whitespaces(whitespaces)
whitespaces -= 2 if whitespaces >= 2
return whitespaces
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|