mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Problem with keymappings


Chronological Thread 
  • From: David Allouche <address@hidden>
  • To: address@hidden
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] Problem with keymappings
  • Date: Wed, 3 Mar 2004 12:54:17 +0100

On Mon, Mar 01, 2004 at 11:52:59PM +0100, address@hidden wrote:

> I have a portuguese keyboard with a special key for generating "?" and
> "?" characters. The character "?" (usually known as masculine) is
> generated by pressing that key and "?" (usually known as ordfeminine)
> is generated by SHIFT-that_key.
>
> The problem is that TeXmacs doesn't detect the key. After searching
> through the manual and snooping arround in
> "/usr/share/TeXmacs/progs/keyboard/" I decided to add the following
> lines to "kbd-text.scm":
>
> ("ordfeminine" "?")
> ("masculine" "?")
[...]
>
> TeXmacs now detects the key but "?" (small letter Z with caron) and
> "&#322;" (small letter L with stroke) appear instead of "?" and "?"
> resp..

Good work. TeXmacs uses the X keysym names, and this is indeed the
correct binding.

The problem you have is that the internal encoding of texmacs is not
ISO-something but instead Cork (a font encoding used by TeX) plus
universal symbols (like "<alpha>", currently only used in maths, but it
looks like that is going to be fixed in 1.0.4).

Cork does not have a codepoint for masculine and ordfeminine. Instead
you should currently use macros called "masculine" or "ordfeminine"
which give the desired layout. This is made harder by the fact that
texmacs currently does not display underlines in a variety of special
contexts (like superscripts and tables).

This macro should be defined in std-symbol.ts along with all other
similar dirty hacks. You have two possibilities:

1. Find a TeX font which provides the desired symbol and see with
Joris what is the correct way to use it.

2. Design a hackish solution with a superscript and table, like this
one (paste in texmacs with Edit->Paste as->Scheme):

(assign "ordfeminine" (macro
(rsup (tabular (tformat
(cwith "1" "-1" "1" "-1" "cell-lsep" "0")
(cwith "1" "-1" "1" "-1" "cell-rsep" "0")
(cwith "1" "-1" "1" "-1" "cell-tsep" "0")
(cwith "1" "-1" "1" "-1" "cell-vcorrect" "n")
(cwith "1" "1" "1" "-1" "cell-bborder" "1ln")
(cwith "1" "1" "1" "-1" "cell-bsep" "2ln")
(twith "table-valign" "T")
(table (row (cell "a"))))))))

Once you have defined these macros (probably in std-symbol.ts, along with
all other related dirty hacks), you could insert them with those
bindings (in text.scm):

("masculine" (make 'masculine))
("ordfeminine" (make 'ord-feminine))

Patches welcome on the Savannah patch manager:

https://savannah.gnu.org/patch/?group=texmacs

> PS: Sorry for this long post! :(

That was not a long post, just a complete and accurate description of
your problem and of your tentative solution.

--
-- ddaa



Archive powered by MHonArc 2.6.19.

Top of page