I noticed "It can also be used for annotating other kinds of text" and wanted to experiment with being able to number specific letters in a string.
More specifically, SMILES is a linear molecular structure notation. "O" is water, "COO" is ethyl alcohol, "c1ccccc1" is a benzene ring, and much more. (See https://en.wikipedia.org/wiki/Simplified_molecular-input_lin... .)
I want to annotate atom positions in the SMILES string. I currently do this with ("pip install smiview") text over the string, as this example using phenol.
1 23456 7
c1ccccc1O
I wanted to try it with ruby so I used: <ruby>
c<rt>1</rt>1c<rt>2</rt>c<rt>3</rt>c<rt>4</rt>c<rt>5</rt>c<rt>6</rt>1
</ruby>
The "2" is located over the center of "1c" instead of over the second "c" like I wanted.How do I get it to center only over the "c"?
I tried changing the CSS too, using this catch-all:
ruby {
font-size: 2em;
ruby-align: center;
text-align: center;
}
* {ruby-align: center;}
No luck. I also tried wrapping things in a span, like: c<rt>1</rt>1<span>c<rt>2</rt></span>c<rt>3</rt>
but got the 3 as a new ruby line, centered over the "1cc", itself with a ruby "2" between the second and third "c".I tried other combinations of <span>, to no avail.