Measure the distance between the attic floor joist and the bottom edge of the roof truss section at its center with a measuring tape. This measurement will determine the length of the support beam.
Transfer the measurement to a section of 2-by-6-inch pressure-treated lumber with a pencil. Cut the lumber section to length with a circular saw.
Place a protractor along the side of the roof truss. Place a carpenters level on the bottom of the protractor and adjust the level and protractor until the bubble appears in the center of the level indicator. This will give you the angle of the roof truss.
Miter one end of the support beam to the angle of the roof truss with a miter saw.