emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
@ 2022-05-30 15:48 Uwe Brauer
  2022-05-30 16:06 ` Eric S Fraga
  2022-05-30 21:10 ` Tim Cross
  0 siblings, 2 replies; 6+ messages in thread
From: Uwe Brauer @ 2022-05-30 15:48 UTC (permalink / raw)
  To: emacs-orgmode


Hi

I wanted to export a 4x4 table to ascii to insert it into a web fill in
interface. However the column get distorted. I tried to tabify or
untabify the buffer but it did not help.


The problem also occurs when I export the table using the 
orgtbl-to-tsv

#+begin_example
| Course                       |           L |           M |           X |           J |           V |
|------------------------------+-------------+-------------+-------------+-------------+-------------|
| Statistics                   | 10:30-11:30 |             | 10:00-11:20 |             | 10:30-11:30 |
| Differential Equations       | 12:30-13:30 |             | 13:00-14:15 |             | 12:30-13:30 |
| Master                       | 14:30-15:30 |             | 15:30-16:30 | 14:30-15:30 |             |
| Numerical Analysis :00-19:00 | 18:00-19:00 | 18:00-19:00 | 18:00-19:00 |             |         7.5 |
|                              |             |             |             | 19:00-20:00 |             |
|------------------------------+-------------+-------------+-------------+-------------+-------------|
|                              |             |             |             |             |             |

#+end_example

Converted to 

#+begin_example
Course	L	M	X	J	V
Statistics	10:30-11:30		10:00-11:20		10:30-11:30
Differential Equations	12:30-13:30		13:00-14:15		12:30-13:30
Master	14:30-15:30		15:30-16:30	14:30-15:30	
Numerical Analysis	18:00-19:00	18:00-19:00	18:00-19:00	18:00-19:00	
				19:00-20:00	
#+end_example


Any idea what is wrong here?


Regards

Uwe Brauer 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
  2022-05-30 15:48 export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv? Uwe Brauer
@ 2022-05-30 16:06 ` Eric S Fraga
  2022-05-30 21:10 ` Tim Cross
  1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2022-05-30 16:06 UTC (permalink / raw)
  To: emacs-orgmode

On Monday, 30 May 2022 at 17:48, Uwe Brauer wrote:
> The problem also occurs when I export the table using the
> orgtbl-to-tsv

The hint is in the name: tsv means "tab separated values" so each entry
(stripped of trailing spaces) is separated by a tab character (\t, o11,
0x09).  If you look at the exported text carefully, you'll find that
there is only one character between each entry and C-x = will tell you
what that character is.

-- 
: Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
  2022-05-30 15:48 export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv? Uwe Brauer
  2022-05-30 16:06 ` Eric S Fraga
@ 2022-05-30 21:10 ` Tim Cross
  2022-05-31  1:14   ` Samuel Wales
  2022-05-31 12:14   ` Uwe Brauer
  1 sibling, 2 replies; 6+ messages in thread
From: Tim Cross @ 2022-05-30 21:10 UTC (permalink / raw)
  To: emacs-orgmode


Uwe Brauer <oub@mat.ucm.es> writes:

> Hi
>
> I wanted to export a 4x4 table to ascii to insert it into a web fill in
> interface. However the column get distorted. I tried to tabify or
> untabify the buffer but it did not help.
>
>
> The problem also occurs when I export the table using the 
> orgtbl-to-tsv
>
> #+begin_example
> | Course                       |           L |           M |           X |           J |           V |
> |------------------------------+-------------+-------------+-------------+-------------+-------------|
> | Statistics                   | 10:30-11:30 |             | 10:00-11:20 |             | 10:30-11:30 |
> | Differential Equations       | 12:30-13:30 |             | 13:00-14:15 |             | 12:30-13:30 |
> | Master                       | 14:30-15:30 |             | 15:30-16:30 | 14:30-15:30 |             |
> | Numerical Analysis :00-19:00 | 18:00-19:00 | 18:00-19:00 | 18:00-19:00 |             |         7.5 |
> |                              |             |             |             | 19:00-20:00 |             |
> |------------------------------+-------------+-------------+-------------+-------------+-------------|
> |                              |             |             |             |             |             |
>
> #+end_example
>
>
> Converted to 
>
> #+begin_example
> Course	L	M	X	J	V
> Statistics	10:30-11:30		10:00-11:20		10:30-11:30
> Differential Equations	12:30-13:30		13:00-14:15		12:30-13:30
> Master	14:30-15:30		15:30-16:30	14:30-15:30	
> Numerical Analysis	18:00-19:00	18:00-19:00	18:00-19:00	18:00-19:00	
> 				19:00-20:00	
> #+end_example
>
>
> Any idea what is wrong here?
>
>

