chris_net4 Posted August 30, 2022 Posted August 30, 2022 Hello everyone, Please let me know how to correctly use mtext with text formatting (tracking - spacing between characters). (setq a (list 0 0)) (setq b (list 10 10)) (setq c 1000) (command "_.mtext" a b c "") OK (setq a (list 0 0)) (setq b (list 10 10)) (setq c {\T0.8; 1000}) (command "_.mtext" a b c "") NOK Quote
Steven P Posted August 30, 2022 Posted August 30, 2022 A couple of thing you might consider. If C is your text then it is probably better to define that as a string if it is being used as a string, put in all in "..... ", for example (setq C "1000") Put your second 'C' in " " to get: (setq c "{\T0.8; 1000}") You might do this already in other parts of your code Last thing to look at is Special characters, the backslash is a marker for a special character in a string (for example, \n is the new line combination. In your c, it is looking to insert a special character, \T. You'll want to fix the \. This is done with a double \\, the first \ to say special character next and the second \ is the character to insert. Hope that makes sense - basic thing, inside " .... " you need to use a double \\ to make that work So you will want to use: (setq c "{\\T0.8; 1000}") Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.