latex-project-template 0.0.3 → 0.0.4

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.
data/README.md CHANGED
@@ -20,11 +20,11 @@ the project directory is managed by git.
20
20
 
21
21
  latex-project-template depends on the following gems.
22
22
 
23
- - git
24
- - filename
25
- - user_config
23
+ - [git](http://rubygems.org/gems/git)
24
+ - [filename](http://rubygems.org/gems/filename)
25
+ - [user_config](http://rubygems.org/gems/user_config)
26
26
 
27
- ## Install
27
+ ## Installation
28
28
 
29
29
  We can install by rubygems.
30
30
 
@@ -38,7 +38,7 @@ First of all, we create configuration directory ~/.latex\_project\_template.
38
38
  latex-project-template --init
39
39
 
40
40
  Next, we edit template files in ~/.latex\_project\_template.
41
- If we want to create latex project 'new_project' fromo 'default' template, type
41
+ If we want to create latex project 'new_project' from 'default' template, type
42
42
 
43
43
  latex-project-template new_project
44
44
 
@@ -51,17 +51,74 @@ To list templates in ~/.latex\_project\_template, we type
51
51
 
52
52
  latex-project-template --list
53
53
 
54
- ## Special notations of template file names
54
+ ## Structure of template
55
+
56
+ In ~/.latex\_project\_template there are the following directories.
57
+
58
+ - template
59
+ - component
60
+ - variable
61
+ - .git
62
+
63
+ ### 'template' directory
64
+
65
+ 'template' directory includes main files of templates.
66
+ A template is a directory in 'template' directory and
67
+ all files are fundamentally copied to a project directory.
68
+ We can write template files with format simple texts or eruby files.
69
+
70
+ If we want to create dynamically files then we use eruby.
71
+ Files with the extension '.erb' is an eruby template and
72
+ latex-project-template evaluates them when copying a template as a specified project.
73
+
74
+ #### Special notations of template file names
75
+
76
+ Some special notations of template file names also are used.
77
+ The following strings starting \_\_ and ending \_\_ have special meanings.
55
78
 
56
79
  \_\_IMPORT\_\_
57
80
  : In \_\_IMPORT\_\_ we write list of files to import from other template.
81
+
58
82
  \_\_PROJECT\_\_
59
83
  : Replace \_\_PROJECT\_\_ by name of project.
84
+
60
85
  \_\_DOT\_\_
61
86
  : Replace \_\_DOT\_\_ by '.'.
87
+
62
88
  \_\_IGNORE\_\_
63
89
  : Files including \_\_IGNORE\_\_ are ignored.
64
90
 
91
+ ### 'component' directory
92
+
93
+ Common parts of template files are placed in 'component' directory.
94
+ In order to import into eruby templates, we use 'component' method.
95
+ If there is 'component/rakefile_common.erb',
96
+ we can use this file in eruby template.
97
+
98
+ <%= component('rakefile_common.erb') %>
99
+
100
+ ### 'variable' directory
101
+
102
+ The 'variable' directory has yaml files,
103
+ which are used in eruby template.
104
+ We can get the object of 'filename.yaml',
105
+ referring to 'filename';
106
+
107
+ For example, if there is variable/profile.yaml' like
108
+
109
+ ---
110
+ :name: Your Name
111
+
112
+ then we can refer to the above value as in 'template/default/\_\_PROJECT\_\_.tex.erb'
113
+
114
+ <%= profile[:name] %>
115
+
116
+ ## Rake tasks
117
+
118
+ Tasks to compile latex files with latexmk are defined in 'latex\_project\_template/task.rb'.
119
+ To investigate usage of the file,
120
+ we can see Rakefile in 'default' template.
121
+
65
122
  ## Contributing to latex-project-template
66
123
 
67
124
  - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -10,7 +10,7 @@ Usage: #{File.basename(__FILE__)} project [template]
10
10
 
11
11
  HELP
12
12
 
13
- Version = '0.0.3'
13
+ Version = '0.0.4'
14
14
 
15
15
  options = {
16
16
  :mode => :create
@@ -2,6 +2,7 @@
2
2
 
3
3
  <%= component('math_preamble.tex') %>
4
4
 
5
+ \title{}
5
6
  \author{<%= profile[:name] %>}
6
7
  \date{}
7
8
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  <%= component('math_preamble.tex') %>
4
4
 
5
+ \title{}
5
6
  \author{<%= profile[:name] %>}
6
7
  \date{}
7
8
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{latex-project-template}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Takayuki YAMAGUCHI"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: latex-project-template
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Takayuki YAMAGUCHI
@@ -171,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- hash: -691823316385091189
174
+ hash: -161505429239603935
175
175
  segments:
176
176
  - 0
177
177
  version: "0"