How do I type to the right of a formula in LibreOffice Writer?

Suppose I want to alternate between text and formulas in LibreOffice Writer, for instance: (text) (formula) (text) (formula) etc. within a single line/paragraph. How do I do that? Clicking to the right of a formula does not move the cursor there, even in direct cursor mode. Clicking to the left of a formula and then hitting the right arrow button just moves the cursor to a new line.

Thanks

In the menu, you should have highlighted View > Formatting Marks so you can see where non-printing elements exist.

The formula object is anchored As character by default in a new install. Right-click on the formula and select Anchor > As Character then the paragraph mark will be visible immediately after the formula. If you click anywhere in the line beyond the formula then the cursor will be immediately to the right of the formula and you can start typing .
FormulasInSameLineAsText.odt (19.2 KB)

1 Like

I cannot reproduce the behavior you describe. When I have formulas on a single line, I can click anywhere to place the cursor. With the keyboard, it depends on whether the formula is selected as a graphical object (i.e., it has four “handles”). If selected as graphical object, arrow keys will do nothing. will open the formula for editing, will unselect the object and return to the normal text cursor, which then can be moved with the navigation keys.

Maybe you should describe specific steps one can try to reproduce, eventually with a sample document.

Thanks for the responses. It looks like right-clicking a formula and changing Anchor to As Character works as @EarnestAl suggested works. Although strangely enough, not with the formulas as is; I have to make a copy of the formula, change that to As Character, and delete the original.

@Vanadium The problem is very easy for me to reproduce: Just create a new document and type Hello. With the cursor right after the o, create a formula and enter 12345, then click away. A formula object then appears, but to the left of Hello. I can drag it to the right of Hello. But then I’m unable to place the cursor to the right of 12345. But yes, changing Anchor to As Character lets me place the cursor to the right of the formula in this case too.

Thanks

It may depend on how you create the formula. I use Insert - Object - Formula Object (you can use the shortcut key Shift+Alt+E) and that places the equation to the right of “hello” with the equation editor opens.

“Clicking away” leaves you with the equation selected as a graphical object: cursor keys won’t work unless you hit “Esc” to return to the normal cursor, as I described. Actually, also clicking anywhere on the right of “12345” places the cursor after the equation.

Yes, for this to behave as expected, the equation obviously must be anchored as a character. Only then will it behave as other characters.

I’ve been using Insert → Object → Formula to create formulas, and then clicking away when I’m done. The problem seems to be that LibreOffice defaults to Anchor To Character, contrary to what EarnestAI said; I don’t know why. But I suppose it’s not a big deal as I can just change to As Character.

Are you using a template for your documents? If you are, then you need to modify the frame style for formulas in your document and in the template.

  • With your document open, open the sidebar and click on the Style icon
  • Click the Frame style icon (3rd from left) at the top of the pane to view the frame styles
  • Right-click Formula and select Modify
  • In the dialogue that opens select the Type tab.
  • Under the heading Anchor, select the option As Character. OK

Do the same for your template

1 Like

Insert the equation using the dedicated menu entry, Insert - OLE Object - Formula Object. You can also use the shortcut key <Shift>+<Alt>+E. This way, the formula object will be inserted anchored as a character, which is required if you want to see it flow like other characters in the paragraph.