2
$\begingroup$

To reproduce the issue, use Ctrl+Enter to create 3 placeholders and enter (or α β) in sequence and wrap it with a pair of " and execute. The output will be a pink box with the following message:

A GridBox containing rows of differing lengths was encountered.

enter image description here

$Version
(* "13.3.1 for Microsoft Windows (64-bit) (July 24, 2023)" *)
$\endgroup$
12
  • $\begingroup$ Can you please include the copy-paste code with the vertical space? I don't know how to type it in ... :) $\endgroup$
    – Domen
    Sep 18, 2023 at 8:25
  • $\begingroup$ @Domen That code can't be pasted here normally. But you can type it by Ctrl key and Enter key at the same time. $\endgroup$
    – Y. zeng
    Sep 18, 2023 at 8:27
  • $\begingroup$ Hm, I have no problems. Please select cell In[22], then go to the menu Cell > Show Expression and include this in your question. This might help us deducing what is wrong with your input. $\endgroup$
    – Domen
    Sep 18, 2023 at 8:39
  • 1
    $\begingroup$ I see it now. I get the same problem if I want to leave an empty space in between; GridBox somehow doesn't allow it. I don't know what to do, but I know some people here speak Chinese so they probably know how to deal with this :) $\endgroup$
    – Domen
    Sep 18, 2023 at 8:52
  • 1
    $\begingroup$ Does it make sense to use a GridBox inside of a string? I think GridBox will expect a complete, rectangular grid of data, so if a "cell" is missing, it can't properly display, and since it's inside a string, I'm not really sure why we should expect anything readable to result. $\endgroup$
    – lericr
    Sep 18, 2023 at 13:51

3 Answers 3

2
$\begingroup$

This looks like a bug to me. For Chinese users, the easiest work around is probably, using the fullwidth space (全角空格)   (FromCharacterCode[12288]) instead of the halfwidth space .

enter image description here

$\endgroup$
3
  • $\begingroup$ May you tell me how did you know this and what input method did you use? $\endgroup$
    – Y. zeng
    Sep 20, 2023 at 6:48
  • $\begingroup$ @Y.zeng I find this just by guess. (The message complains about "rows of differing lengths" , so I guess a fullwidth space may help. ) I'm using 小小输入法 (with 郑码 as the input method), but any Chinese IME should have the button for fullwidth/halfwidth switch. $\endgroup$
    – xzczd
    Sep 20, 2023 at 6:52
  • $\begingroup$ You can use the Chinese input method default in Windows 11, which will be more clean. However, even if the length of them are different, Mathematica should have ability to deal with it, not output error. So, it should be a bug. $\endgroup$
    – Y. zeng
    Sep 20, 2023 at 7:43
0
$\begingroup$

Use simply

  "你\n \n 好"

chinese vertical

Of course exist a text formatting option for classical chinese print right to left, vertical, I suppose.

$\endgroup$
1
  • $\begingroup$ But it is different from Ctrl + Enter. $\endgroup$
    – Y. zeng
    Sep 18, 2023 at 13:37
0
$\begingroup$

I had no problems with it:

"\!\(\*GridBox[{{\:4f60},{\:597d}\n }]\)"

enter image description here

I was able to insert blank in between by this code:

"\!\(\*GridBox[{{\:4f60},{"<>FromCharacterCode[10240]<>"},{\:597d}\n }]\)"

enter image description here

$\endgroup$
7
  • $\begingroup$ I guess you did not use Ctrl + Enter. If you used them, you didn't add a space in the middle. $\endgroup$
    – Y. zeng
    Sep 20, 2023 at 5:45
  • $\begingroup$ What character code has your vertical space? $\endgroup$ Sep 20, 2023 at 6:01
  • $\begingroup$ A space, just press space key to achive it. $\endgroup$
    – Y. zeng
    Sep 20, 2023 at 6:03
  • $\begingroup$ Why you call it then a vertical space when it is an ordinary space? $\endgroup$ Sep 20, 2023 at 6:03
  • $\begingroup$ Sometimes there are three character, sometimes there are two. I just want to keep them align top and bottom together. $\endgroup$
    – Y. zeng
    Sep 20, 2023 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.