15.07.2013 Views

xcoffins.pdf. - CTAN

xcoffins.pdf. - CTAN

xcoffins.pdf. - CTAN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

\JoinCoffins The \JoinCoffins function needs to do a bit of work on the input syntax, as there are<br />

a number of optional arguments to worry about. The idea here is that \JoinCoffins<br />

can be used to either expand the bounding box of 〈coffin1 〉 or add 〈coffin2 〉 without any<br />

expansion of the bounding box. There are also the two handle positions and the offset<br />

to sort out.<br />

76 \NewDocumentCommand \JoinCoffins<br />

77 {<br />

78 o<br />

79 s<br />

80 m<br />

81 > { \SplitArgument { 1 } { , } } O { H , l }<br />

82 m<br />

83 > { \SplitArgument { 1 } { , } } O { H , l }<br />

84 > { \SplitArgument { 1 } { , } } D ( ) { 0 pt , 0 pt }<br />

85 }<br />

86 {<br />

87 \IfNoValueTF {#1}<br />

88 {<br />

89 \IfBooleanTF #2<br />

90 { \coffin_attach:NnnNnnnn #3 #4 #5 #6 #7 }<br />

91 { \coffin_join:NnnNnnnn #3 #4 #5 #6 #7 }<br />

92 }<br />

93 {<br />

94 \group_begin:<br />

95 \keys_set:nn { coffin } {#1}<br />

96 \tl_set:Nx \l__coffin_tmp_tl<br />

97 {<br />

98 \group_end:<br />

99 \bool_if:NTF \l__coffin_bound_box_grow_bool<br />

100 { \coffin_join:NnnNnnnn }<br />

101 { \coffin_attach:NnnNnnnn }<br />

102 \exp_not:N #3<br />

103 { \exp_not:o { \l__coffin_A_hpole_tl } }<br />

104 { \exp_not:o { \l__coffin_A_vpole_tl } }<br />

105 \exp_not:N #5<br />

106 { \exp_not:o { \l__coffin_B_hpole_tl } }<br />

107 { \exp_not:o { \l__coffin_B_vpole_tl } }<br />

108 { \dim_use:N \l__coffin_hoffset_dim }<br />

109 { \dim_use:N \l__coffin_voffset_dim }<br />

110 }<br />

111 \l__coffin_tmp_tl<br />

112 }<br />

113 }<br />

(End definition for \JoinCoffins. This function is documented on page 5.)<br />

\TypesetCoffin For typesetting coffins there are two optional arguments, both of which need to be split.<br />

This is a simpler case of the code needed for \JoinCoffins.<br />

114 \NewDocumentCommand \TypesetCoffin<br />

115 {<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!