Closed GoogleCodeExporter closed 8 years ago
In fact, something even cooler (and might be implemented later) is a more
generalized version of this.
In some (very human-readable) way, be able to specify custom "elements," such
as
comments, images, diagrams, graphs, etc., and be able to specify how these
shuold be
processed by external programs.
This is also a reaction to issue 17 (http://code.google.com/p/pandoc/issues/
detail?id=17&can=1), where it was suggested that some delimeter. This unified
approach could solve both problems (and so many more!). This is somewhat akin
to
what AsciiDoc already provides, but the syntax there is much more atrocious,
and
flies in the face of the markdown/pandoc philosophy of readable source.
I'm thinking: both custom blocks and custom spans can be supported, as so:
[Comment: This is a comment, which will not be rendered.]
--- Comment ----------------------------------------
This is a comment, which will not be rendered.
----------------------------------------------------
--- Diagram ----------------------------------------
+------------------------+
| "Diagram" elements: |
| this will be |
| processed by ditaa |
+------------------------+
----------------------------------------------------
--- Graph ------------------------------------------
# "Graph" elements are processed by gnuplot
1 0
2 1
3 1
4 2
5 3
6 5
7 8
8 13
9 21
----------------------------------------------------
Original comment by yaa...@gmail.com
on 26 Jul 2007 at 5:54
Note that you can already make hidden comments using inline HTML:
<!-- This is a comment -->
They won't show up in rendered HTML, and they won't show up at
all in LaTeX or RTF output.
Interesting idea about the custom blocks; the problem is that
supporting these in all of the output formats is nontrivial!
So for now, it's not a high priority.
Original comment by fiddloso...@gmail.com
on 26 Jul 2007 at 6:54
Oh, I wasn't advocating that you actually produce all of these handlers, but it
would be awesome if Pandoc eventually had the framework for such extensibility,
so
that users (like myself) could add in custom handlers for things like Diagram,
Graph, etc.
But I agree this should be low priority.
Original comment by yaa...@gmail.com
on 18 Sep 2007 at 7:27
You could use the new delimited code blocks to do
what you want to do here:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { .diagram }
+--------+ +-------+ +-------+
| | --+ ditaa +--> | |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
+-------------------------+
And then run it through a postprocessor that finds
XXX
blocks and
replaces them with the result of running ditaa on XXX.
This could be done easily using something like ruby's
hpricot library, or Haskell's HXT or TagSoup.
```
Original comment by `fiddloso...@gmail.com` on 15 Mar 2008 at 6:05
``` Original comment by fiddloso...@gmail.com
on 11 Jul 2008 at 12:21
Original issue reported on code.google.com by
yaa...@gmail.com
on 26 Jul 2007 at 5:42