working with R markdown and automatic figure and table numbering, cross-referencing