Eric Niebler wrote:
> John Maddock wrote:
>> Eric Niebler wrote:
>>> Paul A Bristow wrote:
>>>> Is there is need for a collection of commonly used greek and math
>>>> symbols?
>>>>
>>>> John Maddock and I have certainly found we needed them for recent
>>>> documentation production.
>>>>
>>>> For example (also attached as .qbk)
>>> <snip>
>>>
>>> Cool! I suggest starting a QuickBook standard library of sorts -- a
>>> bunch of .qbk files in a standard place that provide this kind of
>>> useful functionality. Now that QuickBook has templates, most of
>>> QuickBook itself can be implemented in such a library.
>>>
>>> I suggest tools/quickbook/include. And QuickBook should be enhanced so
>>> that $(BOOST_ROOT)/tools/quickbook/include is automatically added to
>>> the include search path.
>> Eric, how does quickbook currently handle scoping: aren't macros and 
>> templates scoped to the current include file?  Or do they escape out into 
>> the enclosing file (they need to for this to work, but there are other 
>> situations where scoping is a *very good thing*)?
> 
> 
> Oh, right. Macros are scoped. I forgot. It would be nice to have an 
> [export __macro_name] that caused a macro to leak out of the current 
> scope. I'm not sure about templates -- that's one of Joel's creations. Joel?

templates are not scoped at the moment, but that's a quirk, as can be
seen in the code:

     // scope the macros
     string_symbols macro = actions.macro;
     // scope the templates
     //~ template_symbols templates = actions.templates; $$$ fixme $$$

I considered that a battle for another day, and maybe that day is
close. The plan is to have real template/macro scopes and the
code has been prepared for that, to some extent.

One thing I am not sure I am happy about is that macros and templates
get tied up with includes and files. But then we might be able to
take advantage of that. For example, consider this fragment:

     [include greek.qbk]

     [/ ...]

     [greek.lambda] ...

which gives us some explicit way to qualify a template.

Then, we can also do a full import:

     [include greek.qbk]
     [import greek]

     [/ ...]

     [lambda] ...

Which allows us to bring all of std into scope.

Note that I am using templates here instead of macros. That's my
preference now. Templates' explicit expansion syntax is an advantage
because, now, we don't have to use obscure naming conventions
like double underscores (e.g. __spirit__) to avoid unwanted
macro replacement.

Finally, I suggest that a std.qbk be automatically included.

>> Aside, one of thing that may be a quickbook bug:
>>
>> I have a super and sub-script templates which work great, but:
>>
>> x[super 2] barr.
>>
>> gets printed without a space between the x^2 and the "barr", I can work 
>> around this by using:
>>
>> x[super 2 ] barr
>>
>> But really we want:
>>
>> x[super 2]barr
>>
>> No space
>>
>> x[super 2] barr
>>
>> has a space.
>>
>> Is this possible?
> 
> 
> Sounds like a bug to me. Joel?

Looks like a bug indeed. I'll investigate.

Regards,
-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to