Use URNs in markdown links.
Author neelsmith
0 Stars
Updated Last
2 Years Ago
Started In
November 2021


Use URNs in markdown links. The current version supports citing images by URN and using a citable image service to resolve URNs to image data.

Quick example

(See the documentation for full information.)

Write markdown like this

ict: ""  
    service: ""
    path: "/project/homer/pyramidal/deepzoom"
maxheight: 500

Highlighted title:


Generate markdown like this

Use the rewrite function to generate markdown with embedded images.Configuring the ict setting means that the displayed image will also be linked to an interactive image browser.

Highlighted title:

[![Rewrittten link to title](,16.67,47.38,4.948/500,/0/default.jpg)](,0.1667,0.4738,0.04948)

What you get

In a markdown environment like a github repository's README, that produces something like the following, with the embedded image linked to an external image browser.

Highlighted title:

Rewrittten link to title

Setting up a command-line script

Although you can use the CiteDown package's rewrite function in larger Julia programs, it can be handy to have a script you run from the command line to convert a markdown file with URN references to markdown with URLs. Create a file with the following contents:

using CiteDown
for f in ARGS

Then define an alias for your shell that invokes julia with options to optimize startup time. If you created the script file in /usr/local/bin/citedown.jl and are using bash or zsh for your shell, you can define an alias like this:

alias citedown="julia -O0 --compile=min --startup=no /usr/local/bin/citedown.jl"

You can then use the simple citedown alias from the command line. Redirect its output to create a new markdown file with URNs replaced by URLs:

citedown >