Guest User

Untitled

a guest
Oct 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.60 KB | None | 0 0
  1. defsetstretch#1{renewcommand{baselinestretch}{#1}}
  2.  
  3. % ***************************************
  4. % * SINGLESPACE ANd DOUBLESPACE *
  5. % ***************************************
  6.  
  7.  
  8. %-------------------------------------------------------------------------------
  9. %
  10. % LaTeX Document style option "doublespace"
  11. % -- usage: documentstyle[...,doublespace,...]{...}
  12. %
  13. % This style option produces a double-spaced document by redefining
  14. % the LaTeX parameter baselinestretch to 2.
  15. %
  16. % It also fixes a number of problems with standard LaTeX, as follows:
  17. %
  18. % 1. A new environment "singlespace" is provided, within which single
  19. % spacing will apply.
  20. % JFL - changed so that it works in regular text and so that vertical
  21. % space is before and after is correctly computed
  22. % 2. Double spacing is turned off within footnotes and floats (figures
  23. % and tables).
  24. % 3. Proper double spacing happens below tabular environments and in other
  25. % places where LaTeX uses a strut.
  26. % 4. Slightly more space is inserted before footnotes.
  27. % 5. JFL - fixes spacing before and after displayed math
  28. %
  29. % Note: This version sets a baselinestretch of 2. If this is too much,
  30. % put setstretch{1.7} (or some appropriate value) before the
  31. % begin{document} command. To print the document with single spacing
  32. % again, without removing "singlespace" environments, just put a
  33. % setstretch{1} at the top of the document.
  34. %
  35. % PLEASE REPORT ANY BUGS
  36. %
  37. %
  38. % Known bugs:
  39. % . It might be nice if spacing before the footnote rule (footins)
  40. % were provided in a tidier way.
  41. % . Increasing struts may possibly cause some other obscure part of
  42. % formatting to fall over.
  43. % . begin{singlespace}begin{quote} produces the wrong spacing before
  44. % the quote (extra glue is inserted).
  45. % . shouldn't @setsize stretch parskip as well?
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47.  
  48. %---Set up double spacing
  49.  
  50. %defbaselinestretch{1}
  51.  
  52.  
  53. %---New command "setstretch" (slightly more mnemonic... and easier to type)
  54.  
  55. defsetstretch#1{renewcommand{baselinestretch}{#1}}
  56.  
  57. %---Stretch the baseline BEFORE calculating the strut size. This improves
  58. % spacing below tabular environments etc., probably...
  59. % Comments are welcomed.
  60.  
  61. def@setsize#1#2#3#4{@nomath#1%
  62. let@currsize#1baselineskip
  63. #2baselineskipbaselinestretchbaselineskip
  64. parskipbaselinestretchparskip
  65. setboxstrutboxhbox{vrule height.7baselineskip
  66. depth.3baselineskip widthz@}%
  67. normalbaselineskipbaselineskip#3#4}
  68.  
  69.  
  70. %---Increase the space between last line of text and footnote rule.
  71. % This is a very untidy way to do it!
  72.  
  73. skipfootins 25pt plus4pt minus4pt
  74.  
  75.  
  76. %---Reset baselinestretch within footnotes and floats. Originally stolen
  77. % from Stanford thesis style.
  78.  
  79. def@xfloat#1[#2]{ifhmode @bsphack@floatpenalty -@Miielse
  80. @floatpenalty-@Miiifidef@captype{#1}ifinner
  81. @parmoderr@floatpenaltyz@
  82. else@next@currbox@freelist{@tempcntacsname ftype@#1endcsname
  83. multiply@tempcnta@xxxiiadvance@tempcntasixt@@n
  84. @tfor @tempa :=#2do
  85. {if@tempa hadvance@tempcnta @nefi
  86. if@tempa tadvance@tempcnta tw@fi
  87. if@tempa badvance@tempcnta 4relaxfi
  88. if@tempa padvance@tempcnta 8relaxfi
  89. }globalcount@currbox@tempcnta}@fltovffi
  90. globalsetbox@currboxcolor@vboxnormalcolorvboxbgroup
  91. defbaselinestretch{1}smallnormalsize
  92. boxmaxdepthz@
  93. hsizecolumnwidth @parboxrestore}
  94. longdef@footnotetext#1{insertfootins{defbaselinestretch{1}footnotesize
  95. interlinepenaltyinterfootnotelinepenalty
  96. splittopskipfootnotesep
  97. splitmaxdepth dpstrutbox floatingpenalty @MM
  98. hsizecolumnwidth @parboxrestore
  99. edef@currentlabel{csname p@footnoteendcsname@thefnmark}@makefntext
  100. {rule{z@}{footnotesep}ignorespaces
  101. #1strut}}}
  102.  
  103. % Stolen from MIT.
  104. %
  105. % A single spaced quote (say) is done by surrounding singlespace with quote.
  106. %
  107. defsspace{%
  108. vskipparskip%
  109. vskipbaselineskip%
  110. defbaselinestretch{0.65}%
  111. ifx@currsizenormalsize@normalsizeelse@currsizefi%
  112. vskip-parskip%
  113. vskip-baselineskip%
  114. }
  115.  
  116. defendsspace{par}
  117.  
  118. % spacing, doublespace and onehalfspace all are meant to INCREASE the
  119. % spacing (i.e. calling onehalfspace from within doublespace will not
  120. % produce a graceful transition between spacings)
  121. %
  122. defspacing#1{par%
  123. defbaselinestretch{#1}%
  124. ifx@currsizenormalsize@normalsizeelse@currsizefi}
  125.  
  126. defendspacing{par%
  127. vskip parskip%
  128. vskip baselineskip%
  129. endgroup%
  130. vskip -parskip%
  131. vskip -baselineskip%
  132. begingroup}
  133.  
  134. defonehalfspace{spacing{1.5}}
  135. letendonehalfspace=endspacing
  136.  
  137. defdspace{spacing{2}}
  138. letdspace=endspacing
  139.  
  140. % Fix up spacing before and after displayed math
  141. % (arraystretch seems to do a fine job for inside LaTeX displayed math,
  142. % since array and eqnarray seem to be affected as expected)
  143. % Changing baselinestretch and doing a font change also works if done here,
  144. % but then you have to change @setsize to remove the call to @nomath)
  145. %
  146. everydisplay{
  147. abovedisplayskip baselinestretchabovedisplayskip%
  148. belowdisplayskip abovedisplayskip%
  149. abovedisplayshortskip baselinestretchabovedisplayshortskip%
  150. belowdisplayshortskip baselinestretchbelowdisplayshortskip}
  151.  
  152. % You may freely use, modify, and/or distribute this file, without limitation.
  153. %%% ======================================================================
  154. %%% @LaTeX-style-file{
  155. %%% filename = "setspace.sty",
  156. %%% codetable = "ISO/ASCII",
  157. %%% checksum = "11793 546 2608 21972",
  158. %%% docstring = "setspace.sty is a LaTeX (2e) package.
  159. %%% Comments and bug reports welcome!
  160. %%%
  161. %%% This includes GDG's modification to Erica Harris'
  162. %%% setspace.sty. The main aspects of this
  163. %%% modification deal with the definitions of
  164. %%% singlespacing onehalfspacing, and
  165. %%% doublespacing, (these are near the beginning of
  166. %%% the file). Primarily, these deal with adding
  167. %%% fontsize changes to guarantee that the new
  168. %%% baseline is properly defined and placed into
  169. %%% action. The extra vskip in the definition of
  170. %%% singlespacing seems to make for a cleaner
  171. %%% transition from multiple spacing back to single
  172. %%% spacing. These did not appear warrranted for
  173. %%% other size changes.
  174. %%%
  175. %%% Modified by GDG on November 1, 1992, to allow
  176. %%% for use of New Font Selection Scheme.
  177. %%%
  178. %%% Modified by GDG on June 4, 1993, to correct
  179. %%% for spacing tokens in definition of @setsize
  180. %%% Thanks to Kaja P. Christiansen <kaja@daimi.aau.dk>
  181. %%% for the fix!!
  182. %%%
  183. %%% Modified by GDG on May 24, 1994, to change toggle
  184. %%% definition from selectfont to @newbaseline.
  185. %%%
  186. %%% Modified by GDG on May 25, 1994, to add
  187. %%% definition of everydisplay -- this part of
  188. %%% the code was apparently written by Geoffrey
  189. %%% Tobin on Thu 23 Jan 1992 and was provided by
  190. %%% stanton@haas.berkeley.edu (Richard Stanton).
  191. %%% This should help with some of the awkward math
  192. %%% placements in changing spacings.
  193. %%%
  194. %%% Modified by GT on 23 Jan 1996, to correct
  195. %%% everymath bug, first reported by Mario
  196. %%% Wolczko <mario@cs.man.ac.uk> on 9 June 1992.
  197. %%%
  198. %%% Modified by GT on 23 Jan 1996, to correct
  199. %%% usage of comment characters in macro
  200. %%% definitions.
  201. %%%
  202. %%% Modified by GT on 23 Jan 1996, to update
  203. %%% (adjusted) @xfloat definition for LaTeX2e.
  204. %%% Bug report was courtesy of Kay Nettle.
  205. %%%
  206. %%% Modified by GT on 24 Jan 1996, to update
  207. %%% (adjusted) @footnotetext definition for
  208. %%% LaTeX2e, and to add an adjusted LaTeX2e
  209. %%% @mpfootnotext definition for minipages.
  210. %%% Bug report was courtesy Kay Nettle.
  211. %%%
  212. %%% Changed by GT on 6 Feb 1996, into a LaTeX2e
  213. %%% package.
  214. %%%
  215. %%% Retained this macro for flexibility.
  216. %%%
  217. %%% Code rearranged by GT, Sat 28 Sep 1996, to give
  218. %%% greater prominence to setstretch.
  219. %%%
  220. %%% Also, GT changed (Sat 28 Sep 1996) many
  221. %%% occurrences of def to newcommand,
  222. %%% renewcommand, or newenvironment,
  223. %%% as seemed appropriate.
  224. %%%
  225. %%% GT, Tue 10 Dec 1996: Following a suggestion
  226. %%% by Ted Stern, the `single' spacing is now
  227. %%% settable by the user. This is for slightly
  228. %%% large fonts such as Lucida Bright.
  229. %%%
  230. %%% GT, Wed 11 Dec 1996: For simplicity and
  231. %%% maintainability, call onehalfspacing in
  232. %%% the onehalfspace environment, and
  233. %%% doublespacing in the doublespace
  234. %%% environment.
  235. %%%
  236. %%% GT, Wed 11 Dec 1996: Also deleted
  237. %%% setspace@size from setstretch,
  238. %%% as @currsize suffices.
  239. %%%
  240. %%% Modified by Brett Presnell (BP)
  241. %%% <presnell@maths.anu.edu.au> on 21 Mar 1998
  242. %%% to add nodisplayskipstretch option, which
  243. %%% turns off the stretching of the space
  244. %%% before and after displays, which is often
  245. %%% excessive, particularly with doublespaced
  246. %%% documents. Also added the
  247. %%% setdisplayskipstretch command, which allows
  248. %%% the user to choose by how much to stretch
  249. %%% the space before and after displays
  250. %%% independently from the setting of
  251. %%% baselinestretch. This works regardless of
  252. %%% whether the nodisplayskipstretch option is
  253. %%% in effect.
  254. %%%
  255. %%% GT, Wed 15 Apr 1998: Added the singlespace*
  256. %%% environment requested by
  257. %%% Mark Olesen <olesen@weber.me.queensu.ca>
  258. %%% on Sat 24 May 1997 and Wed 18 June 1997.
  259. %%% This is reported to give improved vertical
  260. %%% spacing around itemize and quote environments.
  261. %%%
  262. %%% GT, Wed 15 Apr 1998: David Hull pointed out on
  263. %%% Fri 12 Dec 1997 that the belowdisplayskip line
  264. %%% in the everydisplay was mistyped. Now fixed.
  265. %%%
  266. %%% GT, Thu 26 Nov 1998: Finally got round to
  267. %%% fixing the absence of begingroup from
  268. %%% onehalfspace and doublespace environments.
  269. %%% Thanks to: Bernd Schandl, Ron Smith,
  270. %%% Himanshu Gohel, and Kevin Ruland, for bringing
  271. %%% it to my long overdue attention.
  272. %%%
  273. %%% GT, Tue 27 July 1999: On Saturday 24 July
  274. %%% 1999, Alexander L. Wolf <alw@cs.colrado.edu>
  275. %%% informed me that the doublespace and
  276. %%% onehalfspace _macros_ are still at fault.
  277. %%%
  278. %%% GT, Fri 3 March 2000: Today Stefano
  279. %%% Lacaprara of Italy brought my attention to
  280. %%% the need to extend the commands and macros
  281. %%% to point sizes other than 10, 11 and 12.
  282. %%% Since there's no general formula for the
  283. %%% line stretch values in terms of point size,
  284. %%% and they vary only slightly between 10, 11
  285. %%% and 12 pt, and furthermore the values were
  286. %%% presumably optimised specifically for the
  287. %%% Computer Modern fonts, i've chosen to use
  288. %%% the 10 pt values as the generic defaults.
  289. %%%
  290. %%% GT, Fri 1 December 2000: George Pearson
  291. %%% requested package options for the three
  292. %%% common spacings.
  293. %%%
  294. %%% The checksum field above contains a CRC-16
  295. %%% checksum as the first value, followed by the
  296. %%% equivalent of the standard UNIX wc (word
  297. %%% count) utility output of lines, words, and
  298. %%% characters. This is produced by Robert
  299. %%% Solovay's checksum utility."
  300. %%% }
  301. %%% ======================================================================
  302. %% FILE: setspace.sty in SYS2.TEX.PUB.ISULATEX.STYLES
  303. %% AUTHOR: Erica M. S. Harris
  304. %% DATE: April 1990
  305. %% MOD: March 1991
  306. %%%
  307. %%% Update to LaTeX (2e) : 6 Feb 1996.
  308. %%% Description: LaTeX Document Package "setspace"
  309. %%%
  310. %%% Usage:
  311. %%% documentclass[...]{...}
  312. %%% usepackage{setspace}
  313. %%%
  314. %% Based on the doublespace option created by Stephen Page.
  315. %%
  316. %% This style option provides commands and environments for doing
  317. %% double and one-and-a-half spacing based on pt size.
  318. %%
  319. %% Single spacing is the default.
  320. %%
  321. %% Three commands, singlespacing, onehalfspacing, and
  322. %% doublespacing, are for use in the preamble to set the overall
  323. %% spacing for the document. If a different spacing is required then
  324. %% the setstretch{baselinestretch} command can be used in the
  325. %% preamble to set the baselinestretch appropriately. The default
  326. %% spacing with this style option is single spacing.
  327. %%
  328. %% Three environments, singlespace, onehalfspace, and doublespace,
  329. %% allow the spacing to be changed within the document. Both the
  330. %% onehalfspace and doublespace environments are intended to increase
  331. %% the spacing, so the onehalfspace environment should not be used in
  332. %% a double spaced document. If an increased spacing different from
  333. %% one-and-a-half or double spacing is required then the spacing
  334. %% environment can be used. The spacing environment takes one
  335. %% argument which is the larger baselinestretch to use,
  336. %% e.g., begin{spacing}{2.5}.
  337. %%
  338. %% footins is adjusted the same as parskip - appears to work. Lose
  339. %% stretch parts but don't consider that to be crucial
  340. %%
  341. %% Removed code for altering spacing before and after displayed
  342. %% equations - just looked too much.
  343. %%
  344. %% MODS:
  345. %% Redefinition of spacing and endspacing for consistency with
  346. %% TeX 3.x inserted by George Greenwade. Modification provided by
  347. %% Philip Ross (ROSS@UK.AC.ABDN.BIOMED) and John Byrne via INFO-TeX.
  348. %%
  349. %% PLEASE REPORT ANY BUGS
  350. %%
  351. %% Old Documentation follows:
  352. %% 1. A new environment "singlespace" is provided, within which single
  353. %% spacing will apply.
  354. %% JFL - changed so that it works in regular text and so that
  355. %% vertical space before and after is correctly computed
  356. %% 2. Double spacing is turned off within footnotes and floats (figures
  357. %% and tables).
  358. %% 3. Proper double spacing happens below tabular environments and in
  359. %% other places where LaTeX uses a strut.
  360. %% 4. Slightly more space is inserted before footnotes.
  361. %% 5. JFL - fixes spacing before and after displayed math
  362. %%
  363. %%
  364. %% mods: Jean-Francois Lamy
  365. %% lamy@ai.toronto.edu
  366. %% lamy@utai.uucp
  367. %%
  368. %% POSSIBLE BUGS:
  369. %% . Increasing struts may possibly cause some other obscure part of
  370. %% formatting to fall over.
  371. %% . begin{singlespace}begin{quote} produces the wrong spacing before
  372. %% the quote (extra glue is inserted).
  373. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  374.  
  375. NeedsTeXFormat {LaTeX2e}[1994/12/01]
  376. def filename {setspace.sty}
  377. def filedate {2000/12/01}
  378. def fileversion {6.7}
  379. ProvidesPackage {setspace}[filedatespacefileversionspace
  380. Contributed and Supported LaTeX2e package]
  381. typeout {Package: `setspace' fileversionspace <filedate>}
  382.  
  383. % BP: add nodisplayskipstretch option and setdisplayskipstretch command.
  384.  
  385. newcommand{displayskipstretch}{baselinestretch}
  386. newcommand{setdisplayskipstretch}[1]{renewcommand{displayskipstretch}{#1}}
  387. DeclareOption{nodisplayskipstretch}{setdisplayskipstretch{1.0}}
  388.  
  389. % GT: add George Pearsons' suggested options.
  390.  
  391. DeclareOption{singlespacing}{AtEndOfPackage{singlespacing}}
  392. DeclareOption{onehalfspacing}{AtEndOfPackage{onehalfspacing}}
  393. DeclareOption{doublespacing}{AtEndOfPackage{doublespacing}}
  394.  
  395. ProcessOptions
  396.  
  397. % GT: Sat 28 Sep 1996: Widely using newcommand, renewcommand, and
  398. % newenvironment, instead of def.
  399.  
  400. % ** Line space commands.
  401.  
  402. newcommand{setstretch}[1]{%
  403. defbaselinestretch{#1}%
  404. @currsize
  405. }
  406.  
  407. % GT: Sat 28 Sep 1996: spacing commands and environments modified to
  408. % use setstretch instead of baselinestretch.
  409. %
  410. % GT: Sat 28 Sep 1996: No, I don't know understand the line spacing
  411. % algorithms! If someone (LaTeX team) can enlighten me as to the
  412. % general rule, please do! It would be very pleasant if setspace.sty
  413. % were suited for document font sizes other than 10, 11 and 12 pt.
  414. %
  415. % GT: Tue 10 Dec 1996: Instead of fixing singlespacing to exact unity,
  416. % allow user to redefine it (only slightly, please!) from its initial
  417. % value of unity, in the case when a particular font is slightly larger
  418. % or slightly smaller than its point size would indicate. This change
  419. % affects setspace's single spacing commands, and LaTeX's footnote and
  420. % float environments. The one and a half, double, and arbitrary
  421. % spacing commands are unaltered.
  422.  
  423. newcommand{SetSinglespace}[1]{%
  424. defsetspace@singlespace{#1}%
  425. }
  426.  
  427. % Here's the default single line spacing value.
  428. SetSinglespace{1}
  429.  
  430. newcommand{singlespacing}{%
  431. setstretch {setspace@singlespace}% normally 1
  432. vskip baselineskip % Correction for coming into singlespace
  433. }
  434.  
  435. newcommand{onehalfspacing}{%
  436. setstretch{1.25}% default
  437. ifcase @ptsize relax % 10pt
  438. setstretch {1.25}%
  439. or % 11pt
  440. setstretch {1.213}%
  441. or % 12pt
  442. setstretch {1.241}%
  443. fi
  444. }
  445.  
  446. newcommand{doublespacing}{%
  447. setstretch {1.667}% default
  448. ifcase @ptsize relax % 10pt
  449. setstretch {1.667}%
  450. or % 11pt
  451. setstretch {1.618}%
  452. or % 12pt
  453. setstretch {1.655}%
  454. fi
  455. }
  456.  
  457. % ** Modification of the LaTeX command @setsize.
  458.  
  459. %---Stretch the baseline BEFORE calculating the strut size. This improves
  460. % spacing below tabular environments etc., probably...
  461. % Comments are welcomed.
  462.  
  463. % GT: Sun 29 Sep 1996: Question: Is this code anywhere near correct
  464. % since this part of LaTeX (in, eg, latex.ltx) has been greatly changed?
  465.  
  466. % GT: Sun 29 Sep 1996: The meanings of the arguments to @setsize
  467. % appear to be (whatever these may signify) :
  468. % current size; font baselineskip; ignored (!); and font size.
  469.  
  470. % GT: Sun 29 Sep 1996: Note that @setsize (in latest LaTeX,
  471. % @setfontsize, which is called by @setsize) seems to be the only
  472. % place in purely modern LaTeX where @currsize is set, and ltxguide.cls
  473. % seems to be the only file in the LaTeX base distribution that uses it!
  474.  
  475. def@setsize#1#2#3#4{%
  476. % Modified 1993.04.07--GDG per KPC
  477. @nomath#1%
  478. let@currsize#1%
  479. baselineskip #2%
  480. baselineskip baselinestretchbaselineskip
  481. parskip baselinestretchparskip
  482. setboxstrutbox hbox{%
  483. vrule height.7baselineskip
  484. depth.3baselineskip
  485. widthz@}%
  486. skipfootins baselinestretchskipfootins
  487. normalbaselineskipbaselineskip#3#4}
  488.  
  489. % ** Float and footnote adjustments to compensate for a change in the
  490. % ** main text's line spacing.
  491.  
  492. %---Increase the space between last line of text and footnote rule.
  493. %skipfootins 20pt plus4pt minus4pt
  494.  
  495. %---Reset baselinestretch within floats and footnotes.
  496.  
  497. % GT: Tue 23 Jan 1996: This is where the conflict with the combination
  498. % of the color package and the figure environment used to occur.
  499.  
  500. % Floats.
  501.  
  502. % GT: Sat 28 Sep 1996: @xfloat is the only place where normalsize
  503. % is still used in setspace.sty !
  504.  
  505. letlatex@xfloat=@xfloat
  506. def@xfloat #1[#2]{%
  507. latex@xfloat #1[#2]%
  508. defbaselinestretch{setspace@singlespace}%
  509. normalsize
  510. }
  511.  
  512. % GT: Wed 24 Jan 1996: This footnote code was copied from LaTeX and
  513. % modified rather naively. It had to be brought up to date, not only
  514. % because of LaTeX's new color ability, but also because ther had
  515. % been major changes to this code in LaTeX at least as far back as
  516. % March 1992.
  517.  
  518. % Normal, bottom of the page, footnotes.
  519. %
  520. % GT: Based HEAVILY on original LaTeX (2e) code. A standard hook would
  521. % be MUCH preferred, so that LaTeX's footnote implementation needn't be
  522. % copied each time it changes.
  523. %
  524. % GT: The protected@edef requires at least the December 1994 LaTeX.
  525. % This is precisely the kind of VERSION DEPENDENCY situation that
  526. % cannot (AFAIK) be avoided, because LaTeX (2e) LACKS appropriate
  527. % standard hooks and/or context markers.
  528.  
  529. longdef@footnotetext#1{%
  530. insertfootins{%
  531. % GT: Next line added. Hook desired here!
  532. defbaselinestretch {setspace@singlespace}%
  533. reset@fontfootnotesize
  534. interlinepenaltyinterfootnotelinepenalty
  535. splittopskipfootnotesep
  536. splitmaxdepth dpstrutbox floatingpenalty @MM
  537. hsizecolumnwidth
  538. @parboxrestore
  539. protected@edef@currentlabel{%
  540. csname p@footnoteendcsname@thefnmark
  541. }%
  542. color@begingroup
  543. @makefntext{%
  544. rulez@footnotesepignorespaces#1@finalstrutstrutbox}%
  545. color@endgroup}}
  546.  
  547. % Minipage footnotes.
  548.  
  549. longdef@mpfootnotetext#1{%
  550. globalsetbox@mpfootinsvbox{%
  551. unvbox @mpfootins
  552. % GT: Next line added. Hook desired here!
  553. defbaselinestretch {setspace@singlespace}%
  554. reset@fontfootnotesize
  555. hsizecolumnwidth
  556. @parboxrestore
  557. protected@edef@currentlabel{%
  558. csname p@mpfootnoteendcsname@thefnmark}%
  559. color@begingroup
  560. @makefntext{%
  561. rulez@footnotesepignorespaces#1@finalstrutstrutbox}%
  562. color@endgroup}}
  563.  
  564. % ** Line space environments.
  565.  
  566. % A single spaced quote (say) is done by surrounding singlespace with quote.
  567.  
  568. newenvironment{singlespace}{%
  569. vskip baselineskip
  570. setstretch {setspace@singlespace}%
  571. vskip -baselineskip
  572. }{%
  573. par
  574. }
  575.  
  576. % GT (c/o Mark Olesen), Wed 15 April 1998.
  577.  
  578. newenvironment{singlespace*}{%
  579. setstretch {setspace@singlespace}%
  580. vskip -baselineskip
  581. }{%
  582. vskip -0.5baselineskip
  583. }
  584.  
  585. % spacing, doublespace and onehalfspace all are meant to INCREASE the
  586. % spacing (i.e. calling onehalfspace from within doublespace will not
  587. % produce a graceful transition between spacings)
  588. %
  589. % Next two definitions fixed for consistency with TeX 3.x
  590.  
  591. % In order to use newenvironment, while easily using same code for
  592. % end of each environment, the code that used to be in endspacing has
  593. % been moved into a new (but internal) macro, restore@spacing.
  594.  
  595. newcommand{restore@spacing}{%
  596. par
  597. vskip parskip
  598. vskip baselineskip
  599. endgroup
  600. vskip -parskip
  601. vskip -baselineskip
  602. }
  603.  
  604. newenvironment{spacing}[1]{%
  605. par
  606. begingroup % moved from endspacing by PGBR 29-1-91
  607. setstretch {#1}%
  608. }{%
  609. restore@spacing
  610. }
  611.  
  612. % one and a half spacing is 1.5 x pt size
  613. newenvironment{onehalfspace}{%
  614. begingroup
  615. onehalfspacing
  616. }{%
  617. restore@spacing
  618. }
  619.  
  620. % double spacing is 2 x pt size
  621. newenvironment{doublespace}{%
  622. begingroup
  623. doublespacing
  624. }{%
  625. restore@spacing
  626. }
  627.  
  628. % GT: EMSH chose to omit display math part that follows.
  629. % She wrote (see above) that the "altered spacing before and after displayed
  630. % equations ... just looked too much".
  631. %
  632. % Fix up spacing before and after displayed math
  633. % (arraystretch seems to do a fine job for inside LaTeX displayed math,
  634. % since array and eqnarray seem to be affected as expected).
  635. % Changing baselinestretch and doing a font change also works if done here,
  636. % but then you have to change @setsize to remove the call to @nomath)
  637. %
  638. % GT: The belowdisplayskip line was mistyped; now fixed, courtesy of
  639. % David Hull.
  640. %
  641. % GT: Brett Parnell has addressed EMSH's concern by replacing
  642. % baselinestretch by displayskipstretch in displays, as follows.
  643.  
  644. everydisplayexpandafter{%
  645. theeverydisplay
  646. abovedisplayskip displayskipstretchabovedisplayskip
  647. belowdisplayskip displayskipstretchbelowdisplayskip
  648. abovedisplayshortskip displayskipstretchabovedisplayshortskip
  649. belowdisplayshortskip displayskipstretchbelowdisplayshortskip
  650. }
  651.  
  652. endinput
  653.  
  654. %%% EOF.
Add Comment
Please, Sign In to add comment