tag:support.fletcherpenney.net,2013-02-12:/discussions/questions/1390-file-transclusion-and-hierarchy-of-header-levelsMultiMarkdown: Discussion 2016-03-02T02:51:39Ztag:support.fletcherpenney.net,2013-02-12:Comment/384120532015-11-10T13:40:54Z2015-11-10T13:40:54ZFile Transclusion and Hierarchy of Header Levels<div><p>The best example of file transclusion, and many of the tricks
you can<br>
do, is the MultiMarkdown User's Guide:</p>
<p><a href="http://fletcher.github.io/MultiMarkdown-4/">http://fletcher.github.io/MultiMarkdown-4/</a></p>
<p>The source is on github as well:</p>
<p><a href="https://github.com/fletcher/MultiMarkdown-4/tree/gh-pages">https://github.com/fletcher/MultiMarkdown-4/tree/gh-pages</a></p>
<p>The guide is built using one of several master documents, with
chapter<br>
documents, and separate documents for each section.</p>
<p>If you use the <code>make pdf</code> command on your computer in
this directory,<br>
you can get separate files for each section, each chapter, and a
single<br>
document for the entire guide, each with appropriate header
levels.</p>
<p>Metadata is used to modify header levels correctly based on
use.</p>
<p>Studying the guide is the best way to understand some of the
ways to use<br>
transclusion.</p>
<p>F-</p></div>fletchertag:support.fletcherpenney.net,2013-02-12:Comment/384120532015-11-11T04:55:51Z2015-12-24T04:21:20ZFile Transclusion and Hierarchy of Header Levels<div><p>Thanks. I downloaded them. One thing I found over there is that
the chapter "MultiMarkdown User’s Guide" is the same level
and the others like "Introduction". But what I want to do is to
have the files transcluded to have titles under the main
chapter.</p>
<p>I played with the header level before, although I used LaTeX
Header Level rather than Base Header Level. But it seems it can't
do what I want to do.</p>
<p>Thanks.</p></div>Kolentag:support.fletcherpenney.net,2013-02-12:Comment/384120532015-11-11T13:58:18Z2015-11-11T13:58:18ZFile Transclusion and Hierarchy of Header Levels<div><p>Look again. Many of the files are under their parent files (e.g.
the<br>
Syntax chapter).</p>
<p>What you want to do is possible. You just have to decide how you
want<br>
things to work, and figure out what header levels to use in the<br>
individual documents, and what base header level to use in the
various<br>
metadata.</p>
<p>Also, don't forget that base header level can be negative:</p>
<p><a href="http://fletcher.github.io/MultiMarkdown-4/metadata.html#baseheaderlevel">
http://fletcher.github.io/MultiMarkdown-4/metadata.html#baseheaderl...</a></p>
<p>And in the worst case scenario, simply start by using the actual
header<br>
levels you want everything to have, and no base header levels.
That<br>
gives you absolute control, but no flexibility. It might be an
easier<br>
place to start if you're having trouble though.</p>
<p>F-</p></div>fletchertag:support.fletcherpenney.net,2013-02-12:Comment/384120532015-12-23T05:47:30Z2015-12-24T04:21:20ZFile Transclusion and Hierarchy of Header Levels<div><p>I go back and study the MMD User Guide again. And I see how it
is done finally: each individual file to be transcluded actually
only have 1 single heading 1, all others are of heading 2. So if I
am to compile each individual file into a LaTeX and then PDF, each
file will only have 1 single chapter.</p>
<p>What I was thinking is a bit different:</p>
<ol>
<li>Each individual file are an "article", using LaTeX Header Level
2, there are multiple heading 1 in the file, each corresponds to a
chapter.<br></li>
<li>The Master file (like the <code>MMD_Users_Guide.md</code>) are
going to be a "memoir", using LaTeX Header Level 1, each files
included by <code>{{....md}}</code> should be under a new heading 1
that wasn't in the original md file, corresponds to different parts
in the LaTeX file, and each heading 1 in the individual md file
will becomes chapters in the transcluded file, having heading 2.
i.e. the transcluded file should have their heading levels
shifted.</li>
</ol>
<p>With the current file transclusion method like the MMD User
Guide used, each individual file has to becomes a "memoir", not
article, and each will have a single "part".</p>
<p>Is <code>mmd_merge</code> providing the functionality I am
looking for? Is it deprecated?</p>
<p>I think using the current tools with file transclusion, I should
create the individual files starting with heading level 2, and
choose base header level as 1 instead, to provide a proper LaTeX
article while transcluded to a proper memoir. Will there be any
problems if the md files do not have any heading 1 but start from
heading 2? e.g. will MMD Composer render it correctly, including
when using the ToC Panel?</p></div>Kolentag:support.fletcherpenney.net,2013-02-12:Comment/384120532015-12-23T19:22:05Z2015-12-23T19:22:05ZFile Transclusion and Hierarchy of Header Levels<div><p>mmd_merge is a perl script. It's separate from MMD and can be
used.</p>
<p>But the transclusion feature is more powerful I would recommend
using that.</p>
<p>Your files can start with whatever level you like, and Composer
will be<br>
fine.</p>
<p>F-</p></div>fletcher