Censor or redact text in MMD?

Chris Pettit's Avatar

Chris Pettit

28 Apr, 2014 04:29 PM

As far as I know, there is no way in MMD to censor or redact portions of text, whole figures, etc. In preparing lecture notes, I sometimes distribute redacted versions with space for students to fill in portions of the notes during class. Currently I do this brute force by redacting the PDF notes, which is fine as long as I don't change the underlying document, but terrible if I do make changes because I must then re-do the entire set of redactions after rendering the new version in PDF. This would be much easier if the required redaction operations were just markup commands that could be invoked conditionally when the document is rendered.

Any suggestions for how to do this?

  1. Support Staff 1 Posted by fletcher on 28 Apr, 2014 06:10 PM

    fletcher's Avatar

    I suppose you could create a system of transclusion files and use a
    metadata variable to set the filename prefix. But this sounds pretty

    title: Foo
    type: redacted

    This is a discussion of {{[%type]-part1.txt}}.

    Otherwise you could write a pre-processor that strips out your own
    markup (or replaces it with underscores, or whatever) before passing it
    to MMD.


  2. 2 Posted by Loco on 12 May, 2014 09:48 AM

    Loco's Avatar

    Your suggestion

    This is a discussion of {{[%type]-part1.txt}}

    does not work, cause resolution of transclude is done before that of metadata.

  3. Support Staff 3 Posted by fletcher on 12 May, 2014 07:12 PM

    fletcher's Avatar

    True enough. One would have to use a pre-processor script to substitute the [%type] with the actual metadata prior to parsing with MMD.


  4. fletcher closed this discussion on 12 May, 2014 07:12 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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

Recent Discussions

11 Jan, 2022 02:33 PM
23 Nov, 2021 07:46 PM
10 Jun, 2021 11:53 AM
10 Jun, 2021 01:15 AM
17 Dec, 2020 03:23 PM

Recent Articles