Keybindings to change text alignment in table cell

Hello everyone! I’m trying TexMacs and Mogan recently. They are wonderful typesetting tools, but I found it difficult to find documents sometimes, esp. compared to sth. like Latex.

I want to be able to change content alignment in table quickly to, e.g. mimic align env using table.

I saw in The Jolly Writer that:

It is easy to modify the alignment of cells using the keyboard. The shortcut ⌘→ moves the horizontal alignment of a cell further to the right

But meta+right or esc+right inserts new colomn in Texmacs, and does nothing in Mogan.

So does this keybinding actually exist? If not, how can I define one myself? (that is, what scheme function can I use for this?)

The built-in TeXmacs manual might be outdated. We tried to correct a lot outdated info in Mogan (Help->Manual), but there are still many outdated.

For keybindings related to table, just look into:https://github.com/XmacsLabs/mogan/blob/branch-1.2/TeXmacs/progs/table/table-kbd.scm

  ("table H l" (table-set-halign "l"))
  ("table H c" (table-set-halign "c"))
  ("table H r" (table-set-halign "r"))
  ("table H L" (table-set-halign "L"))
  ("table H C" (table-set-halign "C"))
  ("table H R" (table-set-halign "R"))
  ("table H O" (table-set-halign "O"))

table is the prefix key, on Linux, it is Meta+T. Press Meta+t and then press h and then r, you can align the cell to right. And on KDE, Meta-T is occupied by KDE desktop. We can disable in KDE settings and then use it.

It is Meta+Ctrl+arrow in Mogan, it works fine for me on my KDE Desktop.

("structured:geometry delete" (geometry-reset))
("structured:geometry backspace" (geometry-reset))
("structured:geometry left" (geometry-left))
("structured:geometry right" (geometry-right))
("structured:geometry up" (geometry-up))
("structured:geometry down" (geometry-down))
("structured:geometry home" (geometry-start))
("structured:geometry end" (geometry-end))
("structured:geometry pageup" (geometry-top))
("structured:geometry pagedown" (geometry-bottom))
("structured:geometry tab" (geometry-circulate #t))
("structured:geometry S-tab" (geometry-circulate #f))
("structured:geometry [" (geometry-slower))
("structured:geometry ]" (geometry-faster))

The prefix key structured:geometry is Meta+Ctrl in Mogan on Linux, when you press M-C-right, it will invokes (geometry-right) to aligh the cell to right. In this case, the documentation is up-to-date and correct.

I’m not sure which system you’re using, but on my Mac, the keybinding you mentioned is actually Command + Option + Arrow keys. And the manual provides the correct way to do it. You can find more information about it in the Chapter titled Specifying the cell and table alignment.

2 Likes