Daniel Lohmann schrieb:
> On 22.10.2008, at 14:12, Charles de Miramon wrote:
>> Daniel Lohmann wrote:

>>> some ERT box is not an option, as this would cause too much hassle
>>> and would not work in external material, such as bibliographic
>>> entries. I am looking for a more elegant solution.

>> The easiest way would be to process your latex and bib files through  
>> a sed
>> script to replace C++ to \C++ and define a \C++ macro with the correct
>> space between C and +

> However, I am editing and working in LyX, not LaTeX. 

You could try to exprort, change and reLyX the document(s).
However, this process is not 100% reliable (unfortunately).

> Replacing C++ in the lyx files by the correct ERT boxes is somewhat
> more complicated, as it requires inserting some extra begin_inset and
> end_inset lines.  

I'd do the change onece in LyX and then open the lyx file in my
favourite text editor. With both the "before" and "after" codes in the
file, it is easy to do a find-and-replace (possibly a regexp version).
Backup your work first!!!

> Moreover, this would not cover the occurrences of C++ in the  
> bibliography.

Here, the simple C++ -> \C++ conversion works.

>> But it is a lot of work (TeX macros are not very
>> easy) and maybe it is like using a hammer to kill a fly.

> Well, I really do like hammers! :-)

In the first paragraph you where looking for an *elegant* solution!

Günter

Reply via email to