Ghali, A., Neville, A. M. and Brown, T. G., Structural Analysis: A Unified Classical and Matrix Approach, 7th ed., CRC Press — Ch. 4 (force method), Ch. 5 (displacement method), Ch. 24 (effects of temperature and lack of fit).
Canadian design context for the member sizing that follows this analysis: CSA S16:19 Design of Steel Structures, CSA A23.3:19 Design of Concrete Structures and the National Building Code of Canada 2020 (Part 4 loads and load combinations).
Sign convention used throughout. Member end moments $M_{ij}$ are counter-clockwise positive on the member end, which is the convention that matches the standard 6-degree-of-freedom element stiffness matrix and the counter-clockwise-positive joint rotations that Question 9 asks for. With that convention the fixed-end moment of a downward uniform load is $M^{F}_{ij}=+wL^{2}/12$ at the near end, the chord rotation is $\psi_{ij}=\left[(\mathbf{D}_{j}-\mathbf{D}_{i})\cdot\mathbf{e}_{2}\right]/L$ with $\mathbf{e}_{2}$ the member axis turned $+90^{\circ}$, and the ordinary sagging moments plotted on the diagrams are $M_{\text{sag}}(i)=-M_{ij}$ and $M_{\text{sag}}(j)=+M_{ji}$. Where a step of the working is quicker in the clockwise-positive (Hibbeler) form the sign is stated explicitly.