Thanks Richard,

lyx2lyx was indeed missing in my .lyx. After moving it there this is what I
get:

~/.lyx ♪ Traceback (most recent call last):
  File "/home/quesada/.lyx/lyx2lyx/lyx2lyx", line 23, in <module>
    import LyX
  File "/home/quesada/.lyx/lyx2lyx/LyX.py", line 91, in <module>
    convert = getattr(__import__("lyx_" + step), mode)
  File "/home/quesada/.lyx/lyx2lyx/lyx_2_0.py", line 31, in <module>
    from lyx2lyx_tools import add_to_preamble, insert_to_preamble, \
  File "/home/quesada/.lyx/lyx2lyx/lyx2lyx_tools.py", line 64, in <module>
    from unicode_symbols import unicode_reps
  File "/home/quesada/.lyx/lyx2lyx/unicode_symbols.py", line 61, in <module>
    unicode_reps = read_unicodesymbols()
  File "/home/quesada/.lyx/lyx2lyx/unicode_symbols.py", line 26, in
read_unicodesymbols
    fp = open(os.path.join(pathname.strip('lyx2lyx'), 'unicodesymbols'))
IOError: [Errno 2] No such file or directory:
'/home/quesada/.lyx/unicodesymbols'
Error: Conversion script failed
----------------------------------------
/home/quesada/Dropbox/exist.de/foo.lyx is from a newer version of LyX and
cannot be converted by the lyx2lyx script.
~/.lyx ♪

Looks like I'm missing unicodesymbols in my .lyx.

Looking for it on the svn folder doesn't render any hit for a file with such
a name:

~/projIfollow/lyx-devel ♪ ack unicodesymbols
development/scons/scons_manifest.py
1293:    unicodesymbols

development/tools/convert_kmap.py
19:    return ("Usage: %s unicodesymbolsfile inputfile outputfile\n" %
prog_name +
20:            "or     %s unicodesymbolsfile <inputfile >outputfile" %
prog_name)
83:    " Build the symbol list from the unicodesymbols file and add some
hardcoded symbols."
120:def translate_symbol(unicodesymbols, symbol, try_combining = True):
125:    for i in unicodesymbols:
132:        for i in unicodesymbols:
146:                        # entry in unicodesymbols
147:                        combined = translate_symbol(unicodesymbols,
u'%s{%s}' % (i[1], translated))
152:                        translated = translate_symbol(unicodesymbols,
translated, False)
163:def convert(lines, unicodesymbols):
175:                # The unicodesymbols file does not include the trailing
delimiter {}
177:            translated = translate_symbol(unicodesymbols, symbol)
196:    unicodesymbols = open(argv[1], 'rb')
199:    symbols = readsymbols(unicodesymbols)

development/Makefile
348:tools/unicodesymbols.py \

src/mathed/MathFactory.h
37:  * mathalpha in the unicodesymbols file.

src/tex2lyx/test/test-insets.tex
329:builtin \textasciicircum{} unicodesymbols \j{} user \mycommand{} xx\par
330:builtin \textasciicircum {} unicodesymbols \j {} user \mycommand{}
xx\par
332:{} unicodesymbols \j % and a second one

src/tex2lyx/tex2lyx.cpp
792:    FileName const symbols_path = libFileSearch(string(),
"unicodesymbols");
794:            cerr << "Error: Could not find file \"unicodesymbols\"."

src/tex2lyx/text.cpp
2765:                   // try to see whether the string is in
unicodesymbols
3216:                   // try to see whether the string is in
unicodesymbols

src/LyX.cpp
818:    if (!readEncodingsFile("encodings", "unicodesymbols"))

src/Paragraph.cpp
927:    // in the unicodesymbols file and is something like
"\textXXX{<spec>}".

src/BiblioInfo.cpp
175:            // unicodesymbols has things in the form: \"{u},

