Class: Format::ACS
Overview
Basic Format: Author, A. A.; Author, B. B. Book Title (italics), Edition (if any); Publisher: Place of Publication, Year; Pagination.
Dill, K. A.; Bromberg, S. Molecular Driving Forces: Statistical Thermodynamics in Chemistry and Biology; Garland Science: New York, 2003. Engel, R; Cohen, J. I. Synthesis of Carbon-Phosphorus Bonds: New Methods of Exploration; CRC Press: Boca Raton, FL, 2004; pp 54-56. Zumdahl, S. S. Chemical Principles, 4th ed.; Houghton Mifflin: Boston, MA, 2002; p 7.
Constant Summary
Constants included from Format
MediaForwarding, Symbol_to_class_string
Instance Method Summary collapse
-
#article ⇒ Object
def article(cit) [author_list(‘.’, ‘, ’, ‘; ’), i(journal_iso), b(year), [vol, pages].compact.join(‘, ’)] end.
- #article_to_be_submitted ⇒ Object
-
#webpage ⇒ Object
(accessed July 14, 2004).
Methods included from Format
#author_list, #finish, #format, #initialize, #method_missing, new, #par, #punctuate_initials
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Format
Instance Method Details
#article ⇒ Object
def article(cit)
[author_list('.', ', ', '; '), i(journal_iso), b(year), [vol, pages].compact.join(', ')]
end
# needs to deal with journal or no journal
def article_to_be_submitted(cit)
[author_list('.'), i(journal_iso), i('Article to be submitted')]
end
def webpage(cit)
[periodize(b(title)), u(url), periodize("#{b(year)}, #{month} #{day}")].compact.join(' ')
end
# TODO: book
46 47 48 49 50 51 52 53 54 |
# File 'lib/format/acs.rb', line 46 def article vol_o_nil = if vol "#{vol}" else nil end [('.'), i(journal_iso), [b(year), i(vol), pages].compact.join(', ')] end |
#article_to_be_submitted ⇒ Object
56 57 58 |
# File 'lib/format/acs.rb', line 56 def article_to_be_submitted [('.'), i(journal_iso), i('Article to be submitted')] end |
#webpage ⇒ Object
(accessed July 14, 2004)
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/format/acs.rb', line 64 def webpage accessed_string = nil if year accessed_string = '(accessed ' if month accessed_string << month.to_s if day accessed_string << " #{day}, " else accessed_string << " " end end accessed_string << year.to_s << ')' end [periodize(title), url, accessed_string].compact.join(' ') << '.' end |