I think you might be working under a false expectation. A quick look at
the exported table example and it looks to be correct to me - values are
tab separated, with is what a tsv format is. There is no requirement
that the columns should be aligned, only that they are separated by
tabs. 

With regards to more formatted output options, a common issue is with
respect to the fonts people use. If the font being used to view th
eoutput is a proportional font rather than a fixed width one, then all
formatting will be broken. Most web interfaces tend to use proportional
fonts due to their more pleasing look for most people. This is also why
tables sent via email often don't look right for the recipient - they
are using a proportional or condensed font. 

As you have no control over the fonts used by those viewing your ASCII
content, you cannot reliably make it look well formatted. Either you
have to do HTML, some form of markdown or some other format with
enforces tgable alignment.  

If your entering data into a web UI, I would not have any expectations
regarding the final formatting as that will depend heavily on what the
backend does to the supplied input and how the data is presented to
anyone looking at that output. 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
  2022-05-30 21:10 ` Tim Cross
@ 2022-05-31  1:14   ` Samuel Wales
  2022-05-31  1:16     ` Samuel Wales
  2022-05-31 12:14   ` Uwe Brauer
  1 sibling, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2022-05-31  1:14 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

some web ui support some subset of html.  i think blogger does.  then
you might have a div.  which i think [not sure] might enforce line
breaks and also be monospace, or something like that.  [pardon my html
ignorance.]

On 5/30/22, Tim Cross <theophilusx@gmail.com> wrote:
>
> Uwe Brauer <oub@mat.ucm.es> writes:
>
>> Hi
>>
>> I wanted to export a 4x4 table to ascii to insert it into a web fill in
>> interface. However the column get distorted. I tried to tabify or
>> untabify the buffer but it did not help.
>>
>>
>> The problem also occurs when I export the table using the
>> orgtbl-to-tsv
>>
>> #+begin_example
>> | Course                       |           L |           M |           X |
>>           J |           V |
>> |------------------------------+-------------+-------------+-------------+-------------+-------------|
>> | Statistics                   | 10:30-11:30 |             | 10:00-11:20 |
>>             | 10:30-11:30 |
>> | Differential Equations       | 12:30-13:30 |             | 13:00-14:15 |
>>             | 12:30-13:30 |
>> | Master                       | 14:30-15:30 |             | 15:30-16:30 |
>> 14:30-15:30 |             |
>> | Numerical Analysis :00-19:00 | 18:00-19:00 | 18:00-19:00 | 18:00-19:00 |
>>             |         7.5 |
>> |                              |             |             |             |
>> 19:00-20:00 |             |
>> |------------------------------+-------------+-------------+-------------+-------------+-------------|
>> |                              |             |             |             |
>>             |             |
>>
>> #+end_example
>>
>>
>> Converted to
>>
>> #+begin_example
>> Course	L	M	X	J	V
>> Statistics	10:30-11:30		10:00-11:20		10:30-11:30
>> Differential Equations	12:30-13:30		13:00-14:15		12:30-13:30
>> Master	14:30-15:30		15:30-16:30	14:30-15:30	
>> Numerical Analysis	18:00-19:00	18:00-19:00	18:00-19:00	18:00-19:00	
>> 				19:00-20:00	
>> #+end_example
>>
>>
>> Any idea what is wrong here?
>>
>>
>
> I think you might be working under a false expectation. A quick look at
> the exported table example and it looks to be correct to me - values are
> tab separated, with is what a tsv format is. There is no requirement
> that the columns should be aligned, only that they are separated by
> tabs.
>
> With regards to more formatted output options, a common issue is with
> respect to the fonts people use. If the font being used to view th
> eoutput is a proportional font rather than a fixed width one, then all
> formatting will be broken. Most web interfaces tend to use proportional
> fonts due to their more pleasing look for most people. This is also why
> tables sent via email often don't look right for the recipient - they
> are using a proportional or condensed font.
>
> As you have no control over the fonts used by those viewing your ASCII
> content, you cannot reliably make it look well formatted. Either you
> have to do HTML, some form of markdown or some other format with
> enforces tgable alignment.
>
> If your entering data into a web UI, I would not have any expectations
> regarding the final formatting as that will depend heavily on what the
> backend does to the supplied input and how the data is presented to
> anyone looking at that output.
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
  2022-05-31  1:14   ` Samuel Wales
@ 2022-05-31  1:16     ` Samuel Wales
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2022-05-31  1:16 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

i was thinking of a nother element when i said div.

i meant pre

