ydl 0.2.06

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +83 -0
  7. data/README.org +208 -0
  8. data/Rakefile +6 -0
  9. data/bin/console +11 -0
  10. data/bin/setup +8 -0
  11. data/examples/brief.tex +43 -0
  12. data/examples/cases.ydl +79 -0
  13. data/examples/header.rb +12 -0
  14. data/examples/lawyers.ydl +65 -0
  15. data/examples/mwe.tex +67 -0
  16. data/examples/persons.ydl +10 -0
  17. data/examples/simple.tex +23 -0
  18. data/examples/test_page.tex +76 -0
  19. data/lib/ydl/core_ext/array.rb +6 -0
  20. data/lib/ydl/core_ext/array_refine.rb +16 -0
  21. data/lib/ydl/core_ext/boolean.rb +13 -0
  22. data/lib/ydl/core_ext/date.rb +6 -0
  23. data/lib/ydl/core_ext/hash.rb +16 -0
  24. data/lib/ydl/core_ext/numeric.rb +6 -0
  25. data/lib/ydl/core_ext/string.rb +16 -0
  26. data/lib/ydl/core_ext.rb +7 -0
  27. data/lib/ydl/errors.rb +5 -0
  28. data/lib/ydl/node.rb +190 -0
  29. data/lib/ydl/top_queue.rb +40 -0
  30. data/lib/ydl/tree.rb +95 -0
  31. data/lib/ydl/version.rb +3 -0
  32. data/lib/ydl/ydl.rb +244 -0
  33. data/lib/ydl.rb +15 -0
  34. data/spec/array_spec.rb +14 -0
  35. data/spec/core_ext/array_spec.rb +23 -0
  36. data/spec/core_ext/boolean_spec.rb +10 -0
  37. data/spec/core_ext/date_spec.rb +9 -0
  38. data/spec/core_ext/hash_spec.rb +19 -0
  39. data/spec/core_ext/numeric_spec.rb +13 -0
  40. data/spec/core_ext/string_spec.rb +27 -0
  41. data/spec/example_files/err/person_err.ydl +6 -0
  42. data/spec/example_files/home/user/.ydl/config_template.yaml +40 -0
  43. data/spec/example_files/home/user/.ydl/courts/courts.ydl +28 -0
  44. data/spec/example_files/home/user/.ydl/lawyers.ydl +40 -0
  45. data/spec/example_files/home/user/.ydl/persons.ydl +9 -0
  46. data/spec/example_files/home/user/project/cases.ydl +59 -0
  47. data/spec/example_files/home/user/project/courts.ydl +7 -0
  48. data/spec/example_files/home/user/project/judges.ydl +27 -0
  49. data/spec/example_files/home/user/project/lawyers.ydl +52 -0
  50. data/spec/example_files/home/user/project/persons.ydl +5 -0
  51. data/spec/example_files/home/user/project/subproject/lawyers.ydl +85 -0
  52. data/spec/example_files/home/user/project/subproject/persons.ydl +55 -0
  53. data/spec/example_files/sys/ydl/constants.ydl +1 -0
  54. data/spec/example_files/sys/ydl/junk.ydl +1 -0
  55. data/spec/spec_helper.rb +55 -0
  56. data/spec/ydl_error_spec.rb +15 -0
  57. data/spec/ydl_spec.rb +184 -0
  58. data/yaml_v_psych.rb +15 -0
  59. data/ydl.gemspec +40 -0
  60. metadata +230 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 65a1dba2219dd34c0d14ae1bd509e453b4b9f4edb2965320150bc9a40b612887
