-
Notifications
You must be signed in to change notification settings - Fork 0
/
Footnote-Options.jsx
117 lines (96 loc) · 3.09 KB
/
Footnote-Options.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/* --------------------------------------
Footnote Options
by Aaron Troia (@atroia)
Modified Date: 1/31/23
Description:
Set all my footnote options
-------------------------------------- */
var d = app.activeDocument;
main();
function main() {
if (app.documents.length == 0) {
alert("No documents are open.");
} else {
footnoteOptions();
}
}
function footnoteOptions() {
/* ==================================== */
/* ==== Numbering and Formatting ==== */
/* ==================================== */
// ----- NUMBERING ----- //
// Style:
d.footnoteOptions.footnoteNumberingStyle = FootnoteNumberingStyle.KANJI; // 1, 2, 3, 4...
// d.footnoteOptions.footnoteNumberingStyle = FootnoteNumberingStyle.SYMBOLS;
// Start At:
d.footnoteOptions.startAt = 1;
// Restart Numbering Every:
d.footnoteOptions.restartNumbering = FootnoteRestarting.PAGE_RESTART;
d.footnoteOptions.showPrefixSuffix = FootnotePrefixSuffix.NO_PREFIX_SUFFIX;
d.footnoteOptions.prefix;
d.footnoteOptions.suffix;
// ----- FORMATTING ----- //
// Footnote Reference Number in Text
// Position:
d.footnoteOptions.markerPositioning =
FootnoteMarkerPositioning.SUPERSCRIPT_MARKER;
// Character Style:
d.footnoteOptions.footnoteMarkerStyle = d.characterStyleGroups
.item("Superscript")
.characterStyles.item("superscript");
// Footnote Formatting
// Paragraph Style
d.footnoteOptions.footnoteTextStyle = d.paragraphStyleGroups
.item("Footnotes")
.paragraphStyles.item("footnote (symbols)");
// Seperator:
d.footnoteOptions.separatorText = "";
/* ==================================== */
/* ============= Layout ============= */
/* ==================================== */
// Span footnotes across columns
d.footnoteOptions.enableStraddling = true;
// ----- SPACING OPTIONS ----- //
// Minimum Space Before First Footnote:
d.footnoteOptions.spacer = 9;
// Space Between Footnotes:
d.footnoteOptions.spaceBetween = 0;
// ----- FIRST BASELINE ----- //
// Offset
d.footnoteOptions.footnoteFirstBaselineOffset =
FootnoteFirstBaseline.LEADING_OFFSET;
// Min
d.footnoteOptions.footnoteMinimumFirstBaselineOffset = 0;
// ----- PLACEMENT OPTIONS ----- //
// Place End of Story Footnotes at Bottom of Text
d.footnoteOptions.eosPlacement = false;
// Allow Split Footnotes
d.footnoteOptions.noSplitting = true;
// ----- RULE ABOVE OPTIONS ----- //
// Rule Above:
d.footnoteOptions.continuingRuleOn = false; // note sure about this one
// Rule on:
d.footnoteOptions.ruleOn = true;
// Weight:
d.footnoteOptions.ruleLineWeight = 0.3;
// Type:
d.footnoteOptions.ruleType = "Solid";
// Color:
d.footnoteOptions.ruleColor = "Black";
// Tint:
d.footnoteOptions.ruleTint = 100;
// Overprint Stroke
d.footnoteOptions.ruleOverprint = false;
// Gap Color:
d.footnoteOptions.ruleGapColor;
// Gap Tint:
d.footnoteOptions.ruleGapTint;
// Overprint Gap
d.footnoteOptions.ruleGapOverprint;
// Left Indent:
d.footnoteOptions.ruleLeftIndent = 0;
// Width:
d.footnoteOptions.ruleWidth = 72;
// Offset:
d.footnoteOptions.ruleOffset = 0;
}