MultiMarkdown 3.0b4 Released - Major Update

28 views
Skip to first unread message

flet...@fletcherpenney.net

unread,
Feb 14, 2011, 8:14:34 PM2/14/11
to

MultiMarkdown 3.0b4 Released - Major Update

02/14/2011 19:58:01

MultiMarkdown 3.0b4 is a major upgrade:

  • Found and fixed a step in the parser (under HeadingSection) that was slowing down the program on longer documents by orders of magnitude — thanks to Ioa for prompting the search. My 7000+ line test document takes approx 0.150 seconds to convert to XHTML with peg-markdown, and 0.290 seconds with peg-multimarkdown. By comparison, the perl version of MMD takes approximately 8.3 seconds. Running XSLT takes additional time, so the speed difference when converting to LaTeX would be even more pronounced! There may be additional speed benefits to be squeezed out of code optimization, but I’m not sure it’s worth the effort right now as these benefits would likely be minimal at this point.

  • John MacFarlane fixed a bug in list edge cases discovered by a MMD user — that fix is incorporated, as well as a speed-up in HTML processing per his release notes.

  • Metadata that is exported to LaTeX and includes “space-space-newline” as a marker for a line break is now processed so that things like multi-line addresses for letters are properly handled.

  • italics are now handled with \emph{} in LaTeX

  • memoir and “regular” latex modes now output the same logical division levels for h1, h2, etc. (i.e. part, chapter, section, subsection, subsubsection, paragraph, subparagraph), The subparagraph option for h7 will only appear when converting directly from MMD to LaTeX, since no <h7> exists in XHTML. beamer mode uses a different set of divisions.

  • The peg-multimarkdown source repository now includes the documentation wiki, the sample gallery, support files, and test suite as submodules. They can therefore be downloaded separately as well since they exist as their own repositories. The update_submodules shell script will update them all automatically (on Mac or *nix systems).

  • The LaTeX support files now include a functioning version of the manuscript setup so that you can create pdf’s using the “standard” novel manuscript format. This includes some examples of using LaTeX code to replace what used to be done with XSLT processing. My goal is that most of what was done using XSLT with MMD 2.0 can be done with pure LaTeX in MMD 3.0. Naturally, anyone who used XSLT to customize XHTML output will still need to use that approach.

  • The MultiMarkdown-Gallery (included as samples in the source repo) has been updated so that everything works with MMD 3.0. I have included the source text, the “correct” LaTeX output, and the “correct” PDF so that you can verify everything on your system is working appropriately.

  • Mac users can now install Platypus and use the make drop command to build drag and drop apps, or they can be downloaded from the downloads page. These will run multimarkdown -b or multimarkdown -t latex -b on files dropped on them. Similar approaches can be used to make other drag and drop apps as required.

I think I’m getting close to being able to finalize 3.0. Things left to be accomplished:

  • Finish updating User’s Guide for 3.0 (thanks to etherealmind for contributing to the wiki!)

  • Improve Windows installer (I have received a submission of a true installer that I need to test out, but should make things much better for Windows users — more to come!)

Things that likely won’t be included in 3.0, but may appear in the future:

  • I am considering using libxslt to build in support for XSLT processing to the binary. Not sure about this, versus just including the xsltproc binary in the installer for Windows users.

  • I have begun working on ODF support for MMD 3. It’s in very early stages, but the basics shouldn’t be too hard. For now, will need to use MMD 3 to create the content.xml file, and then you can zip the template directory to create an .odt file (which is a zipfile). I have a working minimalist template that is used, as well as a shell script that zips the folder for you into a file that can be opened in LibreOffice, OpenOffice, etc. This might be finished in time for 3.0, but if not I hope to have it ready fairly soon. This will likely become the official way to create an RTF file moving forward since OpenDocument can easily be converted.

https://github.com/fletcher/peg-multimarkdown/downloads/

http://fletcherpenney.net/2011/02/multimarkdown_3.0b4_released.html

Mike B

unread,
Feb 15, 2011, 9:02:03 PM2/15/11
to MultiMarkdown Discussion List

> I think I'm getting close to being able to finalize 3.0.

Great news. I was wondering if it might be possible to also refine
natbib processing with this release (I'm sorry but this is such a big
issue for a certain type of writing...) A wonderful thing about natbib
is that it gives you virtually all the control of the citation you
need with a very simple syntax, and it seems to me MMD is soo close to
it already. Here are possible MMD correlations (as I understand it) of
the basic natbib citation forms listed at http://merkel.zoneo.net/Latex/natbib.php:

