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.
(See the documentation for full information.)
---
ict: "http://www.homermultitext.org/ict2/?"
iiif:
service: "http://www.homermultitext.org/iipsrv"
path: "/project/homer/pyramidal/deepzoom"
maxheight: 500
---
Highlighted title:

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:
[](http://www.homermultitext.org/ict2/?urn=urn:cite2:hmt:vaimg.2017a:VA001RN_0002@0.1639,0.1667,0.4738,0.04948)
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:
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
print(rewrite(f))
end
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 FILE.md > NEWFILE.md