On 5/30/22, Samuel Wales <samologist@gmail.com> wrote:
> some web ui support some subset of html.  i think blogger does.  then
> you might have a div.  which i think [not sure] might enforce line
> breaks and also be monospace, or something like that.  [pardon my html
> ignorance.]
>
> On 5/30/22, Tim Cross <theophilusx@gmail.com> wrote:
>>
>> Uwe Brauer <oub@mat.ucm.es> writes:
>>
>>> Hi
>>>
>>> I wanted to export a 4x4 table to ascii to insert it into a web fill in
>>> interface. However the column get distorted. I tried to tabify or
>>> untabify the buffer but it did not help.
>>>
>>>
>>> The problem also occurs when I export the table using the
>>> orgtbl-to-tsv
>>>
>>> #+begin_example
>>> | Course                       |           L |           M |           X
>>> |
>>>           J |           V |
>>> |------------------------------+-------------+-------------+-------------+-------------+-------------|
>>> | Statistics                   | 10:30-11:30 |             | 10:00-11:20
>>> |
>>>             | 10:30-11:30 |
>>> | Differential Equations       | 12:30-13:30 |             | 13:00-14:15
>>> |
>>>             | 12:30-13:30 |
>>> | Master                       | 14:30-15:30 |             | 15:30-16:30
>>> |
>>> 14:30-15:30 |             |
>>> | Numerical Analysis :00-19:00 | 18:00-19:00 | 18:00-19:00 | 18:00-19:00
>>> |
>>>             |         7.5 |
>>> |                              |             |             |
>>> |
>>> 19:00-20:00 |             |
>>> |------------------------------+-------------+-------------+-------------+-------------+-------------|
>>> |                              |             |             |
>>> |
>>>             |             |
>>>
>>> #+end_example
>>>
>>>
>>> Converted to
>>>
>>> #+begin_example
>>> Course	L	M	X	J	V
>>> Statistics	10:30-11:30		10:00-11:20		10:30-11:30
>>> Differential Equations	12:30-13:30		13:00-14:15		12:30-13:30
>>> Master	14:30-15:30		15:30-16:30	14:30-15:30	
>>> Numerical Analysis	18:00-19:00	18:00-19:00	18:00-19:00	18:00-19:00	
>>> 				19:00-20:00	
>>> #+end_example
>>>
>>>
>>> Any idea what is wrong here?
>>>
>>>
>>
>> I think you might be working under a false expectation. A quick look at
>> the exported table example and it looks to be correct to me - values are
>> tab separated, with is what a tsv format is. There is no requirement
>> that the columns should be aligned, only that they are separated by
>> tabs.
>>
>> With regards to more formatted output options, a common issue is with
>> respect to the fonts people use. If the font being used to view th
>> eoutput is a proportional font rather than a fixed width one, then all
>> formatting will be broken. Most web interfaces tend to use proportional
>> fonts due to their more pleasing look for most people. This is also why
>> tables sent via email often don't look right for the recipient - they
>> are using a proportional or condensed font.
>>
>> As you have no control over the fonts used by those viewing your ASCII
>> content, you cannot reliably make it look well formatted. Either you
>> have to do HTML, some form of markdown or some other format with
>> enforces tgable alignment.
>>
>> If your entering data into a web UI, I would not have any expectations
>> regarding the final formatting as that will depend heavily on what the
>> backend does to the supplied input and how the data is presented to
>> anyone looking at that output.
>>
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
  2022-05-30 21:10 ` Tim Cross
  2022-05-31  1:14   ` Samuel Wales
@ 2022-05-31 12:14   ` Uwe Brauer
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2022-05-31 12:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]


> Uwe Brauer <oub@mat.ucm.es> writes:


> I think you might be working under a false expectation. A quick look at
> the exported table example and it looks to be correct to me - values are
> tab separated, with is what a tsv format is. There is no requirement
> that the columns should be aligned, only that they are separated by
> tabs. 

> With regards to more formatted output options, a common issue is with
> respect to the fonts people use. If the font being used to view th
> eoutput is a proportional font rather than a fixed width one, then all
> formatting will be broken. Most web interfaces tend to use proportional
> fonts due to their more pleasing look for most people. This is also why
> tables sent via email often don't look right for the recipient - they
> are using a proportional or condensed font. 

> As you have no control over the fonts used by those viewing your ASCII
> content, you cannot reliably make it look well formatted. Either you
> have to do HTML, some form of markdown or some other format with
> enforces tgable alignment.  

Ah, this of course is right, I did not think about it, right I checked
again, it is indeed a proportional font, so game over, sorry for the
noise.

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-31 12:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 15:48 export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv? Uwe Brauer
2022-05-30 16:06 ` Eric S Fraga
2022-05-30 21:10 ` Tim Cross
2022-05-31  1:14   ` Samuel Wales
2022-05-31  1:16     ` Samuel Wales
2022-05-31 12:14   ` Uwe Brauer

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).