https://github.com/cran/CollocInfer
Tip revision: 41c609ed32b0141bab65d5b8ded7ce4e7e016ebf authored by Giles Hooker on 25 April 2010, 00:00:00 UTC
version 0.1.4
version 0.1.4
Tip revision: 41c609e
add-links.rb
Dir["*/*.[rR]d"].each do |path|
puts path
file = File.new(path, "r")
update = file.read.gsub(/\\seealso\{(.*?)\}/smi) do
"\\seealso{\n" +
$1.gsub("\n","").split(/[\, ]+/).map{|f| "\\code{\\link{#{f}}}"}.join(", \n") +
"\n}"
end
file.close
file = File.new(path, "w")
file.write update
file.close
end