Re: The beauty of LATEX

Joel de Guzman <[email protected]>
Newsgroups gmane.comp.lib.boost.documentation
Message-ID <[email protected]>
On 10/24/2011 11:10 PM, Matias Capeletto wrote:
> On Mon, Oct 24, 2011 at 3:29 PM, Joel de Guzman
> <[email protected]> wrote:
>> On 10/24/2011 6:46 PM, Matias Capeletto wrote:
>>>
>>> This is a paragraph.
>>>
>>> [custom_bold This is a paragraph]
>>>
>>> [custom_template_for_inserting_image This is not]
>>>
>>> [custom_section_start The same here]
>>>
>>> How will you differentiate the second one from the last two?
>>
>> With the current wiki-wiki paragraph detection you can't.
>> Currently, paragraphs are detected when you have two or
>> more newlines. All those above will be in its own paragraph.
>> You can only do it by avoiding the double-newlines, e.g.:
>>
>> (indenting for clarity):
>>
>>  [custom_bold This is a paragraph]
>>  [/ no double-newline here]
>>  [custom_template_for_inserting_image This is not]
>>
>>  [custom_section_start The same here]
>>
>> That's inherent in wiki style paragraphs.
> 
> I will try to rephrase my question. In Quickbook the following two
> lines (that are separated by two newlines and have all that it takes
> to be a wiki style paragraph) are treated differently:
> 
> [link id This ends up as a paragraph]
> 
> [section This is not a paragraph]
> 
> Both are essentially the same, but Quickbook knows that the [section
> ...], [endsect], etc should not be considered a paragraph. How will
> the wiki processor knows that it has to wrap the [link ...] line with
> a [para ...] template and that the second one should pass as is?

Currently, the wiki processor detects two newlines as a paragraph.
I think it should be more smarter than that. It should be able
to detect non-paragraphs and act accordingly. That means, detecting
the presence of "[section", in this case, or any other potential
non-paragraphs. So, with the wiki preprocessor this:

  [section The Uncertainty Principle]

  The position and momentum of a particle cannot be
  simultaneously measured with arbitrarily high precision.

  [endsect] [/ The Uncertainty Principle]

Should generate this:

  [section The Uncertainty Principle]

  [para The position and momentum of a particle cannot be
  simultaneously measured with arbitrarily high precision.]

  [endsect] [/ The Uncertainty Principle]

The crucial point is that the template processor should be
100% regular and free from these quirks.

Regards,
-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.