mailing-list for TeXmacs Users

Text archives Help


Re: accolade à droite


Chronological Thread 
  • From: Giovanni Piredda <address@hidden>
  • To: Vincent Douce Mathoscope <address@hidden>, texmacs-users <address@hidden>
  • Subject: Re: accolade à droite
  • Date: Sun, 10 Jan 2021 23:03:00 +0100

I suspect it is easy to follow only when typing in "source mode", otherwise the activation of the macros makes them "disappear" (I hope I understood correctly that you are typing the macro in text mode)

I did it by first generating the preamble (which puts one automatically in source mode), in this case the math-table-base does not disappear. You find the command for generating the preamble under     Document->Part

Then there are two ways to do it. Either type the entire sequence (see below) or copy the macro from the the "Edit macro" menu command while inside a "Choice" environment (in WYSIWYG mode), paste it into the preamble, and make the substitutions there (exchange the roles of left and right). Let me know if you want more details on this, which could be the easiest method.

The sequence is the following, I hope I got all steps right and that it makes enough sense that you are seeing where the key presses should bring you. The final look is

I have succeeded writing first both \left, \right, then going back with twice left arrow to add the \tformat part, but not writing first \left and \tformat (could not go to the right place where to write \right). I found it necessary as well to insert \table-math-swell with the backslash (cell-swell is already in a position that takes the environment variables as default, so I did not need to place a backslash before it.

-> is right arrow, <- is left arrow.

\assign RET

macrolx ->

\macro RET TAB <-

x ->

\math-table-base RET

\left RET

. ->

\right RET

} <- <-

\tformat RET

\cwith RET

1 ->

-1 ->

1 ->

-1 ->

cell-swell ->

\table-math-swell ->

TAB

\x RET


After this the macro is available.

If you place the cursor towards the end of the macro definition (I did not investigate precisely) and press return it changes formatting, but it seems to me that this is just the presentation.




Am 10.01.2021 um 22:25 schrieb Vincent Douce Mathoscope:
hi Giovannithanks for your answer and proposition
yes indeed i would need some help
i think i understand your typiing as :
but when i press "enter" or right arrow, what usually makes the | appear, here the math-table-base disappear
Vincent

Le 10 janv. 2021 à 17:20, Giovanni Piredda <address@hidden> a écrit :

Waiting for someone else to comment, I propose this

<assign|rightChoice|<\macro|x>   <math-table-base|<left|.><tformat|<cwith|1|-1|1|-1|cell-swell|<value|table-math-swell>>|<arg|x>><right|}>>
  \;
</macro>>

I started from the macro that defines choice (that I got from the "Edit macro" menu command) and I moved both the brace from left to right and the point from right to left. I do not master yet the editing of macros in the TeXmacs source mode, but it worked and it gives what you want as far as I can tell. Let me know if you need step by step instructions to make it work.

G.


Am 10.01.2021 um 16:56 schrieb Vincent Douce Mathoscope:
bonjour
two TeXmacs users ask me how to make right l'accolade } , thus the symétric of \choice
i mean not only typing } but having this :

x=1|
   |->x+y=3
y=2|

with a large vertical } instead of the |->
----
Vincent Douce
https://lemathoscope.com/
cours de maths postbac par visio

----
Vincent Douce
cours de maths postbac par visio

PNG image

PNG image

PNG image




Archive powered by MHonArc 2.6.19.

Top of page