An analytical local approach to flux-conserving tokamak equilibrium