  For each affine Kac-Moody algebra $X_n^{(r)}$ of rank $\ell$, $r=1,2$, or
$3$, and for every choice of a vertex $c_m$, $m=0,\dots,\ell$, of the
corresponding Dynkin diagram, by using the matrix-resolvent method we define a
gauge-invariant tau-structure for the associated Drinfeld-Sokolov hierarchy and
give explicit formulas for generating series of logarithmic derivatives of the
tau-function in terms of matrix resolvents, extending the results of [Mosc.
Math. J. 21 (2021), 233-270, arXiv:1610.07534] with $r=1$ and $m=0$. For the
case $r=1$ and $m=0$, we verify that the above-defined tau-structure agrees
with the axioms of Hamiltonian tau-symmetry in the sense of [Adv. Math. 293
(2016), 382-435, arXiv:1409.4616] and [arXiv:math.DG/0108160].
