This paper is about the
ideal theory of the algebra of functions continuous on the closure and holomorphic in
the interior of a domain on a compact Riemann surface. The description of the closed
ideals in the disc algebra is shown to apply to an ideal whose hull meets the
boundary of the domain in a finite union of analytic arcs. The canonical factorization
into inner and outer functions in the disc is replaced by a potential theoretic
decomposition theorem, thus allowing essentially the same description to be carried
over. The basically local nature of the problem is used to reduce it to the previously
known ideal theory of a compact bordered Riemann surface. This reduction is
facilitated by a factorization theorem that is proved by potential theoretic
methods.