https://github.com/cran/fda
Tip revision: a651a3c172fe4d8a0b1b79abc2b882526296abef authored by J. O. Ramsay on 03 November 2009, 00:00:00 UTC
version 2.2.3
version 2.2.3
Tip revision: a651a3c
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