Permalink
Browse files

Hack to get the correct article in front of affiliations

  • Loading branch information...
1 parent 9d29cfb commit e4ca2247392b1c2b9970b889ec581900618e8671 @jarrodmillman jarrodmillman committed Feb 23, 2012
Showing with 50 additions and 2 deletions.
  1. +45 −0 publisher/_static/institutions.json
  2. +1 −0 publisher/conf.py
  3. +2 −0 publisher/options.py
  4. +2 −2 publisher/writer/__init__.py
@@ -0,0 +1,45 @@
+{
+
+ "American University": "the",
+ "Argonne National Labs": "the",
+ "AQR Capital Management, LLC": "",
+ "Berea College": "",
+ "Brigham Young University": "",
+ "California Institute of Technology": "the",
+ "CIRANO, University of North Carolina Chapel Hill": "",
+ "Colorado State University": "",
+ "Computer Sciences Corporation, Space Telescope Science Institute": "the",
+ "Duke University": "",
+ "Gemini Observatory": "the",
+ "Google": "",
+ "IIT Bombay": "",
+ "Institute for Advanced Simulation": "the",
+ "Intel": "",
+ "Intellovations, LLC": "",
+ "King Abdullah University of Science and Technology": "",
+ "Los Alamos National Laboratory": "the",
+ "MIT": "",
+ "MIT Media Lab": "the",
+ "Muricoca Labs": "",
+ "NOAA/NESDIS/STAR": "",
+ "Pacific Northwest National Laboratory": "the",
+ "Princeton University": "",
+ "Smithsonian Astrophysical Observatory": "the",
+ "Space Telescope Science Institute": "the",
+ "Stellenbosch University": "the",
+ "Texas Water Development Board": "the",
+ "University of Texas at Austin": "the",
+ "University of California, Berkeley": "the",
+ "University of Edinburgh": "the",
+ "University of Illinois at Chicago": "the",
+ "University of Memphis - Institute For Intelligent Systems": "the",
+ "Université de Montréal": "the",
+ "University of North Carolina, Chapel Hill": "the",
+ "University of Applied Sciences Ravensburg-Weingarten": "the",
+ "University of South Florida": "the",
+ "University of Washington": "the",
+ "Vision Spreadsheet": "",
+ "Washington State University": ""
+
+}
+
View
@@ -8,6 +8,7 @@
static_dir = os.path.join(work_dir,'_static')
css_file = os.path.join(static_dir,'scipy-proc.css')
toc_list = os.path.join(static_dir,'toc.txt')
+inst_conf = os.path.join(static_dir,'institutions.json')
build_dir = os.path.join(work_dir,'_build')
pdf_dir = os.path.join(build_dir, 'pdfs')
html_dir = os.path.join(build_dir, 'html')
View
@@ -11,6 +11,7 @@
import conf
toc_conf = conf.toc_conf
proc_conf = conf.proc_conf
+inst_conf = conf.inst_conf
def get_config():
config = cfg2dict(proc_conf)
@@ -39,3 +40,4 @@ def mkdir_p(dir):
os.makedirs(dir)
options = cfg2dict(proc_conf)
+inst_table = cfg2dict(inst_conf)
@@ -10,7 +10,7 @@
from rstmath import mathEnv
import code_block
-from options import options
+from options import options, inst_table
PreambleCmds.float_settings = '''
\\usepackage[font={small,it},labelfont=bf]{caption}
@@ -91,7 +91,7 @@ def depart_document(self, node):
else:
auths = ', '.join(authlist[:-1] + ['and ' + authlist[-1],])
verb= ' is ' if len(authlist)==1 else ' are '
- compsocthanks += auths+verb+'with the '+inst+'. '
+ compsocthanks += auths+verb+'with '+ inst_table[inst] +' '+inst+'. '
@tsbertalan

tsbertalan Jun 6, 2012

To render the sample document, I had to comment out line 94, where the authors' institutions were generated.

@stefanv

stefanv via email Jun 7, 2012

Owner
copyright_holder = self.author_names[0] + ('.' if len(self.author_names) == 1 else ' et al.')
author_notes = r'''E-mail: \protect\href{%s}{%s}.

0 comments on commit e4ca224

Please sign in to comment.