galaaz 0.4.10 → 2.0.0

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.
Files changed (391) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/LICENSE +0 -0
  4. data/README.md +3123 -882
  5. data/Rakefile +62 -41
  6. data/bin/galaaz-bootstrap +137 -0
  7. data/bin/galaaz-jruby +14 -0
  8. data/bin/galaaz_jruby_env.inc.sh +6 -0
  9. data/bin/gbookdown +64 -0
  10. data/bin/gknit +223 -6
  11. data/bin/gknit-draft +105 -0
  12. data/bin/gknit-draft.rb +28 -0
  13. data/bin/gknit_Rscript +127 -0
  14. data/bin/grun +27 -1
  15. data/bin/gstudio +49 -4
  16. data/bin/{gstudio.rb → gstudio_irb.rb} +0 -0
  17. data/bin/gstudio_pry.rb +7 -0
  18. data/bin/install-tinytex +6 -0
  19. data/bin/run_all_rspec +43 -0
  20. data/bin/run_example +14 -0
  21. data/bin/run_old_rspec +19 -0
  22. data/bin/run_rspec +23 -0
  23. data/bin/run_rspec_subset +38 -0
  24. data/bin/run_slow_rspec +19 -0
  25. data/blogs/R-on-Rails-Planning-Document.md +940 -0
  26. data/blogs/README.md +100 -0
  27. data/blogs/galaaz_ggplot/galaaz_ggplot.Rmd +38 -66
  28. data/blogs/galaaz_ggplot/galaaz_ggplot.log +754 -0
  29. data/blogs/galaaz_ggplot/galaaz_ggplot.md +364 -0
  30. data/blogs/galaaz_ggplot/galaaz_ggplot.tex +607 -0
  31. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
  32. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
  33. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/midwest_rb.png +0 -0
  34. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-markdown_github/scatter_plot_rb.png +0 -0
  35. data/blogs/galaaz_ggplot/midwest.Rmd +3 -3
  36. data/blogs/galaaz_ggplot/midwest_external_png +0 -0
  37. data/blogs/gknit/gknit.Rmd +52 -55
  38. data/blogs/gknit/gknit.md +94 -94
  39. data/blogs/gknit/gknit_files/figure-html/bubble-1.png +0 -0
  40. data/blogs/gknit/gknit_files/figure-html/diverging_bar.png +0 -0
  41. data/blogs/gknit/lst.rds +0 -0
  42. data/blogs/gknit/model.rb +1 -1
  43. data/blogs/gknit/stats.bib +0 -0
  44. data/blogs/manual/include_model_local_repro.Rmd +14 -0
  45. data/blogs/manual/include_model_local_repro.md +75 -0
  46. data/blogs/manual/lst.rds +0 -0
  47. data/blogs/manual/manual.Rmd +1582 -196
  48. data/blogs/manual/manual.log +1786 -0
  49. data/blogs/manual/manual.md +3107 -890
  50. data/blogs/manual/manual.tex +3018 -1086
  51. data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
  52. data/blogs/manual/manual_files/figure-html/diverging_bar.png +0 -0
  53. data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
  54. data/blogs/manual/model.rb +41 -0
  55. data/blogs/nse_dplyr/nse_dplyr.Rmd +277 -151
  56. data/blogs/nse_dplyr/nse_dplyr.log +928 -0
  57. data/blogs/nse_dplyr/nse_dplyr.md +457 -293
  58. data/blogs/oh_my/not_so.rb +0 -0
  59. data/blogs/oh_my/oh_my.Rmd +1234 -25
  60. data/blogs/oh_my/oh_my.log +804 -0
  61. data/blogs/oh_my/oh_my.md +1808 -228
  62. data/blogs/oh_my/oh_my.tex +821 -0
  63. data/blogs/oh_my/old.Rmd +15 -14
  64. data/blogs/ruby_plot/ruby_plot.Rmd +58 -82
  65. data/blogs/ruby_plot/ruby_plot.log +885 -0
  66. data/blogs/ruby_plot/ruby_plot.md +71 -103
  67. data/blogs/ruby_plot/ruby_plot.tex +940 -0
  68. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
  69. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
  70. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
  71. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
  72. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
  73. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
  74. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
  75. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
  76. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
  77. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
  78. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
  79. data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
  80. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  81. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  82. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  83. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  84. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  85. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  86. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  87. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  88. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  89. data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  90. data/blogs/test/test.Rmd +14 -0
  91. data/examples/50Plots_MasterList/Images/midwest-scatterplot.PNG +0 -0
  92. data/examples/50Plots_MasterList/ScatterPlot.rb +0 -0
  93. data/examples/50Plots_MasterList/scatter_plot.rb +0 -0
  94. data/examples/Bibliography/master.bib +50 -0
  95. data/examples/Bibliography/stats.bib +72 -0
  96. data/examples/R/calc.R +0 -0
  97. data/examples/R/java_interop.R +0 -0
  98. data/examples/bioconductor_deseq2_airway/Documentation/DESeq2-airway-walkthrough.md +56 -0
  99. data/examples/bioconductor_deseq2_airway/bench_galaaz_three_same_process.rb +53 -0
  100. data/examples/bioconductor_deseq2_airway/bench_r_three_same_process.R +34 -0
  101. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz.rb +33 -0
  102. data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz_optimized.rb +34 -0
  103. data/examples/bioconductor_deseq2_airway/deseq2_airway_minimal.R +30 -0
  104. data/examples/bioconductor_deseq2_airway/deseq2_airway_pipeline_for_bench.R +36 -0
  105. data/examples/islr/all.rb +13 -0
  106. data/examples/islr/ch2.spec.rb +37 -7
  107. data/examples/islr/ch3.spec.rb +11 -2
  108. data/examples/islr/ch3_boston.rb +27 -0
  109. data/examples/islr/ch3_multiple_regression.rb +0 -0
  110. data/examples/islr/ch6.spec.rb +24 -1
  111. data/examples/islr/x_y_rnorm.jpg +0 -0
  112. data/examples/latex_templates/Test-acm_article/Makefile +16 -0
  113. data/examples/latex_templates/Test-acm_article/Test-acm_article.Rmd +65 -0
  114. data/examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls +1670 -0
  115. data/examples/latex_templates/Test-acm_article/sensys-abstract.cls +703 -0
  116. data/examples/latex_templates/Test-acm_article/sigproc.bib +59 -0
  117. data/examples/latex_templates/Test-acs_article/Test-acs_article.Rmd +260 -0
  118. data/examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib +11 -0
  119. data/examples/latex_templates/Test-acs_article/acs-my_output.bib +11 -0
  120. data/examples/latex_templates/Test-acs_article/acstest.bib +17 -0
  121. data/examples/latex_templates/Test-aea_article/AEA.cls +1414 -0
  122. data/{blogs/gknit/marshal.dump → examples/latex_templates/Test-aea_article/BibFile.bib} +0 -0
  123. data/examples/latex_templates/Test-aea_article/Test-aea_article.Rmd +108 -0
  124. data/examples/latex_templates/Test-aea_article/aea.bst +1269 -0
  125. data/examples/latex_templates/Test-aea_article/multicol.sty +853 -0
  126. data/examples/latex_templates/Test-aea_article/references.bib +0 -0
  127. data/examples/latex_templates/Test-aea_article/setspace.sty +546 -0
  128. data/examples/latex_templates/Test-amq_article/Test-amq_article.Rmd +256 -0
  129. data/examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync +3397 -0
  130. data/examples/latex_templates/Test-ams_article/Test-ams_article.Rmd +215 -0
  131. data/examples/latex_templates/Test-ams_article/amstest.bib +436 -0
  132. data/examples/latex_templates/Test-asa_article/Test-asa_article.Rmd +153 -0
  133. data/examples/latex_templates/Test-asa_article/agsm.bst +1353 -0
  134. data/examples/latex_templates/Test-asa_article/bibliography.bib +233 -0
  135. data/examples/latex_templates/Test-ieee_article/IEEEtran.bst +2409 -0
  136. data/examples/latex_templates/Test-ieee_article/IEEEtran.cls +6346 -0
  137. data/examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd +175 -0
  138. data/examples/latex_templates/Test-ieee_article/mybibfile.bib +20 -0
  139. data/examples/latex_templates/Test-rjournal_article/RJournal.sty +335 -0
  140. data/examples/latex_templates/Test-rjournal_article/RJreferences.bib +18 -0
  141. data/examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd +52 -0
  142. data/examples/latex_templates/Test-springer_article/Test-springer_article.Rmd +65 -0
  143. data/examples/latex_templates/Test-springer_article/bibliography.bib +26 -0
  144. data/examples/latex_templates/Test-springer_article/spbasic.bst +1658 -0
  145. data/examples/latex_templates/Test-springer_article/spmpsci.bst +1512 -0
  146. data/examples/latex_templates/Test-springer_article/spphys.bst +1443 -0
  147. data/examples/latex_templates/Test-springer_article/svglov3.clo +113 -0
  148. data/examples/latex_templates/Test-springer_article/svjour3.cls +1431 -0
  149. data/examples/misc/baseball.csv +0 -0
  150. data/examples/misc/ggplot.rb +3 -2
  151. data/examples/misc/moneyball.rb +0 -0
  152. data/examples/misc/subsetting.rb +0 -0
  153. data/examples/multithread_shards_to_r/shards_to_r.rb +67 -0
  154. data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd +73 -0
  155. data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd +382 -0
  156. data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd +164 -0
  157. data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd +92 -0
  158. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv +482 -0
  159. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd +280 -0
  160. data/examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd +386 -0
  161. data/examples/sthda_ggplot/README.md +0 -0
  162. data/examples/sthda_ggplot/RUN.md +41 -0
  163. data/examples/sthda_ggplot/all.rb +0 -0
  164. data/examples/sthda_ggplot/one_variable_continuous/density_gg.rb +0 -0
  165. data/examples/sthda_ggplot/one_variable_continuous/geom_area.rb +0 -0
  166. data/examples/sthda_ggplot/one_variable_continuous/geom_density.rb +2 -0
  167. data/examples/sthda_ggplot/one_variable_continuous/geom_dotplot.rb +0 -0
  168. data/examples/sthda_ggplot/one_variable_continuous/geom_freqpoly.rb +0 -0
  169. data/examples/sthda_ggplot/one_variable_continuous/geom_histogram.rb +0 -0
  170. data/examples/sthda_ggplot/one_variable_continuous/histogram_density.rb +0 -0
  171. data/examples/sthda_ggplot/one_variable_continuous/stat.rb +0 -0
  172. data/examples/sthda_ggplot/one_variable_discrete/bar.rb +0 -0
  173. data/examples/sthda_ggplot/qplots/box_violin_dot.rb +0 -0
  174. data/examples/sthda_ggplot/qplots/scatter_plots.rb +0 -0
  175. data/examples/sthda_ggplot/scatter_gg.rb +0 -0
  176. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_bin2d.rb +0 -0
  177. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_density2d.rb +0 -0
  178. data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_hex.rb +0 -0
  179. data/examples/sthda_ggplot/two_variables_cont_cont/geom_point.rb +0 -0
  180. data/examples/sthda_ggplot/two_variables_cont_cont/geom_smooth.rb +0 -0
  181. data/examples/sthda_ggplot/two_variables_cont_cont/misc.rb +0 -0
  182. data/examples/sthda_ggplot/two_variables_cont_function/geom_area.rb +4 -3
  183. data/examples/sthda_ggplot/two_variables_disc_cont/geom_bar.rb +0 -0
  184. data/examples/sthda_ggplot/two_variables_disc_cont/geom_boxplot.rb +0 -0
  185. data/examples/sthda_ggplot/two_variables_disc_cont/geom_dotplot.rb +0 -0
  186. data/examples/sthda_ggplot/two_variables_disc_cont/geom_jitter.rb +0 -0
  187. data/examples/sthda_ggplot/two_variables_disc_cont/geom_line.rb +0 -0
  188. data/examples/sthda_ggplot/two_variables_disc_cont/geom_violin.rb +0 -0
  189. data/examples/sthda_ggplot/two_variables_disc_disc/geom_jitter.rb +0 -0
  190. data/examples/sthda_ggplot/two_variables_error/geom_crossbar.rb +0 -0
  191. data/ext/new_bridge/Makefile +46 -0
  192. data/ext/new_bridge/galaaz_gatekeeper_phase0.cpp +12 -0
  193. data/ext/new_bridge/galaaz_gatekeeper_phase1.cpp +1639 -0
  194. data/lib/R_interface/galaaz_device.R +20 -0
  195. data/lib/R_interface/include_engine.R +109 -0
  196. data/lib/R_interface/new_bridge_adapter.rb +824 -0
  197. data/lib/R_interface/r.rb +177 -25
  198. data/lib/R_interface/r_arrow.rb +113 -0
  199. data/lib/R_interface/r_libs.R +4 -4
  200. data/lib/R_interface/r_methods.rb +13 -116
  201. data/lib/R_interface/r_module_s.rb +0 -0
  202. data/lib/R_interface/rbinary_operators.rb +20 -2
  203. data/lib/R_interface/rclosure.rb +5 -1
  204. data/lib/R_interface/rdata_frame.rb +34 -70
  205. data/lib/R_interface/rdevice.rb +125 -0
  206. data/lib/R_interface/rdevices.R +0 -0
  207. data/lib/R_interface/renvironment.rb +10 -4
  208. data/lib/R_interface/rexpression.rb +5 -1
  209. data/lib/R_interface/rindexed_object.rb +41 -13
  210. data/lib/R_interface/rlanguage.rb +20 -62
  211. data/lib/R_interface/rlist.rb +115 -25
  212. data/lib/R_interface/rlogical_operators.rb +0 -0
  213. data/lib/R_interface/rmatrix.rb +2 -11
  214. data/lib/R_interface/rmd_indexed_object.rb +5 -1
  215. data/lib/R_interface/robject.rb +348 -290
  216. data/lib/R_interface/rpkg.rb +1 -0
  217. data/lib/R_interface/rsupport.rb +610 -331
  218. data/lib/R_interface/rsupport_scope.rb +2 -1
  219. data/lib/R_interface/rsymbol.rb +50 -0
  220. data/lib/R_interface/ruby_callback.rb +2 -3
  221. data/lib/R_interface/ruby_extensions.rb +225 -175
  222. data/lib/R_interface/runary_operators.rb +0 -0
  223. data/lib/R_interface/rvector.rb +147 -31
  224. data/lib/galaaz.rb +0 -0
  225. data/lib/galaaz_jruby.rb +22 -0
  226. data/lib/gknit/diagnostics.rb +50 -0
  227. data/lib/gknit/draft.rb +111 -0
  228. data/lib/gknit/include_engine.rb +15 -7
  229. data/lib/gknit/knitr_engine.rb +223 -107
  230. data/lib/gknit/rb_engine.rb +3 -3
  231. data/lib/gknit/ruby_engine.rb +0 -0
  232. data/lib/gknit.rb +3 -0
  233. data/lib/new_bridge/bootstrap/windows_bootstrap.rb +285 -0
  234. data/lib/new_bridge/envelope.rb +51 -0
  235. data/lib/new_bridge/eval_result.rb +26 -0
  236. data/lib/new_bridge/framing.rb +39 -0
  237. data/lib/new_bridge/instance_pool_client.rb +38 -0
  238. data/lib/new_bridge/r_instance_manager.rb +404 -0
  239. data/lib/new_bridge/session_client.rb +530 -0
  240. data/lib/new_bridge/tcp_framed.rb +44 -0
  241. data/lib/new_bridge.rb +9 -0
  242. data/lib/util/exec_ruby.rb +95 -46
  243. data/lib/util/inline_file.rb +35 -30
  244. data/new_bridge_specs/benchmark_phase5_5_unboxing_spec.rb +96 -0
  245. data/new_bridge_specs/eval_r_async_spec.rb +113 -0
  246. data/new_bridge_specs/integration_phase5_1_concurrent_spec.rb +50 -0
  247. data/new_bridge_specs/integration_phase5_1_eval_spec.rb +16 -0
  248. data/new_bridge_specs/integration_phase5_1_r_api_spec.rb +25 -0
  249. data/new_bridge_specs/integration_phase5_1_smoke_spec.rb +31 -0
  250. data/new_bridge_specs/integration_phase5_2_dataframe_unboxing_spec.rb +19 -0
  251. data/new_bridge_specs/integration_phase5_2_handle_eval_unboxing_spec.rb +25 -0
  252. data/new_bridge_specs/integration_phase5_3_callback_args_spec.rb +28 -0
  253. data/new_bridge_specs/integration_phase5_3_callback_error_spec.rb +22 -0
  254. data/new_bridge_specs/integration_phase5_3_callback_timeout_spec.rb +28 -0
  255. data/new_bridge_specs/integration_phase5_3_callbacks_smoke_spec.rb +22 -0
  256. data/new_bridge_specs/integration_phase5_3_edge_cases_spec.rb +52 -0
  257. data/new_bridge_specs/integration_phase5_3_nested_spec.rb +30 -0
  258. data/new_bridge_specs/integration_phase5_4_concurrent_sessions_spec.rb +53 -0
  259. data/new_bridge_specs/integration_phase5_4_nested_session_callbacks_spec.rb +49 -0
  260. data/new_bridge_specs/integration_phase5_4_session_routing_spec.rb +38 -0
  261. data/new_bridge_specs/integration_phase5_5_stress_concurrency_spec.rb +52 -0
  262. data/new_bridge_specs/integration_phase5_5_unbox_walk_spec.rb +46 -0
  263. data/new_bridge_specs/phase0_protocol_spec.rb +96 -0
  264. data/new_bridge_specs/phase1_req_ret_spec.rb +66 -0
  265. data/new_bridge_specs/phase2_multi_instance_spec.rb +67 -0
  266. data/new_bridge_specs/phase3_callbacks_spec.rb +71 -0
  267. data/new_bridge_specs/phase4_2_hardening_spec.rb +252 -0
  268. data/new_bridge_specs/phase4_3_r_instance_manager_spec.rb +85 -0
  269. data/new_bridge_specs/phase4_nested_callbacks_spec.rb +123 -0
  270. data/r_requires/ggplot.rb +0 -0
  271. data/r_requires/knitr.rb +0 -0
  272. data/specs/all.rb +15 -11
  273. data/specs/arrow_from_ruby_batches_spec.rb +50 -0
  274. data/specs/arrow_semantics_spec.rb +64 -0
  275. data/specs/bridge_concurrent_spec.rb +46 -0
  276. data/specs/bridge_nested_spec.rb +25 -0
  277. data/specs/dataframe_semantics_spec.rb +122 -0
  278. data/specs/dataframe_single_index_logical_filter_spec.rb +21 -0
  279. data/specs/dispatch_probe_cache_spec.rb +38 -0
  280. data/specs/dispatch_probe_error_class_fallback_spec.rb +20 -0
  281. data/specs/dispatch_probe_fallback_spec.rb +18 -0
  282. data/specs/environment_semantics_spec.rb +89 -0
  283. data/specs/field_access_spec.rb +31 -0
  284. data/specs/figures/bg.jpeg +0 -0
  285. data/specs/figures/bg.png +0 -0
  286. data/specs/figures/bg.svg +168 -57
  287. data/specs/figures/dose_len.png +0 -0
  288. data/specs/figures/no_args.jpeg +0 -0
  289. data/specs/figures/no_args.png +0 -0
  290. data/specs/figures/no_args.svg +168 -57
  291. data/specs/figures/width_height.jpeg +0 -0
  292. data/specs/figures/width_height.png +0 -0
  293. data/specs/figures/width_height_units1.jpeg +0 -0
  294. data/specs/figures/width_height_units1.png +0 -0
  295. data/specs/figures/width_height_units2.jpeg +0 -0
  296. data/specs/figures/width_height_units2.png +0 -0
  297. data/specs/formula_semantics_spec.rb +81 -0
  298. data/specs/galaaz_util_exec_ruby_spec.rb +85 -0
  299. data/specs/galaaz_util_inline_file_spec.rb +54 -0
  300. data/specs/gknit_cli_option_permutation_spec.rb +24 -0
  301. data/specs/gknit_include_engine_spec.rb +72 -0
  302. data/specs/gknit_install_timeout_report_spec.rb +69 -0
  303. data/specs/gknit_internal_error_report_spec.rb +57 -0
  304. data/specs/gknit_vector_map_output_spec.rb +59 -0
  305. data/specs/globalenv_guardrail_spec.rb +52 -0
  306. data/specs/language_expression_semantics_spec.rb +145 -0
  307. data/specs/list_semantics_spec.rb +111 -0
  308. data/specs/new_bridge_bulk_dataframe_transfer_spec.rb +44 -0
  309. data/specs/new_bridge_bulk_vector_transfer_spec.rb +73 -0
  310. data/specs/new_bridge_callback_timeout_spec.rb +69 -0
  311. data/specs/new_bridge_eval_r_fallback_spec.rb +55 -0
  312. data/specs/nil_null_spec.rb +42 -0
  313. data/specs/object_build_phase2_spec.rb +53 -0
  314. data/specs/phase1_callback_bridge_spec.rb +84 -0
  315. data/specs/phase2_gknit_generic_rendering_guardrail_spec.rb +46 -0
  316. data/specs/phase2_gknit_no_raw_code_leakage_spec.rb +43 -0
  317. data/specs/phase3_gknit_generic_graphics_capture_spec.rb +71 -0
  318. data/specs/plot_device_semantics_spec.rb +28 -0
  319. data/specs/plot_snapshot_semantics_spec.rb +58 -0
  320. data/specs/protocol_result_spec.rb +236 -0
  321. data/specs/r_batch_fail_fast_spec.rb +47 -0
  322. data/specs/r_bridge_bootstrap_spec.rb +11 -0
  323. data/specs/r_devices.spec.rb +1 -1
  324. data/specs/r_eval.spec.rb +16 -18
  325. data/specs/r_function.spec.rb +1 -1
  326. data/specs/r_instance_manager_spec.rb +285 -0
  327. data/specs/r_list_apply.spec.rb +15 -15
  328. data/specs/r_matrix.spec.rb +0 -0
  329. data/specs/r_nse.spec.rb +5 -5
  330. data/specs/r_object_send_dispatch_spec.rb +13 -0
  331. data/specs/r_vector_comparator_spec.rb +8 -0
  332. data/specs/r_vector_creation.spec.rb +0 -0
  333. data/specs/r_vector_functions.spec.rb +0 -0
  334. data/specs/r_vector_object.spec.rb +0 -0
  335. data/specs/r_vector_operators.spec.rb +0 -0
  336. data/specs/r_vector_structured_scalar_reads_spec.rb +35 -0
  337. data/specs/r_vector_subsetting.spec.rb +0 -0
  338. data/specs/range_helper_spec.rb +21 -0
  339. data/specs/rsupport_scope_spec.rb +28 -0
  340. data/specs/rsupport_var_name_thread_safety_spec.rb +24 -0
  341. data/specs/scalar_character_spec.rb +44 -0
  342. data/specs/scoped_symbol_dsl_refinement_spec.rb +40 -0
  343. data/specs/session_env_bridge_spec.rb +25 -0
  344. data/specs/simplecov_bootstrap_spec.rb +10 -0
  345. data/specs/spec_helper.rb +10 -0
  346. data/specs/tmp.rb +41 -20
  347. data/specs/unboxing_recursion_regression_spec.rb +30 -0
  348. data/specs/unboxing_spec.rb +49 -0
  349. data/specs/verify_callbacks.rb +42 -0
  350. data/sty/galaaz.sty +0 -0
  351. data/version.rb +1 -1
  352. metadata +239 -71
  353. data/blogs/galaaz_ggplot/galaaz_ggplot.aux +0 -41
  354. data/blogs/galaaz_ggplot/galaaz_ggplot.html +0 -705
  355. data/blogs/galaaz_ggplot/galaaz_ggplot.out +0 -10
  356. data/blogs/galaaz_ggplot/galaaz_ggplot.pdf +0 -0
  357. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/midwest_rb.pdf +0 -0
  358. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/scatter_plot_rb.pdf +0 -0
  359. data/blogs/galaaz_ggplot/midwest.html +0 -188
  360. data/blogs/gknit/gknit.html +0 -2266
  361. data/blogs/gknit/gknit.pdf +0 -0
  362. data/blogs/gknit/gknit.tex +0 -1358
  363. data/blogs/manual/graph.rb +0 -29
  364. data/blogs/manual/manual.html +0 -2995
  365. data/blogs/manual/manual.pdf +0 -0
  366. data/blogs/manual/manual_files/figure-latex/diverging_bar.pdf +0 -0
  367. data/blogs/nse_dplyr/nse_dplyr.html +0 -960
  368. data/blogs/nse_dplyr/nse_dplyr.pdf +0 -0
  369. data/blogs/nse_dplyr/nse_dplyr.tex +0 -1373
  370. data/blogs/oh_my/oh_my.html +0 -680
  371. data/blogs/ruby_plot/ruby_plot.Rmd_external_figs +0 -662
  372. data/blogs/ruby_plot/ruby_plot.html +0 -729
  373. data/blogs/ruby_plot/ruby_plot.pdf +0 -0
  374. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.svg +0 -57
  375. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.svg +0 -106
  376. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.svg +0 -110
  377. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.svg +0 -174
  378. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg +0 -236
  379. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.svg +0 -296
  380. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.svg +0 -236
  381. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.svg +0 -218
  382. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.svg +0 -128
  383. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.svg +0 -150
  384. data/examples/paper/paper.rb +0 -36
  385. data/specs/r_dataframe.spec.rb +0 -379
  386. data/specs/r_environment.spec.rb +0 -140
  387. data/specs/r_formula.spec.rb +0 -232
  388. data/specs/r_language.spec.rb +0 -112
  389. data/specs/r_list.spec.rb +0 -293
  390. data/specs/r_plots.spec.rb +0 -72
  391. data/specs/ruby_expression.spec.rb +0 -315
