As a new user, I'm venturing a first question.
I'm using embedded pre-blocks in markdown for simple tables. I'm spacing the columns with tabs. When a word in a column has an accented character the number of generated spaces in the conversion to html is wrong. See the example below.
Before conversion:
<pre> Fitié <tab> NextWord Fitie <tab> NextWord </pre>
After conversion:
<pre> Fitié <space> <space> NextWord Fitie <space> <space> <space> NextWord </pre>
When the word has one accented character 2 spaces are generated in this case, otherwise there are 3 spaces. Something to do with UTF-8 encoding?
-- Bert Fitié
On 9. Oct 2006, at 15:40, Bert Fitié wrote:
I'm using embedded pre-blocks in markdown for simple tables. I'm spacing the columns with tabs. When a word in a column has an accented character the number of generated spaces in the conversion to html is wrong. [...] Something to do with UTF-8 encoding?
Most likely -- but what conversion command are you using?
I'm using the "standard" Convert Document to HTML -- Markdown command (CTRL SHIFT H)
On Oct 9, 2006, at 8:00 PM, Allan Odgaard wrote:
On 9. Oct 2006, at 15:40, Bert Fitié wrote:
I'm using embedded pre-blocks in markdown for simple tables. I'm spacing the columns with tabs. When a word in a column has an accented character the number of generated spaces in the conversion to html is wrong. [...] Something to do with UTF-8 encoding?
Most likely -- but what conversion command are you using?
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 9. Oct 2006, at 20:15, Bert Fitié wrote:
I'm using the "standard" Convert Document to HTML -- Markdown command (CTRL SHIFT H)
Ah okay, well, that’s because Markdown itself does a simple “tabs to spaces” before processing your file.
You should not explicitly wrap your pre-formatted text in <pre>, instead indent it by one tab or four spaces. This will make it appear as-is (raw) in the resulting HTML.
Generally you should not use HTML tags in Markdown documents.
Thanks for the "one tab, four spaces" tip; I didn't know this. The problem, however, remains:
Before conversion:
<tab> Fitié <tab> NextWord <tab> Fitie <tab> NextWord
After conversion:
<pre><code> Fitié <space> <space> NextWord Fitie <space> <space> <space> NextWord </code></pre>
and I'm losing one space in the first line when I use my name in the accented version; in the second line using my name in the non- accented version I don't lose anything.
On Oct 9, 2006, at 8:40 PM, Allan Odgaard wrote:
On 9. Oct 2006, at 20:15, Bert Fitié wrote:
I'm using the "standard" Convert Document to HTML -- Markdown command (CTRL SHIFT H)
Ah okay, well, that’s because Markdown itself does a simple “tabs to spaces” before processing your file.
You should not explicitly wrap your pre-formatted text in <pre>, instead indent it by one tab or four spaces. This will make it appear as-is (raw) in the resulting HTML.
Generally you should not use HTML tags in Markdown documents.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 9. Oct 2006, at 22:15, Bert Fitié wrote:
[...] and I'm losing one space in the first line when I use my name in the accented version; in the second line using my name in the non-accented version I don't lose anything.
hmm… yes, Markdown still does tabs to spaces for pre-formatted text.
This really is a Markdown problem (as that is the program which converts your tabs), but I bet they would say that this is a user problem, as Markdown is not encoding aware, and so couldn’t really know about multi-byte sequences.
I can ask at the Markdown list, what their view is on this. We can of course do tabs to spaces before sending the text to Markdown, but then we are deviating from the “standard”, i.e. if you test in TextMate, then post to your blog as Markdown, the result will not be the same.
I would appreciate that: multi-byte UTF-8 sequences should be normal in markdown and using markdown is about 50% of my TextMate use.
On Oct 9, 2006, at 10:51 PM, Allan Odgaard wrote:
On 9. Oct 2006, at 22:15, Bert Fitié wrote:
[...] and I'm losing one space in the first line when I use my name in the accented version; in the second line using my name in the non-accented version I don't lose anything.
I can ask at the Markdown list, what their view is on this. We can of course do tabs to spaces before sending the text to Markdown, but then we are deviating from the “standard”, i.e. if you test in TextMate, then post to your blog as Markdown, the result will not be the same.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 10. Oct 2006, at 08:03, Bert Fitié wrote:
I would appreciate that: multi-byte UTF-8 sequences should be normal in markdown and using markdown is about 50% of my TextMate use.
Here’s the thread: http://six.pairlist.net/pipermail/markdown-discuss/ 2006-October/thread.html#298
It seems everybody is pro-UTF-8.
It seems everybody is pro-UTF-8.
UTF-8 ftw!!
C ____________________________________
Caius Durling UK Student tel: +44 (0) 7746 746039 email: inemo@mac.com nemo8686@mac.com web: http://caius.name/ http://qwert.us/ ____________________________________
On 9. Oct 2006, at 22:15, Bert Fitié wrote:
[...] The problem, however, remains:
Btw: one solution would be to use TextMate’s convert tabs to spaces (Text → Convert menu) and switch to soft tabs (status bar) for Markdown.
That way TextMate will use spaces, but act almost as if it was tabs, so functionality it’s about the same, but you do not have this problem with later processing not being multi-byte aware and/or using a different tab size.
In the mean time I will use this solution. Thank you!
On Oct 9, 2006, at 10:54 PM, Allan Odgaard wrote:
On 9. Oct 2006, at 22:15, Bert Fitié wrote:
[...] The problem, however, remains:
Btw: one solution would be to use TextMate’s convert tabs to spaces (Text → Convert menu) and switch to soft tabs (status bar) for Markdown.
That way TextMate will use spaces, but act almost as if it was tabs, so functionality it’s about the same, but you do not have this problem with later processing not being multi-byte aware and/ or using a different tab size.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate