texstyles 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/texstyles/style.rb +5 -3
- data/texstyles.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f07c14f9ad05008b0dd23481c853253607b4654
|
|
4
|
+
data.tar.gz: 0f355705a06b27c303eb1f3e4660fe3b522cdbaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34f061ca3b159fec54e4dae31e544695151bfd55057c2e48deedd0d7793ca4182b259e3cba0b2280bc13150a6b4153cf4b7d0cf916574a7fcdf91b349e3307a1
|
|
7
|
+
data.tar.gz: 6afda5cefc0599ed263bda80f5eb4fd0f82991b8d545eb6c316ebbf966a177677ea94338d2acc79c9b18087738e422cce6de02103e10f692321a67ebf3df42e1
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# TeX Styles
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A collection of ERB-based TeX/LaTeX preamble styles, for the world of scholarly writing and beyond. Founded and maintained by the [Authorea](www.authorea.com) team.
|
|
4
|
+
|
|
5
|
+
**CAUTION: This repository is in a pre-alpha dev sprint, consider it completely unstable until a 0.1.0 release**
|
|
4
6
|
|
|
5
7
|
[](https://travis-ci.org/Authorea/texstyles)
|
|
6
8
|
[](https://raw.githubusercontent.com/authorea/texstyles/master/LICENSE)
|
data/lib/texstyles/style.rb
CHANGED
|
@@ -3,9 +3,11 @@ require 'yaml'
|
|
|
3
3
|
|
|
4
4
|
module Texstyles
|
|
5
5
|
class Style
|
|
6
|
+
attr_accessor :symbol
|
|
6
7
|
|
|
7
|
-
def initialize(symbol
|
|
8
|
-
|
|
8
|
+
def initialize(symbol=:authorea)
|
|
9
|
+
@symbol = symbol.to_sym
|
|
10
|
+
style_filename = "#{@symbol}.tex.erb"
|
|
9
11
|
style_filepath = File.join(Texstyles.root, 'styles', style_filename)
|
|
10
12
|
@erb = if File.exist? style_filepath
|
|
11
13
|
ERB.new(File.read(style_filepath))
|
|
@@ -13,7 +15,7 @@ module Texstyles
|
|
|
13
15
|
nil
|
|
14
16
|
end
|
|
15
17
|
|
|
16
|
-
spec_filename = symbol
|
|
18
|
+
spec_filename = "#{@symbol}.yml"
|
|
17
19
|
spec_filepath = File.join(Texstyles.root, 'spec', spec_filename)
|
|
18
20
|
@spec = if File.exist? spec_filepath
|
|
19
21
|
YAML.load_file(spec_filepath)
|
data/texstyles.gemspec
CHANGED