Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various issues in markdown and rst templates #4174

Merged
merged 3 commits into from
Sep 9, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 5, 2013

  • remove prompts from default output
  • add missing HTML block
  • remove double-wrapping of latex
  • use plain-markdown indentation for code blocks (could use GFM `` python`)
  • images didn't work in either one at all
  • markdown extracts output

closes #4024

candidate for backport to 1.1

- remote prompts from output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM '` ` `python')

closes ipython#4024

candidate for backport to 1.1
@minrk
Copy link
Member Author

minrk commented Sep 6, 2013

I guess nobody has ever actually tried to use rst or markdown output from nbconvert - they are all kinds of wrong. I will try to limit the scope of this PR before I get carried away, but I wouldn't recommend that anyone use 1.x for markdown or rst output ever.

@minrk
Copy link
Member Author

minrk commented Sep 6, 2013

This is no longer that minor. The markdown template assumed that output was extracted, but it wasn't. I went with turning on figure-extraction, but I can also do inline HTML images if people would prefer. @ellisonbg?

@ellisonbg
Copy link
Member

Hmm, I am not sure I have strong feelins either way. In the long run we
may need to make this configurable. I could imagine different usage cases
for these formats that would require each approach. For now I would do
whatever is simplest.

On Thu, Sep 5, 2013 at 6:32 PM, Min RK notifications@github.com wrote:

This is no longer that minor. The markdown template assumed that output
was extracted, but it wasn't. I went with turning on figure-extraction, but
I can also do inline HTML images if people would prefer. @ellisonbghttps://github.com/ellisonbg
?


Reply to this email directly or view it on GitHubhttps://github.com//pull/4174#issuecomment-23913638
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


def path2url(path):
"""Turn a file path into a URL"""
parts = os.path.split(path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think os.path.split() splits all parts of a path name, just directory name and basename. Should this be path.split(os.sep)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course. I always make this mistake, thanks.

@minrk
Copy link
Member Author

minrk commented Sep 6, 2013

Simplest is extracting files, which is what it does now. Making it configurable isn't difficult, and makes sense for both markdown and HTML, but we can look into that later.

use split-files for embedded images

add path2url
minrk added a commit that referenced this pull request Sep 9, 2013
various issues in markdown and rst templates

- remove prompts from default output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM ``` ` ` `python```)
- images didn't work in either one at all
- markdown extracts output

closes #4024
@minrk minrk merged commit 8c88aec into ipython:master Sep 9, 2013
minrk added a commit that referenced this pull request Sep 9, 2013
- remove prompts from default output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM ``` ` ` `python```)
- images didn't work in either one at all
- markdown extracts output

closes #4024

candidate for backport to 1.1
@minrk minrk deleted the markup-templates branch March 31, 2014 23:36
yarikoptic added a commit to yarikoptic/ipython that referenced this pull request May 2, 2014
* commit 'rel-1.1.0-3-gb8b89ca': (66 commits)
  Backport PR ipython#4209: Magic doc fixes
  Backport PR ipython#4204: remove some extraneous print statements from IPython.parallel
  back to dev
  release 1.1.0
  don't upload to GitHub in release script
  1.1 backport stats
  Backport PR ipython#4188: Allow user_ns trait to be None
  Backport PR ipython#4189: always fire LOCAL_IPS.extend(PUBLIC_IPS)
  Backport PR ipython#4174: various issues in markdown and rst templates
  Backport PR ipython#4181: nbconvert: Fix, sphinx template not removing new lines from headers
  Backport PR ipython#4043: don't 'restore_bytes' in from_JSON
  Backport PR ipython#4178: add missing data_javascript
  Backport PR ipython#4136: catch javascript errors in any output
  Backport PR ipython#4163: Fix for incorrect default encoding on Windows.
  Backport PR ipython#4171: add nbconvert config file when creating profiles
  Backport PR ipython#4159: don't split `.cell` and `div.cell` CSS
  Backport PR ipython#4158: generate choices for `--gui` configurable from real mapping
  Backport PR ipython#4143: update example custom.js
  Backport PR ipython#4144: help_end transformer shouldn't pick up ? in multiline string
  Backport PR ipython#4104: Add way to install MathJax to a particular profile
  ...
yarikoptic added a commit to yarikoptic/ipython that referenced this pull request May 2, 2014
* commit 'rel-1.1.0-7-gf5891e9': (70 commits)
  Backport PR ipython#4346: getpass() on Windows & Python 2 needs bytes prompt
  Backport PR ipython#4336: use simple replacement rather than string formatting in format_kernel_cmd
  Backport PR ipython#4316: underscore missing on notebook_p4
  Backport PR ipython#4257: fix unicode argv parsing
  Backport PR ipython#4209: Magic doc fixes
  Backport PR ipython#4204: remove some extraneous print statements from IPython.parallel
  back to dev
  release 1.1.0
  don't upload to GitHub in release script
  1.1 backport stats
  Backport PR ipython#4188: Allow user_ns trait to be None
  Backport PR ipython#4189: always fire LOCAL_IPS.extend(PUBLIC_IPS)
  Backport PR ipython#4174: various issues in markdown and rst templates
  Backport PR ipython#4181: nbconvert: Fix, sphinx template not removing new lines from headers
  Backport PR ipython#4043: don't 'restore_bytes' in from_JSON
  Backport PR ipython#4178: add missing data_javascript
  Backport PR ipython#4136: catch javascript errors in any output
  Backport PR ipython#4163: Fix for incorrect default encoding on Windows.
  Backport PR ipython#4171: add nbconvert config file when creating profiles
  Backport PR ipython#4159: don't split `.cell` and `div.cell` CSS
  ...
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
various issues in markdown and rst templates

- remove prompts from default output
- add missing HTML block
- remove double-wrapping of latex
- use plain-markdown indentation for code blocks (could use GFM ``` ` ` `python```)
- images didn't work in either one at all
- markdown extracts output

closes ipython#4024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nbconvert markdown issues
3 participants