character style that preserves subscripts/superscripts

For all things Mellel

Moderators: redlers, Eyal Redler, Ori Redler

Post Reply
mlemaire
Got the styles thing figured out
Posts: 7
Joined: Sat Nov 26, 2011 7:58 pm

character style that preserves subscripts/superscripts

Post by mlemaire » Wed Dec 12, 2018 10:33 pm

My written work involves using a lot of superscripts and subscripts (scientific articles). I would like to use paragraph and character styles throughout the text. The problem I have is that when I apply character styles (say "Body"), it strips all of the subscripts/superscripts from the text. It is not a big deal for the references because I can simply re-scan with Bookends and this part is taken care of in a flash. But the other parts of the text need to be changed one-by-one, by hand, since as far as I know, it is not possible to find/replace with specific styles applied to it. BTW, this would be an awesome addition if there is one. Nisus Writer Pro can do it...

The ideal character style would preserve these changes. The "Style variations" option could potentially work, but I would need to apply specific styles manually to all of these characters. So not practical at all for long-form writing. It seems like the solution may have to do with the OpenType characters + features but I haven't figured it how it could work. In part, it seems like I would have to pick "superscript/superior" or "subscript/inferior" since only one option may be ticked at once.

Hopefully someone can help!

Thanks

DavidH
Read the guide, knows everything
Posts: 45
Joined: Wed Mar 26, 2008 9:13 pm

Re: character style that preserves subscripts/superscripts

Post by DavidH » Wed Dec 19, 2018 1:16 am

I’m not completely sure what you’re trying to do, but this may help.

Each Mellel Character style includes specifications for all possible Character attributes. Character attributes you don’t explicitly set while defining or redefining a particular Character style are inherited from the Base Character style of your document or template or style set. So when you reapply any Character style to a piece of text, it always resets all the text’s Character attributes, including font, regular/italic/bold, point size, Position (Normal or Superscript or Subscript), etc.

You can always define a new Character style for subscripts by taking an existing Character style, copying it, renaming the copy, and adding the Position attribute Subscript to the definition of your new style. All text to which the new style is applied will be subscript text. You can follow the same procedure to define a second new Character style for superscripts.

What you can’t do is base one Character style on another so that the second style automatically inherits changes in the first, i.e. a NewStyle that simply adds a Subscript attribute to OldStyle in such a manner that if you subsequently change e.g. the font of OldStyle, the font in NewStyle will automatically follow suit. That particular kind of inheritance, letting you define a NewStyle as OldStyle + Subscript, isn’t how Mellel’s style system works.

The difference between getting superscripts or subscripts using the Position attribute and using OpenType features instead is that the first method works with all fonts but simply shrinks and relocates the regular numerals; the second method uses specially drawn superscript or subscript glyphs but works only with OpenType fonts that include these glyphs in the first place.

If you prefer, you could re-dedicate one of the pre-existing style variations B-H to making subscripts and another to making superscripts by redefining two of those variations in the Base Character style. The changes you make there are inherited by the style variations in other Character styles. If you anticipate needing subscripts and superscripts with lots of different fonts and sizes, and can put up with Mellel’s use of function keys to apply style variations, this might be a more efficient way to go in the long run.

Bulow
Knows everything, can prove it
Posts: 158
Joined: Tue Nov 25, 2008 11:49 am
Location: Paris (sometimes Copenhagen)

Re: character style that preserves subscripts/superscripts

Post by Bulow » Sat Dec 29, 2018 1:23 pm

This is a serious problem. I have found that the best way to solve it is to use, not the position, but to use the specified subscript/superscript figures. You find them in the unicode section Digits - all. When you write yourself, it is easy (you can put these digits in your favourites), but it can be difficult to obtain this disciplin from authors whose text you are treating.
Bülow

mlemaire
Got the styles thing figured out
Posts: 7
Joined: Sat Nov 26, 2011 7:58 pm

Re: character style that preserves subscripts/superscripts

Post by mlemaire » Wed Jan 09, 2019 3:23 am

Hi DavidH and Bülow,

Thanks a lot for your input. In the end, the simplest solution was the last one: to use the unicode subscript digits that are considered to be "Position - Normal".

For others with the same problem, you have to use the menu Edit - Emojis & Symbols, then click on the image to the right of the search bar to discover the full menu that will allow you to search for whatever number and add it to your Favorites.

BTW there are also superscript numbers in there. If you need subscript letters, you cannot use this approach, but you can use it for superscript letters.

Thanks
Mathieu

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests