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
- `pdflatex -output-directory \"#{File.dirname(filename)}\" \"#{filename}.tex\"`
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 || 'placeholder'}}\n\\end{center}"
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.
@@ -1,3 +1,3 @@
1
1
  module CosSinCalc
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
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-11 00:00:00 +01:00
18
+ date: 2010-11-14 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21