summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-03-14 15:29:32 +0000
committerknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2014-03-14 15:29:32 +0000
commitd842694cd77a0bb7218bf2d2fc65af59fea44a9a (patch)
treec56267527edfb797586a1c2f0e54fbb52178d83a
parentb98230f1a4357b144691197f0aff2f08642b2d4b (diff)
patch from Barry Wardell: include interface information in ThornDoc
git-svn-id: http://svn.cactuscode.org/flesh/trunk@5096 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rwxr-xr-xlib/sbin/InterLatex.pl7
-rw-r--r--lib/sbin/ParamLatex.pl5
-rwxr-xr-xlib/sbin/SchedLatex.pl7
-rwxr-xr-xlib/sbin/ThornDoc15
-rwxr-xr-xlib/sbin/ThornDocHTML15
-rw-r--r--lib/sbin/ThornGuide.pl3
6 files changed, 44 insertions, 8 deletions
diff --git a/lib/sbin/InterLatex.pl b/lib/sbin/InterLatex.pl
index cb558948..fd495806 100755
--- a/lib/sbin/InterLatex.pl
+++ b/lib/sbin/InterLatex.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -s
#use strict;
-use vars qw($cctk_home $debug $verbose $h $help $document_type $outdir $directory $thornlist);
+use vars qw($cctk_home $debug $verbose $h $help $document_type $outdir $directory $thornlist $thorn);
#/*@@
# @file InterLatex.pl
@@ -27,6 +27,7 @@ if ($h || $help) {
print "--> InterLatex.pl <--\n";
print "Options:\n";
print "\t-thornlist= : thornlist to process\n";
+ print "\t-thorn= : (opt) specific thorn to process\n";
print "\t-directory= : directory of arrangements (default arrangements/)\n";
print "\t-outdir= : directory to dump output files, default is .\n";
print "\t-document_type= : create a 'document' or 'section'\n";
@@ -110,6 +111,8 @@ if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
@listOfThorns = sort keys %thorns;
+} elsif (defined $thorn) {
+ @listOfThorns = $thorn;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
@@ -331,7 +334,7 @@ sub LatexTableElement
# print nothign as we are dealing with the same group
if (! $firstpass) {
print "~ &";
- $firstpass = 0;
+ $firstpass = 0;
}
my $new_counter = 1;
diff --git a/lib/sbin/ParamLatex.pl b/lib/sbin/ParamLatex.pl
index 48b30501..0628e140 100644
--- a/lib/sbin/ParamLatex.pl
+++ b/lib/sbin/ParamLatex.pl
@@ -4,7 +4,7 @@
# the following variables in the 'use vars' statement, that can be passed in from
# the command.
use strict;
-use vars qw($h $help $cctk_home $thornlist $outdir $verbose $debug $arrangements_dir $document_type);
+use vars qw($h $help $cctk_home $thornlist $outdir $verbose $debug $arrangements_dir $document_type $thorn);
#########################
# ->> ParamLatex.pl <<- #
@@ -19,6 +19,7 @@ This program will take as input a thornlist, and outputs a latex table that cont
-cctk_home= : root directory of Cactus
-arrangements_dir= : arrangements directory
-thornlist= : thornlist to process
+ -thorn= : specific thorn to process
-outdir= : where to place resulting output files
-document_type= : is this a self containted 'document' or 'section'
@@ -111,6 +112,8 @@ if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
@listOfThorns = sort keys %thorns;
+} elsif (defined $thorn) {
+ @listOfThorns = $thorn;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
diff --git a/lib/sbin/SchedLatex.pl b/lib/sbin/SchedLatex.pl
index ba67e807..b7317abb 100755
--- a/lib/sbin/SchedLatex.pl
+++ b/lib/sbin/SchedLatex.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -s
use strict;
-use vars qw($h $help $cctk_home $thornlist $outdir $verbose $debug $directory $document_type);
+use vars qw($h $help $cctk_home $thornlist $outdir $verbose $debug $directory $document_type $thorn);
#/*@@
# @file SchedLatex.pl
@@ -25,7 +25,8 @@ if ($h || $help) {
print "--> SchedLatex.pl <--\n";
print " This program will take as input a thornlist, and outputs a latex table that contains the information in the thorns' schedule.ccl file(s). This latex table can then be used as a stand-alone document, or as a section of a larger 'ThornGuide'";
print "Options:\n";
- print "\t-thornlist= : (req) list specific thorns to process\n";
+ print "\t-thornlist= : (opt) list specific thorns to process\n";
+ print "\t-thorn= : (opt) specific thorn to process\n";
print "\t-directory= : (opt) dir. of arrangements (default arrangements/)\n";
print "\t-outdir= : (opt) directory to dump output files, default is .\n";
print "\t-document_type= : (opt) 'document' or 'section'\n";
@@ -101,6 +102,8 @@ if (defined $thornlist) {
# provided by MakeUtils.pl, returns a hash with a list of the thorns in our thornlist
%thorns = &ReadThornlist($thornlist);
@listOfThorns = sort keys %thorns;
+} elsif (defined $thorn) {
+ @listOfThorns = $thorn;
} else {
# we don't have a thornlist, go find all thorns in arrangements directory
@listOfThorns = ThornUtils::CreateThornlist($arrangements_dir);
diff --git a/lib/sbin/ThornDoc b/lib/sbin/ThornDoc
index eaaabff4..cda10c61 100755
--- a/lib/sbin/ThornDoc
+++ b/lib/sbin/ThornDoc
@@ -26,7 +26,20 @@ for arr in `cd arrangements; echo *`; do
rm -f documentation.tex documentation.pdf
path=$abspath/arrangements/$arr/$th/doc
< $path/documentation.tex sed -e 's+\(\\includegraphics.*\){ *\(.*\) *}+\1{'"$path"'/\2}+g' |
- sed -e 's+\(\\input *\)\(.*\)+\1'"$path"'/\2+g' > documentation.tex
+ sed -e 's+\(\\input *\)\(.*\)+\1'"$path"'/\2+g' |
+ sed -e 's+\\begin{document}+\\newlength{\\tableWidth} \\newlength{\\maxVarWidth} \\newlength{\\paraWidth} \\newlength{\\descWidth} \\begin{document}+g' |
+ sed -e 's+\\end{document}++g' > documentation.tex
+
+ echo " Parsing ccl files..."
+ perl -s $abspath/lib/sbin/ParamLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_PARAMLATEX_MSGS 2>&1
+ perl -s $abspath/lib/sbin/InterLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_INTERLATEX_MSGS 2>&1
+ perl -s $abspath/lib/sbin/SchedLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_SCHEDLATEX_MSGS 2>&1
+
+ inter_file=`echo ${arr}_${th}_inter.tex | tr '[:upper:]' '[:lower:]'`
+ cat ${arr}_${th}_param.tex >> documentation.tex
+ cat $inter_file >> documentation.tex
+ cat ${arr}_${th}_schedule.tex >> documentation.tex
+ echo "\\end{document}" >> documentation.tex
{
pdflatex documentation < /dev/null > LATEX_MESSAGES 2>&1
diff --git a/lib/sbin/ThornDocHTML b/lib/sbin/ThornDocHTML
index 71c762ed..455605ce 100755
--- a/lib/sbin/ThornDocHTML
+++ b/lib/sbin/ThornDocHTML
@@ -28,7 +28,20 @@ for arr in `cd arrangements; echo *`; do
path=$abspath/arrangements/$arr/$th/doc
< $path/documentation.tex sed -e 's+\(\\includegraphics.*\){ *\(.*\) *}+\1{'"$path"'/\2}+g' |
sed -e 's+\(\\input *\)\(.*\)+\1'"$path"'/\2+g' |
- sed -e 's+\\usepackage{../../../../doc/latex/cactus}+\\usepackage{../../../../../doc/latex/cactus}+g' > documentation.tex
+ sed -e 's+\\usepackage{../../../../doc/latex/cactus}+\\usepackage{../../../../../doc/latex/cactus}+g' |
+ sed -e 's+\\begin{document}+\\newlength{\\tableWidth} \\newlength{\\maxVarWidth} \\newlength{\\paraWidth} \\newlength{\\descWidth} \\begin{document}+g' |
+ sed -e 's+\\end{document}++g' > documentation.tex
+
+ echo " Parsing ccl files..."
+ perl -s $abspath/lib/sbin/ParamLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_PARAMLATEX_MSGS 2>&1
+ perl -s $abspath/lib/sbin/InterLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_INTERLATEX_MSGS 2>&1
+ perl -s $abspath/lib/sbin/SchedLatex.pl -cctk_home=$abspath -directory=$abspath/arrangements -thorn=$arr/$th -outdir=$PWD > LOG_SCHEDLATEX_MSGS 2>&1
+
+ inter_file=`echo ${arr}_${th}_inter.tex | tr '[:upper:]' '[:lower:]'`
+ cat ${arr}_${th}_param.tex >> documentation.tex
+ cat $inter_file >> documentation.tex
+ cat ${arr}_${th}_schedule.tex >> documentation.tex
+ echo "\\end{document}" >> documentation.tex
$abspath/lib/sbin/ConvertFigures $path
diff --git a/lib/sbin/ThornGuide.pl b/lib/sbin/ThornGuide.pl
index 745e7882..a1b171a7 100644
--- a/lib/sbin/ThornGuide.pl
+++ b/lib/sbin/ThornGuide.pl
@@ -424,7 +424,8 @@ sub Add_Section
$thorn = ThornUtils::CleanForLatex($thorn);
print OUT <<EOC;
-\\chapter{$thorn}
+\\chapter*{$thorn}
+\\addcontentsline{toc}{chapter}{$thorn}
$contents
EOC