How can i write a case math like this?


i tried:

BP = \begin{cases}  1 & nếu \space c > r \\e^{1-\frac{r}{c}} & nếu c \leq r \end{cases}

but it does not work: the string "nếu", which contains a unicode-encoded glyph, displays incorrectly!

Thanks for any help!

  • 3
    Welcome to the site! I've removed a couple of your tags as you weren't asking about biblatex or the editor itself. Remember the tags tell us what your question is about. So if you had a question about Texpad (like, 'how do I alter the syntax highlighting in Texpad?') you would tag it with Texpad. But you wouldn't if you just happened to be using Texpad as your editor. Anyway, that's just a quick heads-up, well done for including the proper code sample markdown and I hope someone who knows the answer will be along soon :) – Au101 Nov 24 '16 at 2:25
  • 1
    Please complete your code so that we can compile it to reproduce the same incorrect output. Please also tell us which engine you are using. I assume XeTeX or LuaTeX since you're using unicode-math. We need a complete example to see the details e.g. the fonts you are specifying etc. Are you sure that should not be marked up as text e.g. with \text{}? – cfr Nov 24 '16 at 3:17
  • 1
    I can only reproduce the output you are showing by using \text{}. – cfr Nov 24 '16 at 3:23

I originally misread your question and saw the character you'd typed as an e with a tilde accent. However, I now see it is really a to bach and an acute. So, for these two accents on the e, I believe you want something like this which typesets the character in text mode rather than maths mode:

BP = \begin{cases}  1 & \text{nếu } c > r \\e^{1-\frac{r}{c}} & \text{nếu } c \leq r \end{cases}

another possibility

I'd like to know how to type this, though. (Other than copy-pasting from your question!)

  • It should be a circumflex with an acute above it. You can make it out of combining diacritical marks, does ế not copy across for you? – Au101 Nov 24 '16 at 3:36
  • @Au101 It just isn't very easy to see it is meant to be that with my eyes and my screen, I think. I actually was editing when you commented. Please see above. But I'd still like to know how to type it. – cfr Nov 24 '16 at 3:37
  • 1
    You need maybe a Vietnamese keyboard layout or you can do it by unicode character codes, or with a character map. For me with an international keyboard AltGr+; AltGr+' e - to my surprise - does work ế but I originally made it using Ubuntu's "Character Map" I guess Windows might have something similar. OS X does but I can't remember what it's called – Au101 Nov 24 '16 at 3:40
  • And yes, sorry, I didn't mean to come across as brusque, your original cut ended with a sentence saying you weren't quite sure what it was and I meant my comment as a natural reply to that. I certainly didn't mean to sound like I was thinking "silly cfr" ! – Au101 Nov 24 '16 at 3:43
  • 1
    @Au101 Aha! that is helpful, albeit off-topic. KCharSelect I do have :-). – cfr Nov 24 '16 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.