I currently need the symbol \mapsfrom, available in the package stmaryrd. If I input \mapsfrom in math-mode, then it is not replaced by a graphical representation of the symbol.

Is it possible to get LyX to display such "non-standard" symbols, and if so, then how?

A method that does not use Tools > Preferences... > Display > Display Graphics would be preferable :)

  • Out of curiosity, why are you nixing Tools / Prefs / … / Display Graphics? – Sean Allred May 14 '14 at 17:00
  • 1
    What version of LyX are you using? Under LyX 2.1.0 \mapsfrom is replaced by a graphical representation of the symbol. – Werner May 14 '14 at 18:24
  • @Werner: LyX 2.0.6 on Ubuntu. I see this is different in the daily version (2.2.0dev): \mapsfrom is replaced by (graphical \leftarrow)mapsfromchar. @Sean: I prefer not to have the graphics shown in general -- that the representation changes when I enter/exit math annoys me a little :) – Rasmus May 14 '14 at 18:52
  • @Rasmus: Then update and live happily ever after... – Werner May 14 '14 at 18:54
  • @Werner: I update to the stable version 2.1, and indeed, it looks neat :) But if LyX 2.1 is short of a graphical representation, is there something I can do? – Rasmus May 14 '14 at 19:16

The characters are defined in lib/symbols and lib/unicodesymbols. These are just text files and are easily editable. It takes a little bit of time to understand how to add support, but everything you need to know (examples and instructions) are in those files.

The best way is to post an enhancement request at http://www.lyx.org/trac . Georg (the main LyX developer working with these files) is often adding new symbols.

If you do implement this yourself for some symbols, please contribute back to LyX by sending your patch to lyx-devel@lists.lyx.org

  • Thank you, Scott! I'm looking forward to playing around! – Rasmus May 15 '14 at 5:25
  • 1
    @Rasmus great! Feel free to send an email to lyx-devel if you get stuck. We're usually happy to help someone who's willing to put in the time to learning how to implement it themselves and hopefully add it on to improve LyX. I think this is one of those things where once you learn how to do it once the next time is much easier. – scottkosty May 15 '14 at 6:14

This is not the "true" answer like scottkosty, but a quick workaround is to use math macros. There's a separate entry in math macros for the display text in LyX and the actual TeX output, so you can just put the character you really want in the TeX part and put some sort of half-baked visual simulation in the LyX part (e.g. in this case you could use the unicode character ↤). Then instead of using the real macro in your formulae, use the indirect one that you've defined.

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.