diff options
author | ikelley <ikelley@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-10-17 17:35:07 +0000 |
---|---|---|
committer | ikelley <ikelley@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-10-17 17:35:07 +0000 |
commit | f2a66ba8d0c6dee4353b52160edb41bfd7c148e6 (patch) | |
tree | c57bdf29767e936d5c6b587f0657bd750f976b9f /lib/sbin/ThornGuide.pl | |
parent | 805952177569d090149ac4d8d0bca0f50d9a1530 (diff) |
should now include the cactus style file...
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3014 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/ThornGuide.pl')
-rw-r--r-- | lib/sbin/ThornGuide.pl | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/lib/sbin/ThornGuide.pl b/lib/sbin/ThornGuide.pl index 840151ad..7b2cb28a 100644 --- a/lib/sbin/ThornGuide.pl +++ b/lib/sbin/ThornGuide.pl @@ -45,6 +45,7 @@ $cctk_home .= '/' if (($cctk_home !~ /\/$/) && (defined $cctk_home)); # set up the sbin dir, tacking cctk_home on the front my $sbin_dir = "${cctk_home}lib/sbin"; +my $cactus_style_file = "${cctk_home}doc/latex/cactus"; ############## # REQUIRE(S) # ############## @@ -194,10 +195,10 @@ sub Read_New_Thorn_Doc if (/\\title\{(.*?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?.*?)\}/) { $title = $1; if ($title !~ /\w/) { close DOC; return 0;} } if (/\\author\{(.*?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?.*?)\}/) { $author = $1;} if (/\\date\{(.*?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?(?:.*?\{.*?[^\{].*?\}.*?)?.*?)\}/) { $date = $1; $date =~ s/.*Date:(.*?)\$\s*?\$/$1/; } - if (/% START CACTUS THORNGUIDE/) { + if (/^% START CACTUS THORNGUIDE/) { $start = 1; - while (($_ = <DOC>) && ($_ !~ /% END CACTUS THORNGUIDE/)) + while (($_ = <DOC>) && ($_ !~ /^% END CACTUS THORNGUIDE/)) { if (/(.*)\\begin\{abstract\}(.*)/) { $_ = "$1\\section\{Abstract\}$2"; @@ -474,24 +475,15 @@ sub Output_Top { print OUT <<EOC; -\\newif\\ifpdf -\\ifx\\pdfoutput\\undefined - \\pdffalse % we are not running PDFLaTeX -\\else - \\pdfoutput=1 % we are running PDFLaTeX - \\pdftrue -\\fi - \\documentclass{report} -\\usepackage{fancyhdr} +\\usepackage{$cactus_style_file} + +\\usepackage{fancyhdr} \\usepackage{minitoc} -\\usepackage{latexsym} -\\usepackage{amssymb} -\\usepackage{ifthen} -\\usepackage{calc} -\\usepackage{graphicx} + +\% mini table of contents stuff \\setlength{\\mtcindent}{24pt} \\renewcommand{\\mtcfont}{\\small\\rm} \\setcounter{minitocdepth}{2} @@ -506,42 +498,6 @@ print OUT <<EOC; \\addtolength{\\cftsubsecnumwidth}{0.5em} \\addtolength{\\cftsubsubsecnumwidth}{0.5em} -% macros -\\def\\text#1{{\\rm #1}} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\\parskip = 2 pt -\\oddsidemargin = 0 cm -\\textwidth = 16 cm -\\topmargin = -1 cm -\\textheight = 24 cm - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\\def\\q{\\bf QUERY: } -\\def\\t{\\tt \\obeylines } - -% MANPAGE like description setting for options, use as % \\begin{Lentry} -%\\item[text] text \\end{Lentry} \\usepackage{ifthen,calc} -\\newcommand{\\entrylabel}[1]{\\mbox{\\textsf{#1}}\\hfil} -\\newenvironment{entry} - {\\begin{list}{} - {\\renewcommand{\\makelabel}{\\entrylabel} - \\setlength{\\labelwidth}{90pt} - \\setlength{\\leftmargin}{\\labelwidth+\\labelsep} - } - } - {\\end{list}} \\newlength{\\Mylen} \\newcommand{\\Lentrylabel}[1]{% - \\settowidth{\\Mylen}{\\textsf{#1}}% - \\ifthenelse{\\lengthtest{\\Mylen > \\labelwidth}}% - {\\parbox[b]{\\labelwidth} % term > labelwidth - {\\makebox[0pt][l]{\\textsf{#1}}\\\\}} % - {\\textsf{#1}} % - \\hfil\\relax} \\newenvironment{Lentry} - {\\renewcommand{\\entrylabel}{\\Lentrylabel} - \\begin{entry}} - {\\end{entry}} - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Takes three arguments - the name of the document, the revision, and % the date. |