scholarmarkdown 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -0
- data/Gemfile.lock +14 -0
- data/VERSION +1 -1
- data/bin/template/content/introduction.md +2 -0
- data/bin/template/layouts/default.html.erb +1 -0
- data/lib/scholarmarkdown.rb +1 -0
- data/lib/scholarmarkdown/filter/labelify.rb +2 -0
- data/lib/scholarmarkdown/preprocess/katex.rb +15 -0
- data/scholarmarkdown.gemspec +16 -3
- metadata +59 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e5d23bd7d0c9be0cd125d0808dd9c0df6b29d2f
|
4
|
+
data.tar.gz: a99b6ebfced6aa0ad73e85e4ef344c37af9a416f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af15e371f9f8fe2ae1b38724085801404d406eba09663f43a97b97e97464d9e75cb3ae56677567be547701fe041707bf81f72deaedbcb2f2e2e9a11ad5ed566
|
7
|
+
data.tar.gz: 54dc3d426e736be81c1b9c4f6de07c328d31348775bb79cace05598138826114d9aaac266f34c0cb733ac9bf90b4cdab7febc125a4791240521183787f64820f
|
data/Gemfile
CHANGED
@@ -8,6 +8,12 @@ gem 'citeproc-ruby', '>= 1.1.6'
|
|
8
8
|
gem 'csl-styles'
|
9
9
|
gem 'bibmarkdown', '~> 2.0.0'
|
10
10
|
|
11
|
+
# math
|
12
|
+
gem 'katex'
|
13
|
+
gem 'sskatex'
|
14
|
+
gem 'execjs'
|
15
|
+
gem 'therubyracer' # embedded V8 JavaScript engine
|
16
|
+
|
11
17
|
group :development do
|
12
18
|
# management of this gem
|
13
19
|
gem "bundler", "~> 1.0"
|
data/Gemfile.lock
CHANGED
@@ -21,6 +21,7 @@ GEM
|
|
21
21
|
csl (~> 1.0)
|
22
22
|
descendants_tracker (0.0.4)
|
23
23
|
thread_safe (~> 0.3, >= 0.3.1)
|
24
|
+
execjs (2.7.0)
|
24
25
|
faraday (0.12.2)
|
25
26
|
multipart-post (>= 1.2, < 3)
|
26
27
|
git (1.3.0)
|
@@ -49,7 +50,10 @@ GEM
|
|
49
50
|
jwt (1.5.6)
|
50
51
|
kamelcase (0.0.2)
|
51
52
|
semver2 (~> 3)
|
53
|
+
katex (0.4.3)
|
54
|
+
execjs (~> 2.7)
|
52
55
|
latex-decode (0.3.1)
|
56
|
+
libv8 (3.16.14.19)
|
53
57
|
mini_portile2 (2.3.0)
|
54
58
|
multi_json (1.13.1)
|
55
59
|
multi_xml (0.6.0)
|
@@ -68,7 +72,13 @@ GEM
|
|
68
72
|
rack (1.5.5)
|
69
73
|
rake (12.3.0)
|
70
74
|
rdoc (6.0.2)
|
75
|
+
ref (2.0.0)
|
71
76
|
semver2 (3.4.2)
|
77
|
+
sskatex (0.9.39)
|
78
|
+
execjs (~> 2.7)
|
79
|
+
therubyracer (0.12.3)
|
80
|
+
libv8 (~> 3.16.14.15)
|
81
|
+
ref
|
72
82
|
thread_safe (0.3.6)
|
73
83
|
|
74
84
|
PLATFORMS
|
@@ -80,9 +90,13 @@ DEPENDENCIES
|
|
80
90
|
bundler (~> 1.0)
|
81
91
|
citeproc-ruby (>= 1.1.6)
|
82
92
|
csl-styles
|
93
|
+
execjs
|
83
94
|
i18n
|
84
95
|
juwelier (~> 2.4.7)
|
96
|
+
katex
|
85
97
|
latex-decode
|
98
|
+
sskatex
|
99
|
+
therubyracer
|
86
100
|
|
87
101
|
BUNDLED WITH
|
88
102
|
1.14.6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.4.0
|
@@ -3,6 +3,8 @@
|
|
3
3
|
|
4
4
|
This is a great article on the [Semantic Web](cite:cites semanticweb), written in Markdown.
|
5
5
|
|
6
|
+
Make sure to [write your document effectively](http://www.treesmapsandtheorems.com/pdfs/TM&Th-2.0-summary.pdf)!
|
7
|
+
|
6
8
|
Write proper introduction.
|
7
9
|
More information on snippets like this can be found on the [ScholarMarkdown wiki](https://github.com/rubensworks/ScholarMarkdown/wiki/Snippets).
|
8
10
|
{:.todo}
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<title><%= h @item[:title] %></title>
|
6
6
|
<link rel="stylesheet" media="screen" href="styles/screen.css" />
|
7
7
|
<link rel="stylesheet" media="print" href="styles/print.css" />
|
8
|
+
<%= @items['/styles/katex.css'].nil? ? '' : '<link rel="stylesheet" media="all" href="styles/katex.css">' %>
|
8
9
|
</head>
|
9
10
|
<body prefix="cc: https://creativecommons.org/ns# rdfs: http://www.w3.org/2000/01/rdf-schema#">
|
10
11
|
<%= yield %>
|
data/lib/scholarmarkdown.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'katex'
|
2
|
+
require 'sskatex'
|
3
|
+
|
4
|
+
# Make sure our KaTeX assets are available (this can be disabled if you are not using math-mode)
|
5
|
+
def preprocess_katex_assets
|
6
|
+
# Copy stylesheet
|
7
|
+
@items.create(File.open(File.join(Katex.gem_path, 'vendor', 'katex', 'stylesheets', 'katex.css'), 'r').read, {}, '/styles/katex.css')
|
8
|
+
|
9
|
+
# Copy fonts
|
10
|
+
fontPath = File.join(Katex.gem_path, 'vendor', 'katex', 'fonts')
|
11
|
+
Dir.foreach(fontPath) do |item|
|
12
|
+
next if item == '.' or item == '..'
|
13
|
+
@items.create(File.open(File.join(fontPath, item), 'r').read, {}, '/styles/fonts/' + item)
|
14
|
+
end
|
15
|
+
end
|
data/scholarmarkdown.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: scholarmarkdown 1.
|
5
|
+
# stub: scholarmarkdown 1.4.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "scholarmarkdown"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.4.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Ruben Taelman"]
|
14
|
-
s.date = "2018-05
|
14
|
+
s.date = "2018-06-05"
|
15
15
|
s.email = "rubensworks@gmail.com"
|
16
16
|
s.executables = ["generate-scholarmarkdown"]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -53,6 +53,7 @@ Gem::Specification.new do |s|
|
|
53
53
|
"lib/scholarmarkdown/filter/include_code.rb",
|
54
54
|
"lib/scholarmarkdown/filter/labelify.rb",
|
55
55
|
"lib/scholarmarkdown/filter/references_to_footer.rb",
|
56
|
+
"lib/scholarmarkdown/preprocess/katex.rb",
|
56
57
|
"lib/scholarmarkdown/snippets.rb",
|
57
58
|
"scholarmarkdown.gemspec"
|
58
59
|
]
|
@@ -71,6 +72,10 @@ Gem::Specification.new do |s|
|
|
71
72
|
s.add_runtime_dependency(%q<citeproc-ruby>, [">= 1.1.6"])
|
72
73
|
s.add_runtime_dependency(%q<csl-styles>, [">= 0"])
|
73
74
|
s.add_runtime_dependency(%q<bibmarkdown>, ["~> 2.0.0"])
|
75
|
+
s.add_runtime_dependency(%q<katex>, [">= 0"])
|
76
|
+
s.add_runtime_dependency(%q<sskatex>, [">= 0"])
|
77
|
+
s.add_runtime_dependency(%q<execjs>, [">= 0"])
|
78
|
+
s.add_runtime_dependency(%q<therubyracer>, [">= 0"])
|
74
79
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
75
80
|
s.add_development_dependency(%q<juwelier>, ["~> 2.4.7"])
|
76
81
|
else
|
@@ -80,6 +85,10 @@ Gem::Specification.new do |s|
|
|
80
85
|
s.add_dependency(%q<citeproc-ruby>, [">= 1.1.6"])
|
81
86
|
s.add_dependency(%q<csl-styles>, [">= 0"])
|
82
87
|
s.add_dependency(%q<bibmarkdown>, ["~> 2.0.0"])
|
88
|
+
s.add_dependency(%q<katex>, [">= 0"])
|
89
|
+
s.add_dependency(%q<sskatex>, [">= 0"])
|
90
|
+
s.add_dependency(%q<execjs>, [">= 0"])
|
91
|
+
s.add_dependency(%q<therubyracer>, [">= 0"])
|
83
92
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
84
93
|
s.add_dependency(%q<juwelier>, ["~> 2.4.7"])
|
85
94
|
end
|
@@ -90,6 +99,10 @@ Gem::Specification.new do |s|
|
|
90
99
|
s.add_dependency(%q<citeproc-ruby>, [">= 1.1.6"])
|
91
100
|
s.add_dependency(%q<csl-styles>, [">= 0"])
|
92
101
|
s.add_dependency(%q<bibmarkdown>, ["~> 2.0.0"])
|
102
|
+
s.add_dependency(%q<katex>, [">= 0"])
|
103
|
+
s.add_dependency(%q<sskatex>, [">= 0"])
|
104
|
+
s.add_dependency(%q<execjs>, [">= 0"])
|
105
|
+
s.add_dependency(%q<therubyracer>, [">= 0"])
|
93
106
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
94
107
|
s.add_dependency(%q<juwelier>, ["~> 2.4.7"])
|
95
108
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scholarmarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruben Taelman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05
|
11
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -94,6 +94,62 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 2.0.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: katex
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sskatex
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: execjs
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: therubyracer
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
97
153
|
- !ruby/object:Gem::Dependency
|
98
154
|
name: bundler
|
99
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,6 +221,7 @@ files:
|
|
165
221
|
- lib/scholarmarkdown/filter/include_code.rb
|
166
222
|
- lib/scholarmarkdown/filter/labelify.rb
|
167
223
|
- lib/scholarmarkdown/filter/references_to_footer.rb
|
224
|
+
- lib/scholarmarkdown/preprocess/katex.rb
|
168
225
|
- lib/scholarmarkdown/snippets.rb
|
169
226
|
- scholarmarkdown.gemspec
|
170
227
|
homepage: http://github.com/rubensworks/ScholarMarkdown
|