minor adjustments to markdown / rst templates

- 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 #4024

candidate for backport to 1.1
fix markdown images

use split-files for embedded images

add path2url
fix jpg/jpeg type in sphinx