* table alignment with org-pretty-entities turned on
@ 2016-08-28 19:37 jsj
2016-08-30 18:12 ` jsj
[not found] ` <24054f3d55784e3b905a958604b45a33@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
0 siblings, 2 replies; 8+ messages in thread
From: jsj @ 2016-08-28 19:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
Hi,
I am using the latest org-plus-contrib package (20160822) with emacs 25.1.50.
I turned org-pretty-entities on in my init.el. When there are prettified letters displayed in an org table, the alignment of the table seems to be messed up. The deviation is related to the number of prettified symbols.
For example,
| a | b | c |
|--------+---+---|
| \alpha | | |
is displayed as
| a | b | c |
|----+---+---|
| α | | |
while
| a | b | c |
|--------------+---+---|
| \alpha \beta | | |
is prettified as
| a | b | c |
|-------+---+---|
| α β | | |
I am wondering whether I miss anything. It would be great to have aligned tables with prettified symbols.
Thank you!
Best regards,
Jiang
[-- Attachment #2: Type: text/html, Size: 2435 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-08-28 19:37 table alignment with org-pretty-entities turned on jsj
@ 2016-08-30 18:12 ` jsj
2016-09-06 6:06 ` Nicolas Goaziou
[not found] ` <24054f3d55784e3b905a958604b45a33@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
1 sibling, 1 reply; 8+ messages in thread
From: jsj @ 2016-08-30 18:12 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
To make it clear, the behavior I reported can be reproduced with a clean init file with just org loaded.
I put the table
| a | b | c |
|--------+---+---|
| \alpha | | |
in an org file, toggle pretty entities by C-c C-x \, then C-c C-c to realign the table. The result I get is
| a | b | c |
|----+---+---|
| α | | |
If I try the same thing for
| a | b | c |
|--------------+---+---|
| \alpha \beta | | |
I get
| a | b | c |
|-------+---+---|
| α β | | |
Is it just me or you can reproduce the same behavior?
Regards,
Jiang
> On 2016年8月28日, at 12:37, jsj <jsj.register@gmail.com> wrote:
>
> Hi,
>
> I am using the latest org-plus-contrib package (20160822) with emacs 25.1.50.
>
> I turned org-pretty-entities on in my init.el. When there are prettified letters displayed in an org table, the alignment of the table seems to be messed up. The deviation is related to the number of prettified symbols.
>
> For example,
>
> | a | b | c |
> |--------+---+---|
> | \alpha | | |
>
> is displayed as
>
> | a | b | c |
> |----+---+---|
> | α | | |
>
> while
>
> | a | b | c |
> |--------------+---+---|
> | \alpha \beta | | |
>
> is prettified as
>
> | a | b | c |
> |-------+---+---|
> | α β | | |
>
> I am wondering whether I miss anything. It would be great to have aligned tables with prettified symbols.
>
> Thank you!
>
> Best regards,
> Jiang
[-- Attachment #2: Type: text/html, Size: 5241 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-08-30 18:12 ` jsj
@ 2016-09-06 6:06 ` Nicolas Goaziou
2016-09-07 2:36 ` s j
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2016-09-06 6:06 UTC (permalink / raw)
To: jsj; +Cc: emacs-orgmode
Hello,
jsj <jsj.register@gmail.com> writes:
> To make it clear, the behavior I reported can be reproduced with a clean init file with just org loaded.
>
> I put the table
>
> | a | b | c |
> |--------+---+---|
> | \alpha | | |
>
> in an org file, toggle pretty entities by C-c C-x \, then C-c C-c to realign the table. The result I get is
>
> | a | b | c |
> |----+---+---|
> | α | | |
>
>
> If I try the same thing for
>
> | a | b | c |
> |--------------+---+---|
> | \alpha \beta | | |
>
> I get
>
> | a | b | c |
> |-------+---+---|
> | α β | | |
>
> Is it just me or you can reproduce the same behavior?
I cannot reproduce it.
However, I fixed an alignment bug in tables recently. Does updating Org
solve your issue?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-09-06 6:06 ` Nicolas Goaziou
@ 2016-09-07 2:36 ` s j
0 siblings, 0 replies; 8+ messages in thread
From: s j @ 2016-09-07 2:36 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]
It was solved. I just report it here in case it is useful to others.
It turned out to be a problem with the language environment.
Previously, the language environment was detected to be Chinese although my
system-default language is English. The preferred charset for Greek letters
was then set to a Chinese charset, which leads to wrong widths I guess. After
I set the language environment to utf8 in the init file, everything works
fine.
PS: sorry for duplicated emails, forgot to "reply all" in the first reply.
Jiang
On Sep 5 2016, at 11:06 pm, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> jsj <jsj.register@gmail.com> writes:
>
> > To make it clear, the behavior I reported can be reproduced with a clean
init file with just org loaded.
>
> I put the table
>
> | a | b | c |
> |--------+---+---|
> | \alpha | | |
>
> in an org file, toggle pretty entities by C-c C-x \, then C-c C-c to realign
the table. The result I get is
>
> | a | b | c |
> |----+---+---|
> | α | | |
>
>
> If I try the same thing for
>
> | a | b | c |
> |--------------+---+---|
> | \alpha \beta | | |
>
> I get
>
> | a | b | c |
> |-------+---+---|
> | α β | | |
>
> Is it just me or you can reproduce the same behavior?
>
> I cannot reproduce it.
>
> However, I fixed an alignment bug in tables recently. Does updating Org
solve your issue?
>
> Regards,
>
> \--
Nicolas Goaziou
[-- Attachment #2: Type: text/html, Size: 2552 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <24054f3d55784e3b905a958604b45a33@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: table alignment with org-pretty-entities turned on
[not found] ` <24054f3d55784e3b905a958604b45a33@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-08-31 8:25 ` Eric S Fraga
2016-08-31 14:44 ` Clément Pit--Claudel
2016-08-31 21:34 ` jsj
0 siblings, 2 replies; 8+ messages in thread
From: Eric S Fraga @ 2016-08-31 8:25 UTC (permalink / raw)
To: jsj; +Cc: emacs-orgmode@gnu.org
On Tuesday, 30 Aug 2016 at 18:12, jsj wrote:
[...]
> | a | b | c |
> |-------+---+---|
> | α β | | |
>
> Is it just me or you can reproduce the same behavior?
I have seen the same at times. Not always so it may be font
related. Not sure.
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-08-31 8:25 ` Eric S Fraga
@ 2016-08-31 14:44 ` Clément Pit--Claudel
2016-08-31 17:14 ` jsj
2016-08-31 21:34 ` jsj
1 sibling, 1 reply; 8+ messages in thread
From: Clément Pit--Claudel @ 2016-08-31 14:44 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1095 bytes --]
On 2016-08-31 04:25, Eric S Fraga wrote:
> On Tuesday, 30 Aug 2016 at 18:12, jsj wrote:
>
> [...]
>
>> | a | b | c |
>> |-------+---+---|
>> | α β | | |
>>
>> Is it just me or you can reproduce the same behavior?
>
> I have seen the same at times. Not always so it may be font
> related. Not sure.
I'm not sure I understand the problem description. Turning on prettification does breaks table alignment; thus,
| a | b | c |
|--------+---+---|
| \alpha | | |
is always displayed as
| a | b | c |
|--------+---+---|
| α | | |
I can indeed reproduce this; one way to prevent it from happening would be to prettify "\alpha" as "α ".
On the other hand, realigning the table (by pressing tab in a cell) produces the expected alignment:
| a | b | c |
|---+---+---|
| α | | |
which in turn looks wrong when prettification is disabled:
| a | b | c |
|---+---+---|
| \alpha | | |
Does this match your experience? If so, I don't think it's a bug, as much as a limitation of prettification.
Clément.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-08-31 14:44 ` Clément Pit--Claudel
@ 2016-08-31 17:14 ` jsj
0 siblings, 0 replies; 8+ messages in thread
From: jsj @ 2016-08-31 17:14 UTC (permalink / raw)
To: Clément Pit--Claudel; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
Hi,
> On 2016年8月31日, at 07:44, Clément Pit--Claudel <clement.pit@gmail.com> wrote:
>
> I'm not sure I understand the problem description. Turning on prettification does breaks table alignment; thus,
>
> | a | b | c |
> |--------+---+---|
> | \alpha | | |
>
> is always displayed as
>
> | a | b | c |
> |--------+---+---|
> | α | | |
>
> I can indeed reproduce this; one way to prevent it from happening would be to prettify "\alpha" as "α “.
This is the same as my experience, and it makes sense because turning on prettification does not take care of the alignment. The problem I have is exactly related to what you described below, i.e. the table alignment after a realignment.
> On the other hand, realigning the table (by pressing tab in a cell) produces the expected alignment:
>
> | a | b | c |
> |---+---+---|
> | α | | |
>
I have a different experience for this.
In my case, after a realignment (by pressing TAB or C-c C-c), I got
| a | b | c |
|----+---+---|
| α | | |
instead of
| a | b | c |
|---+---+---|
| α | | |
It looks like that a greek letter is considered to be a double-wide symbol but displayed as a single-wide one.
> which in turn looks wrong when prettification is disabled:
>
> | a | b | c |
> |---+---+---|
> | \alpha | | |
>
> Does this match your experience? If so, I don't think it's a bug, as much as a limitation of prettification.
>
> Clément.
This is surprising as I can reproduce the issue with a clean init file.
Btw, I am using org-plus-contrib package (20160822) with emacs 25.1.50 on a mac (10.11.6).
Jiang
[-- Attachment #2: Type: text/html, Size: 19272 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: table alignment with org-pretty-entities turned on
2016-08-31 8:25 ` Eric S Fraga
2016-08-31 14:44 ` Clément Pit--Claudel
@ 2016-08-31 21:34 ` jsj
1 sibling, 0 replies; 8+ messages in thread
From: jsj @ 2016-08-31 21:34 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode@gnu.org
I have some updates about this issue.
I can confirm that it is not related to the prettification. I tried to directly put in unicode symbols instead of the ones generated by prettification, and I got exactly the same issue.
So I guess this has something to do with how the system is handling the non-latin symbols.
It looks like these greek letters are displayed to be single-width symbols but counted as double-wide ones. Btw, I am using a fixed-width font, and the greek letters does not cause alignment issues outside tables.
Jiang
> On 2016年8月31日, at 01:25, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> On Tuesday, 30 Aug 2016 at 18:12, jsj wrote:
>
> [...]
>
>> | a | b | c |
>> |-------+---+---|
>> | α β | | |
>>
>> Is it just me or you can reproduce the same behavior?
>
> I have seen the same at times. Not always so it may be font
> related. Not sure.
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-09-07 2:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-28 19:37 table alignment with org-pretty-entities turned on jsj
2016-08-30 18:12 ` jsj
2016-09-06 6:06 ` Nicolas Goaziou
2016-09-07 2:36 ` s j
[not found] ` <24054f3d55784e3b905a958604b45a33@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-08-31 8:25 ` Eric S Fraga
2016-08-31 14:44 ` Clément Pit--Claudel
2016-08-31 17:14 ` jsj
2016-08-31 21:34 ` jsj
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).