[Solved] Superscript within cross reference text

Discuss the word processor

[Solved] Superscript within cross reference text

Postby sjmullock » Thu Apr 02, 2020 5:23 pm

I have been using cross-references without problem. However, recently I have been writing a technical note about the I<sup>2<\sup>C interface, pronounced I-squared-C. The 2 should be superscript. Unsurprisingly, several of my headings include I-squared-C, with the 2 superscripted. If I make a cross reference to such a heading the superscript is lost. I can select the whole cross reference and change the font/size of the text, but I don't see how to recover the superscript for a single character. It is not the end of the world, but it looks a bit clunky. Does anyone have a suggestion for a fix/work-around? Does this count as a bug?
Last edited by sjmullock on Fri Apr 03, 2020 11:47 am, edited 1 time in total.
OpenOffice 4.7.1 on Windows 10
sjmullock
 
Posts: 10
Joined: Fri Oct 19, 2012 6:56 pm

Re: Superscript within cross reference text

Postby John_Ha » Thu Apr 02, 2020 6:05 pm

sjmullock wrote:Does anyone have a suggestion for a fix/work-around?

Search for each occurrence which is not superscripted and superscript it.

Search the forum with search superscript to find posts like Re: search for superscripts which will assist you in automating it.

eg search for all 2 preceded by i and followed by C (using a regular expression?) and superscript those found 2s by Ctrl+shift+p.

Or Find All i2C which highlights them. Close Find and Replace. Paste i2supC in place of all the i2C found.

Or do it in steps.

1. Find all i2C. Click in the Replace box and click Format and set Superscript. Replace All. This sets all i2C to superscript.

Clipboard02.gif
Replacing all found i2C by superscripted "i2C"

2. Now click in the Find box and click Format. Search for all superscript i. Click the Replace box and click No Format. Replace all by No Format i.

3. Repeat and replace all superscript C by No Format C.

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Superscript within cross reference text

Postby sjmullock » Thu Apr 02, 2020 7:19 pm

Thanks for trying to help, but I think you may have misunderstood. I know how to apply the superscript format, but I cannot select the 2 when it appears in cross reference text, at least I have not figured out a way. I can select the whole cross-reference, but not part of it.
OpenOffice 4.7.1 on Windows 10
sjmullock
 
Posts: 10
Joined: Fri Oct 19, 2012 6:56 pm

Re: Superscript within cross reference text

Postby Hagar Delest » Thu Apr 02, 2020 7:31 pm

sjmullock wrote:Does this count as a bug?

I would agree.
I've run a quick search and it may be linked to that one: Issue 27377 - Character formatting not retained in entries of TOC, table lists, etc.
There may be a workaround by using a special font at the end of the discussion.

Another dirty workaround: make 3 references so that you can format the superscript 2 in the cross-references.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Superscript within cross reference text

Postby sjmullock » Fri Apr 03, 2020 11:46 am

Hagar Delest wrote: make 3 references so that you can format the superscript 2 in the cross-references.

I admire the deviousness of your thinking, but I can't help feeling that I might be making more trouble for myself than it would be worth when cross referencing numbered headings. Your solution certainly addresses the issue.

Thank you for showing me the link to the bug report. I now know its not worth struggling until the bug is fixed. I am slightly surprised it has had higher priority as it clearly appears to the user as a bug, whatever its formal classification. However, I don't want to critiocise the good people who work on this software. In most repects it is really remarkably good.

The point about fonts is a good one and in my particular case this time provides a solution, because now I think about it, the regular font has a superscript 2 in it I think. So I'll mark this as solved and maybe think about finding out how I up-vote the issue for a general fix. Many thanks
OpenOffice 4.7.1 on Windows 10
sjmullock
 
Posts: 10
Joined: Fri Oct 19, 2012 6:56 pm

Re: [Solved] Superscript within cross reference text

Postby Hagar Delest » Fri Apr 03, 2020 1:41 pm

I thought about the upperscript 2 that is usually under the Esc key of the keyboard. But there are plenty of similar situations where the formatting is needed, so I consider this still a workaround, even if it meets the needs in many cases.

Beware of cross-references to headings. I made some in a couple of documents but when I made them part of a master document, the heading references had changed and the links no longer worked, I had to recreate them. And this time, I used the string of the heading to create the reference instead of the built-in feature to cross-reference a heading. No big deal if the document will remain standalone for ever but soemthing to keep in mind just in case.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Solved] Superscript within cross reference text

Postby John_Ha » Fri Apr 03, 2020 3:12 pm

Hagar Delest wrote:I thought about the upperscript 2 that is usually under the Esc key of the keyboard.

Insert > Special character ..., finds a superscript 2.
Attachments
Clipboard02.gif
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7794
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Superscript within cross reference text

Postby sjmullock » Fri Apr 03, 2020 4:04 pm

sjmullock wrote:now I think about it, the regular font has a superscript 2 in it

Yes thanks, I did get there in the end
OpenOffice 4.7.1 on Windows 10
sjmullock
 
Posts: 10
Joined: Fri Oct 19, 2012 6:56 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 8 guests