I am a newcomer to Inkscape, and to this forum. I am trying to create equations in Inkscape using a Baskerville italic font and I am having some problems with subscripts, superscripts and letter spacing.
Equation 5 shows the problem with superscripts. the exponents of the first k squared and t cubed were created with the Inkscape text superscript function, the second squared and cubed signs were created with Unicode U+00B2 and U+00B3, superscript 2 and 3. The Inkscape superscript is too close to the base letter and there is too much space after the superscripted letter. The Unicode superscript is nicely spaced from the base letter and the following letter, but should be higher.
Equation 7 shows the problem with spacing. Here I have deliberately added blank spaces before and after the + signs. The big spaces between the alpha, beta and gamma letters and the following thetas are not blank spaces. They seem to be created by the combination of the subscripts and italic face. I have tried using the Inkscape letter spacing function but it doesn't seem to work. All the superscripts in Equation 7 were created with the Unicode characters.
Any suggestions would be gratefully received.
Equations, subscripts, superscripts and letter spacing
-
- Posts: 5
- Joined: Wed Aug 15, 2018 12:58 am
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Equations, subscripts, superscripts and letter spacing
Maybe this...?


Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Equations, subscripts, superscripts and letter spacing
Also note that TD's suggestion, above, can be achieved by putting the text cursor in place then holding the Alt key and one of the arrow keys. I find this easier than tweaking the values in the toolbar, especially as you can just release the Alt key and use the arrow keys to move the text cursor to the next character that needs adjustment.
-
- Posts: 5
- Joined: Wed Aug 15, 2018 12:58 am
Re: Equations, subscripts, superscripts and letter spacing
Thanks TD, the problem I was having was because I selecting the elements to move incorrectly. And thanks Xav, that keyboard shortcut is great!
Actually, now I try it I have another problem. When I close up the spacing between the beta and the theta in Inkscape and then look at the SVG in a browser (Chrome), the theta hasn't moved. Even if I move the theta to the left so far that it overlaps the beta, there is still a big space. However, if I save it as a PNG, then the image in the browser is the same as in Inkscape. This can be seen at http://www.vintagewatchstraps.com/equations.php In fact, the PNG image is exactly the same as the way the equation displays in Inkscape, with the same poorly shaped Greek letters.
It seems that Chrome thinks it knows better, not only rendering the Greek letters correctly, which for some reason(?) Inkscape doesn't, but also puts in spacing as it sees fit, ignoring the movement of the letters in Inkscape. Arrrgh!
Actually, now I try it I have another problem. When I close up the spacing between the beta and the theta in Inkscape and then look at the SVG in a browser (Chrome), the theta hasn't moved. Even if I move the theta to the left so far that it overlaps the beta, there is still a big space. However, if I save it as a PNG, then the image in the browser is the same as in Inkscape. This can be seen at http://www.vintagewatchstraps.com/equations.php In fact, the PNG image is exactly the same as the way the equation displays in Inkscape, with the same poorly shaped Greek letters.
It seems that Chrome thinks it knows better, not only rendering the Greek letters correctly, which for some reason(?) Inkscape doesn't, but also puts in spacing as it sees fit, ignoring the movement of the letters in Inkscape. Arrrgh!
Last edited by DavidCheshire on Fri Aug 17, 2018 12:02 am, edited 1 time in total.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Equations, subscripts, superscripts and letter spacing
If you don't require the text to be native in the browsers, you might try converting the final layouts to paths. (They appear small because I did not scale from the original files.)
Here is the text version:
Equation7KernTest.svg

Here is the converted version:
Equation7KernTest-Paths.svg

