Show More
@@ -19,6 +19,10 b' From the command line:' | |||
|
19 | 19 | |
|
20 | 20 | $ python -m IPython.external.mathjax |
|
21 | 21 | |
|
22 | To a specific profile: | |
|
23 | ||
|
24 | $ python -m IPython.external.mathjax --profile=research | |
|
25 | ||
|
22 | 26 | To install MathJax from a file you have already downloaded: |
|
23 | 27 | |
|
24 | 28 | $ python -m IPython.external.mathjax mathjax-xxx.tar.gz |
@@ -200,20 +204,26 b' def main() :' | |||
|
200 | 204 | ) |
|
201 | 205 | |
|
202 | 206 | parser.add_argument( |
|
207 | '-p', | |
|
208 | '--profile', | |
|
209 | default='default', | |
|
210 | help='profile to install MathJax to (default is default)') | |
|
211 | ||
|
212 | parser.add_argument( | |
|
203 | 213 | '-i', |
|
204 | 214 | '--install-dir', |
|
205 | default=default_dest, | |
|
206 | help='installation directory (by default : %s)' % (default_dest)) | |
|
215 | help='custom installation directory') | |
|
216 | ||
|
207 | 217 | parser.add_argument( |
|
208 | 218 | '-d', |
|
209 | 219 | '--dest', |
|
210 | 220 | action='store_true', |
|
211 |
help='print where |
|
|
221 | help='print where current mathjax would be installed and exit') | |
|
212 | 222 | parser.add_argument( |
|
213 | 223 | '-r', |
|
214 | 224 | '--replace', |
|
215 | 225 | action='store_true', |
|
216 | help='Wether to replace current mathjax if already exist') | |
|
226 | help='Whether to replace current mathjax if it already exists') | |
|
217 | 227 | parser.add_argument( |
|
218 | 228 | '-t', |
|
219 | 229 | '--test', |
@@ -225,7 +235,13 b' def main() :' | |||
|
225 | 235 | |
|
226 | 236 | pargs = parser.parse_args() |
|
227 | 237 | |
|
228 |
|
|
|
238 | if pargs.install_dir: | |
|
239 | # Explicit install_dir overrides profile | |
|
240 | dest = pargs.install_dir | |
|
241 | else: | |
|
242 | profile = pargs.profile | |
|
243 | dest = os.path.join(locate_profile(profile), 'static', 'mathjax') | |
|
244 | ||
|
229 | 245 | if pargs.dest : |
|
230 | 246 | print dest |
|
231 | 247 | return |
General Comments 0
You need to be logged in to leave comments.
Login now