\citet{jon90} --> Jones et al. (1990)
[;][#jon90]

\citet[chap. 2]{jon90} --> Jones et al. (1990, chap. 2)
[;chap. 2][#jon90]

\citep{jon90} --> (Jones et al., 1990)
[][#jon90]

\citep[chap. 2]{jon90} --> (Jones et al., 1990, chap. 2)
[chap. 2][#jon90]

\citep[see][]{jon90} --> (see Jones et al., 1990)
[see][][#jon90]

\citep[see][chap. 2]{jon90} --> (see Jones et al., 1990, chap. 2)
[see][chap.2][#jon90]

I'm happy to have a go at contributing to the code if someone can
point me to the right place (I love regular expressions ;))!

Cheers,
Mike

Fletcher T. Penney

unread,
Feb 15, 2011, 11:16:27 PM2/15/11
to Mike B, MultiMarkdown Discussion List
I'll have to think about this.

One thing I can say is that the [][][#] constructions below (three
sets of brackets) will NOT make it, as they do not follow Markdown/MMD
syntax.

It may be possible to do something inside the "locator" bracket....


Further thoughts?


F-

> --
> You received this message because you are subscribed to the Google Groups "MultiMarkdown Discussion List" group.
> To post to this group, send email to multim...@googlegroups.com.
> To unsubscribe from this group, send email to multimarkdow...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/multimarkdown?hl=en.
>
>

--
Fletcher T. Penney
fletche...@gmail.com

DaveG

unread,
Feb 16, 2011, 3:19:52 AM2/16/11
to MultiMarkdown Discussion List
Hi,

Neat to see the further improvements in MultiMarkdown.

It appears that the syntax

<div markdown="1">

[Text](url)

</div>

is not working as it did before where with the markdown="1" attribute,
the information inside tags was evaluated for markdown syntax.

Dave

On Feb 14, 7:14 pm, fletc...@fletcherpenney.net wrote:
> Title:  MultiMarkdown 3.0b4 Released - Major Update
> Date:   02/14/2011 19:58:01
> Tags:   MultiMarkdown
>
> MultiMarkdown 3.0b4 is a *major* upgrade:
>
> * Found and fixed a step in the parser (under HeadingSection) that was slowing
>   down the program on longer documents by orders of magnitude --- thanks to
>   Ioa for prompting the search. My 7000+ line test document takes approx 0.150
>   seconds to convert to XHTML with peg-markdown, and 0.290 seconds with
>   peg-multimarkdown. By comparison, the perl version of MMD takes
>   approximately 8.3 seconds. Running XSLT takes additional time, so the speed
>   difference when converting to LaTeX would be even more pronounced! There may
>   be additional speed benefits to be squeezed out of code optimization, but
>   I'm not sure it's worth the effort right now as these benefits would likely
>   be minimal at this point.
>
> * John MacFarlane fixed a bug in list edge cases discovered by a MMD user ---
>   that fix is incorporated, as well as a speed-up in HTML processing per his
>   release notes.
>
> * Metadata that is exported to LaTeX and includes "space-space-newline" as a
>   marker for a line break is now processed so that things like multi-line
>   addresses for letters are properly handled.
>
> * italics are now handled with `\emph{}` in LaTeX
>
> * `memoir` and "regular" `latex` modes now output the same logical division
>   levels for `h1`, `h2`, etc. (i.e. `part`, `chapter`, `section`,
>   `subsection`, `subsubsection`, `paragraph`, `subparagraph`), The
>   `subparagraph` option for `h7` will only appear when converting directly
>   from MMD to LaTeX, since no `<h7>` exists in XHTML. `beamer` mode uses a
>   different set of divisions.
>
> * The peg-multimarkdown source repository now includes the documentation wiki,
>   the sample gallery, support files, and test suite as submodules. They can
>   therefore be downloaded separately as well since they exist as their own
>   repositories. The `update_submodules` shell script will update them all
>   automatically (on Mac or *nix systems).
>
> * The LaTeX support files now include a functioning version of the
>   `manuscript` setup so that you can create pdf's using the "standard" novel
>   manuscript format. This includes some examples of using LaTeX code to
>   replace what used to be done with XSLT processing. My goal is that *most* of
>   what was done using XSLT with MMD 2.0 can be done with pure LaTeX in MMD
>   3.0. Naturally, anyone who used XSLT to customize XHTML output will still
>   need to use that approach.
>
> * The MultiMarkdown-Gallery (included as `samples` in the source repo) has
>   been updated so that everything works with MMD 3.0. I have included the
>   source text, the "correct" LaTeX output, and the "correct" PDF so that you
>   can verify everything on your system is working appropriately.
>
> * Mac users can now install [Platypus](http://www.sveinbjorn.org/platypus) and
>   use the `make drop` command to build drag and drop apps, or they can be
>   downloaded from the downloads page. These will run `multimarkdown -b` or
>   `multimarkdown -t latex -b` on files dropped on them. Similar approaches can
>   be used to make other drag and drop apps as required.
>
> I think I'm getting close to being able to finalize 3.0. Things left to be
> accomplished:
>
> * Finish updating User's Guide for 3.0 (thanks to etherealmind for
>   contributing to the wiki!)
>
> * Improve Windows installer (I have received a submission of a true installer
>   that I need to test out, but should make things *much* better for Windows
>   users --- more to come!)
>
> Things that likely *won't* be included in 3.0, but *may* appear in the future:
>
> * I am considering using `libxslt` to build in support for XSLT processing to
>   the binary. Not sure about this, versus just including the xsltproc binary
>   in the installer for Windows users.
>
> * I have begun working on ODF support for MMD 3. It's in *very* early stages,

DaveG

unread,
Feb 16, 2011, 4:05:19 AM2/16/11
to MultiMarkdown Discussion List
I have (now) found the

--process-html process MultiMarkdown inside of raw HTML

work around.

Dave

Sherwood Botsford

unread,
Feb 16, 2011, 8:37:11 AM2/16/11
to Mike B, MultiMarkdown Discussion List

Yuck.  More alphabet soup. 

I hope that MMD doesn't lose site of the key aspects of keeping it simple, readable.  MD was written originally to make writing web pages easy.  Fletcher added the capability to output other formats.  Doing that has stretched the syntax some.   I would like MMD to remain focused primarily on enabling the quick creation of web pages.  The other output options should focus on getting a reasonable print equivalent of that web page. 

(In the following TeX stands for ALL forms of TeX -- latex, bibtex, natlib,)

TeX allows incredible control of every aspect of typesetting.  But to do that requires lots of markup.  To me the difference between the proposed syntax and the natbib syntax is minimal.  It doesn't save much.  There's a raft of TeXs out there.  Supporting them all is a nightmare.

I'm not sure that MMD is the best tool to write TeX.  Perhaps a different tool is needed to write TeX to hide the markup.

The best solution for this IMHO is a spanning symbol set that tells Markdown, "Strip off the spanning symbols, and pass the contents through unchanged"  This allows people to easily write their own post processing code.  Somthing like

pass-
\citet[chap. 2]{jon90}  -pass


Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0




Jon

unread,
Feb 16, 2011, 9:42:18 AM2/16/11
to MultiMarkdown Discussion List
Fletcher, I'm excited about the possibility of odt support!!! Let me
know if you need additional testers!

-Jon Skovron

On Feb 14, 8:14 pm, fletc...@fletcherpenney.net wrote:
> Title:  MultiMarkdown 3.0b4 Released - Major Update
> Date:   02/14/2011 19:58:01
> Tags:   MultiMarkdown
>
> MultiMarkdown 3.0b4 is a *major* upgrade:
>
> * Found and fixed a step in the parser (under HeadingSection) that was slowing
>   down the program on longer documents by orders of magnitude --- thanks to
>   Ioa for prompting the search. My 7000+ line test document takes approx 0.150
>   seconds to convert to XHTML with peg-markdown, and 0.290 seconds with
>   peg-multimarkdown. By comparison, the perl version of MMD takes
>   approximately 8.3 seconds. Running XSLT takes additional time, so the speed
>   difference when converting to LaTeX would be even more pronounced! There may
>   be additional speed benefits to be squeezed out of code optimization, but
>   I'm not sure it's worth the effort right now as these benefits would likely
>   be minimal at this point.
>
> * John MacFarlane fixed a bug in list edge cases discovered by a MMD user ---
>   that fix is incorporated, as well as a speed-up in HTML processing per his
>   release notes.
>
> * Metadata that is exported to LaTeX and includes "space-space-newline" as a
>   marker for a line break is now processed so that things like multi-line
>   addresses for letters are properly handled.
>
> * italics are now handled with `\emph{}` in LaTeX
>
> * `memoir` and "regular" `latex` modes now output the same logical division
>   levels for `h1`, `h2`, etc. (i.e. `part`, `chapter`, `section`,
>   `subsection`, `subsubsection`, `paragraph`, `subparagraph`), The
>   `subparagraph` option for `h7` will only appear when converting directly
>   from MMD to LaTeX, since no `<h7>` exists in XHTML. `beamer` mode uses a
>   different set of divisions.
>
> * The peg-multimarkdown source repository now includes the documentation wiki,
>   the sample gallery, support files, and test suite as submodules. They can
>   therefore be downloaded separately as well since they exist as their own
>   repositories. The `update_submodules` shell script will update them all
>   automatically (on Mac or *nix systems).
>
> * The LaTeX support files now include a functioning version of the
>   `manuscript` setup so that you can create pdf's using the "standard" novel
>   manuscript format. This includes some examples of using LaTeX code to
>   replace what used to be done with XSLT processing. My goal is that *most* of
>   what was done using XSLT with MMD 2.0 can be done with pure LaTeX in MMD
>   3.0. Naturally, anyone who used XSLT to customize XHTML output will still
>   need to use that approach.
>
> * The MultiMarkdown-Gallery (included as `samples` in the source repo) has
>   been updated so that everything works with MMD 3.0. I have included the
>   source text, the "correct" LaTeX output, and the "correct" PDF so that you
>   can verify everything on your system is working appropriately.
>
> * Mac users can now install [Platypus](http://www.sveinbjorn.org/platypus) and
>   use the `make drop` command to build drag and drop apps, or they can be
>   downloaded from the downloads page. These will run `multimarkdown -b` or
>   `multimarkdown -t latex -b` on files dropped on them. Similar approaches can
>   be used to make other drag and drop apps as required.
>
> I think I'm getting close to being able to finalize 3.0. Things left to be
> accomplished:
>
> * Finish updating User's Guide for 3.0 (thanks to etherealmind for
>   contributing to the wiki!)
>
> * Improve Windows installer (I have received a submission of a true installer
>   that I need to test out, but should make things *much* better for Windows
>   users --- more to come!)
>
> Things that likely *won't* be included in 3.0, but *may* appear in the future:
>
> * I am considering using `libxslt` to build in support for XSLT processing to
>   the binary. Not sure about this, versus just including the xsltproc binary
>   in the installer for Windows users.
>
> * I have begun working on ODF support for MMD 3. It's in *very* early stages,

Mike B

unread,
Feb 16, 2011, 12:37:11 PM2/16/11
to MultiMarkdown Discussion List
I agree that there are too many TeXs out there for one MMD to rule
them all. But I think there is something to be said for attempting to
support TeX efforts which are designed to serve as 'umbrella'
standards, unifying much of what was formerly patchwork and disparate.
The memoir class is one instance of this, and natbib is another.

I also agree that there is no great saving in this case of MMD over
raw LaTeX, and it is inevitable that LaTeX markup will find it's way
in to moderately complex documents. But still, more markdown is good.
And in the MD system, the most common commands are marked-down the
most, and so the savings are greater than it might seem when comparing
all the possible cases.

I don't think there's a problem with saying there is a deeper and less
simple level of markdown for those who choose to go there, and which
most people can happily ignore. Or in saying that there is a kind of
superset of MMD, think of it as MMDTeX, that TeX users might be
interested in, as long as the conventions adopted there don't
compromise the base functionality.

I take the point about [][][].

So if anyone is still interested, here is a possible strategy. We
assume \citep is the default, and thus most marked-down.

\citep{jon90} --> (Jones et al., 1990)
[][#jon90]

We use two different separators [:] and [;] inside the locator for the
\citep and\citet cases (the first is synonymous with the above and
included for completeness)

\citep{jon90} --> (Jones et al., 1990)
[:][#jon90]

\citet{jon90} --> Jones et al. (1990)
[;][#jon90]

We then use the two positions in the locator in exactly the same way
that natbib uses the two positions in the prefixed []'s (shown
explicitly here, although natbib supports suppression of most empty
[]).

\citet[][chap. 2]{jon90} --> Jones et al. (1990, chap. 2)
[;chap. 2][#jon90]

\citep[][chap. 2]{jon90} --> (Jones et al., 1990, chap.
2)
[:chap. 2][#jon90]

\citep[see][]{jon90} --> (see Jones et al., 1990)
[see:][#jon90]

\citep[see][chap. 2]{jon90} --> (see Jones et al., 1990, chap.
2)
[see:chap. 2][#jon90]

I'm agnostic on the choice of separators, just couldn't think of
anything cuter.

Cheers,
Mike

Fletcher T. Penney

unread,
Feb 16, 2011, 2:33:32 PM2/16/11
to DaveG, MultiMarkdown Discussion List
Due to the way MMD 3 parses things, to change this would be a bigger
deal right now than I am interested in changing.

Perhaps for version 3.5, but no promises.

For now the --process-html option you mention in your next post is the
way to go.

F-

> --
> You received this message because you are subscribed to the Google Groups "MultiMarkdown Discussion List" group.
> To post to this group, send email to multim...@googlegroups.com.
> To unsubscribe from this group, send email to multimarkdow...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/multimarkdown?hl=en.
>
>

--
Fletcher T. Penney
fletche...@gmail.com

Fletcher T. Penney

unread,
Feb 16, 2011, 2:44:50 PM2/16/11
to Sherwood Botsford, Mike B, MultiMarkdown Discussion List
MMD's focus has always been and will always be to allow 80% of users
to create 80% of their documents. The focus as far as output formats
is XHTML and LaTeX. With the XSLT approach, almost any text/XML based
format can be created if someone is interested in putting in the
effort. But the focus will be on those elements that tend to be
common across document formats.

That said, there are a few things that are used commonly in writing
that aren't directly included in XHTML (e.g. footnotes). The goal
here is to have a simple, easy to write, easy to read syntax that fits
most situations.

I might be able to tweak the citation parsing to handle some of these
situations, and file them in an "advanced" section of the manual where
they are hidden from most users who can ignore it.


On Wed, Feb 16, 2011 at 8:37 AM, Sherwood Botsford <sgbot...@gmail.com> wrote:
>
> Yuck.  More alphabet soup.
>
> I hope that MMD doesn't lose site of the key aspects of keeping it simple,
> readable.  MD was written originally to make writing web pages easy.
> Fletcher added the capability to output other formats.  Doing that has
> stretched the syntax some.   I would like MMD to remain focused primarily on
> enabling the quick creation of web pages.  The other output options should
> focus on getting a reasonable print equivalent of that web page.
>
> (In the following TeX stands for ALL forms of TeX -- latex, bibtex, natlib,)
>
> TeX allows incredible control of every aspect of typesetting.  But to do
> that requires lots of markup.  To me the difference between the proposed
> syntax and the natbib syntax is minimal.  It doesn't save much.  There's a
> raft of TeXs out there.  Supporting them all is a nightmare.
>
> I'm not sure that MMD is the best tool to write TeX.  Perhaps a different
> tool is needed to write TeX to hide the markup.

I think MMD *is* the best tool to write with, knowing that it will
convert your writing into TeX markup, provided you're happy with
relying on the "default" behavior. If you want a lot of fine grained
control over the output, then I agree - you will probably be happier
with hand crafted TeX/LaTeX. For me, however, I want to focus on the
writing and be able to ignore the LaTeX markup behind the scenes.
Even using default behavior, LaTeX generates better output than
anything else the vast majority of the time, IMHO.

> The best solution for this IMHO is a spanning symbol set that tells
> Markdown, "Strip off the spanning symbols, and pass the contents through
> unchanged"  This allows people to easily write their own post processing
> code.  Somthing like
>
> pass- \citet[chap. 2]{jon90}  -pass

You mean like the <!-- foo --> syntax that's been around for quite a
while? :)


My goal is to streamline MMD as much as possible, not complicate it
further. I decline many more feature requests than I implement, and I
don't expect that to change.

F-

Fletcher T. Penney

unread,
Feb 16, 2011, 2:52:27 PM2/16/11
to Jon, MultiMarkdown Discussion List
Anyone is welcome to test it out - the opendoc branch in the github
repo is kept up to date with latest changes (you have to compile
yourself though).

What I'll need even more than testers, though, is feedback from anyone
familiar with the OpenDocument XML format to give some pointers.
Particularly ideas on including images and math equations....


F-

Reply all
Reply to author
Forward
0 new messages