cellml / cellml-specification

CellML Specification
0 stars 8 forks source link

I282 table numbers #283

Closed kerimoyle closed 4 years ago

kerimoyle commented 4 years ago

Addresses #282

Manually added table numbers throughout the text to the links because numref can't do it for us.

Rendered version here: https://cellml-specification-dev.readthedocs.io/en/i282_table_numbers/index.html

MichaelClerx commented 4 years ago

Any way we could use this kind of construct to avoid the hard links?

.. table:: Table caption
   :name: table_x

:numref:`Table %s: Unit thingies<table_x>`

Found this online: https://github.com/sphinx-doc/sphinx/issues/1763

kerimoyle commented 4 years ago

Thanks, I'll give it a go (didn't even realise that "table" was a thing, oops!)

MichaelClerx commented 4 years ago

Me neither :D https://docutils.sourceforge.io/docs/ref/rst/directives.html#table

MichaelClerx commented 4 years ago

Looks good, but doesn't work for me in the PDF somehow. I'm not seeing the table heading anymore

kerimoyle commented 4 years ago

image it's not working at all ... yet ...

agarny commented 4 years ago

Ok, ping us when it's ready to review.

MichaelClerx commented 4 years ago

I've been playing around too and can't get it to work

MichaelClerx commented 4 years ago

Heyyyy that seems to work!

kerimoyle commented 4 years ago

Yep, getting there ... now I need to clean it up a little ...

agarny commented 4 years ago

Not quite working for me:

Screen Shot 2020-04-17 at 11 12 31 AM

Also, I would expect references to a table to read something like "Table x.y", not "Table x.y: some description" as is currently the case, e.g.:

Screen Shot 2020-04-17 at 11 14 02 AM
kerimoyle commented 4 years ago

I think it's nice to have the title of the table there ... since hoverxref doesn't seem to play nicely with it, it saves people from having to click on the link to find out which table it's talking about. And it's (here's that magic word) consistent with our other internal links to sections and their titles ... ?

agarny commented 4 years ago

It's a personal preference of mine, but if the majority is in favour of keeping things as they are, then I am "fine".

hsorby commented 4 years ago

numref can do this see #285.

kerimoyle commented 4 years ago

yep, just fixing it up now @hsorby

hsorby commented 4 years ago

Already done in #285