From: Samuel Wales <samologist@gmail.com>
To: Tim Cross <theophilusx@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: export a org table to ascii format (tabs) are not conserved, culprit orgtbl-to-tsv?
Date: Mon, 30 May 2022 18:16:32 -0700 [thread overview]
Message-ID: <CAJcAo8vwjefORm3UH1n3CZpAVoyRbmkOn3-BZksbL4bfmpL-jQ@mail.gmail.com> (raw)
In-Reply-To: <CAJcAo8u-NySfTvdfY+Ckap2iezgLQoXOo4PF7fgfFUNE4qN1pw@mail.gmail.com>
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
next prev parent reply other threads:[~2022-05-31 1:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-05-31 12:14 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJcAo8vwjefORm3UH1n3CZpAVoyRbmkOn3-BZksbL4bfmpL-jQ@mail.gmail.com \
--to=samologist@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=theophilusx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).