Hi, yet again, capper.
I make no claim to be a real expert in finite element theory, so the following might well be complete bunkum. Let's see what others say about that?
I have a nasty feeling that you may be trying for an impossible result, since there is not any single unique formulation for the stiffness matrix of ANY shaped finite element. The stiffness matrix depends on assumptions regarding the displacement function used in its development. Hence there have been debates about the relative merits of different formulations used by various authors on the subject.
For each assumed displacement function you will get a different stiffness matrix. All of these may be 'correct', but they will, in general, not give you identical results.
So, even if you use the 'Austim/emil' method of extracting the numeric values from a FE package, it would be little more than good luck if they exactly corresponded with your own values.
As for books/papers -
"Structural Analysis - A.Ghali and A.M. Neville" published by Chapman and Hall, (my copy was reprinted in 1983) has a good chapter on FE development (co-authored by Y.K. Cheung), with stiffness matrices for in-plane triangles and bending rectangles. It also has a number of (hopefully useful) references to other sources.
A web search for O. Zienkiewicz and Y.K. Cheung could well give you some useful references.
Good luck with your endeavours.