src/Encoding.cpp
256:CharInfoMap unicodesymbols;
318:                    CharInfoMap::const_iterator const it =
unicodesymbols.find(uc);
319:                    if (it == unicodesymbols.end() || !it->second.force)
330:                            CharInfoMap::const_iterator const it =
unicodesymbols.find(c);
331:                            if (it == unicodesymbols.end() ||
!it->second.force)
362:    CharInfoMap::const_iterator const it = unicodesymbols.find(c);
363:    if (it == unicodesymbols.end())
382:    // now the ones from the unicodesymbols file
383:    CharInfoMap::const_iterator const end = unicodesymbols.end();
384:    CharInfoMap::const_iterator it = unicodesymbols.begin();
397:    CharInfoMap::const_iterator const it = unicodesymbols.find(c);
398:    if (it == unicodesymbols.end()) {
425:    CharInfoMap::const_iterator const end = unicodesymbols.end();
426:    CharInfoMap::const_iterator it = unicodesymbols.begin();
447:    CharInfoMap::const_iterator const uniend = unicodesymbols.end();
467:            // the prefix of some command in the unicodesymbols file
470:            CharInfoMap::const_iterator it = unicodesymbols.begin();
503:                    // matching entry in the unicodesymbols file.
574:    CharInfoMap::const_iterator const it = unicodesymbols.find(c);
575:    if (it != unicodesymbols.end()) {
655:    CharInfoMap::const_iterator const it = unicodesymbols.find(c);
656:    if (it != unicodesymbols.end())
664:    CharInfoMap::const_iterator const it = unicodesymbols.find(c);
666:    if (it == unicodesymbols.end())
817:            // we assume that at least one command is nonempty when
using unicodesymbols
819:                    unicodesymbols[symbol] = info;

src/Encoding.h
179:     * to the corresponding entry in the unicodesymbols file.

lib/lyx2lyx/unicode_symbols.py
23:def read_unicodesymbols():
24:    " Read the unicodesymbols list of unicode characters and
corresponding commands."
26:    fp = open(os.path.join(pathname.strip('lyx2lyx'), 'unicodesymbols'))
30:    # they are written in the unicodesymbols file; but they can also be
written
61:unicode_reps = read_unicodesymbols()

lib/lyx2lyx/lyx_1_5.py
257:        spec_chars = read_unicodesymbols()
337:def read_unicodesymbols():
338:    " Read the unicodesymbols list of unicode characters and
corresponding commands."
340:    fp = open(os.path.join(pathname.strip('lyx2lyx'), 'unicodesymbols'))
432:document encoding to commands according to the unicodesymbols
436:    spec_chars = read_unicodesymbols()

lib/lyx2lyx/lyx_1_6.py
148:def read_unicodesymbols():
149:    " Read the unicodesymbols list of unicode characters and
corresponding commands."
151:    fp = open(os.path.join(pathname.strip('lyx2lyx'), 'unicodesymbols'))
155:    # they are written in the unicodesymbols file; but they can also be
written
272:unicode_reps = read_unicodesymbols()

lib/Makefile
428:  languages symbols syntax.default unicodesymbols

-------

on help > about lyx, the system dir is still /usr/local/share/lyx (not my
prefix!).

I copied lyx2lyx there. I also copied the missing unicode symbols to my
.lyx. Now things work.

I think there's something wrong with the makefile and these files, at least
when specifying a prefix...

Thanks
-J

On Tue, Feb 1, 2011 at 7:43 PM, Richard Heck <rgh...@comcast.net> wrote:

> On 02/01/2011 01:34 PM, Jose Quesada wrote:
>
>> Hi,
>>
>> Quite often I have problems with lyx2lyx failing when updating from svn
>> and doing a make install. I've been trying to pinpoint the problem to write
>> a better report, but to no avail. Where should lyx2lyx go normally? does it
>> follow the --prefix? it fails even when I rename my .lyx folder and start
>> the make install from scratch. Any ideas? Workarounds?
>> THanks!
>>
>>  It should follow the prefix, but I think we did once have a problem with
> its not doing so. The workaround would be to copy the lyx2lyx/ directory
> manually.
>
> Richard
>
>


-- 
Best,
-Jose

Jose Quesada, PhD.
Research scientist,
Max Planck Institute,
Center for Adaptive Behavior and Cognition,
Berlin
http://www.josequesada.name/
http://twitter.com/Quesada

Reply via email to