texstyles 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/texstyles/style.rb +21 -10
- data/meta/acs.yml +2 -1
- data/meta/biogeosciences.yml +2 -1
- data/meta/dfgproposal.yml +1 -0
- data/meta/egu.yml +2 -1
- data/meta/hess.yml +2 -1
- data/styles/a0poster-landscape.tex.erb +1 -1
- data/styles/a0poster-portrait.tex.erb +1 -1
- data/styles/aa.tex.erb +1 -1
- data/styles/aa_onecolumn.tex.erb +1 -1
- data/styles/aa_twocolumn.tex.erb +1 -1
- data/styles/aaai.tex.erb +1 -1
- data/styles/abnt.tex.erb +1 -1
- data/styles/acl.tex.erb +1 -1
- data/styles/acm.tex.erb +2 -2
- data/styles/acm_large.tex.erb +1 -1
- data/styles/acm_sig_alternate.tex.erb +1 -1
- data/styles/acm_sig_strict.tex.erb +1 -1
- data/styles/acs.tex.erb +1 -1
- data/styles/agu.tex.erb +1 -1
- data/styles/aiaa.tex.erb +1 -1
- data/styles/aip_preprint.tex.erb +1 -1
- data/styles/aip_reprint.tex.erb +1 -1
- data/styles/aisb2008.tex.erb +1 -1
- data/styles/aj_manuscript.tex.erb +2 -2
- data/styles/aj_preprint.tex.erb +2 -2
- data/styles/ajps.tex.erb +1 -1
- data/styles/alma.tex.erb +1 -1
- data/styles/ams_one.tex.erb +1 -1
- data/styles/ams_two.tex.erb +1 -1
- data/styles/apa_doc.tex.erb +1 -1
- data/styles/apj_emulate.tex.erb +2 -2
- data/styles/apj_manuscript.tex.erb +2 -2
- data/styles/aps.tex.erb +1 -1
- data/styles/aps_preprint.tex.erb +1 -1
- data/styles/article.tex.erb +1 -1
- data/styles/asp.tex.erb +1 -1
- data/styles/authorea-double-numbered.tex.erb +1 -1
- data/styles/authorea-double.tex.erb +1 -1
- data/styles/authorea-numbered.tex.erb +1 -1
- data/styles/authorea.tex.erb +1 -1
- data/styles/biogeosciences.tex.erb +1 -1
- data/styles/bioinformatics.tex.erb +1 -1
- data/styles/bmc.tex.erb +1 -1
- data/styles/book.tex.erb +1 -1
- data/styles/cernatsnote.tex.erb +1 -1
- data/styles/cernyrep.tex.erb +1 -1
- data/styles/chandra.tex.erb +1 -1
- data/styles/cogsci.tex.erb +1 -1
- data/styles/cornell.tex.erb +1 -1
- data/styles/cv.tex.erb +1 -1
- data/styles/development.tex.erb +1 -1
- data/styles/dfgproposal.tex.erb +2 -2
- data/styles/doe.tex.erb +1 -1
- data/styles/econf.tex.erb +1 -1
- data/styles/egu.tex.erb +2 -2
- data/styles/elsevier.tex.erb +1 -1
- data/styles/elsevier_review.tex.erb +1 -1
- data/styles/elsevier_softwarex.tex.erb +1 -1
- data/styles/elsevier_twocolumn.tex.erb +1 -1
- data/styles/empty.tex.erb +1 -1
- data/styles/epjc.tex.erb +1 -1
- data/styles/f1000.tex.erb +1 -1
- data/styles/frontiersENG.tex.erb +1 -1
- data/styles/frontiersFPHY.tex.erb +1 -1
- data/styles/frontiersMED.tex.erb +1 -1
- data/styles/frontiersSCNS.tex.erb +1 -1
- data/styles/g3.tex.erb +1 -1
- data/styles/geophysics.tex.erb +2 -2
- data/styles/gji.tex.erb +1 -1
- data/styles/hess.tex.erb +2 -2
- data/styles/iclr.tex.erb +1 -1
- data/styles/ieee_bare_conf.tex.erb +1 -1
- data/styles/ieee_bare_jrnl.tex.erb +1 -1
- data/styles/ieee_bare_jrnl_compsoc.tex.erb +1 -1
- data/styles/ifac.tex.erb +1 -1
- data/styles/ijcai.tex.erb +2 -2
- data/styles/imsart_aas.tex.erb +1 -1
- data/styles/imsart_as.tex.erb +1 -1
- data/styles/iop.tex.erb +1 -1
- data/styles/iram_proposal.tex.erb +1 -1
- data/styles/jacow.tex.erb +1 -1
- data/styles/jfm.tex.erb +1 -1
- data/styles/jhep.tex.erb +1 -1
- data/styles/jinst.tex.erb +1 -1
- data/styles/jrss.tex.erb +1 -1
- data/styles/jxb.tex.erb +1 -1
- data/styles/lncs.tex.erb +2 -2
- data/styles/mdpi.tex.erb +1 -1
- data/styles/mit.tex.erb +1 -1
- data/styles/mnras.tex.erb +1 -1
- data/styles/nasa.tex.erb +1 -1
- data/styles/nature.tex.erb +1 -1
- data/styles/nature_scirep.tex.erb +1 -1
- data/styles/nime.tex.erb +1 -1
- data/styles/nips.tex.erb +1 -1
- data/styles/osaexpress.tex.erb +2 -2
- data/styles/osaletters.tex.erb +1 -1
- data/styles/peerj.tex.erb +1 -1
- data/styles/plos.tex.erb +1 -1
- data/styles/plos2015.tex.erb +1 -1
- data/styles/pnas.tex.erb +1 -1
- data/styles/report.tex.erb +1 -1
- data/styles/rsc.tex.erb +1 -1
- data/styles/sciadvances.tex.erb +1 -1
- data/styles/science.tex.erb +1 -1
- data/styles/sigchi.tex.erb +1 -1
- data/styles/sigplan.tex.erb +1 -1
- data/styles/spie.tex.erb +1 -1
- data/styles/spieman.tex.erb +1 -1
- data/styles/springer.tex.erb +1 -1
- data/styles/springer_twocolumn.tex.erb +1 -1
- data/styles/svmono.tex.erb +1 -1
- data/styles/trb.tex.erb +1 -1
- data/styles/tufte-handout.tex.erb +1 -1
- data/styles/uchicago.tex.erb +1 -1
- data/styles/ucriverside.tex.erb +1 -1
- data/styles/uiowa.tex.erb +1 -1
- data/styles/umich.tex.erb +1 -1
- data/styles/uvic.tex.erb +1 -1
- data/styles/uwollongong.tex.erb +1 -1
- data/texstyles.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6322d33732ec29a9ab905aadd33e90859bd2dcd
|
4
|
+
data.tar.gz: 558e6bd483bdae22ff50a99e83d346f38e2bbbb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b4f9126637527d5d7c06a51c9aa470a6813f444a0e1a9a6d5120f83443b8a09fbd5434d8022bd065550468f266fc423511718ea78960739549c8250c3dea5b1
|
7
|
+
data.tar.gz: 987675f1a8420285b51e4a8a1b1d328ff266ccbb15e9e371026ac5495fb3c3e1dad0105b9dbd34aa8480894b8965d43c5f6dc9cbecdf745038f772578ada51c4
|
data/lib/texstyles/style.rb
CHANGED
@@ -29,17 +29,28 @@ module Texstyles
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def render_latex(options = {})
|
32
|
-
@default_packages = options[
|
33
|
-
@header = options[
|
34
|
-
@alternative_author_string = options[
|
35
|
-
@
|
36
|
-
@short_title = options[
|
37
|
-
@first_author = options[:first_author].to_s
|
38
|
-
@first_affiliation = options[:first_affiliation].to_s
|
39
|
-
@coauthor_list = options[:coauthor_list].to_a
|
40
|
-
@coauthor_affiliations = options[:coauthor_affiliations].to_a
|
32
|
+
@default_packages = options["default_packages"].to_s
|
33
|
+
@header = options["header"].to_s
|
34
|
+
@alternative_author_string = options["alternative_author_string"].to_s
|
35
|
+
@title = options["title"].to_s
|
36
|
+
@short_title = options["short_title"].to_s
|
41
37
|
|
42
|
-
@
|
38
|
+
@authors = options["authors"] || []
|
39
|
+
@affiliations = options["affiliations"] || []
|
40
|
+
|
41
|
+
# TODO: Refactor these together with the templates into a more elegant workflow,
|
42
|
+
# more aware of multiple affiliations
|
43
|
+
@authors.each do |data|
|
44
|
+
# set the first affiliation as the default one, if not set and we have a list
|
45
|
+
data["affiliation"] ||= (data["affiliations"] && data["affiliations"][0])
|
46
|
+
end
|
47
|
+
@first_author_data = @authors[0] || {}
|
48
|
+
@first_author = @first_author_data["name"].to_s
|
49
|
+
@first_affiliation = @first_author_data["affiliation"].to_s
|
50
|
+
@coauthor_list = @authors[1..-1].to_a.map{|data| data["name"]}
|
51
|
+
@coauthor_affiliations = @authors[1..-1].to_a.map{|data| data["affiliation"]}
|
52
|
+
|
53
|
+
@abstract = options["abstract"].to_s
|
43
54
|
if !@abstract.empty?
|
44
55
|
@abstract_begin_end = if @abstract.match(/\{abstract\}/)
|
45
56
|
@abstract
|
data/meta/acs.yml
CHANGED
data/meta/biogeosciences.yml
CHANGED
data/meta/dfgproposal.yml
CHANGED
data/meta/egu.yml
CHANGED
data/meta/hess.yml
CHANGED
@@ -50,7 +50,7 @@
|
|
50
50
|
% The widths of these boxes can be easily edited to accommodate your content as you see fit
|
51
51
|
|
52
52
|
\begin{minipage}[b]{0.75\linewidth}
|
53
|
-
\veryHuge \color{NavyBlue} \textbf{<%=@
|
53
|
+
\veryHuge \color{NavyBlue} \textbf{<%=@title%>} \color{Black}\\ % Title
|
54
54
|
%\Huge\textit{An Exploration of Complexity}\\[2cm] % Subtitle
|
55
55
|
<% if !@alternative_author_string.to_s.empty? %>
|
56
56
|
<%= @alternative_author_string %>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
% The widths of these boxes can be easily edited to accommodate your content as you see fit
|
51
51
|
|
52
52
|
\begin{minipage}[b]{0.75\linewidth}
|
53
|
-
\veryHuge \color{NavyBlue} \textbf{<%=@
|
53
|
+
\veryHuge \color{NavyBlue} \textbf{<%=@title%>} \color{Black}\\ % Title
|
54
54
|
%\Huge\textit{An Exploration of Complexity}\\[2cm] % Subtitle
|
55
55
|
<% if !@alternative_author_string.to_s.empty? %>
|
56
56
|
<%= @alternative_author_string %>
|
data/styles/aa.tex.erb
CHANGED
data/styles/aa_onecolumn.tex.erb
CHANGED
data/styles/aa_twocolumn.tex.erb
CHANGED
data/styles/aaai.tex.erb
CHANGED
data/styles/abnt.tex.erb
CHANGED
data/styles/acl.tex.erb
CHANGED
data/styles/acm.tex.erb
CHANGED
@@ -35,10 +35,10 @@
|
|
35
35
|
\begin{document}
|
36
36
|
|
37
37
|
% Page heads
|
38
|
-
\markboth{<%=@first_author%>}{<%=@
|
38
|
+
\markboth{<%=@first_author%>}{<%=@title%>}
|
39
39
|
|
40
40
|
% Title portion
|
41
|
-
\title{<%=@
|
41
|
+
\title{<%=@title%>}
|
42
42
|
<% if !@alternative_author_string.to_s.empty? %>
|
43
43
|
<%= @alternative_author_string %>
|
44
44
|
<% else %>
|
data/styles/acm_large.tex.erb
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
\markboth{D. Pineo, C. Ware and S. Fogarty}{Neural Modeling of Flow Rendering Effectiveness}
|
35
35
|
|
36
36
|
% Title portion
|
37
|
-
\title{<%=@
|
37
|
+
\title{<%=@title%>}
|
38
38
|
<% if !@alternative_author_string.to_s.empty? %>
|
39
39
|
<%= @alternative_author_string %>
|
40
40
|
<% else %>
|
@@ -58,7 +58,7 @@
|
|
58
58
|
%\crdata{0-12345-67-8/90/01} % Allows default copyright data (0-89791-88-6/97/05) to be over-ridden - IF NEED BE.
|
59
59
|
% --- End of Author Metadata ---
|
60
60
|
|
61
|
-
\title{<%=@
|
61
|
+
\title{<%=@title%>}
|
62
62
|
|
63
63
|
%
|
64
64
|
% You need the command \numberofauthors to handle the 'placement
|
data/styles/acs.tex.erb
CHANGED
@@ -61,7 +61,7 @@
|
|
61
61
|
%% The document title should be given as usual
|
62
62
|
%% A short title can be given as a *suggestion* for running headers.
|
63
63
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
64
|
-
\title[]{<%=@
|
64
|
+
\title[]{<%=@title%>}
|
65
65
|
|
66
66
|
\begin{document}
|
67
67
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
data/styles/agu.tex.erb
CHANGED
@@ -125,7 +125,7 @@
|
|
125
125
|
%% ------------------------------------------------------------------------ %%
|
126
126
|
|
127
127
|
|
128
|
-
\title{<%=@
|
128
|
+
\title{<%=@title%>}
|
129
129
|
%
|
130
130
|
% e.g., \title{Terrestrial ring current:
|
131
131
|
% Origin, formation, and decay $\alpha\beta\Gamma\Delta$}
|
data/styles/aiaa.tex.erb
CHANGED
data/styles/aip_preprint.tex.erb
CHANGED
data/styles/aip_reprint.tex.erb
CHANGED
data/styles/aisb2008.tex.erb
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
%% head is a modified title of up to roughly 44 characters.
|
40
40
|
%% Running heads will not print in the manuscript style.
|
41
41
|
|
42
|
-
\shorttitle{<%=@
|
42
|
+
\shorttitle{<%=@title%>}
|
43
43
|
\shortauthors{<%=@first_author%>}
|
44
44
|
|
45
45
|
%% This is the end of the preamble. Indicate the beginning of the
|
@@ -51,7 +51,7 @@
|
|
51
51
|
%% one line. However, you may use \\ to force a line break if
|
52
52
|
%% you desire.
|
53
53
|
|
54
|
-
\title{<%=@
|
54
|
+
\title{<%=@title%>}
|
55
55
|
|
56
56
|
%% Use \author, \affil, and the \and command to format
|
57
57
|
%% author and affiliation information.
|
data/styles/aj_preprint.tex.erb
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
%% head is a modified title of up to roughly 44 characters.
|
41
41
|
%% Running heads will not print in the manuscript style.
|
42
42
|
|
43
|
-
\shorttitle{<%=@
|
43
|
+
\shorttitle{<%=@title%>}
|
44
44
|
\shortauthors{<%=@first_author%>}
|
45
45
|
|
46
46
|
%% This is the end of the preamble. Indicate the beginning of the
|
@@ -52,7 +52,7 @@
|
|
52
52
|
%% one line. However, you may use \\ to force a line break if
|
53
53
|
%% you desire.
|
54
54
|
|
55
|
-
\title{<%=@
|
55
|
+
\title{<%=@title%>}
|
56
56
|
|
57
57
|
%% Use \author, \affil, and the \and command to format
|
58
58
|
%% author and affiliation information.
|
data/styles/ajps.tex.erb
CHANGED
data/styles/alma.tex.erb
CHANGED
data/styles/ams_one.tex.erb
CHANGED
data/styles/ams_two.tex.erb
CHANGED
data/styles/apa_doc.tex.erb
CHANGED
data/styles/apj_emulate.tex.erb
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
%% head is a modified title of up to roughly 44 characters.
|
20
20
|
%% Running heads will not print in the manuscript style.
|
21
21
|
|
22
|
-
\shorttitle{<%=@
|
22
|
+
\shorttitle{<%=@title%>}
|
23
23
|
\shortauthors{<%=@first_author%>}
|
24
24
|
|
25
25
|
%% This is the end of the preamble. Indicate the beginning of the
|
@@ -31,7 +31,7 @@
|
|
31
31
|
%% one line. However, you may use \\ to force a line break if
|
32
32
|
%% you desire.
|
33
33
|
|
34
|
-
\title{<%=@
|
34
|
+
\title{<%=@title%>}
|
35
35
|
|
36
36
|
|
37
37
|
%% Use \author, \affil, and the \and command to format
|
@@ -39,7 +39,7 @@
|
|
39
39
|
%% head is a modified title of up to roughly 44 characters.
|
40
40
|
%% Running heads will not print in the manuscript style.
|
41
41
|
|
42
|
-
\shorttitle{<%=@
|
42
|
+
\shorttitle{<%=@title%>}
|
43
43
|
\shortauthors{<%=@first_author%>}
|
44
44
|
|
45
45
|
%% This is the end of the preamble. Indicate the beginning of the
|
@@ -51,7 +51,7 @@
|
|
51
51
|
%% one line. However, you may use \\ to force a line break if
|
52
52
|
%% you desire.
|
53
53
|
|
54
|
-
\title{<%=@
|
54
|
+
\title{<%=@title%>}
|
55
55
|
|
56
56
|
%% Use \author, \affil, and the \and command to format
|
57
57
|
%% author and affiliation information.
|
data/styles/aps.tex.erb
CHANGED
data/styles/aps_preprint.tex.erb
CHANGED
data/styles/article.tex.erb
CHANGED