File transclusion
I installed MMD v. 4.5 and MMD Composer v. 2.6.8. File transclusion works perfectly when I export to HTML from the command line. However, it seems that this new feature is not still implemented in MMD Composer. Is this so? Are there plans to release a new version of Composer with full support for file transclusion?
I have tried to get it through the advanced Preferences panel.
In the Custom HTML export field, I type mmd $1, where
$1 means the file being currently being edited.
However, this does not work.
How can I get file transclusion from within MMD Composer?
Finally, just a suggestion for MMD Composer. When I select
File > Export, the default option in the dropdown
menu for File Format is Multimarkdown Text Document. I
think however that, most times, users want HTML
Document, so they have to explicitly select it. It would be
nice if HTML Document were the default option.
Thanks in advance for your attention.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Fletcher on 26 Feb, 2014 04:20 PM
Thanks for writing in!
See below.
Support Staff 2 Posted by Fletcher on 26 Feb, 2014 09:31 PM
Trying again...
See below.
Support Staff 3 Posted by Fletcher on 26 Feb, 2014 09:32 PM
And again...
See below.
> I installed MMD v. 4.5 and MMD Composer v. 2.6.8. File transclusion
> works perfectly when I export to HTML from the command line. However, it
> seems that this new feature is not still implemented in MMD Composer. Is
> this so? Are there plans to release a new version of Composer with full
> support for file transclusion?
Transclusion will be tricky to implement in Composer, depending on what
you want:
* Sandboxing limits the ability to open arbitrary files without user
interaction (similar to including local images in the preview).
* File transclusion can work differently for different export formats
(e.g. wildcard extensions)
* Transclusion is likely to be used with bigger projects (e.g. books).
Including all files in the preview pane with each keystroke will get
processor intensive.
* Certain export formats (e.g. PDF) rely on the preview pane to generate
the preview.
The current support for file transclusion that I plan to release in the
next update is similar to the mmd_merge support. Basically you work on
your files separately, and when you are ready to export you use a menu
command to transclude everything to a new document. You can then export
the complete document to any format you want.
While it seems "sexy" to automatically transclude everything behind the
scenes, and automatically update the preview when linked files change,
I'm not sure that this is the best idea (particularly for an App Store app).
That's the long answer. Short version is next release will have support
for transclusion.
> I have tried to get it through the advanced Preferences panel. In the
> Custom HTML export field, I type |mmd $1|, where |$1| means the file
> being currently being edited. However, this does not work.
>
> How can I get file transclusion from within MMD Composer?
The `$1` syntax is for shell processors like bash, tcsh, etc. In this
case, there isn't a file that is being processed -- just the text of the
frontmost window. All you put here is a path to the mmd binary, usually
`/usr/local/bin/multimarkdown`.
But if you're using the MAS version, sandboxing permissions *might*
still bite you. Don't get too creative with linking to files all over
your computer. Put them all together and you should be ok.
> Finally, just a suggestion for MMD Composer. When I select |File >
> Export|, the default option in the dropdown menu for File Format is
> |Multimarkdown Text Document|. I think however that, most times, users
> want |HTML Document|, so they have to explicitly select it. It would be
> nice if |HTML Document| were the default option.
I agree it would be nice. I'd even like to just remember what the user
did last time. Too bad Apple doesn't allow that (that I've been able to
find). Rewriting the code to handle that GUI, especially in the context
of sandboxing, is a low priority given the "bang for the buck." The
time it would take me to do that is better spent on other more
interesting features (file transclusion, for example). Hopefully Apple
will improve what's allowed when trying to customize the dialog to allow
this, so we can all benefit.
Thanks for your thoughts and comments!
Fletcher
Support Staff 4 Posted by Fletcher on 01 Mar, 2014 06:23 PM
Just an update.... I dug around some more and found a way to restore the last used export type in the dialog. I think.
It's a bit of a hack in a sense, since Apple doesn't provide a way to do this. But basically I just reorder the types and put the desired one first. I can't guarantee that first always means default. But it seems to work when dealing with a file that has already been saved. If the file is unsaved, it seems to default to MultiMarkdown Text file, I guess assuming you want to save a native copy first.
Fletcher
Fletcher closed this discussion on 01 Mar, 2014 06:41 PM.