@@ -0,0 +1,546 @@
1
+ %%% ======================================================================
2
+ %%% @LaTeX-style-file{
3
+ %%% filename = "setspace.sty",
4
+ %%% version = "6.7",
5
+ %%% date = "Fri 1 December 2000",
6
+ %%% time = "17:49 UT+11",
7
+ %%% author = "Geoffrey Tobin",
8
+ %%% address = "Department of Electronic Engineering
9
+ %%% Faculty of Science and Technology
10
+ %%% La Trobe University
11
+ %%% Bundoora VIC 3086
12
+ %%% Australia",
13
+ %%% email = "G.Tobin@latrobe.edu.au (Internet)",
14
+ %%% telephone = "(+ 613) 9479-3736",
15
+ %%% FAX = "(+ 613) 9479-3025",
16
+ %%% supported = "yes",
17
+ %%% archived = "CTAN",
18
+ %%% distribution = "freely redistributable",
19
+ %%% keywords = "LaTeX package, line spacing",
20
+ %%% codetable = "ISO/ASCII",
21
+ %%% checksum = "11793 546 2608 21972",
22
+ %%% docstring = "setspace.sty is a LaTeX (2e) package.
23
+ %%% Comments and bug reports welcome!
24
+ %%%
25
+ %%% This includes GDG's modification to Erica Harris'
26
+ %%% setspace.sty. The main aspects of this
27
+ %%% modification deal with the definitions of
28
+ %%% \singlespacing \onehalfspacing, and
29
+ %%% \doublespacing, (these are near the beginning of
30
+ %%% the file). Primarily, these deal with adding
31
+ %%% fontsize changes to guarantee that the new
32
+ %%% baseline is properly defined and placed into
33
+ %%% action. The extra \vskip in the definition of
34
+ %%% \singlespacing seems to make for a cleaner
35
+ %%% transition from multiple spacing back to single
36
+ %%% spacing. These did not appear warrranted for
37
+ %%% other size changes.
38
+ %%%
39
+ %%% Modified by GDG on November 1, 1992, to allow
40
+ %%% for use of New Font Selection Scheme.
41
+ %%%
42
+ %%% Modified by GDG on June 4, 1993, to correct
43
+ %%% for spacing tokens in definition of \@setsize
44
+ %%% Thanks to Kaja P. Christiansen <kaja@daimi.aau.dk>
45
+ %%% for the fix!!
46
+ %%%
47
+ %%% Modified by GDG on May 24, 1994, to change toggle
48
+ %%% definition from \selectfont to \@newbaseline.
49
+ %%%
50
+ %%% Modified by GDG on May 25, 1994, to add
51
+ %%% definition of \everydisplay -- this part of
52
+ %%% the code was apparently written by Geoffrey
53
+ %%% Tobin on Thu 23 Jan 1992 and was provided by
54
+ %%% stanton@haas.berkeley.edu (Richard Stanton).
55
+ %%% This should help with some of the awkward math
56
+ %%% placements in changing spacings.
57
+ %%%
58
+ %%% Modified by GT on 23 Jan 1996, to correct
59
+ %%% \everymath bug, first reported by Mario
60
+ %%% Wolczko <mario@cs.man.ac.uk> on 9 June 1992.
61
+ %%%
62
+ %%% Modified by GT on 23 Jan 1996, to correct
63
+ %%% usage of comment characters in macro
64
+ %%% definitions.
65
+ %%%
66
+ %%% Modified by GT on 23 Jan 1996, to update
67
+ %%% (adjusted) \@xfloat definition for LaTeX2e.
68
+ %%% Bug report was courtesy of Kay Nettle.
69
+ %%%
70
+ %%% Modified by GT on 24 Jan 1996, to update
71
+ %%% (adjusted) \@footnotetext definition for
72
+ %%% LaTeX2e, and to add an adjusted LaTeX2e
73
+ %%% \@mpfootnotext definition for minipages.
74
+ %%% Bug report was courtesy Kay Nettle.
75
+ %%%
76
+ %%% Changed by GT on 6 Feb 1996, into a LaTeX2e
77
+ %%% package.
78
+ %%%
79
+ %%% Made more package-like by GT on 14 Feb 1996,
80
+ %%% by adding standard messages.
81
+ %%%
82
+ %%% GT replaced \@normalsize by \normalsize on 28
83
+ %%% Sep 1996. This change was successively
84
+ %%% advised by:
85
+ %%%
86
+ %%% Rowland J.~Bartlett
87
+ %%% <R.J.Bartlett@bolton.ac.uk>
88
+ %%% on Tue 6 Aug 96,
89
+ %%%
90
+ %%% Ted Stern
91
+ %%% <stern@amath.washington.edu>
92
+ %%% on Wed 7 Aug 96,
93
+ %%%
94
+ %%% Michal Jaegermann
95
+ %%% <michal@ellpspace.math.ualberta.ca>
96
+ %%% on Fri 27 Sep 96.
97
+ %%%
98
+ %%% GT: Sat 28 Sep 1996: Added call to
99
+ %%% \setspace@size in \setstretch, as suggested
100
+ %%% by David Hull <hull@cs.uiuc.edu>
101
+ %%% on Wed 24 July 1996.
102
+ %%%
103
+ %%% GT: Sat 28 Sep 1996: Pared \setspace@size
104
+ %%% mercilessly down to \@currsize, following
105
+ %%% advice given on Fri 27 Sep 1996 by Michal
106
+ %%% Jaegermann <michal@ellpspace.math.ualberta.ca>.
107
+ %%% Retained this macro for flexibility.
108
+ %%%
109
+ %%% Code rearranged by GT, Sat 28 Sep 1996, to give
110
+ %%% greater prominence to \setstretch.
111
+ %%%
112
+ %%% Also, GT changed (Sat 28 Sep 1996) many
113
+ %%% occurrences of \def to \newcommand,
114
+ %%% \renewcommand, or \newenvironment,
115
+ %%% as seemed appropriate.
116
+ %%%
117
+ %%% GT, Tue 10 Dec 1996: Following a suggestion
118
+ %%% by Ted Stern, the `single' spacing is now
119
+ %%% settable by the user. This is for slightly
120
+ %%% large fonts such as Lucida Bright.
121
+ %%%
122
+ %%% GT, Wed 11 Dec 1996: For simplicity and
123
+ %%% maintainability, call \onehalfspacing in
124
+ %%% the onehalfspace environment, and
125
+ %%% \doublespacing in the doublespace
126
+ %%% environment.
127
+ %%%
128
+ %%% GT, Wed 11 Dec 1996: Also deleted
129
+ %%% \setspace@size from \setstretch,
130
+ %%% as \@currsize suffices.
131
+ %%%
132
+ %%% Modified by Brett Presnell (BP)
133
+ %%% <presnell@maths.anu.edu.au> on 21 Mar 1998
134
+ %%% to add nodisplayskipstretch option, which
135
+ %%% turns off the stretching of the space
136
+ %%% before and after displays, which is often
137
+ %%% excessive, particularly with doublespaced
138
+ %%% documents. Also added the
139
+ %%% setdisplayskipstretch command, which allows
140
+ %%% the user to choose by how much to stretch
141
+ %%% the space before and after displays
142
+ %%% independently from the setting of
143
+ %%% baselinestretch. This works regardless of
144
+ %%% whether the nodisplayskipstretch option is
145
+ %%% in effect.
146
+ %%%
147
+ %%% GT, Wed 15 Apr 1998: Added the singlespace*
148
+ %%% environment requested by
149
+ %%% Mark Olesen <olesen@weber.me.queensu.ca>
150
+ %%% on Sat 24 May 1997 and Wed 18 June 1997.
151
+ %%% This is reported to give improved vertical
152
+ %%% spacing around itemize and quote environments.
153
+ %%%
154
+ %%% GT, Wed 15 Apr 1998: David Hull pointed out on
155
+ %%% Fri 12 Dec 1997 that the \belowdisplayskip line
156
+ %%% in the \everydisplay was mistyped. Now fixed.
157
+ %%%
158
+ %%% GT, Thu 26 Nov 1998: Finally got round to
159
+ %%% fixing the absence of \begingroup from
160
+ %%% onehalfspace and doublespace environments.
161
+ %%% Thanks to: Bernd Schandl, Ron Smith,
162
+ %%% Himanshu Gohel, and Kevin Ruland, for bringing
163
+ %%% it to my long overdue attention.
164
+ %%%
165
+ %%% GT, Tue 27 July 1999: On Saturday 24 July
166
+ %%% 1999, Alexander L. Wolf <alw@cs.colrado.edu>
167
+ %%% informed me that the \doublespace and
168
+ %%% \onehalfspace _macros_ are still at fault.
169
+ %%%
170
+ %%% GT, Fri 3 March 2000: Today Stefano
171
+ %%% Lacaprara of Italy brought my attention to
172
+ %%% the need to extend the commands and macros
173
+ %%% to point sizes other than 10, 11 and 12.
174
+ %%% Since there's no general formula for the
175
+ %%% line stretch values in terms of point size,
176
+ %%% and they vary only slightly between 10, 11
177
+ %%% and 12 pt, and furthermore the values were
178
+ %%% presumably optimised specifically for the
179
+ %%% Computer Modern fonts, i've chosen to use
180
+ %%% the 10 pt values as the generic defaults.
181
+ %%%
182
+ %%% GT, Fri 1 December 2000: George Pearson
183
+ %%% requested package options for the three
184
+ %%% common spacings.
185
+ %%%
186
+ %%% The checksum field above contains a CRC-16
187
+ %%% checksum as the first value, followed by the
188
+ %%% equivalent of the standard UNIX wc (word
189
+ %%% count) utility output of lines, words, and
190
+ %%% characters. This is produced by Robert
191
+ %%% Solovay's checksum utility."
192
+ %%% }
193
+ %%% ======================================================================
194
+ %% FILE: setspace.sty in SYS2.TEX.PUB.ISULATEX.STYLES
195
+ %% AUTHOR: Erica M. S. Harris
196
+ %% DATE: April 1990
197
+ %% MOD: March 1991
198
+ %%%
199
+ %%% Update to LaTeX (2e) : 6 Feb 1996.
200
+ %%% Description: LaTeX Document Package "setspace"
201
+ %%%
202
+ %%% Usage:
203
+ %%% \documentclass[...]{...}
204
+ %%% \usepackage{setspace}
205
+ %%%
206
+ %% Based on the doublespace option created by Stephen Page.
207
+ %%
208
+ %% This style option provides commands and environments for doing
209
+ %% double and one-and-a-half spacing based on pt size.
210
+ %%
211
+ %% Single spacing is the default.
212
+ %%
213
+ %% Three commands, \singlespacing, \onehalfspacing, and
214
+ %% \doublespacing, are for use in the preamble to set the overall
215
+ %% spacing for the document. If a different spacing is required then
216
+ %% the \setstretch{baselinestretch} command can be used in the
217
+ %% preamble to set the baselinestretch appropriately. The default
218
+ %% spacing with this style option is single spacing.
219
+ %%
220
+ %% Three environments, singlespace, onehalfspace, and doublespace,
221
+ %% allow the spacing to be changed within the document. Both the
222
+ %% onehalfspace and doublespace environments are intended to increase
223
+ %% the spacing, so the onehalfspace environment should not be used in
224
+ %% a double spaced document. If an increased spacing different from
225
+ %% one-and-a-half or double spacing is required then the spacing
226
+ %% environment can be used. The spacing environment takes one
227
+ %% argument which is the larger baselinestretch to use,
228
+ %% e.g., \begin{spacing}{2.5}.
229
+ %%
230
+ %% \footins is adjusted the same as \parskip - appears to work. Lose
231
+ %% stretch parts but don't consider that to be crucial
232
+ %%
233
+ %% Removed code for altering spacing before and after displayed
234
+ %% equations - just looked too much.
235
+ %%
236
+ %% MODS:
237
+ %% Redefinition of \spacing and \endspacing for consistency with
238
+ %% TeX 3.x inserted by George Greenwade. Modification provided by
239
+ %% Philip Ross (ROSS@UK.AC.ABDN.BIOMED) and John Byrne via INFO-TeX.
240
+ %%
241
+ %% PLEASE REPORT ANY BUGS
242
+ %%
243
+ %% Old Documentation follows:
244
+ %% 1. A new environment "singlespace" is provided, within which single
245
+ %% spacing will apply.
246
+ %% JFL - changed so that it works in regular text and so that
247
+ %% vertical space before and after is correctly computed
248
+ %% 2. Double spacing is turned off within footnotes and floats (figures
249
+ %% and tables).
250
+ %% 3. Proper double spacing happens below tabular environments and in
251
+ %% other places where LaTeX uses a strut.
252
+ %% 4. Slightly more space is inserted before footnotes.
253
+ %% 5. JFL - fixes spacing before and after displayed math
254
+ %%
255
+ %%
256
+ %% mods: Jean-Francois Lamy
257
+ %% lamy@ai.toronto.edu
258
+ %% lamy@utai.uucp
259
+ %%
260
+ %% POSSIBLE BUGS:
261
+ %% . Increasing struts may possibly cause some other obscure part of
262
+ %% formatting to fall over.
263
+ %% . \begin{singlespace}\begin{quote} produces the wrong spacing before
264
+ %% the quote (extra glue is inserted).
265
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266
+
267
+ \NeedsTeXFormat {LaTeX2e}[1994/12/01]
268
+ \def \filename {setspace.sty}
269
+ \def \filedate {2000/12/01}
270
+ \def \fileversion {6.7}
271
+ \ProvidesPackage {setspace}[\filedate\space\fileversion\space
272
+ Contributed and Supported LaTeX2e package]
273
+ \typeout {Package: `setspace' \fileversion\space <\filedate>}
274
+
275
+ % BP: add nodisplayskipstretch option and \setdisplayskipstretch command.
276
+
277
+ \newcommand{\displayskipstretch}{\baselinestretch}
278
+ \newcommand{\setdisplayskipstretch}[1]{\renewcommand{\displayskipstretch}{#1}}
279
+ \DeclareOption{nodisplayskipstretch}{\setdisplayskipstretch{1.0}}
280
+
281
+ % GT: add George Pearsons' suggested options.
282
+
283
+ \DeclareOption{singlespacing}{\AtEndOfPackage{\singlespacing}}
284
+ \DeclareOption{onehalfspacing}{\AtEndOfPackage{\onehalfspacing}}
285
+ \DeclareOption{doublespacing}{\AtEndOfPackage{\doublespacing}}
286
+
287
+ \ProcessOptions
288
+
289
+ % GT: Sat 28 Sep 1996: Widely using \newcommand, \renewcommand, and
290
+ % \newenvironment, instead of \def.
291
+
292
+ % ** Line space commands.
293
+
294
+ \newcommand{\setstretch}[1]{%
295
+ \def\baselinestretch{#1}%
296
+ \@currsize
297
+ }
298
+
299
+ % GT: Sat 28 Sep 1996: spacing commands and environments modified to
300
+ % use \setstretch instead of \baselinestretch.
301
+ %
302
+ % GT: Sat 28 Sep 1996: No, I don't know understand the line spacing
303
+ % algorithms! If someone (LaTeX team) can enlighten me as to the
304
+ % general rule, please do! It would be very pleasant if setspace.sty
305
+ % were suited for document font sizes other than 10, 11 and 12 pt.
306
+ %
307
+ % GT: Tue 10 Dec 1996: Instead of fixing singlespacing to exact unity,
308
+ % allow user to redefine it (only slightly, please!) from its initial
309
+ % value of unity, in the case when a particular font is slightly larger
310
+ % or slightly smaller than its point size would indicate. This change
311
+ % affects setspace's single spacing commands, and LaTeX's footnote and
312
+ % float environments. The one and a half, double, and arbitrary
313
+ % spacing commands are unaltered.
314
+
315
+ \newcommand{\SetSinglespace}[1]{%
316
+ \def\setspace@singlespace{#1}%
317
+ }
318
+
319
+ % Here's the default single line spacing value.
320
+ \SetSinglespace{1}
321
+
322
+ \newcommand{\singlespacing}{%
323
+ \setstretch {\setspace@singlespace}% normally 1
324
+ \vskip \baselineskip % Correction for coming into singlespace
325
+ }
326
+
327
+ \newcommand{\onehalfspacing}{%
328
+ \setstretch{1.25}% default
329
+ \ifcase \@ptsize \relax % 10pt
330
+ \setstretch {1.25}%
331
+ \or % 11pt
332
+ \setstretch {1.213}%
333
+ \or % 12pt
334
+ \setstretch {1.241}%
335
+ \fi
336
+ }
337
+
338
+ \newcommand{\doublespacing}{%
339
+ \setstretch {1.667}% default
340
+ \ifcase \@ptsize \relax % 10pt
341
+ \setstretch {1.667}%
342
+ \or % 11pt
343
+ \setstretch {1.618}%
344
+ \or % 12pt
345
+ \setstretch {1.655}%
346
+ \fi
347
+ }
348
+
349
+ % ** Modification of the LaTeX command \@setsize.
350
+
351
+ %---Stretch the baseline BEFORE calculating the strut size. This improves
352
+ % spacing below tabular environments etc., probably...
353
+ % Comments are welcomed.
354
+
355
+ % GT: Sun 29 Sep 1996: Question: Is this code anywhere near correct
356
+ % since this part of LaTeX (in, eg, latex.ltx) has been greatly changed?
357
+
358
+ % GT: Sun 29 Sep 1996: The meanings of the arguments to \@setsize
359
+ % appear to be (whatever these may signify) :
360
+ % current size; font baselineskip; ignored (!); and font size.
361
+
362
+ % GT: Sun 29 Sep 1996: Note that \@setsize (in latest LaTeX,
363
+ % \@setfontsize, which is called by \@setsize) seems to be the only
364
+ % place in purely modern LaTeX where \@currsize is set, and ltxguide.cls
365
+ % seems to be the only file in the LaTeX base distribution that uses it!
366
+
367
+ \def\@setsize#1#2#3#4{%
368
+ % Modified 1993.04.07--GDG per KPC
369
+ \@nomath#1%
370
+ \let\@currsize#1%
371
+ \baselineskip #2%
372
+ \baselineskip \baselinestretch\baselineskip
373
+ \parskip \baselinestretch\parskip
374
+ \setbox\strutbox \hbox{%
375
+ \vrule height.7\baselineskip
376
+ depth.3\baselineskip
377
+ width\z@}%
378
+ \skip\footins \baselinestretch\skip\footins
379
+ \normalbaselineskip\baselineskip#3#4}
380
+
381
+ % ** Float and footnote adjustments to compensate for a change in the
382
+ % ** main text's line spacing.
383
+
384
+ %---Increase the space between last line of text and footnote rule.
385
+ %\skip\footins 20pt plus4pt minus4pt
386
+
387
+ %---Reset baselinestretch within floats and footnotes.
388
+
389
+ % GT: Tue 23 Jan 1996: This is where the conflict with the combination
390
+ % of the color package and the figure environment used to occur.
391
+
392
+ % Floats.
393
+
394
+ % GT: Sat 28 Sep 1996: \@xfloat is the only place where \normalsize
395
+ % is still used in setspace.sty !
396
+
397
+ \let\latex@xfloat=\@xfloat
398
+ \def\@xfloat #1[#2]{%
399
+ \latex@xfloat #1[#2]%
400
+ \def\baselinestretch{\setspace@singlespace}%
401
+ \normalsize
402
+ }
403
+
404
+ % GT: Wed 24 Jan 1996: This footnote code was copied from LaTeX and
405
+ % modified rather naively. It had to be brought up to date, not only
406
+ % because of LaTeX's new color ability, but also because ther had
407
+ % been major changes to this code in LaTeX at least as far back as
408
+ % March 1992.
409
+
410
+ % Normal, bottom of the page, footnotes.
411
+ %
412
+ % GT: Based HEAVILY on original LaTeX (2e) code. A standard hook would
413
+ % be MUCH preferred, so that LaTeX's footnote implementation needn't be
414
+ % copied each time it changes.
415
+ %
416
+ % GT: The \protected@edef requires at least the December 1994 LaTeX.
417
+ % This is precisely the kind of VERSION DEPENDENCY situation that
418
+ % cannot (AFAIK) be avoided, because LaTeX (2e) LACKS appropriate
419
+ % standard hooks and/or context markers.
420
+
421
+ \long\def\@footnotetext#1{%
422
+ \insert\footins{%
423
+ % GT: Next line added. Hook desired here!
424
+ \def\baselinestretch {\setspace@singlespace}%
425
+ \reset@font\footnotesize
426
+ \interlinepenalty\interfootnotelinepenalty
427
+ \splittopskip\footnotesep
428
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
429
+ \hsize\columnwidth
430
+ \@parboxrestore
431
+ \protected@edef\@currentlabel{%
432
+ \csname p@footnote\endcsname\@thefnmark
433
+ }%
434
+ \color@begingroup
435
+ \@makefntext{%
436
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
437
+ \color@endgroup}}
438
+
439
+ % Minipage footnotes.
440
+
441
+ \long\def\@mpfootnotetext#1{%
442
+ \global\setbox\@mpfootins\vbox{%
443
+ \unvbox \@mpfootins
444
+ % GT: Next line added. Hook desired here!
445
+ \def\baselinestretch {\setspace@singlespace}%
446
+ \reset@font\footnotesize
447
+ \hsize\columnwidth
448
+ \@parboxrestore
449
+ \protected@edef\@currentlabel{%
450
+ \csname p@mpfootnote\endcsname\@thefnmark}%
451
+ \color@begingroup
452
+ \@makefntext{%
453
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
454
+ \color@endgroup}}
455
+
456
+ % ** Line space environments.
457
+
458
+ % A single spaced quote (say) is done by surrounding singlespace with quote.
459
+
460
+ \newenvironment{singlespace}{%
461
+ \vskip \baselineskip
462
+ \setstretch {\setspace@singlespace}%
463
+ \vskip -\baselineskip
464
+ }{%
465
+ \par
466
+ }
467
+
468
+ % GT (c/o Mark Olesen), Wed 15 April 1998.
469
+
470
+ \newenvironment{singlespace*}{%
471
+ \setstretch {\setspace@singlespace}%
472
+ \vskip -\baselineskip
473
+ }{%
474
+ \vskip -0.5\baselineskip
475
+ }
476
+
477
+ % spacing, doublespace and onehalfspace all are meant to INCREASE the
478
+ % spacing (i.e. calling onehalfspace from within doublespace will not
479
+ % produce a graceful transition between spacings)
480
+ %
481
+ % Next two definitions fixed for consistency with TeX 3.x
482
+
483
+ % In order to use \newenvironment, while easily using same code for
484
+ % end of each environment, the code that used to be in \endspacing has
485
+ % been moved into a new (but internal) macro, \restore@spacing.
486
+
487
+ \newcommand{\restore@spacing}{%
488
+ \par
489
+ \vskip \parskip
490
+ \vskip \baselineskip
491
+ \endgroup
492
+ \vskip -\parskip
493
+ \vskip -\baselineskip
494
+ }
495
+
496
+ \newenvironment{spacing}[1]{%
497
+ \par
498
+ \begingroup % moved from \endspacing by PGBR 29-1-91
499
+ \setstretch {#1}%
500
+ }{%
501
+ \restore@spacing
502
+ }
503
+
504
+ % one and a half spacing is 1.5 x pt size
505
+ \newenvironment{onehalfspace}{%
506
+ \begingroup
507
+ \onehalfspacing
508
+ }{%
509
+ \restore@spacing
510
+ }
511
+
512
+ % double spacing is 2 x pt size
513
+ \newenvironment{doublespace}{%
514
+ \begingroup
515
+ \doublespacing
516
+ }{%
517
+ \restore@spacing
518
+ }
519
+
520
+ % GT: EMSH chose to omit display math part that follows.
521
+ % She wrote (see above) that the "altered spacing before and after displayed
522
+ % equations ... just looked too much".
523
+ %
524
+ % Fix up spacing before and after displayed math
525
+ % (arraystretch seems to do a fine job for inside LaTeX displayed math,
526
+ % since array and eqnarray seem to be affected as expected).
527
+ % Changing \baselinestretch and doing a font change also works if done here,
528
+ % but then you have to change @setsize to remove the call to @nomath)
529
+ %
530
+ % GT: The \belowdisplayskip line was mistyped; now fixed, courtesy of
531
+ % David Hull.
532
+ %
533
+ % GT: Brett Parnell has addressed EMSH's concern by replacing
534
+ % \baselinestretch by \displayskipstretch in displays, as follows.
535
+
536
+ \everydisplay\expandafter{%
537
+ \the\everydisplay
538
+ \abovedisplayskip \displayskipstretch\abovedisplayskip
539
+ \belowdisplayskip \displayskipstretch\belowdisplayskip
540
+ \abovedisplayshortskip \displayskipstretch\abovedisplayshortskip
541
+ \belowdisplayshortskip \displayskipstretch\belowdisplayshortskip
542
+ }
543
+
544
+ \endinput
545
+
546
+ %%% EOF.