Ask Your Question

Cannot type formula V_in : Librewriter

asked 2020-01-10 10:07:49 +0100

attaponc gravatar image

updated 2020-04-03 17:01:50 +0100

keme gravatar image

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

edit retag flag offensive close merge delete


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"}.

Mike Kaganski gravatar imageMike Kaganski ( 2020-01-10 10:35:08 +0100 )edit

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

See also :

Lupp gravatar imageLupp ( 2020-01-10 13:18:53 +0100 )edit

@Lupp: done ;-P

Mike Kaganski gravatar imageMike Kaganski ( 2020-01-10 18:47:46 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-01-10 18:42:58 +0100

updated 2020-04-03 13:47:31 +0100

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.
edit flag offensive delete link more


@Mike Kaganski: 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 was upvoted 11 times, and the answers have a total of 19 votes?

Lupp gravatar imageLupp ( 2020-01-11 00:10:34 +0100 )edit

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

Posted as a FAQ.

Mike Kaganski gravatar imageMike Kaganski ( 2020-04-03 16:26:50 +0100 )edit

\// Fascinating!
Will users consult it?

Lupp gravatar imageLupp ( 2020-04-03 17:20:08 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-01-10 10:07:49 +0100

Seen: 116 times

Last updated: Apr 03 '20