This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.prototype.main = function(){ | |
if (this.documents.length <= 0) return; | |
var tg = this.selection[0] || this.activeDocument; | |
if ('appliedFont' in tg) tg = tg.parent; | |
if (tg.constructor == TextFrame) { tg = tg.parentStory; } | |
if (!('findGrep' in tg)) return; | |
/* Here it is neecessary to choose a pattern for wrapping the note, we are not parsing | |
here, hence the rough technique! */ | |
var fnPatterns = ["@foot_beg@([\\s\\S]*?)@foot_end@", "@footnote_begin@([\\s\\S]*?)@footnote_end@"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
module namespace dtp-utils = 'http://46.28.111.241:8081/exist/db/apps/karolinum-x/modules/dtp-utils'; | |
import module namespace cust-utils = 'http://46.28.111.241:8081/exist/db/apps/karolinum-x/modules/cust-utils' at 'cust-utils.xqm'; | |
declare namespace tei = 'http://www.tei-c.org/ns/1.0'; | |
(:~ This module is useful for in-memory converting of TEI Simpe XML into XML suitable | |
: for importing into InDesign. It is not a silver bullet, it was tested and developed | |
: for a very specific scenario. However, it should be useful for anyone who uses TEI | |
: Simple XML (possibly with minor modifications of replacing strings and so on) and |
NewerOlder