Replace hard-coded references with LaTeX references