As you have discovered, different SVG renderers (programs, browsers, etc.) behave differently. If you're curious, additional info on font faces in SVG, Inkscape and CSS: http://tavmjong.free.fr/blog/?p=822
Here is the text version:
Equation7KernTest.svg
Here is the converted version:
Equation7KernTest-Paths.svg
As you have discovered, different SVG renderers (programs, browsers, etc.) behave differently. If you're curious, additional info on font faces in SVG, Inkscape and CSS: http://tavmjong.free.fr/blog/?p=822
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
-
- Posts: 5
- Joined: Wed Aug 15, 2018 12:58 am
Re: Equations, subscripts, superscripts and letter spacing
Thanks. I guess that is why Chrome and the other browsers don't mess with the TeX SVGs that I have on my page, they are all paths so the browser doesn't realise that some of them represent text.
Your conversion of Equation7KernTest.svg to paths shows exactly what I see in Inkscape. But the Greek letters are badly formed, especially the gammas on the bootom row. They don't look anything like the Greek letters of the Baskerville font that I am trying to use, and which Chrome successfully renders them as. Why do the Greek letters look like this in Inkscape? It makes editing the equations hard because they are not wysiwyg.
Is it only fonts that are rendered differently by different SVG renderers? It's a bit disturbing to send an SVG to someone and not know that they are seeing exactly the same as I am seeing. I have been discussing these equations with a friend who has Adobe Illustrator and it is becoming clear that what he sees is not what I see. The width of the line on the top of the square root sign is the same as the sloping line for me, but he sees it much thinner. Since the square root sign is a path I was expecting that at least that would be the same for both of us.
Thanks for your help.
Your conversion of Equation7KernTest.svg to paths shows exactly what I see in Inkscape. But the Greek letters are badly formed, especially the gammas on the bootom row. They don't look anything like the Greek letters of the Baskerville font that I am trying to use, and which Chrome successfully renders them as. Why do the Greek letters look like this in Inkscape? It makes editing the equations hard because they are not wysiwyg.
Is it only fonts that are rendered differently by different SVG renderers? It's a bit disturbing to send an SVG to someone and not know that they are seeing exactly the same as I am seeing. I have been discussing these equations with a friend who has Adobe Illustrator and it is becoming clear that what he sees is not what I see. The width of the line on the top of the square root sign is the same as the sloping line for me, but he sees it much thinner. Since the square root sign is a path I was expecting that at least that would be the same for both of us.
Thanks for your help.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Equations, subscripts, superscripts and letter spacing
I consider SVG (and other vector images) as rendered-on-the-fly... depending on the renderer, it may look different even with the same XML and same installed fonts.
Common example: in Inkscape, a stroked line 0.001" thick might be invisible at a particular zoom level, but in Adobe Reader, that same thickness line will always look equal or greater than .001" regardless of zoom, because Reader refuses to render anything less than 1 pixel. I will need to explore what Illustrator does with thin or unset strokes.
Fonts are particularly tricky, as noted in the article linked above. Plus, the font named "Baskerville" on one person's machine might not be the same as another's:
Common example: in Inkscape, a stroked line 0.001" thick might be invisible at a particular zoom level, but in Adobe Reader, that same thickness line will always look equal or greater than .001" regardless of zoom, because Reader refuses to render anything less than 1 pixel. I will need to explore what Illustrator does with thin or unset strokes.
Fonts are particularly tricky, as noted in the article linked above. Plus, the font named "Baskerville" on one person's machine might not be the same as another's:
https://en.wikipedia.org/wiki/BaskervilleMany companies have provided digital releases (some of older Baskerville revivals), including Linotype, URW++, Bitstream and SoftMaker as well as many others. These may have varying features, for example some lacking small caps. Monotype Baskerville is installed on Macs as part of Mac OS, while many Windows computers receive Moore's adaptation under the name of Baskerville Old Face in the URW digitisation (that described above) without an italic or bold weight.
Adaptations
A particularly idiosyncratic Baskerville revival is Mrs Eaves (1996), designed by Zuzana Licko.[75] Named after Baskerville's housekeeper-turned-wife, it uses a low x-height to create a bright page without reducing stroke width. Not intended for extended body text, it is often used on book titles and headings.[76][77][78] It uses a variety of ligatures to create effects with linked characters.[79] Licko later created a sans-serif companion, Mr. Eaves.
Big Moore by Matthew Carter is a recent, complex digitisation of the larger sizes of Isaac Moore's early adaptation, that often called Baskerville Old Face, adding an italic.[51][55][80][81] Harriet is an adaptation by Okaytype inspired by American nineteenth-century printing.[82]
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/