##// END OF EJS Templates
Finished nbconvert section
David P. Sanders -
Show More
@@ -12,8 +12,8 b' The IPython Notebook extends the previous text-console-based approach, and the l'
12 :ref:`Installation requirements <installnotebook>` for the Notebook.
12 :ref:`Installation requirements <installnotebook>` for the Notebook.
13
13
14
14
15 Introduction
15 Basic structure
16 ------------
16 ---------------
17
17
18 The IPython Notebook combines two components:
18 The IPython Notebook combines two components:
19
19
@@ -302,9 +302,9 b' The default output format is HTML, for which the `--format`` modifier is not req'
302
302
303 Otherwise, the following `FORMAT`
303 Otherwise, the following `FORMAT`
304
304
305 where ``FORMAT`` is the desired export format. The currently export format options available are the following.
305 where ``FORMAT`` is the desired export format. The currently export format options available are the following:
306
306
307 * HTML output formats:
307 * HTML:
308
308
309 - ``full_html``:
309 - ``full_html``:
310 Standard HTML
310 Standard HTML
@@ -315,41 +315,56 b' where ``FORMAT`` is the desired export format. The currently export format optio'
315 - ``reveal``:
315 - ``reveal``:
316 HTML slideshow presentation for use with the ``reveal.js`` package
316 HTML slideshow presentation for use with the ``reveal.js`` package
317
317
318 * PDF:
318
319
320 - ``sphinx_howto``:
321 The format for Sphinx HOWTOs; similar to `article` in LaTeX
319
322
320 * ``sphinx_howto``:
323 - ``sphinx_manual``:
321 The format for Sphinx HOWTOs; similar to an `article` in LaTeX
324 The format for Sphinx manuals; similar to `book` in LaTeX
322
325
323 * ``sphinxP
326 - ``latex``:
327 LaTeX article
324
328
325 * ``latex``:
329 * Markup:
326 Produces LaTeX output which may be compiled with ``pdflatex`` to PDF.
327
330
328 The simplest way to use nbconvert is
331 - ``rst``:
329
332 reStructuredText
330 > ipython nbconvert mynotebook.ipynb
333
331
334 - ``markdown``:
332 which will convert mynotebook.ipynb to the default format (probably HTML).
335 Markdown
333
336
334 You can specify the export format with `--format`.
337 * Python:
335 Options include ['basic_html', 'full_html', 'latex', 'markdown', 'python', 'reveal', 'rst', 'sphinx_howto', 'sphinx_manual']
338
336
339 Produces a standard ``.py`` script, with the non-Python code commented out.
337 > ipython nbconvert --format latex mynotebook.ipnynb
338
339 You can also pipe the output to stdout, rather than a file
340
340
341 > ipython nbconvert mynotebook.ipynb --stdout
341 The output files are currently placed in a new subdirectory called
342 ``nbconvert_build``.
343
344 The PDF options produce a root LaTeX `.tex` file with the same name as the notebook, as well as individual files for each figure, and `.text` files with textual output from running code cells; all of these files are located together in the `nbconvert_build` subdirectory.
345
346 To actually produce the final PDF file, simply run::
347
348 $ pdflatex notebook
349
350 which produces `notebook.pdf`, also inside the `nbconvert_build` subdirectory.
351
352 Alternatively, the output may be piped to standard output `stdout` with::
342
353
343 Multiple notebooks can be given at the command line in a couple of
354 $ ipython nbconvert mynotebook.ipynb --stdout
344 different ways:
345
355
346 > ipython nbconvert notebook*.ipynb
356 Multiple notebooks can be specified at the command line in a couple of
347 > ipython nbconvert notebook1.ipynb notebook2.ipynb
357 different ways::
348
358
349 or you can specify the notebooks list in a config file, containing::
359 $ ipython nbconvert notebook*.ipynb
360 $ ipython nbconvert notebook1.ipynb notebook2.ipynb
350
361
351 c.NbConvertApp.notebooks = ["my_notebook.ipynb"]
362 or via a list in a configuration file, containing::
352
363
364 c.NbConvertApp.notebooks = ["notebook1.ipynb", "notebook2.ipynb"]
365
366 and using the command::
367
353 > ipython nbconvert --config mycfg.py
368 > ipython nbconvert --config mycfg.py
354
369
355
370
@@ -361,7 +376,9 b' To see a list of available options enter::'
361 $ ipython notebook --help
376 $ ipython notebook --help
362
377
363 Defaults for these options can also be set by creating a file named
378 Defaults for these options can also be set by creating a file named
364 ``ipython_notebook_config.py`` in your IPython *profile folder*. The profile folder is a subfolder of your IPython directory; ``ipython locate`` will show you where it is located.
379 `ipython_notebook_config.py`` in your IPython *profile folder*. The profile folder is a subfolder of your IPython directory; to find out where it is located, run::
380
381 $ ipython locate
365
382
366 To create a new set of default configuration files, with lots of information on available options, use::
383 To create a new set of default configuration files, with lots of information on available options, use::
367
384
General Comments 0
You need to be logged in to leave comments. Login now