lib.itmens Guids and Tricks

The followings are for lib.itmens.
Cross-site cookies#
This instance doesn't block iframes and cross-site cookies by default, you're on your own. It is recommended to use a browser extension such as uMatrix (it is archived but it still works and is the best so far).
Work vs Edition (for books)#
Multiple editions belong to a same work. Editions include: plain editions (first, second, revised, etc.), translations.
To link multiple editions, choose an edition that is the most original, and link other editions to that edition.
To be able to link you may need to delete the works that other editions are linked to first.
Never merge - unless you really know what you are doing.
Markdown format references#
Title
=====
Subtitle
--------
Paragraphs need to be separated by a blank line
Indentation at the beginning of the paragraph requires using a Unicode full-width space
[Link](https://zh.wikipedia.org/wiki/Markdown)
**Bold** *Italic* ==Highlight== ~~Strikethrough~~
^Super^script ~Sub~script [拼(pīn)音(yīn)]
Drag and drop an image 
> Quote
>> Multi-level quote
Inline >! spoiler warning !< (also in short comments)
>! Multi-line
>! Spoiler
---
- Bullet
- Points
content in paragraph with footnote[^1] markup.
[^1]: footnote explain
```
code
```
Table Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
Enable mathjax#
Tampermonkey script:
// ==UserScript==
// @name enable mathjax
// @namespace http://tampermonkey.net/
// @version 2025-03-02
// @description enable mathjax
// @author gesang
// @match https://lib.itinerariummentis.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict'
if (window.MathJax !== undefined) {
return
}
window.MathJax = {
tex: {
inlineMath: [['$', '$'],['\\(','\\)']],
displayMath: [['$$','$$']],
processEscapes: true,
processEnvironments: true,
tags: 'ams'
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
},
chtml: {
mtextInheritFont: false,
matchFontHeight: false
},
loader: {
load: ['ui/lazy']
}
};
let script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js';
script.async = true;
document.head.appendChild(script);
})()
It is also possible to use the `tex-chtml.js` file hosted locally by `lib.itmens`, if you don't use extensions that provide local cdn:
script.src = 'https://lib.itinerariummentis.org/mathjax/tex-chtml.js';
Shadow library links#
This particular instance has links to shadow libraries for books. You can add convenient links to other shadow libraries with something like this:
let isbn = document.head.querySelector('[property~="og:book:isbn"][content]').content;
let name = document.getElementsByTagName("h1")[0].innerText
let metadataDiv = document.getElementById("item-metadata");
metadataDiv.innerHTML = metadataDiv.innerHTML + '<div><a href="https://dufs.itinerariummentis.org/book/?q=' + name + '">dufs.itmens</a></div>';
metadataDiv.innerHTML = metadataDiv.innerHTML + '<div>Annas-Archive By<a href="https://annas-archive.org/search?q=' + isbn + '"> ISBN</a></div>';
metadataDiv.innerHTML = metadataDiv.innerHTML + '<div>Annas-Archive By <a href="https://annas-archive.org/search?q=' + name + '"> Name</a></div>';
metadataDiv.innerHTML = metadataDiv.innerHTML + '<div>ZLibrary By <a href="https://z-lib.gs/s/' + isbn + '"> ISBN</a></div>';
metadataDiv.innerHTML = metadataDiv.innerHTML + '<div>ZLibrary By <a href="https://z-lib.gs/s/' + name + '"> Name</a></div>';