Cannot type formula V_in : Librewriter 6.3.4.2

I want to type equation V_in in writer but it shows question mark instead of “in”
Could anyone help

image description

Thank in advance
attapon

in is a keyword in Math; to use it as a literal, you need to put it in quotes; since it will make it look different (non-italic), you might want this: V_{ital "in"}.

@mikekaganski. It might be not too bad an idea to post answers as answers.

See also : How to escape keyword in the formula editor

@Lupp: done :stuck_out_tongue_winking_eye:

in is a keyword in Math, which is a set operation expecting two arguments on the both sides (before and after), so put in the formula as is, it shows you a question mark indicating missing argument.

When you need to put a name that is a keyword in Math, you have several options.

When you want to use it as a text

E.g., a comment inside a formula … just put all your comment, including what would otherwise be keywords, into quotes: "this is text in quotes".

When you want to use it as a function name

Functions (e.g., sin) by default have non-italic font. Turning Math keywords into function names also easy and logical. E.g., you wanted a formula like in(a, b): typed that way, it would give you ¿(a, b). To get what you need, you use func keyword explicitly telling that what follows is a function name, and should not be treated otherwise: func in( a,b )

When you want to use it as a variable name

Variables by default have italic font. Using keywords as variables is most tricky: there’s no syntax like quotes or a keyword telling that what follows is a variable. So below are workarounds with discussion:

  1. Use ital func <keyword>, like V_{ital func in}. This would do the trick in the default configuration, when variables and functions differ only in italics. But (a) it is long, and (b) it will fail if you setup your formula fonts so that function names also use different font face: then italicized function name will still differ visually from variables. A variant of the same approach is uoper <keyword> {}, as in V_{uoper in {}} - but it seems to use the same font as variables, without need to specify ital explicitly.
  2. Use ital "keyword", like V_{ital "in"}. The shortest of all workarounds; still has the same problem as #1: if you change font of text in your formula, this workaround will not produce correct result.
  3. Use explicit font definition, using font Serif size 12 bold ital "in". Most verbose; allows you to match your customized font chosen for variables… but if you later decide to change formula fonts (e.g., using an extension allowing you to do it in all formulas at once), you will need to look through all your formulas with those workarounds and change that manually.
  4. Use nospace keyword, like in V_nospace {i n}. This takes the following separate elements and joins them - almost as if they are one word. Slightly longer than #2; but IMO, it’s the best option, since it gives you the formatting of variables which you choose in the formula. Yes, still a workaround.

@mikekaganski: Well, now it’s a full-featured tutorial.
How can we help users experiencing similar issues or just wanting to learn a bit more to find it?.

===
Can you imagine a reason for what my question Why is this site not structured better? was upvoted 11 times, and the answers have a total of 19 votes?

How can we help users experiencing similar issues or just wanting to learn a bit more to find it?

Posted as a FAQ.

\// Fascinating!
Will users consult it?