Hello, To get a list as
So I coded as:
ToString[#] <> "month\n(here)") & /@ Range[12]
But the result is
So,
Thanks
Read the documentation for Labeled. The default is Bottom. You can change it, e.g.
Labeled
Bottom
Labeled[ToString[#] <> " month", "(here)", Top] & /@ Range[12]
Yes. Thanks a lot.
I tested and this one works:
Grid[{{ToString[#] <> "month"}, {"(here)"}}] & /@ Range[12]
How are you intending to use the result? Maybe this would work for your use case
Labeled[ToString[#] <> " month", "(here)"] & /@ Range[12]
Why Labeled will put the "(here)" below?
"(here)"
You did get the list you wanted (except for the space which you should have added before month). Are you asking how to get a different presentation?
month
Hello, I tried this,
(ToString[#] <> " month\n(here)") & /@ Range[12]
but the result is still the same.
That’s just a trivial detail. My point is that your code succeeded. What else is it that you want?
What I expect is this effect
So put it in a grid. I’m so confused. How do you think what you’re showing is actually different than the result you got?
There are obvious differences:
The first is entered by Ctrl+Enter. The second is entered by codes.
I check the Fullform, but it is too complicated. It seems it is not easy to replace '\n' by code.
Fullform