I am trying to find the embedding and the branching rules for some group decompositions. For example, I consider $E_7$ and its maximally compact subgroup $SU(8)$ and I want to "see" how the Dynkin diagram of $E_7$ is modified to get $A_7$. I tried to take a linear combination of roots to produce $A_7$.
The problem is for an embedding like $SU(8) \supset SU(6) \times U(1)$. How do I get this?
Since $SU(8)$ is a maximal regular subalgebra of $E_7$, you can identify it by looking at the extended Dynkin diagram. This is the diagram you get by appending the lowest root to the simple roots that you have. The $E_7$ Dynkin diagram looks like this:
The extended diagram you get by appending the lowest root has an extra circle on the left side of the diagram:
Now you obtain the subalgebras by erasing one of the circles in the diagram, so to get $A_7$, you just erase the circle that is sticking up. This means to get the roots of the $A_7$ subalgebra from the $E_7$ roots, you just take the six original simple roots that don't include the one sticking up, and add to it the lowest $E_7$ root.
This procedure will give you all the maximal regular subalgebras of a given Lie algebra. Each diagram has a unique extended diagram from which you can construct these maximal regular subalgebras. You can find the extended diagrams here.
The other example you asked about, $SU(8) \supset SU(7)\times U(1) $ (I'm doing $SU(7)$ instead of $SU(6)$, since it is the bigger subalgebra) simply comes from erasing one of the nodes of the $A_7$ diagram. The resulting Dynkin diagram is $A_6$ which describes the $SU(7)$ factor, and then the node you erased is the $U(1)$ generator, which commutes with all elements of the $A_6$ algebra.