cossincalc 1.0.5 → 1.0.6
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.
@@ -31,7 +31,7 @@ EOT
|
|
31
31
|
# The filename should be provided without the .pdf extension.
|
32
32
|
def save_pdf(filename)
|
33
33
|
save_tex(filename)
|
34
|
-
|
34
|
+
Dir.chdir(File.dirname(filename)) { `pdflatex "#{filename}.tex"` }
|
35
35
|
end
|
36
36
|
|
37
37
|
# Returns the content of the LaTeX document.
|
@@ -97,7 +97,7 @@ EOT
|
|
97
97
|
# If no filename is given no image will be saved (can be used in testing).
|
98
98
|
def drawing(filename = nil)
|
99
99
|
CosSinCalc::Triangle::Drawing.new(f).save_png(filename) if filename
|
100
|
-
"\\begin{center}\n\\includegraphics[scale=0.4]{#{filename
|
100
|
+
"\\begin{center}\n\\includegraphics[scale=0.4]{#{filename ? File.basename(filename) : 'placeholder'}}\n\\end{center}"
|
101
101
|
end
|
102
102
|
|
103
103
|
# Wraps the given LaTeX content into a LaTeX document ready to write to filesystem.
|
data/lib/cossincalc/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cossincalc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Molte Emil Strange Andersen
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-14 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|