4
+ data.tar.gz: 938b868e021730cf50941ec0dc4af022911e550db5b814f32782bc52b079cb40
5
+ SHA512:
6
+ metadata.gz: 83500294f866584f4a2b0c0800104a2b961629e436239a5d61a11b19c3d55d3f950a4f3ac67ec70b2c357c437e45c94eb4128a9d57cd9a9e0233b36ec122089d
7
+ data.tar.gz: 9cd25bae84a0241f5f37a4c6bf3430f653d0140ee049c0354599dbd066626b503da4a0a34fd5615b1e568945691ff68bd400050656e43a2a9855c9e0c649d809
data/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ /GPATH
13
+ /GRTAGS
14
+ /GTAGS
15
+ *synctex.gz
16
+ examples/*.idx
17
+ examples/*.ilg
18
+ examples/*.ind
19
+ examples/*.pdf
20
+ examples/_region_*
21
+ /examples/brief.out
22
+ .local/
23
+ .lesshst
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.5
5
+ - 2.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in erb_ddl.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,83 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ydl (0.2.06)
5
+ activesupport (~> 6.0)
6
+ fat_core
7
+ psych
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (6.1.4.4)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
+ coderay (1.1.3)
19
+ concurrent-ruby (1.1.9)
20
+ damerau-levenshtein (1.3.3)
21
+ debug (1.4.0)
22
+ irb (>= 1.3.6)
23
+ reline (>= 0.2.7)
24
+ diff-lcs (1.5.0)
25
+ fat_core (4.9.2)
26
+ activesupport
27
+ damerau-levenshtein
28
+ i18n (1.8.11)
29
+ concurrent-ruby (~> 1.0)
30
+ io-console (0.5.11)
31
+ irb (1.4.1)
32
+ reline (>= 0.3.0)
33
+ law_doc (0.1.15)
34
+ activesupport (~> 6.0)
35
+ fat_core
36
+ method_source (1.0.0)
37
+ minitest (5.15.0)
38
+ pry (0.14.1)
39
+ coderay (~> 1.1)
40
+ method_source (~> 1.0)
41
+ pry-doc (1.2.0)
42
+ pry (~> 0.11)
43
+ yard (~> 0.9.11)
44
+ psych (4.0.3)
45
+ stringio
46
+ rake (13.0.6)
47
+ reline (0.3.1)
48
+ io-console (~> 0.5)
49
+ rspec (3.10.0)
50
+ rspec-core (~> 3.10.0)
51
+ rspec-expectations (~> 3.10.0)
52
+ rspec-mocks (~> 3.10.0)
53
+ rspec-core (3.10.1)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-expectations (3.10.1)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-mocks (3.10.2)
59
+ diff-lcs (>= 1.2.0, < 2.0)
60
+ rspec-support (~> 3.10.0)
61
+ rspec-support (3.10.3)
62
+ stringio (3.0.1)
63
+ tzinfo (2.0.4)
64
+ concurrent-ruby (~> 1.0)
65
+ webrick (1.7.0)
66
+ yard (0.9.27)
67
+ webrick (~> 1.7.0)
68
+ zeitwerk (2.5.3)
69
+
70
+ PLATFORMS
71
+ ruby
72
+
73
+ DEPENDENCIES
74
+ debug (>= 1.0.0)
75
+ law_doc (>= 0.1.15)
76
+ pry
77
+ pry-doc
78
+ rake
79
+ rspec (~> 3.0)
80
+ ydl!
81
+
82
+ BUNDLED WITH
83
+ 2.3.4
data/README.org ADDED
@@ -0,0 +1,208 @@
1
+ * Ydl
2
+
3
+ Ydl provides a way to supply a ruby app with initialized objects by allowing
4
+ the user to supply the data about the objects in a hierarchical series of
5
+ "data definition files" with the extension ~.ydl~. In particular, the ~ydl~
6
+ command ~Ydl.load~ finds all files with the extension ~.ydl~ in the following
7
+ locations and uses the data in them to instantiate ~Ruby~ objects:
8
+
9
+ 1. all ~.ydl~ files a configurable system-wide directory, by default ~/etc/ydl~
10
+ 2. all ~.ydl~ files in the user's directory ~/home/user/.ydl~ and all
11
+ directories under that directory, recursively, and
12
+ 3. all ~.ydl~ files in each directory starting at the user's home directory
13
+ (or the root directory if the current directory is not directly or
14
+ indirectly underneath the user's home directory) and continuing to the
15
+ current working directory,
16
+
17
+ After calling ~Ydl.load~, you can access all the objects described by the
18
+ ~.ydl~ files from a hierarchical tree of nested hashes via the global hash
19
+ Ydl.data[<key] (or, more concisely, ~Ydl[<key]~).
20
+
21
+ The ~.ydl~ files are in YAML format, with a couple of twists. One twist is
22
+ that you can use cross-references of the form ~ydl:/path/to/other/node~ to set
23
+ the value of one node to its value at another place in the data hierarchy. The
24
+ second twist is that nodes having names of classes that you specify in your
25
+ config are automatically instantiated into Ruby objects of that class and made
26
+ available in the ~ydl~ data tree.
27
+
28
+ ** Installation
29
+
30
+ Add this line to your application's Gemfile:
31
+ #+BEGIN_SRC ruby
32
+ gem 'ydl'
33
+ #+END_SRC
34
+
35
+ And then execute:
36
+
37
+ #+BEGIN_SRC shell
38
+ $ bundle
39
+ #+END_SRC
40
+
41
+ Or install it yourself as:
42
+
43
+ #+BEGIN_SRC shell
44
+ $ gem install ydl
45
+ #+END_SRC
46
+
47
+ ** Usage
48
+
49
+ Ydl allows you to build a Hash, available as ~Ydl.data~, containing all the
50
+ items defined in the data definition files:
51
+
52
+ #+BEGIN_SRC ruby
53
+ require 'ydl'
54
+
55
+ Ydl.load
56
+ Ydl.data.class #=> Hash
57
+ Ydl.data[:persons] #=> { joe: {....}, mary: {....} }
58
+ Ydl.data[:lawyers] #=> { anne: {....}, will: {....} }
59
+ #+END_SRC
60
+
61
+ You can load only files with a given base name. ~Ydl.load~ then returns a Hash
62
+ just of the objects from files with the given base name, but also adds them to
63
+ the global ~Ydl.data~ variable as well.
64
+
65
+ #+BEGIN_SRC ruby
66
+ require 'ydl'
67
+
68
+ people = Ydl.load('persons')
69
+ people.class #=> Hash
70
+ people #=> { joe: {....}, mary: {....} }
71
+ people[:joe].class #=> Person
72
+ Ydl.data[:persons][:joe].class #=> Person
73
+
74
+ lawyers = Ydl.load('lawyers')
75
+ lawyers.class #=> Hash
76
+ lawyers #=> { will: {....}, anne: {....} }
77
+ lawyers[:will].class #=> Lawyer
78
+ Ydl.data[:lawyers][:will].class #=> Lawyer
79
+ #+END_SRC
80
+
81
+ *** Data Definition Files
82
+
83
+ The data definition files have the extension ~.ydl~ and are read from the
84
+ following places:
85
+
86
+ - from a system wide directory that is by default, ~/etc/ydl~, including all its
87
+ subdirectories,
88
+ - from a user-specific directory in the user's HOME directory that is by
89
+ default, =~/.ydl=, including all its subdirectories,
90
+ - in the current working directory and all directories above the current
91
+ directory up to the user's home directory or the root directory, whichever it
92
+ hits first.
93
+
94
+ The data definitions are read in the same order given above, except that the
95
+ third category reads files in the HOME directory first, then in each directory
96
+ from there to the current directory in order. In other words, directories closer
97
+ to the current directory take priority over those higher up in the directory
98
+ hierarchy.
99
+
100
+ In each case, all files with the extension '.ydl' are read and /only/ those
101
+ files. Definitions in files read later are merged into those read earlier,
102
+ overwriting any data having the same key or appending to array data having the
103
+ same key.
104
+
105
+ The base name of each file is used as an outer key for the contents of the file.
106
+ For example, a file ~'persons.ydl'~ in the current directory will be treated as
107
+ the value of a Hash with the key ~:persons~.
108
+
109
+ *** Automatic Instantiation of Classes
110
+
111
+ If, when the files are read in, there is a class whose name is the camelized and
112
+ singularized version of a hash key, and if the value of that key is itself a
113
+ hash, an instance of the class is initialized using the hash values as
114
+ initializers. So if there is a class defined whose last component is Person, the
115
+ contents of the file ~person.ydl~ will instantiate objects of that class. This
116
+ process is recursive, so values that are hashes with keys matching class names
117
+ are instantiated as well. If there is more than one such class, an exception is
118
+ raised.
119
+
120
+ You can restrict the classes searched for by setting the ~class_modules~ config
121
+ setting to a string or a list of strings of class prefixes to be consulted. If
122
+ ~class_modules~ is set to 'Company::Engineers', only the class
123
+ ~Company::Engineers::Person~ will be instantiated for objects under the
124
+ ~:persons~ hierarchy. By default all modules will be consulted.
125
+
126
+ In order for this to work, the initialize method for the classes must be able to
127
+ take a Hash as an argument to ~.new~. A different initializer method can be
128
+ specified for each class with the ~class_init~ option in the configuration file.
129
+
130
+ If no class is found, the item is left as a Hash.
131
+
132
+ *** Cross References
133
+
134
+ String values can have the form ~ydl:/person/smith/address/city~ or
135
+ ~ydl:person/smith/address/city~ (the presence of the leading '/' is optional
136
+ and has no meaning), that is, the 'ydl:' specifier followed by a "data path",
137
+ much like a file name path, will, upon resolution, look up the value of the
138
+ given item and return it as the value of that element. Resolution of ~ydl:~
139
+ elements is deferred until all files have been read in so that forward
140
+ references are possible. However, ~Ydl~ will not look outside the files being
141
+ loaded to find a cross-reference, so if you selectively load files, you may
142
+ not be able to resolve some cross-references. Circular cross-references raise
143
+ a ~Ydl::CircularReference~ error.
144
+
145
+ *** Configuration
146
+
147
+ Ydl looks for a configuration file in ~.ydl/config.yaml~ of your ~HOME~
148
+ directory. Here is the sample configuration that explains the options
149
+ available:
150
+
151
+ #+BEGIN_EXAMPLE
152
+ # You can set the system-wide ydl directory here; otherwise it defaults to
153
+ # /usr/local/share/ydl.
154
+
155
+ # system_ydl_dir: /usr/local/share/ydl
156
+
157
+ # For automatic instantiation, search for classes prefixed by the given modules
158
+ # in the order given. For example, if the key 'breed' is to be instantiated, you
159
+ # can restrict the search for classes named 'Breed' only in modules, 'Dog' and
160
+ # 'Cat' with this:
161
+ #
162
+ # class_modules:
163
+ # - Dog
164
+ # - Cat
165
+ #
166
+ # then, only Dog::Breed and Cat::Breed will be searched for an existing breed
167
+ # class. Otherwise, any class ending in Breed could be used, and they will be
168
+ # searched in alphabetical order, and the first found will be used.
169
+ #
170
+ # A blank value means to consider classes in the main, global module level. You
171
+ # can always disambiguate the class selected with the class_map option below.
172
+
173
+ class_modules:
174
+ -
175
+ - LawDoc
176
+ - Company::Employee
177
+
178
+ # By default, each key will be camelized and singularized to find the matching
179
+ # class. So, the key 'dogs' will look for a class named 'Dog', and 'dog_faces'
180
+ # will look for a class 'DogFace'. You can override this heuristic here by
181
+ # saying exactly which class a given key should map to.
182
+ class_map:
183
+ address: LawDoc::Address
184
+ persons: LawDoc::Person
185
+ fax: LawDoc::Phone
186
+
187
+ # Specify constructors for classes whose .new method will not take a Hash as an
188
+ # argument to initialize the class.
189
+ class_init:
190
+ LawDoc::Person: from_hash
191
+ #+END_EXAMPLE
192
+
193
+ ** Development
194
+
195
+ After checking out the repo, run ~bin/setup~ to install dependencies. Then, run
196
+ ~rake spec~ to run the tests. You can also run ~bin/console~ for an interactive
197
+ prompt that will allow you to experiment.
198
+
199
+ To install this gem onto your local machine, run ~bundle exec rake install~. To
200
+ release a new version, update the version number in ~version.rb~, and then run
201
+ ~bundle exec rake release~, which will create a git tag for the version, push
202
+ git commits and tags, and push the ~.gem~ file to
203
+ [rubygems.org](https://rubygems.org).
204
+
205
+ ** Contributing
206
+
207
+ Bug reports and pull requests are welcome on GitHub at
208
+ https://github.com/ddoherty03/ydl.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'ydl'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ require 'pry'
11
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,43 @@
1
+ \documentclass[sign]{lawdoc}
2
+
3
+ {: require 'law_doc' :}
4
+
5
+ {:=
6
+ LawDoc.document do
7
+ title 'Brief in Support of Plaintiff\'s Motion for Summary Judgment'
8
+ kase Ydl[:cases][:erickson]
9
+ on_behalf_of 'plaintiffs'
10
+ signers Ydl[:lawyers][:ded], Ydl[:lawyers][:cjh]
11
+ sig_date '2015-11-20'
12
+ server signer
13
+ service_date sig_date
14
+ end
15
+ :}
16
+
17
+ % \overfullrule=10pt
18
+ % \geometry{showframe}
19
+ \begin{document}
20
+ \maketitlepage
21
+
22
+ \makefullcaption
23
+
24
+ \makecaption
25
+
26
+ \section{Our Lawyers}
27
+
28
+ \makeourlawyersblock
29
+
30
+ \section{Their Lawyers}
31
+
32
+ \maketheirlawyersblock
33
+
34
+ \section{Full Signature}
35
+
36
+ \makefullsignature
37
+
38
+ \section{Signature}
39
+
40
+ \makesignature
41
+
42
+ \makecertificateofservice
43
+ \end{document}
@@ -0,0 +1,79 @@
1
+ erickson:
2
+ court: ydl:/courts/sdny
3
+ judge: ydl:/judges/forrest
4
+ number: 14-CV-09061
5
+ parties:
6
+ -
7
+ person: ydl:/persons/lag
8
+ role: Plaintiff
9
+ lawyer:
10
+ - ydl:/lawyers/ded
11
+ - ydl:/lawyers/cjh
12
+ -
13
+ person: ydl:/persons/revive
14
+ role: Plaintiff
15
+ lawyer:
16
+ - ydl:/lawyers/ded
17
+ - ydl:/lawyers/cjh
18
+ -
19
+ person: ydl:/persons/erickson
20
+ role: Nominal Defendant
21
+ lawyers:
22
+ - ydl:/lawyers/dclarke
23
+ - ydl:/lawyers/jclarke
24
+ -
25
+ name: Quinn Morgan
26
+ role: Defendant
27
+ address:
28
+ street:
29
+ - 60 East 42nd Street
30
+ - Suite 1400
31
+ city: New York
32
+ state: NY
33
+ zip: 10165
34
+ lawyers:
35
+ - ydl:/lawyers/rjones
36
+ - ydl:/lawyers/mcrisp
37
+ - ydl:/lawyers/tfarrell
38
+ -
39
+ name: ZM Private Equity Fund I
40
+ role: Defendant
41
+ address:
42
+ street:
43
+ - c/o Corporation Service Company
44
+ - 2711 Centerville Rd, Suite 400
45
+ city: Wilmington
46
+ state: DE
47
+ zip: 19808
48
+ lawyers:
49
+ - ydl:/lawyers/rjones
50
+ - ydl:/lawyers/mcrisp
51
+ - ydl:/lawyers/tfarrell
52
+ -
53
+ name: ZM Private Equity Fund II
54
+ role: Defendant
55
+ address:
56
+ street:
57
+ - c/o Corporation Service Company
58
+ - 2711 Centerville Rd, Suite 400
59
+ city: Wilmington
60
+ state: DE
61
+ zip: 19808
62
+ lawyers:
63
+ - ydl:/lawyers/rjones
64
+ - ydl:/lawyers/mcrisp
65
+ - ydl:/lawyers/tfarrell
66
+ -
67
+ name: ZM EAC LLC
68
+ role: Defendant
69
+ address:
70
+ street:
71
+ - 60 East 42nd Street
72
+ - Suite 1400
73
+ city: New York
74
+ state: NY
75
+ zip: 10165
76
+ lawyers:
77
+ - ydl:/lawyers/rjones
78
+ - ydl:/lawyers/mcrisp
79
+ - ydl:/lawyers/tfarrell
@@ -0,0 +1,12 @@
1
+ require 'law_doc'
2
+ require 'pry'
3
+
4
+ LawDoc.document do
5
+ title 'Brief in Support of Plaintiff\'s Motion for Summary Judgment'
6
+ kase Ydl[:cases][:erickson]
7
+ on_behalf_of 'plaintiffs', 'nominal'
8
+ signer Ydl[:lawyers][:ded]
9
+ sig_date '2015-11-20'
10
+ server signer
11
+ service_date sig_date
12
+ end
@@ -0,0 +1,65 @@
1
+ dclarke:
2
+ name: David Clarke
3
+ sex: male
4
+ address:
5
+ street:
6
+ - DLA Piper LLP (US)
7
+ - 500 Eighth Street NW
8
+ city: Washington
9
+ state: DC
10
+ zip: 20004
11
+ email: david.clarke@dlapiper.com
12
+
13
+ jclarke:
14
+ name: John J. Clarke
15
+ sex: male
16
+ address:
17
+ street:
18
+ - DLA Piper LLP (US)
19
+ - 1251 Avenue of the Americas
20
+ city: New York
21
+ state: NY
22
+ zip: 10020
23
+ email: john.clarke@dlapiper.com
24
+
25
+ rjones:
26
+ sex: male
27
+ name: Robert G. Jones
28
+ address:
29
+ street:
30
+ - Ropes & Gray LLP
31
+ - 800 Boylston Street
32
+ city: Boston
33
+ state: MA
34
+ zip: 02199
35
+ phone: 617-951-7000
36
+ fax: 617-951-7050
37
+ email: robert.jones@ropesgray.com
38
+
39
+ mcrisp:
40
+ sex: male
41
+ name: Martin J. Crisp
42
+ address:
43
+ street:
44
+ - Ropes & Gray LLP
45
+ - 1211 Avenue of the Americas
46
+ city: New York
47
+ state: NY
48
+ zip: 10036-8704
49
+ phone: 212-596-9000
50
+ fax: 212-596-9090
51
+ email: martin.crisp@ropesgray.com
52
+
53
+ tfarrell:
54
+ sex: male
55
+ name: Timothy R. Farrell
56
+ address:
57
+ street:
58
+ - Ropes & Gray LLP
59
+ - 191 North Wacker Drive, 32nd Floor
60
+ city: Chicago
61
+ state: IL
62
+ zip: 60606
63
+ email: Timothy.Farrell@ropesgray.com
64
+ phone: 312-845-1209
65
+ fax: 312-845-5569
data/examples/mwe.tex ADDED
@@ -0,0 +1,67 @@
1
+ \documentclass{article}
2
+
3
+ \usepackage{array}
4
+ \usepackage{longtable}
5
+ \usepackage{calc}
6
+
7
+ \begin{document}
8
+
9
+ % A bit less than half the page width
10
+ \newlength{\halfwd}
11
+ \setlength{\halfwd}{((\textwidth) * \real{0.95} - \columnsep)/2}%
12
+
13
+ % A longtable that I want as one of the page components
14
+ \def\lt{%
15
+ \setlength\extrarowheight{12pt}%
16
+ \begin{longtable}{cc}%
17
+ \parbox[t]{\halfwd}{%
18
+ 11111111111111111\\
19
+ 11111111111111111111\\
20
+ 11111111111111111111}&
21
+ \parbox[t]{\halfwd}{22222222222222222222\\
22
+ 22222222222222222\\
23
+ 22222222222222222222}\\
24
+
25
+ \parbox[t]{\halfwd}{33333333333333333333\\
26
+ 33333333333333333333\\
27
+ 33333333333333333333}&
28
+ \parbox[t]{\halfwd}{44444444444444444444\\
29
+ 44444444444444444444\\
30
+ 44444444444444444444}\\
31
+
32
+ \parbox[t]{\halfwd}{55555555555555555555\\
33
+ 55555555555555555555\\
34
+ 55555555555555555555}&
35
+ \parbox[t]{\halfwd}{66666666666666666666\\
36
+ 66666666666666666666\\
37
+ 66666666666666666666}\\
38
+ \end{longtable}
39
+ }
40
+
41
+ % I expect each part of the page to be equally spaced and all the parts together
42
+ % to fill up the whole page.
43
+ \begin{center}
44
+ \hrule
45
+ Part I
46
+
47
+ \vfill
48
+ \hrule
49
+ \vfill
50
+ Part II
51
+
52
+ \vfill
53
+ \hrule
54
+ \vfill
55
+
56
+ Part III
57
+
58
+ {\ttfamily \lt}
59
+ \vfill
60
+ \hrule
61
+ \vfill
62
+ Part IV
63
+
64
+ \vfill
65
+ \hrule
66
+ \end{center}
67
+ \end{document}
@@ -0,0 +1,10 @@
1
+ erickson:
2
+ name: Erickson Incorporated
3
+ address:
4
+ street:
5
+ - c/o The Corporation Trust Company
6
+ - Corporation Trust Center
7
+ - 1209 Orange St.
8
+ city: Wilmington
9
+ state: DE
10
+ zip: 19801
@@ -0,0 +1,23 @@
1
+ \documentclass{lawdoc}
2
+
3
+ {:=
4
+ require 'law_doc'
5
+ LawDoc.document do
6
+ title 'Brief in Support of Plaintiff\'s Motion for Summary Judgment'
7
+ kase Ydl[:cases][:erickson]
8
+ on_behalf_of 'plaintiffs'
9
+ signers Ydl[:lawyers][:ded], Ydl[:lawyers][:cjh]
10
+ sig_date '2015-11-20'
11
+ server signer
12
+ service_date sig_date
13
+ end
14
+ :}
15
+
16
+ \begin{document}
17
+ \makecaption
18
+
19
+ \makesignature
20
+
21
+ \newpage
22
+ \makecertificateofservice
23
+ \end{document}