A Lagrangian-Hamiltonian variational formulation is proposed for the thermoelasticity of heat conductors and its generalization to anelasticity described by means of internal-state variablesby using a gauge-theoretical technique (introduction of an additional variable of state the gradient of thermacy that renders the system apparently Hamiltonian). Projecting the equations resulting from the E...