[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: export a org table to ascii format (tabs) are not conserved, culprit
From: |
Samuel Wales |
Subject: |
Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv? |
Date: |
Mon, 30 May 2022 18:14:31 -0700 |
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