Document prefix dropped

I tried to add a document prefix to my plain text compile output, but it would not appear in the compiled text file. The same text worked fine as a document suffix. I eventually figured out that I could get it to appear if I restored some of the frontmatter, all of which I was omitting. (It wasn’t enough to pretend to include frontmatter and then omit all my frontmatter sections individually.)

The manual (p. 634) doesn’t mention such a restriction on using the document prefix, so I was wondering if it was a bug and might possibly get fixed.

Yes, that does indeed look like a bug to me. It doesn’t have to do with front matter specifically, as I was able to get it working properly with a very simple test at first (in fact I had to play around a bit to even get it to a point where what you describe happened):

  1. Created a new blank project.
  2. Typed in “word” into the starter document.
  3. Entered File ▸ Compile… and created a new Format.
  4. In the Text Layout pane, added a prefix of “{{” and a suffix of “}}”.
  5. Saved and compiled. The expected result in a .txt file is:
{{word}}

And that is what I got.

  1. Back in the binder, created a new document above the previous one and placed it at the top of the Draft folder.
  2. Ran a test compile with the following result:
word}}
  1. If I type in the word “final” into the empty first document and compile again, then I get as expected:

[code]{{final

word}}[/code]

Likewise, if the first item in the Draft folder is a folder that essentially does nothing (no headings, no printing of its text content, etc.), then I get the same result. The key seems to be an item at the top of the binder that does nothing. I suspect the front matter files you added did something, and hence they fulfilled the requirement incidentally.

Fixed for 3.0.4.

Thanks!