[liblouis-liblouisxml] Re: Paragraphs in Text Files

  • From: Keith Creasy <kcreasy@xxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Fri, 28 Mar 2014 11:59:33 +0000

I know Markdown. I am not particularly fond of it. We use it for ikiwiki.


-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Whapples
Sent: Friday, March 28, 2014 6:29 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Paragraphs in Text Files

I think with your example of writing something quickly like meeting notes, that 
is why I suggest supporting one of the plain text markup languages like 
markdown or RST, as these allow you to write fairly naturally but give much 
richer document structure than the current LibLouisUTDML text format. Some 
wikis use these languages, normally more likely markdown rather than RST (RST 
seems more designed for large documents with more typical documentation 
concepts).

Some quick examples of markdown.

# First level heading
## second level heading

A paragraph of text which is deemed to begin and finish where a blank line is 
found. When you want to do actual lists, you can define a list structure.

* First item in non-numbered list
* second item of this list.
* Yet another item.

There are ways of doing other things like links and such like, but those escape 
me.

RST has an extension system but extensions only really would make more sense if 
converting it into XML (eg. some have written extensions where one inserts math 
by using iTeX notation and then when creating the output format either it 
compiles the iTeX using LaTeX, if creating XML it uses itex2mml to create 
mathml and inserts that in the XML output).

When comparing this with LibLouisUTDML's text processing, this is far more 
advanced.

How much effort it would be to add markdown support in LibLouisUTDML directly I 
do not know, but I feel it might be significant work as there may not be 
existing libraries which will fit with the C constraints of LibLouisUTDML. 
However to write an external filter application to produce XML from these would 
be very low cost (we might even find one off the shelf as wikis and other 
projects need something to change these from the text format into XML/XHTML).

Michael Whapples
On 28/03/2014 10:11, Keith Creasy wrote:
> Hi Michael.
>
> I had said at one point that I did not consider text file support to be 
> important until I just recently got a Braille printer and wanted to print out 
> my meeting agenda. I saved it as text of course and then when I attempted to 
> open it with BB and print it I got it with all my list items dumped into a 
> single paragraph. So, it was very convenient for me except that the results 
> were not what I wanted. I can in the future put a blank line between list 
> items but it seems like I shouldn't have to do that.
>
> I could write it using HTML but why for something so simple as a list of 
> agenda items.
>
> I see this as a common use case  for BB and LibLouisUTDML. I believe it 
> should be supported in an intelligent and intuitive way.
>
>
> I suppose it isn't critical but to me it just seems to make sense.
>
> Keith
>
> -----Original Message-----
> From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
> [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of 
> Michael Whapples
> Sent: Friday, March 28, 2014 5:37 AM
> To: liblouis-liblouisxml@xxxxxxxxxxxxx
> Subject: [liblouis-liblouisxml] Re: Paragraphs in Text Files
>
> Yes I fully agree with you regarding the user base of nano, I just did not 
> know if other editors behave like that.
>
> Also I think some of the plain text markup languages (eg.
> RestracturedText) use double line breaks to indicate new paragraphs and so 
> hard line breaks are permitted. However as LibLouisUTDML would not deal with 
> other markup in these files then may be it is irrelevant as one might do 
> better to write an external RST to XML conversion filter and pass in the XML.
>
> Considering how little the text file input stuff does, I am not really sure 
> of the value of the text file support directly built in to LibLouisUTDML, one 
> possibly would always want an external filter to handle the text formatting 
> the user is using (may it be RST, markdown, textile, etc).
>
> If anything is to be done with the LibLouisUTDML code to adjust paragraph 
> handling, I would suggest it would have to be a configuration option. What 
> the default value should be is something I would let someone else decide, 
> possibly it should be new paragraph on a line break. What it should not be is 
> hard coded in to LibLouisUTDML, I am sure that there would always be someone 
> wanting something slightly different.
>
> Michael Whapples
> On 28/03/2014 07:26, Keith Creasy wrote:
>> Hi Michael. It is also a very old editor, previously known as Pico 
>> and most likely older than you. :)
>>
>> It is used by a relatively small number of mostly Linux programmers and 
>> administrators and not much if at all for general content authoring. It is 
>> my editor of choice for Linux scripts but I don't even use it for much else 
>> but that and writing commit log messages from within Git and Mercurial.
>>
>> Again, I'm fine with a configuration to make it optional but the default 
>> should be that new-line chars mark the beginning of a paragraph and the 
>> configuration option for the rare occaisons when someone might actually be 
>> using an obscure text file that contains hard line breaks. My opinion is 
>> that the current implementation is wrong based on current conventions.
>>
>> Keith
>>
>>
>> Yes, I regard Nano as an isolated exception
>>
>> -----Original Message-----
>> From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
>> [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of 
>> Michael Whapples
>> Sent: Thursday, March 27, 2014 4:05 PM
>> To: liblouis-liblouisxml@xxxxxxxxxxxxx
>> Subject: [liblouis-liblouisxml] Re: Paragraphs in Text Files
>>
>> I don't know as to how widely spread text files with hard line breaks are, 
>> but I believe in some text editors (eg. nano on Linux) that if one uses line 
>> wrap it will insert hard line breaks. May be nano is an isolated example.
>>
>> The ideal for the user would be to add a configuration option.
>>
>> Michael Whapples
>> On 27/03/2014 18:05, Keith Creasy wrote:
>>> OK. Does anyone use this for text files with hard line breaks in them? Can 
>>> we just change it so it uses new-line chars to start new paragraphs as the 
>>> default? I haven't seen a text file with hard line breaks in it since about 
>>> 1986.
>>>
>>> Keith
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
>>> [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of John 
>>> J. Boyer
>>> Sent: Thursday, March 27, 2014 11:36 AM
>>> To: liblouis-liblouisxml@xxxxxxxxxxxxx
>>> Subject: [liblouis-liblouisxml] Re: Paragraphs in Text Files
>>>
>>> Not yet. Besides a new configuration setting it would be necessary to 
>>> modify the  functions in transcriber.c that deal with text files.
>>>
>>> John
>>>
>>> On Thu, Mar 27, 2014 at 02:51:59PM +0000, Keith Creasy wrote:
>>>> Hello.
>>>>
>>>> Is there a setting that would cause LibLouisUTDML to treat each new-line 
>>>> in a text file as the beginning of a new paragraph? By default it seems to 
>>>> require a blank line, that is two new-line characters, to do this. Most 
>>>> text editors these days use a new-line to begin a new paragraph.
>>>>
>>>> Thanks.
>>>>
>>>> Keith
>>>>
>>> --
>>> John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
>>> http://www.abilitiessoft.com
>>> Madison, Wisconsin USA
>>> Developing software for people with disabilities
>>>
>>> For a description of the software, to download it and links to 
>>> project pages go to http://www.abilitiessoft.com For a description 
>>> of the software, to download it and links to project pages go to 
>>> http://www.abilitiessoft.com
>> For a description of the software, to download it and links to 
>> project pages go to http://www.abilitiessoft.com
>>   u  *m   ~ ^     ޶ h yhiحjwe y,  k 7    z (  m
> n)b '    com=
>
> For a description of the software, to download it and links to project 
> pages go to http://www.abilitiessoft.com 
>   u  *m   ~ ^     ޶ h yhiحjwe y,  k 7    z (  m    
n)b '    com=

For a description of the software, to download it and links to project pages go 
to http://www.abilitiessoft.com

Other related posts: