Frequently Asked Questions
Contents:
- Relative paths in included files
- Syntax highlighting on large documents
- Intra-document links in exported PDFs
- Custom processor permissions in MAS version
- A URL won’t validate or returns “unknown”
- License has already been utilized
- Preview Not Updating
- Overall Performance
- Using Javascript in Marked
- Additional Help
Relative paths in included files
Files included using Marked’s include syntax, as well as Scrivener files, can use relative paths to reference other files. (Note: this doesn’t apply to files included using IA Writer’s /file
syntax or CSV files). As of recent versions (2.5.10+), these paths are relative to the included file, not the base file.
Given a file/folder structure like this:
- base_file.md
- subfolder
- included_file.md
- images
- image1.jpg
If included_file.md
references image1.jpg via a relative path, it needs to be written as ../images/image1.jpg
, not images/image1.jpg
. (..
indicates the parent directory) .
Syntax highlighting on large documents
Marked’s syntax highlighting is done via JavaScript, and while care has been taken to slice the operation up and prevent blocking the interface entirely, each code block needs to be handled individually, and processing a large number of code blocks can cause a significant delay in loading time as well as a CPU spike. If you’re working on a long document with dozens of highlighted code blocks, it’s wise to disable syntax highlighting until you’re ready to export.
Intra-document links in exported PDFs
Marked’s PDF export currently uses WebKit’s print features. One consequence of this is that intra-document (internal) links, including those in a Table of Contents, will not jump to other points in the document. This is something I hope to fix very soon.
Custom processor permissions in MAS version
Due to sandboxing restrictions, the Mac App Store version of Marked 2 is unable to execute certain types of binary tools as custom processors. If you run into this limitation, there are a few steps you can try.
Ensure that you’ve gone into
and clicked on “Update Permissions.” This will attempt to grant Marked access to your entire default drive, clearing up issues with scripts and utilities that need to access temp folders and non-default locations.Try using a script. Reference the utility you want to run (multimarkdown, kramdown, etc.) in a shell script. It can be a bash, Ruby, Perl, or Python script. Then set the processor in Advanced preferences to the related shell or executable, and the parameters to the location of the script. For example, I can create a bash script saved to ~/scripts/mmd_wrapper.sh:
#!/bin/bash cat | /usr/local/bin/multimarkdown
Then make it executable (
chmod a+x ~/scripts/mmd_wrapper.sh
) and set up my Custom Processor preferences:Processor: /bin/bash Arguments: /Users/me/scripts/mmd_wrapper.sh
Some executables (especially Pandoc) just won’t work within sandboxing. In this case, please contact me via the error window that pops up upon execution to receive a crossgrade license to the direct version.
A URL won’t validate or returns “unknown”
Marked’s link validation uses a basic HEAD request to determine whether a link is valid. Anything other than a 200 (success) result will give either an unknown, or an error if it’s a common error code such as 404 (not found) or 500 (server error). URLs behind authentication (such as Apple Developer urls or anything that requires login to access) will return an “unknown”, as will certain sites such as Amazon.com where the server returns bizarre response codes. There’s not much Marked can do about this.
License has already been utilized
If you do a fresh install and receive the error “License code has already been utilized” when entering your license, please contact me requesting a new license. Please include the email address you registered under and/or your current license code.
Early licenses generated for Marked had a usage limit instead of a machine limit, so 3 installs—even on the same machine—would use up activations. These limits have been corrected in more recently-generated licenses. Purchase of a Marked 2 license permits you to install Marked 2 on any machine you own, so don’t hesitate to ask for a replacement if you run into issues.