John Levon wrote:

> On Thu, Mar 13, 2003 at 01:06:21PM +0000, Angus Leeming wrote:
> 
>> If tokens do not need to start with '\\' then I think that something is
>> wrong with lyxlex. Jean-Marc, could you confirm that my understanding is
>> correct.
> 
> JMarc was saying that lyxlex's behaviour is not dependent on the
> particular encoding of what lyx's token use (starts with '\\'). However,
> it seems he is wrong, else no spaces in actual document content would
> ever be read, and users might  be angry about that

I'm still confused. Why does it handle this fine. Should I play safe and add 
'\\' to the start of each token?

bool font2string(LyXFont const & font, bool toggle, string & data)
{
        string lang = "ignore";
        if (font.language())
                lang = font.language()->lang();

        ostringstream os;
        os << "family " << font.family() << '\n'
           << "series " << font.series() << '\n'
           << "shape " << font.shape() << '\n'
           << "size " << font.size() << '\n'
           << "emph " << font.emph() << '\n'
           << "underbar " << font.underbar() << '\n'
           << "noun " << font.noun() << '\n'
           << "number " << font.number() << '\n'
           << "color " << font.color() << '\n'
           << "language " << lang << '\n'
           << "toggleall " << tostr(toggle);
        data = os.str();
        return true;
}

-- 
Angus

Reply via email to