Changeset 758

Show
Ignore:
Timestamp:
09/14/11 14:25:36 (8 months ago)
Author:
mgalloy
Message:

Adding MathJax? and ability to use LaTeX style mathematical equations to any comments.

Location:
trunk
Files:
547 added
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/CREDITS

    r707 r758  
    33from Françoise Pinsard, Joe Hood, Jim Pendleton, and Mark Piper. 
    44 
     5See the LICENSE file in the resources/mathjax directory for the MathJax  
     6license. 
    57 
    68The attach.png icon is part of Mark James' Silk icon set available at   
     
    1012It is used under a Creative Commons Attribution 2.5 License. 
    1113 
    12  
    1314The LaTeX class and style used are based on modifications to the Tufte-LaTeX 
    1415project copyright 2007-2008 Bil Kleb, Bill Wood, and Kevin Godby. This work is 
  • trunk/docs/idldoc-reference.rst

    r751 r758  
    7777                         files are not shown); the default is developer-level  
    7878                         docs showing files and parameters 
     79  `USE_LATEX`            set to use MathJax to automatically typeset any LaTeX 
     80                         style equations in comments 
    7981  `VERSION`              set to print out the version of IDLdoc 
    8082  ====================== ===================================================== 
  • trunk/RELEASE

    r752 r758  
    22============= 
    33 
    4 IDLdoc 3.3.2 
    5 ------------ 
     4IDLdoc 3.4 
     5---------- 
     6 
     7* Allow LaTeX equation formatting. 
    68 
    79* Fix for bug where links to routines, files, etc. in directory overview  
  • trunk/src/doc_system__define.pro

    r752 r758  
    8888    'statistics': return, self.statistics 
    8989    'index_level': return, self.indexLevel 
     90    'use_latex': return, self.useLatex 
    9091     
    9192    'preformat': return, self.preformat 
     
    12511252  file_copy, resourceLocation, resourceDestination, /recursive, /overwrite 
    12521253   
     1254  ; copy MathJax files 
     1255  if (self.useLatex) then begin 
     1256    mathjaxLocation = expand_path(filepath('mathjax', subdir=['resources'], $ 
     1257                                           root=self.sourceLocation)) 
     1258    mathjaxFiles = file_search(mathjaxLocation, '*.*') 
     1259    mathjaxRelFiles = strmid(mathjaxFiles, strlen(mathjaxLocation) + 1) 
     1260    mathjaxDestination = filepath(mathjaxRelFiles, $ 
     1261                                  subdir='mathjax', $ 
     1262                                  root=resourceDestination) 
     1263     
     1264    ; make subdirectories before copying                          
     1265    dirs = file_dirname(mathjaxDestination) 
     1266    dirs = dirs[uniq(dirs, sort(dirs))] 
     1267    file_mkdir, dirs 
     1268     
     1269    file_copy, mathjaxFiles, mathjaxDestination, /overwrite 
     1270  endif 
     1271   
    12531272  ; move the LaTeX files up a directory if needed 
    12541273  if (self.commentstyle eq 'latex') then begin 
     
    13611380;    log_file : in, optional, type=string 
    13621381;       if present, send messages to this filename instead of stdout 
     1382;    use_latex : in, optional, type=boolean 
     1383;       set to find and display LaTeX style math equations in comments 
    13631384;    embed : in, optional, type=boolean 
    13641385;       embed CSS stylesheet instead of linking to it (useful for documentation 
     
    14241445                           quiet=quiet, silent=silent, n_warnings=nWarnings, $ 
    14251446                           log_file=logFile, $ 
     1447                           use_latex=useLatex, $ 
    14261448                           assistant=assistant, embed=embed, overview=overview, $ 
    14271449                           footer=footer, title=title, subtitle=subtitle, $ 
     
    15411563    self.logLun = lun 
    15421564  endif 
    1543      
     1565   
     1566  self.useLatex = keyword_set(useLatex) 
     1567   
    15441568  self.templatePrefix = n_elements(templatePrefix) gt 0 ? templatePrefix : '' 
    15451569  self.templateLocation = n_elements(templateLocation) gt 0 ? templateLocation : '' 
     
    16791703;    embed 
    16801704;       set to embed CSS in the HTML output 
     1705;    useLatex 
     1706;       set to include MathJax for LaTeX equation rendering 
    16811707;    currentTemplate 
    16821708;       most recently asked for template 
     
    17431769             isTty: 0B, $ 
    17441770              
     1771             useLatex: 0B, $ 
     1772              
    17451773             templatePrefix: '', $ 
    17461774             templateLocation: '', $ 
  • trunk/src/idldoc.pro

    r614 r758  
    2929;    log_file : in, optional, type=string 
    3030;       if present, send messages to this filename instead of stdout 
     31;    use_latex : in, optional, type=boolean 
     32;       set to find and display LaTeX style math equations in comments 
    3133;    embed : in, optional, type=boolean 
    3234;       embed CSS stylesheet instead of linking to it (useful for documentation 
     
    104106            n_warnings=nWarnings, $ 
    105107            log_file=logFile, $ 
     108            use_latex=useLatex, $ 
    106109            assistant=assistant, $ 
    107110            embed=embed, $ 
     
    160163                   n_warnings=nWarnings, $ 
    161164                   log_file=logFile, $ 
     165                   use_latex=useLatex, $ 
    162166                   assistant=assistant, $ 
    163167                   embed=embed, $ 
  • trunk/src/templates/categories.tt

    r395 r758  
    99    <title>Categories ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/dlmfile.tt

    r618 r758  
    99    <title>[% basename %] ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/help.tt

    r690 r758  
    99    <title>Help ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/idldocfile.tt

    r666 r758  
    99    <title>[% file_title %] ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/overview.tt

    r739 r758  
    99    <title>[% title %]</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/profile.tt

    r675 r758  
    99    <title>[% basename %] ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/savefile.tt

    r361 r758  
    99    <title>[% basename %] ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/search.tt

    r421 r758  
    99    <title>Search ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all"> 
  • trunk/src/templates/warnings.tt

    r636 r758  
    99    <title>Warnings ([% title %])</title> 
    1010 
     11    [% IF use_latex %] 
     12      <script type="text/javascript" 
     13  src="[% relative_root %]idldoc-resources/mathjax/MathJax.js?config=default"> 
     14      </script> 
     15    [% END %] 
     16     
    1117    [% IF embed %] 
    1218    <style type="text/css" media="all">