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
    convoluted.

    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.

    Fletcher

  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.

    F-

  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

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

Recent Discussions

11 Oct, 2018 02:59 AM
22 Apr, 2018 11:04 PM
13 Apr, 2018 10:58 PM
09 Apr, 2018 09:47 PM
09 Apr, 2018 04:28 PM

Recent Articles