Re: Building .deb package
On Wed, Oct 17, 2007 at 08:53:28PM +0200, Tommaso Cucinotta wrote: Hi, is there any automated script to build a .deb package for LyX ? Well you can always check out the debian directory from the pkg-lyx svn on alioth and use that to build with dpkg-buildpackage and related tools. http://wiki.debian.org/PkgLyx My question is why you would like to do it? Cheers, Sven
Re: [Patch] use Qt resources
On Wed, Oct 17, 2007 at 09:55:53PM -0500, Bo Peng wrote: On 10/16/07, Andre Poenitz [EMAIL PROTECTED] wrote: On Tue, Oct 16, 2007 at 11:11:23PM +0200, Andre Poenitz wrote: Could somebody on Windows please try this one? [It should work] Also anu observations on startup speed are welcome. Slightly more complete patch attached. I get src/frontends/qt4/GuiToolbar.cpp:51: undefined reference to `qInitResources()' collect2: ld returned 1 exit status Scons? There's a Resources.cpp to be build and compiled in frontends/qt4. Andre'
Link failure with CMake, PB with qInitResources()
I guess rcc.exe need to be executed but how and when? frontend_qt4.lib(GuiToolbar.obj) : error LNK2019: unresolved external symbol void __cdecl qInitResources(void) (?qInitResources@@YAXXZ) referenced in function void __cdecl initializeResources(void) (?initializeResources@@YAXXZ) D:\devel\lyx\trunk\development\cmake\bin\Release\lyx.exe : fatal error LNK1120: 1 unresolved externals Abdel.
Re: boost::fs
Andre Poenitz wrote: Something like that? Fine with me. So you are going to replace all those I hope? Find all fs::exists, Subfolders, Find Results 1, lyx-trunk, *.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh D:\devel\lyx\trunk\src\Buffer.cpp(418): if (fs::exists(bname.toFilesystemEncoding()) D:\devel\lyx\trunk\src\Buffer.cpp(419): (!fs::exists(fname.toFilesystemEncoding()) || D:\devel\lyx\trunk\src\Buffer.cpp(690): if (fs::exists(lyxfile.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Buffer.cpp(860): if (lyxrc.make_backup fs::exists(encodedFilename)) { D:\devel\lyx\trunk\src\Buffer.cpp(879): if (fs::exists(encodedFilename) isExternallyModified(checksum_method)) { D:\devel\lyx\trunk\src\Buffer.cpp(1647): BOOST_ASSERT(fs::exists(pimpl_-filename.toFilesystemEncoding())); D:\devel\lyx\trunk\src\Buffer.cpp(1657): if (fs::exists(file)) { D:\devel\lyx\trunk\src\Buffer.cpp(2138): if (fs::exists(FileName(fname).toFilesystemEncoding())) { D:\devel\lyx\trunk\src\buffer_funcs.cpp(84): if (!fs::exists(s.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\buffer_funcs.cpp(95): if (fs::exists(e.toFilesystemEncoding()) D:\devel\lyx\trunk\src\buffer_funcs.cpp(96): fs::exists(s.toFilesystemEncoding()) D:\devel\lyx\trunk\src\buffer_funcs.cpp(122): if (fs::exists(a.toFilesystemEncoding()) D:\devel\lyx\trunk\src\buffer_funcs.cpp(123): fs::exists(s.toFilesystemEncoding()) D:\devel\lyx\trunk\src\ConverterCache.cpp(138): if (!fs::exists(orig_from_name.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\ConverterCache.cpp(149): if (!fs::exists(item.cache_name.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\ConverterCache.cpp(231): if (!fs::exists(cache_dir.toFilesystemEncoding())) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(149):if (!fs::exists(emb_file)) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(153): if (fs::exists(ext_file)) { D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(191):if (!fs::exists(ext_file)) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(195): if (fs::exists(emb_file)) { D:\devel\lyx\trunk\src\Exporter.cpp(81): if (fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Exporter.cpp(246): } else if (fs::exists(tmp_result_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Format.cpp(269): if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Format.cpp(339): if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LaTeX.cpp(216): bool had_depfile = fs::exists(depfile.toFilesystemEncoding()); D:\devel\lyx\trunk\src\LaTeX.cpp(233): if (!fs::exists(output_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LaTeX.cpp(294): rerun = fs::exists(idxfile.toFilesystemEncoding()) D:\devel\lyx\trunk\src\LaTeX.cpp(483): if (!fs::exists(file2.toFilesystemEncoding())) D:\devel\lyx\trunk\src\LaTeX.cpp(774): * Wrapper around fs::exists that can handle invalid file names. D:\devel\lyx\trunk\src\LaTeX.cpp(776): * before calling fs::exists, but in practice it is unusable: On windows it D:\devel\lyx\trunk\src\LaTeX.cpp(783): return fs::exists(possible_name.toFilesystemEncoding()); D:\devel\lyx\trunk\src\LyX.cpp(988): if (fs::exists(document_path.toFilesystemEncoding()) D:\devel\lyx\trunk\src\LyX.cpp(1135): return (! fs::exists(absfile)) D:\devel\lyx\trunk\src\LyX.cpp(1148): if (fs::exists(user_support) fs::is_directory(user_support)) { D:\devel\lyx\trunk\src\LyXFunc.cpp(540): enable = !buf-isUnnamed() fs::exists(buf-fileName()) D:\devel\lyx\trunk\src\LyXFunc.cpp(1155):if (fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2158): if (!fs::exists(fullname.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2250): if (fs::exists(lyxfile.toFilesystemEncoding()) fullname != lyxfile) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2408): if (fs::exists(encoded) fs::is_directory(encoded)) D:\devel\lyx\trunk\src\Session.cpp(81): if (fs::exists(file.toFilesystemEncoding()) D:\devel\lyx\trunk\src\Session.cpp(136): if (fs::exists(file.toFilesystemEncoding()) D:\devel\lyx\trunk\src\Session.cpp(191): if (fs::exists(file.toFilesystemEncoding()) D:\devel\lyx\trunk\src\Session.cpp(272): if (fs::exists(file.toFilesystemEncoding()) D:\devel\lyx\trunk\src\TextClass.cpp(1017): if (layout_file.empty() || !fs::exists(layout_file.toFilesystemEncoding())) D:\devel\lyx\trunk\src\TextClassList.cpp(197): if (fs::exists(layout_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\client\client.cpp(92): if (!fs::exists(dirpath) || !fs::is_directory(dirpath)) { D:\devel\lyx\trunk\src\client\client.cpp(104): if (fs::exists(lyxsocket)) { D:\devel\lyx\trunk\src\frontends\qt4\GuiGraphics.cpp(769): if (!(fs::exists(encoded_clipdir) fs::is_directory(encoded_clipdir))) D:\devel\lyx\trunk\src\insets\InsetInclude.cpp(405): if
Re: r20991 - in /lyx-devel/trunk/src: KeyMap.h frontends/qt4/...
Bo Peng [EMAIL PROTECTED] writes: I will commit the attached updated patch tomorrow if there is no objection. This time, I also list LFUNs without any keybinding. This is much much better. You have my OK. Just a small comment: + LyXAction::const_func_iterator fit = lyxaction.func_begin(); + LyXAction::const_func_iterator fit_end = lyxaction.func_end(); + for (; fit != fit_end; ++fit) { + kb_action action = fit-second; + bool has_action = false; + it = bindinglist.begin(); + it_end = bindinglist.end(); + for (; it != it_end; ++it) [...] This code should be moved to KeyMap::listBindings() (maybe with a bool parameter indicating whether we want to have the unbound lfuns?) JMarc
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
Andre Poenitz [EMAIL PROTECTED] writes: Hm... I wonder whether I have overlooked something here Even if the files are not needed for 'make install' they might be needed for 'make dist', right? This is what I was about to answer to your commit message. JMarc
Re: .svn stuff in tar balls?
Andre Poenitz [EMAIL PROTECTED] writes: Is there a specific reason that we distribute part of our working copies in the tar balls? As far as I can tell the reason is EXTRA_DIST += some_dir instead of EXTRA_DIST += somedir/file1 ... So is this just lazyness? The proper distribution scheme is to do a 'svn export' before the 'make dist'. There are therefore no .svn files in official tar.gz on ftp.lyx.org (except for older one when I was too lazy to do it :) JMarc
LyX Debian/Ubuntu packages.
Hi all, I've just uploaded LyX .deb packages I built starting from the debian/ structure of the Ubuntu Gutsy lyx-1.5.1 package here: http://feanor.sssup.it/~tommaso/lyx_1.5.2-1ubuntu1_i386.deb http://feanor.sssup.it/~tommaso/lyx-common_1.5.2-1ubuntu1_all.deb Just changed prefix from /usr to /usr/local, and removed dependency from texlive-latex-base (on my system I don't really need it). Maybe somebody could find them useful. T.
Re: boost::fs
Andre Poenitz [EMAIL PROTECTED] writes: On Wed, Oct 17, 2007 at 11:54:00PM +0200, Andre Poenitz wrote: Something like that? Second try. I like it a lot. Note that is_directory has the same problem. JMarc
Re: Charstyles rendering issue - jumping lines disrupt workflow
On Wed, 17 Oct 2007 22:14:09 +0300 Martin Vermeer [EMAIL PROTECTED] wrote: On Wed, Oct 17, 2007 at 04:04:35PM +0200, Helge Hafting wrote: Charstyles is nice for something - and now I even get the URL charstyle automatically when opening older documents. (Yes, I use 1.6 for work :-) All very fine, but one problem. Whenever the cursor moves through an URL charstyle, stuff on the screen jumps all over the place. That is very distracting. The line with the URL is shifted slightly down, possibly to make room for the upper corners that mark the URL inset. The lines below the URL downshifts a lot, probably to make room for a label. But the URL charstyle don't have a label! Suggestions for improvements: 1. If there is no label (or a blank label or whatever), don't try to make any room. No need! 2. Don't shift the line down. Use whatever local line height there is, and adapt the corners to that instead. Exceptions might be necessary for heavily nested styles, but it'd be _very_ nice if _no_ text moves when entering a single charstyle. Ideally, no movement even within two levels. Many levels will probably be rare. This will make editing (or simply using LyX as a reader) much easier. If more visual feedback is needed, consider bigger corners, colors, or whatever. Even marching ants is a lot less disruptive than moving the line that I am reading. 3. Possibly show the current style (and nested styles too?) on the status line, so stuffing labels into the text won't be necessary. A charstyle combobox in addition to the paragraph style box will also serve this purpose, and of course it offers easier use of charstyles too. Which is probably what we want. :-) Helge Hafting If Bo gets his info-on-mouseover working, the label can be permanently disabled if turned off. Then nothing will move. It's the label (always drawn when inside the inset) that causes the movement. It's not true what you say that URL has no label; in fact it has an empty label. The worst of both worlds ;-/ (I could add specialcasing for that to InsetCollapsable; rather not. The patch for this is attached, in case somebody likes it. BTW why is URL in charstyles and not in custom insets? I spent some quality time looking for it :-( ) - Martin Actually the better way to do it is the attached. I'll commit this if no objection is heard. - Martin Index: url.module === --- url.module (revision 20941) +++ url.module (working copy) @@ -3,12 +3,17 @@ Format 4 InsetLayout URL - LyXType charstyle - LatexType command + LyXType custom + LatexType command LatexName url + Decoration minimalistic + LabelString URL Font - Family Typewriter +Family Typewriter EndFont + LabelFont +Family Typewriter + EndFont Preamble \usepackage{url} EndPreamble
Re: [Patch] use Qt resources
Scons? There's a Resources.cpp to be build and compiled in frontends/qt4. There is no such file. Did you add it to svn? Bo
lyx2lyx is broken apparently
I can't open any of the help documents... Abdel.
Re: boost::fs
On Thu, Oct 18, 2007 at 02:23:07PM +0200, Abdelrazak Younes wrote: Andre Poenitz wrote: Something like that? Fine with me. So you are going to replace all those I hope? Find all fs::exists, Subfolders, Find Results 1, lyx-trunk, *.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh D:\devel\lyx\trunk\src\Buffer.cpp(418): if (fs::exists(bname.toFilesystemEncoding()) D:\devel\lyx\trunk\src\Buffer.cpp(419): (!fs::exists(fname.toFilesystemEncoding()) || D:\devel\lyx\trunk\src\Buffer.cpp(690): if (fs::exists(lyxfile.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Buffer.cpp(860): if (lyxrc.make_backup fs::exists(encodedFilename)) { D:\devel\lyx\trunk\src\Buffer.cpp(879): if I'll to the automatic changes first, i.e. the one using 'toFileSystemEncoding' in 'user code'. The rest would need manual work... But yes, having readable user code in the end is the plan... Andre'
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
On Thu, Oct 18, 2007 at 02:28:00PM +0200, Jean-Marc Lasgouttes wrote: Andre Poenitz [EMAIL PROTECTED] writes: Hm... I wonder whether I have overlooked something here Even if the files are not needed for 'make install' they might be needed for 'make dist', right? This is what I was about to answer to your commit message. What would I use to have it in the tarball but not installed? EXTRADIST? Andre'
Re: boost::fs
On Thu, Oct 18, 2007 at 03:23:39PM +0200, Jean-Marc Lasgouttes wrote: Andre Poenitz [EMAIL PROTECTED] writes: On Wed, Oct 17, 2007 at 11:54:00PM +0200, Andre Poenitz wrote: Something like that? Second try. I like it a lot. Note that is_directory has the same problem. I noticed ;-) Andre'
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 08:47:18AM -0500, Bo Peng wrote: Scons? There's a Resources.cpp to be build and compiled in frontends/qt4. There is no such file. Did you add it to svn? This is a generated file built by Resources.qrc: echo !DOCTYPE RCCRCC version='1.0'qresource $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):file alias=\1/file:' \ $@ echo /qresource/RCC $@ Resources.cpp: Resources.qrc $(RCC4) $ -o $@ in the automake version. As resources do not change very often we could add Resources.cpp to svn but I'd rather always generate it. Andre'
Re: lyx2lyx is broken apparently
On Thu, Oct 18, 2007 at 05:42:03PM +0200, Abdelrazak Younes wrote: I can't open any of the help documents... Try again. -- Enrico
Re: lyx2lyx is broken apparently
Abdelrazak Younes wrote: I can't open any of the help documents... I think I may have committed something by accident. Let me check. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
This is a generated file built by Resources.qrc: echo !DOCTYPE RCCRCC version='1.0'qresource $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):file alias=\1/file:' \ $@ echo /qresource/RCC $@ What is the advantage of doing all these? Bo
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
Andre Poenitz [EMAIL PROTECTED] writes: What would I use to have it in the tarball but not installed? EXTRADIST? I think you need to use noinst somewhere in the name of the variable.
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 01:32:44PM -0500, Bo Peng wrote: On 10/18/07, Bo Peng [EMAIL PROTECTED] wrote: This is a generated file built by Resources.qrc: echo !DOCTYPE RCCRCC version='1.0'qresource $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):file alias=\1/file:' \ $@ echo /qresource/RCC $@ OK. Scons is fixed for this. Abdel seems to have the same problem with cmake. I did ask people to test he patch, didn't I? Andre'
InsetCommandParams Question
So, the work on making this system more flexible proceeds, with interruptions for actual philosophy from time to time. At this point, I have a question before I embark on the next step. The question concerns how the list of parameters is represented in InsetCommandParams. At present, it's done like this. This struct: struct CommandInfo { /// Number of parameters size_t n; /// Parameter names. paramnames[n] must be . char const * const * paramnames; /// Tells whether a parameter is optional bool const * optional; }; describes the parameters to be used, and it's defined here: switch (code) { case BIBITEM_CODE: { static const char * const paramnames[] = {label, key, }; static const bool isoptional[] = {true, false}; static const CommandInfo info = {2, paramnames, isoptional}; return info; } etc. The parameters themselves are stored in a separate data structure: typedef std::vectordocstring ParamVector; /// The parameters (both optional and required ones). The order is /// the same that is required for LaTeX output. The size of params_ /// is always info_-n. ParamVector params_; and written in the following sort of way: int const i = findToken(info_-paramnames, token); if (i = 0) { lex.next(true); params_[i] = lex.getDocString(); } I take it that the idea is that we don't have to store the list of parameters, whether they're optional, etc, in each and every inset, but rather use a reference to the static const construct to save memory. But the problem, from my point of view, is that, in trying to make this more flexible, we don't want to assume that each inset has a fixed list of parameters that it will accept. What parameters it accepts may depend upon what command it represents: Compare jurabib and natbib and biblatex, in particular, let alone a to-be-written custom command inset similar to custom Flex insets. The obvious way to handle this is to have something like this: enum Optional { OPT, REQ }; struct ParamInfo { std::string paramName; Optional opt; docstring value; } class ParamList { setValue(std::string name, docstring value); getValue(std::string name); isOptional(std::string name); addParam(ParamInfo); private: std::listParamInfo plist; } And then every InsetCommand would have an associated ParamList in its InsetCommandParams. So the question is: Are the added memory requirements here objectionable? If so, is there some natural way to continue with the static const treatment, even assuming the acceptable parameters could vary, and even be set at runtime? It's because I don't see how to do the latter that this plan seems the only workable one. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
What is the advantage of doing all these? Compiled-in resources vs 600 seperately installed files? Makes sense. Thanks. BTW, you use find to get all the images under lib/images, but some of them are unused. Scons only compiles the used ones that are listed in scons_manifest. Bo
Re: [Patch] use Qt resources
OK. Scons is fixed for this. Abdel seems to have the same problem with cmake. I did ask people to test he patch, didn't I? You did ask, but I had no idea what your patch was about, and did not test. Bo
Re: [Patch] use Qt resources
On 10/18/07, Bo Peng [EMAIL PROTECTED] wrote: This is a generated file built by Resources.qrc: echo !DOCTYPE RCCRCC version='1.0'qresource $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):file alias=\1/file:' \ $@ echo /qresource/RCC $@ OK. Scons is fixed for this. Abdel seems to have the same problem with cmake. Bo
Re: LyX asserts when browsing for images to insert
Jean-Marc Lasgouttes wrote: Helge Hafting [EMAIL PROTECTED] writes: I insert a graphic in a float. When I press the browse button, LyX dies. gdb backtrace: ASSERT failure in QListT::at: index out of range, file ../../include/QtCore/../../src/corelib/tools/qlist.h, line 386 Ouch. This looks like a qt bug to me. That would be strange - this used to work fine. Helge Hafting
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 12:20:23PM -0500, Bo Peng wrote: This is a generated file built by Resources.qrc: echo !DOCTYPE RCCRCC version='1.0'qresource $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):file alias=\1/file:' \ $@ echo /qresource/RCC $@ What is the advantage of doing all these? Compiled-in resources vs 600 seperately installed files? Andre'
UserGuide
Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1-\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? Andre'
Re: UserGuide
Andre Poenitz wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1-\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? I've had the same problem but haven't had time to investigate. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
Andre Poenitz wrote: On Tue, Oct 16, 2007 at 11:11:23PM +0200, Andre Poenitz wrote: Could somebody on Windows please try this one? [It should work] Also anu observations on startup speed are welcome. Slightly more complete patch attached. Andre' + +static void initializeResources() +{ + extern void qInitResources(); + static bool initialized = false; + if (!initialized) { + qInitResources(); + initialized = true; + } +} + + I've replaced your qInitResources() with the 'official' Qt Q_INIT_RESOURCE(Resources) because on windows the rcc generates qInitResources_Resources(). Also cmake is now up to date. Peter
Re: Link failure with CMake, PB with qInitResources()
Abdelrazak Younes wrote: I guess rcc.exe need to be executed but how and when? frontend_qt4.lib(GuiToolbar.obj) : error LNK2019: unresolved external symbol void __cdecl qInitResources(void) (?qInitResources@@YAXXZ) referenced in function void __cdecl initializeResources(void) (?initializeResources@@YAXXZ) D:\devel\lyx\trunk\development\cmake\bin\Release\lyx.exe : fatal error LNK1120: 1 unresolved externals Abdel. It's fixed now. CMake also globs for the png files. -- Peter Kümmel
Re: UserGuide
Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like it does not work for me quite long time (i remember another err messages though). e.g. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129100.html pavel
Re: UserGuide
Pavel Sanda wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like same on windows. it does not work for me quite long time (i remember another err messages though). e.g. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129100.html pavel -- Peter Kümmel
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 01:51:35PM -0500, Bo Peng wrote: What is the advantage of doing all these? Compiled-in resources vs 600 seperately installed files? Makes sense. Thanks. BTW, you use find to get all the images under lib/images, but some of them are unused. Scons only compiles the used ones that are listed in scons_manifest. Would anybody object to remove the unused ones? Andre'
Re: InsetCommandParams Question
On Thu, Oct 18, 2007 at 02:47:44PM -0400, Richard Heck wrote: So the question is: Are the added memory requirements here objectionable? How much would that be? Andre'
Re: [Patch] use Qt resources
BTW, you use find to get all the images under lib/images, but some of them are unused. Scons only compiles the used ones that are listed in scons_manifest. Would anybody object to remove the unused ones? I am not quite sure. For example, I can add font-bold to ui/stdtoolbar.inc, and font-bold.png would better be there... Bo
Re: InsetCommandParams Question
Andre Poenitz wrote: On Thu, Oct 18, 2007 at 02:47:44PM -0400, Richard Heck wrote: So the question is: Are the added memory requirements here objectionable? How much would that be? I don't know C++ internals enough to be sure how much we're talking per inset. We're looking at, on average, a string and a half, maybe 8-10 characters, and an int, per inset, plus whatever overhead a struct and class involve. That said, InsetCommand's aren't all that common. It's not like we're dealing with math. So maybe it's trivial, in the end. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: InsetCommandParams Question
Richard Heck wrote: The obvious way to handle this is to have something like this: enum Optional { OPT, REQ }; struct ParamInfo { std::string paramName; Optional opt; docstring value; } class ParamList { setValue(std::string name, docstring value); getValue(std::string name); isOptional(std::string name); addParam(ParamInfo); private: std::listParamInfo plist; } And then every InsetCommand would have an associated ParamList in its InsetCommandParams. So the question is: Are the added memory requirements here objectionable? If so, is there some natural way to continue with the static const treatment, even assuming the acceptable parameters could vary, and even be set at runtime? It's because I don't see how to do the latter that this plan seems the only workable one. It looks like a sane plan and doesn't look especially expensive to me. You might even take this one step further to: enum Optional { OPT, REQ }; struct PropertyDefinition { std::string paramName; Optional opt; // Some helper functions defining what might be meant // by valid values. }; struct Property { PropertyDefinition propDef; docstring value; }; Doing that, you would have essentially define a schema that you could go on to use to validate your input data. Presumably well known insets would have hard-coded ParamLists and custom Flex insets would define them in the equivalent of a .layout file. (Whatever this thing is called for these clever beasties.) -- Angus
Re: r21033 - in /lyx-devel/trunk/src: Buffer.cpp CutAndPaste....
[EMAIL PROTECTED] wrote: Author: younes Date: Thu Oct 18 17:29:51 2007 New Revision: 21033 URL: http://www.lyx.org/trac/changeset/21033 Log: Reduce header dependencies in Paragraph.h - Move Changes.h out of Paragraph.h - pimpl the inset list. == --- lyx-devel/trunk/src/InsetList.cpp (original) +++ lyx-devel/trunk/src/InsetList.cpp Thu Oct 18 17:29:51 2007 @@ -138,4 +138,12 @@ } +void InsetList::clone() +{ + List::iterator it = list_.begin(); + List::iterator end = list_.end(); + for (; it != end; ++it) + it-inset = it-inset-clone(); +} + } // namespace lyx == --- lyx-devel/trunk/src/Paragraph.cpp (original) +++ lyx-devel/trunk/src/Paragraph.cpp Thu Oct 18 17:29:51 2007 @@ -21,10 @@ -277,6 +282,8 @@ inset_owner = p.inset_owner; fontlist = p.fontlist; id_ = paragraph_id++; + insetlist_ = p.insetlist_; + insetlist_.clone(); } This is a very strange clone. Why aren't you writing it: class InsetList { static InsetList clone(InsetList rhs) { InsetList lhs = rhs; List::iterator it = lhs.begin(); List::iterator const end = lhs.end(); for (; it != end; ++it) { // Indeed, I think Inset::clone should be similar. it-inset = it-inset-clone(); } return lhs; } }; ? Angus
Re: r21050 - in /lyx-devel/trunk/src/frontends/qt4: GuiPrefs....
On 10/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Author: bpeng Date: Fri Oct 19 05:09:14 2007 New Revision: 21050 URL: http://www.lyx.org/trac/changeset/21050 Log: PrefShortcuts: the buttons are almost usable now The buttons are roughly working. The next patch will handle user.bind and \unbind. Bo
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: Commands such as \url and \index don't like latex macros in their argument Sorry, that is true for \url only. -- Enrico
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 04:07:56PM -0500, Bo Peng wrote: BTW, you use find to get all the images under lib/images, but some of them are unused. Scons only compiles the used ones that are listed in scons_manifest. Would anybody object to remove the unused ones? I am not quite sure. For example, I can add font-bold to ui/stdtoolbar.inc, and font-bold.png would better be there... Bo +1 (Surely you mean font-strong.png :-) - Martin
Re: [Cvslog] r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
On Thu, Oct 18, 2007 at 11:03:52PM -, [EMAIL PROTECTED] wrote: Author: poenitz Date: Fri Oct 19 01:03:51 2007 New Revision: 21048 URL: http://www.lyx.org/trac/changeset/21048 Log: isome more FileName shuffling [..] +bool FileName::isWritable() const +{ + QFileInfo const fi(toqstr(name_)); + return fi.isReadable(); +} Ouch... -- Enrico
Re: UserGuide
On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1-\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? Commands such as \url and \index don't like latex macros in their argument, and the UserGuide is full of them: $ egrep \\(url|index)[{].*(LyX|TeX).*[}] UserGuide.tex | wc -l 46 This is due to the LyX - \LyX and TeX - \TeX translations performed by LyX. When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the argument of one of those commands, they should be marked as ERT in order to avoid their translation to a macro. -- Enrico
Re: UserGuide
On Fri, Oct 19, 2007 at 04:09:22AM +0200, Enrico Forestieri wrote: On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: Commands such as \url and \index don't like latex macros in their argument Sorry, that is true for \url only. Hmmm... that's more complicated. I had the impression that a macro could be used in the @ part of an entry, but \index{Bibliography ! [EMAIL PROTECTED] works, whereas \index{Bibliography ! [EMAIL PROTECTED] doesn't work. -- Enrico
Re: [Cvslog] r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
URL: http://www.lyx.org/trac/changeset/21048 Log: isome more FileName shuffling [..] +bool FileName::isWritable() const +{ + QFileInfo const fi(toqstr(name_)); + return fi.isReadable(); +} Ouch... And I just fixed tex2lyx for you. Bo
Re: [Patch] use Qt resources
I've replaced your qInitResources() with the 'official' Qt Q_INIT_RESOURCE(Resources) because on windows the rcc generates qInitResources_Resources(). I do not know what is going on here, but Linux/qt does not have qInitResources_Resources()... and now I am getting src/frontends/qt4/GuiToolbar.cpp:50: undefined reference to `qInitResources_Resources()' Please #ifdef WIN32, or apply a proper solution. (Or should I use rcc -name option?) Bo
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1-\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? Commands such as \url and \index don't like latex macros in their argument, and the UserGuide is full of them: $ egrep \\(url|index)[{].*(LyX|TeX).*[}] UserGuide.tex | wc -l 46 This is due to the LyX - \LyX and TeX - \TeX translations performed by LyX. When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the argument of one of those commands, they should be marked as ERT in order to avoid their translation to a macro. -- Enrico Is this something that should have beem done in lyx2lyx? - Martin
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1-\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? Commands such as \url and \index don't like latex macros in their argument, and the UserGuide is full of them: $ egrep \\(url|index)[{].*(LyX|TeX).*[}] UserGuide.tex | wc -l 46 This is due to the LyX - \LyX and TeX - \TeX translations performed by LyX. When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the argument of one of those commands, they should be marked as ERT in order to avoid their translation to a macro. It is more complicated than that. Inside \index we would really want the macro output to appear in the index entry (although LyX didn't manage that earlier either). Inside \url we don't want the macros to be expanded at all. - Martin
Re: r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
[EMAIL PROTECTED] wrote: Author: poenitz Date: Fri Oct 19 01:03:51 2007 New Revision: 21048 URL: http://www.lyx.org/trac/changeset/21048 Log: isome more FileName shuffling http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/FileName.cpp?rev=21048 == --- lyx-devel/trunk/src/support/FileName.cpp (original) +++ lyx-devel/trunk/src/support/FileName.cpp Fri Oct 19 01:03:51 2007 @@ -16,6 +16,9 @@ #include support/os.h #include support/qstring_helpers.h +#include debug.h +#include lyxlib.h + #include QFile #include QFileInfo @@ -67,14 +70,14 @@ } -string const FileName::toFilesystemEncoding() const +string FileName::toFilesystemEncoding() const { QByteArray const encoded = QFile::encodeName(toqstr(name_)); return string(encoded.begin(), encoded.end()); } -FileName const FileName::fromFilesystemEncoding(string const name) +FileName FileName::fromFilesystemEncoding(string const name) { QByteArray const encoded(name.c_str(), name.length()); return FileName(fromqstr(QFile::decodeName(encoded))); @@ -104,6 +107,40 @@ { QFileInfo const fi(toqstr(name_)); return fi.isReadable(); +} + + +bool FileName::isFileReadable() const +{ + QFileInfo const fi(toqstr(name_)); + return fi.isFile() fi.isReadable(); +} + + +bool FileName::isWritable() const +{ + QFileInfo const fi(toqstr(name_)); + return fi.isReadable(); +} + + +bool FileName::isDirWritable() const +{ + LYXERR(Debug::FILES) isDirWriteable: *this std::endl; + + FileName const tmpfl(tempName(*this, lyxwritetest)); + + if (tmpfl.empty()) + return false; + + unlink(tmpfl); + return true; +} + + +FileName FileName::tempName(FileName const dir, std::string const mask) +{ + return support::tempName(dir, mask); } This makes the source much more readable; obviously the right thing to do. However, I think it also makes sense to make that QFileInfo a member variable of FileName, no? You seem to be creating an awful lot of temporary objects for no real reason. Angus
Re: Building .deb package
On Wed, Oct 17, 2007 at 08:53:28PM +0200, Tommaso Cucinotta wrote: > Hi, > > is there any automated script to build a .deb package for LyX ? > Well you can always check out the debian directory from the pkg-lyx svn on alioth and use that to build with dpkg-buildpackage and related tools. http://wiki.debian.org/PkgLyx My question is why you would like to do it? Cheers, Sven
Re: [Patch] use Qt resources
On Wed, Oct 17, 2007 at 09:55:53PM -0500, Bo Peng wrote: > On 10/16/07, Andre Poenitz <[EMAIL PROTECTED]> wrote: > > On Tue, Oct 16, 2007 at 11:11:23PM +0200, Andre Poenitz wrote: > > > > > > Could somebody on Windows please try this one? > > > > > > [It should work] > > > > > > Also anu observations on startup speed are welcome. > > > > Slightly more complete patch attached. > > I get > > src/frontends/qt4/GuiToolbar.cpp:51: undefined reference to `qInitResources()' > collect2: ld returned 1 exit status Scons? There's a Resources.cpp to be build and compiled in frontends/qt4. Andre'
Link failure with CMake, PB with qInitResources()
I guess rcc.exe need to be executed but how and when? frontend_qt4.lib(GuiToolbar.obj) : error LNK2019: unresolved external symbol "void __cdecl qInitResources(void)" (?qInitResources@@YAXXZ) referenced in function "void __cdecl initializeResources(void)" (?initializeResources@@YAXXZ) D:\devel\lyx\trunk\development\cmake\bin\Release\lyx.exe : fatal error LNK1120: 1 unresolved externals Abdel.
Re: boost::fs
Andre Poenitz wrote: Something like that? Fine with me. So you are going to replace all those I hope? Find all "fs::exists", Subfolders, Find Results 1, "lyx-trunk", "*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh" D:\devel\lyx\trunk\src\Buffer.cpp(418): if (fs::exists(bname.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\Buffer.cpp(419): (!fs::exists(fname.toFilesystemEncoding()) || D:\devel\lyx\trunk\src\Buffer.cpp(690): if (fs::exists(lyxfile.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Buffer.cpp(860): if (lyxrc.make_backup && fs::exists(encodedFilename)) { D:\devel\lyx\trunk\src\Buffer.cpp(879): if (fs::exists(encodedFilename) && isExternallyModified(checksum_method)) { D:\devel\lyx\trunk\src\Buffer.cpp(1647): BOOST_ASSERT(fs::exists(pimpl_->filename.toFilesystemEncoding())); D:\devel\lyx\trunk\src\Buffer.cpp(1657): if (fs::exists(file)) { D:\devel\lyx\trunk\src\Buffer.cpp(2138): if (fs::exists(FileName(fname).toFilesystemEncoding())) { D:\devel\lyx\trunk\src\buffer_funcs.cpp(84): if (!fs::exists(s.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\buffer_funcs.cpp(95): if (fs::exists(e.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\buffer_funcs.cpp(96): fs::exists(s.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\buffer_funcs.cpp(122): if (fs::exists(a.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\buffer_funcs.cpp(123): fs::exists(s.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\ConverterCache.cpp(138): if (!fs::exists(orig_from_name.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\ConverterCache.cpp(149): if (!fs::exists(item.cache_name.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\ConverterCache.cpp(231): if (!fs::exists(cache_dir.toFilesystemEncoding())) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(149):if (!fs::exists(emb_file)) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(153): if (fs::exists(ext_file)) { D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(191):if (!fs::exists(ext_file)) D:\devel\lyx\trunk\src\EmbeddedFiles.cpp(195): if (fs::exists(emb_file)) { D:\devel\lyx\trunk\src\Exporter.cpp(81): if (fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Exporter.cpp(246): } else if (fs::exists(tmp_result_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Format.cpp(269): if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\Format.cpp(339): if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LaTeX.cpp(216): bool had_depfile = fs::exists(depfile.toFilesystemEncoding()); D:\devel\lyx\trunk\src\LaTeX.cpp(233): if (!fs::exists(output_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LaTeX.cpp(294): rerun = fs::exists(idxfile.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\LaTeX.cpp(483): if (!fs::exists(file2.toFilesystemEncoding())) D:\devel\lyx\trunk\src\LaTeX.cpp(774): * Wrapper around fs::exists that can handle invalid file names. D:\devel\lyx\trunk\src\LaTeX.cpp(776): * before calling fs::exists, but in practice it is unusable: On windows it D:\devel\lyx\trunk\src\LaTeX.cpp(783): return fs::exists(possible_name.toFilesystemEncoding()); D:\devel\lyx\trunk\src\LyX.cpp(988): if (fs::exists(document_path.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\LyX.cpp(1135): return (! fs::exists(absfile)) D:\devel\lyx\trunk\src\LyX.cpp(1148): if (fs::exists(user_support) && fs::is_directory(user_support)) { D:\devel\lyx\trunk\src\LyXFunc.cpp(540): enable = !buf->isUnnamed() && fs::exists(buf->fileName()) D:\devel\lyx\trunk\src\LyXFunc.cpp(1155):if (fs::exists(filename.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2158): if (!fs::exists(fullname.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2250): if (fs::exists(lyxfile.toFilesystemEncoding()) && fullname != lyxfile) { D:\devel\lyx\trunk\src\LyXFunc.cpp(2408): if (fs::exists(encoded) && fs::is_directory(encoded)) D:\devel\lyx\trunk\src\Session.cpp(81): if (fs::exists(file.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\Session.cpp(136): if (fs::exists(file.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\Session.cpp(191): if (fs::exists(file.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\Session.cpp(272): if (fs::exists(file.toFilesystemEncoding()) && D:\devel\lyx\trunk\src\TextClass.cpp(1017): if (layout_file.empty() || !fs::exists(layout_file.toFilesystemEncoding())) D:\devel\lyx\trunk\src\TextClassList.cpp(197): if (fs::exists(layout_file.toFilesystemEncoding())) { D:\devel\lyx\trunk\src\client\client.cpp(92): if (!fs::exists(dirpath) || !fs::is_directory(dirpath)) { D:\devel\lyx\trunk\src\client\client.cpp(104): if (fs::exists(lyxsocket)) { D:\devel\lyx\trunk\src\frontends\qt4\GuiGraphics.cpp(769): if (!(fs::exists(encoded_clipdir) && fs::is_directory(encoded_clipdir)))
Re: r20991 - in /lyx-devel/trunk/src: KeyMap.h frontends/qt4/...
"Bo Peng" <[EMAIL PROTECTED]> writes: > I will commit the attached updated patch tomorrow if there is no > objection. This time, I also list LFUNs without any keybinding. This is much much better. You have my OK. Just a small comment: > + LyXAction::const_func_iterator fit = lyxaction.func_begin(); > + LyXAction::const_func_iterator fit_end = lyxaction.func_end(); > + for (; fit != fit_end; ++fit) { > + kb_action action = fit->second; > + bool has_action = false; > + it = bindinglist.begin(); > + it_end = bindinglist.end(); > + for (; it != it_end; ++it) [...] This code should be moved to KeyMap::listBindings() (maybe with a bool parameter indicating whether we want to have the unbound lfuns?) JMarc
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
Andre Poenitz <[EMAIL PROTECTED]> writes: > Hm... I wonder whether I have overlooked something here > > Even if the files are not needed for 'make install' they might be needed > for 'make dist', right? This is what I was about to answer to your commit message. JMarc
Re: .svn stuff in tar balls?
Andre Poenitz <[EMAIL PROTECTED]> writes: > Is there a specific reason that we distribute part of our working copies > in the tar balls? > > As far as I can tell the reason is EXTRA_DIST += some_dir instead of > EXTRA_DIST += somedir/file1 ... > > So is this just lazyness? The proper distribution scheme is to do a 'svn export' before the 'make dist'. There are therefore no .svn files in official tar.gz on ftp.lyx.org (except for older one when I was too lazy to do it :) JMarc
LyX Debian/Ubuntu packages.
Hi all, I've just uploaded LyX .deb packages I built starting from the debian/ structure of the Ubuntu Gutsy lyx-1.5.1 package here: http://feanor.sssup.it/~tommaso/lyx_1.5.2-1ubuntu1_i386.deb http://feanor.sssup.it/~tommaso/lyx-common_1.5.2-1ubuntu1_all.deb Just changed prefix from /usr to /usr/local, and removed dependency from texlive-latex-base (on my system I don't really need it). Maybe somebody could find them useful. T.
Re: boost::fs
Andre Poenitz <[EMAIL PROTECTED]> writes: > On Wed, Oct 17, 2007 at 11:54:00PM +0200, Andre Poenitz wrote: >> >> Something like that? > > Second try. I like it a lot. Note that is_directory has the same problem. JMarc
Re: Charstyles rendering issue - jumping lines disrupt workflow
On Wed, 17 Oct 2007 22:14:09 +0300 Martin Vermeer <[EMAIL PROTECTED]> wrote: > On Wed, Oct 17, 2007 at 04:04:35PM +0200, Helge Hafting wrote: > > Charstyles is nice for something - and now I even get > > the URL charstyle automatically when opening older documents. > > (Yes, I use 1.6 for work :-) > > > > All very fine, but one problem. Whenever the cursor moves through an > > URL charstyle, stuff on the screen jumps all over the place. > > That is very distracting. > > > > The line with the URL is shifted slightly down, possibly to make > > room for the upper corners that mark the URL inset. > > > > The lines below the URL downshifts a lot, probably to make > > room for a label. But the URL charstyle don't have a label! > > > > > > Suggestions for improvements: > > 1. If there is no label (or a blank label or whatever), > >don't try to make any room. No need! > > > > 2. Don't shift the line down. Use whatever local line height there is, > > and adapt the corners to that instead. Exceptions might be > > necessary for heavily nested styles, but it'd be _very_ nice if _no_ > > text moves when entering a single charstyle. Ideally, no movement > > even within two levels. Many levels will probably be rare. > > This will make editing (or simply using LyX as a reader) much easier. > > > > If more visual feedback is needed, consider bigger corners, > > colors, or whatever. Even "marching ants" is a lot less disruptive > > than moving the line that I am reading. > > > > 3. Possibly show the current style (and nested styles too?) on > >the status line, so stuffing labels into the text won't be necessary. > >A "charstyle combobox" in addition to the "paragraph style" box > >will also serve this purpose, and of course it offers easier use > > of charstyles too. Which is probably what we want. :-) > > > > Helge Hafting > > If Bo gets his info-on-mouseover working, the label can be permanently > disabled if turned off. Then nothing will move. It's the label (always > drawn when inside the inset) that causes the movement. It's not true > what you say that URL has no label; in fact it has an empty label. The > worst of both worlds ;-/ > > (I could add specialcasing for that to InsetCollapsable; rather not. > The patch for this is attached, in case somebody likes it. BTW why is > URL in charstyles and not in custom insets? I spent some quality time > looking for it :-( ) > > - Martin > Actually the better way to do it is the attached. I'll commit this if no objection is heard. - Martin Index: url.module === --- url.module (revision 20941) +++ url.module (working copy) @@ -3,12 +3,17 @@ Format 4 InsetLayout URL - LyXType charstyle - LatexType command + LyXType custom + LatexType command LatexName url + Decoration minimalistic + LabelString URL Font - Family Typewriter +Family Typewriter EndFont + LabelFont +Family Typewriter + EndFont Preamble \usepackage{url} EndPreamble
Re: [Patch] use Qt resources
> Scons? > > There's a Resources.cpp to be build and compiled in frontends/qt4. There is no such file. Did you add it to svn? Bo
lyx2lyx is broken apparently
I can't open any of the help documents... Abdel.
Re: boost::fs
On Thu, Oct 18, 2007 at 02:23:07PM +0200, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >Something like that? > > Fine with me. So you are going to replace all those I hope? > > Find all "fs::exists", Subfolders, Find Results 1, "lyx-trunk", > "*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh" > D:\devel\lyx\trunk\src\Buffer.cpp(418): if > (fs::exists(bname.toFilesystemEncoding()) && > D:\devel\lyx\trunk\src\Buffer.cpp(419): > (!fs::exists(fname.toFilesystemEncoding()) || > D:\devel\lyx\trunk\src\Buffer.cpp(690): if > (fs::exists(lyxfile.toFilesystemEncoding())) { > D:\devel\lyx\trunk\src\Buffer.cpp(860): if (lyxrc.make_backup && > fs::exists(encodedFilename)) { > D:\devel\lyx\trunk\src\Buffer.cpp(879): if I'll to the automatic changes first, i.e. the one using 'toFileSystemEncoding' in 'user code'. The rest would need manual work... But yes, having readable user code in the end is the plan... Andre'
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
On Thu, Oct 18, 2007 at 02:28:00PM +0200, Jean-Marc Lasgouttes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > > Hm... I wonder whether I have overlooked something here > > > > Even if the files are not needed for 'make install' they might be needed > > for 'make dist', right? > > This is what I was about to answer to your commit message. What would I use to have it in the tarball but not installed? EXTRADIST? Andre'
Re: boost::fs
On Thu, Oct 18, 2007 at 03:23:39PM +0200, Jean-Marc Lasgouttes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > > On Wed, Oct 17, 2007 at 11:54:00PM +0200, Andre Poenitz wrote: > >> > >> Something like that? > > > > Second try. > > I like it a lot. Note that is_directory has the same problem. I noticed ;-) Andre'
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 08:47:18AM -0500, Bo Peng wrote: > > Scons? > > > > There's a Resources.cpp to be build and compiled in frontends/qt4. > > There is no such file. Did you add it to svn? This is a generated file built by Resources.qrc: echo "" > $@ find $(top_srcdir)/lib/images -name '*.png' \ | sed -e 's:$(top_srcdir)/lib/\(.*\):&:' \ >> $@ echo "" >> $@ Resources.cpp: Resources.qrc $(RCC4) $< -o $@ in the automake version. As resources do not change very often we could add Resources.cpp to svn but I'd rather always generate it. Andre'
Re: lyx2lyx is broken apparently
On Thu, Oct 18, 2007 at 05:42:03PM +0200, Abdelrazak Younes wrote: > I can't open any of the help documents... Try again. -- Enrico
Re: lyx2lyx is broken apparently
Abdelrazak Younes wrote: I can't open any of the help documents... I think I may have committed something by accident. Let me check. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
> This is a generated file built by > > Resources.qrc: > echo "" > $@ > find $(top_srcdir)/lib/images -name '*.png' \ > | sed -e 's:$(top_srcdir)/lib/\(.*\): alias="\1">&:' \ > >> $@ > echo "" >> $@ What is the advantage of doing all these? Bo
Re: [Cvslog] r21014 - /lyx-devel/trunk/lib/Makefile.am
Andre Poenitz <[EMAIL PROTECTED]> writes: > What would I use to have it in the tarball but not installed? > > EXTRADIST? I think you need to use noinst somewhere in the name of the variable.
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 01:32:44PM -0500, Bo Peng wrote: > On 10/18/07, Bo Peng <[EMAIL PROTECTED]> wrote: > > > This is a generated file built by > > > > > > Resources.qrc: > > > echo "" > $@ > > > find $(top_srcdir)/lib/images -name '*.png' \ > > > | sed -e 's:$(top_srcdir)/lib/\(.*\): > > alias="\1">&:' \ > > > >> $@ > > > echo "" >> $@ > > OK. Scons is fixed for this. Abdel seems to have the same problem with cmake. I did ask people to test he patch, didn't I? Andre'
InsetCommandParams Question
So, the work on making this system more flexible proceeds, with interruptions for actual philosophy from time to time. At this point, I have a question before I embark on the next step. The question concerns how the list of parameters is represented in InsetCommandParams. At present, it's done like this. This struct: struct CommandInfo { /// Number of parameters size_t n; /// Parameter names. paramnames[n] must be "". char const * const * paramnames; /// Tells whether a parameter is optional bool const * optional; }; describes the parameters to be used, and it's defined here: switch (code) { case BIBITEM_CODE: { static const char * const paramnames[] = {"label", "key", ""}; static const bool isoptional[] = {true, false}; static const CommandInfo info = {2, paramnames, isoptional}; return } etc. The parameters themselves are stored in a separate data structure: typedef std::vector ParamVector; /// The parameters (both optional and required ones). The order is /// the same that is required for LaTeX output. The size of params_ /// is always info_->n. ParamVector params_; and written in the following sort of way: int const i = findToken(info_->paramnames, token); if (i >= 0) { lex.next(true); params_[i] = lex.getDocString(); } I take it that the idea is that we don't have to store the list of parameters, whether they're optional, etc, in each and every inset, but rather use a reference to the static const construct to save memory. But the problem, from my point of view, is that, in trying to make this more flexible, we don't want to assume that each inset has a fixed list of parameters that it will accept. What parameters it accepts may depend upon what command it represents: Compare jurabib and natbib and biblatex, in particular, let alone a to-be-written "custom command inset" similar to custom Flex insets. The obvious way to handle this is to have something like this: enum Optional { OPT, REQ }; struct ParamInfo { std::string paramName; Optional opt; docstring value; } class ParamList { setValue(std::string name, docstring value); getValue(std::string name); isOptional(std::string name); addParam(ParamInfo); private: std::list plist; } And then every InsetCommand would have an associated ParamList in its InsetCommandParams. So the question is: Are the added memory requirements here objectionable? If so, is there some natural way to continue with the static const treatment, even assuming the acceptable parameters could vary, and even be set at runtime? It's because I don't see how to do the latter that this plan seems the only workable one. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
> > What is the advantage of doing all these? > > Compiled-in resources vs 600 seperately installed files? Makes sense. Thanks. BTW, you use find to get all the images under lib/images, but some of them are unused. Scons only compiles the used ones that are listed in scons_manifest. Bo
Re: [Patch] use Qt resources
> > OK. Scons is fixed for this. Abdel seems to have the same problem with > > cmake. > > I did ask people to test he patch, didn't I? You did ask, but I had no idea what your patch was about, and did not test. Bo
Re: [Patch] use Qt resources
On 10/18/07, Bo Peng <[EMAIL PROTECTED]> wrote: > > This is a generated file built by > > > > Resources.qrc: > > echo "" > $@ > > find $(top_srcdir)/lib/images -name '*.png' \ > > | sed -e 's:$(top_srcdir)/lib/\(.*\): > alias="\1">&:' \ > > >> $@ > > echo "" >> $@ OK. Scons is fixed for this. Abdel seems to have the same problem with cmake. Bo
Re: LyX asserts when browsing for images to insert
Jean-Marc Lasgouttes wrote: Helge Hafting <[EMAIL PROTECTED]> writes: I insert a graphic in a float. When I press the "browse" button, LyX dies. gdb backtrace: ASSERT failure in QList::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qlist.h, line 386 Ouch. This looks like a qt bug to me. That would be strange - this used to work fine. Helge Hafting
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 12:20:23PM -0500, Bo Peng wrote: > > This is a generated file built by > > > > Resources.qrc: > > echo "" > $@ > > find $(top_srcdir)/lib/images -name '*.png' \ > > | sed -e 's:$(top_srcdir)/lib/\(.*\): > alias="\1">&:' \ > > >> $@ > > echo "" >> $@ > > What is the advantage of doing all these? Compiled-in resources vs 600 seperately installed files? Andre'
UserGuide
Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1->\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? Andre'
Re: UserGuide
Andre Poenitz wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like ! Use of [EMAIL PROTECTED] doesn't match its definition. [EMAIL PROTECTED] #1->\def [EMAIL PROTECTED] { #1}\ifx [EMAIL PROTECTED] [EMAIL PROTECTED] \let [EMAIL PROTECTED] l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} \\ ? I've had the same problem but haven't had time to investigate. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: [Patch] use Qt resources
Andre Poenitz wrote: On Tue, Oct 16, 2007 at 11:11:23PM +0200, Andre Poenitz wrote: Could somebody on Windows please try this one? [It should work] Also anu observations on startup speed are welcome. Slightly more complete patch attached. Andre' + +static void initializeResources() +{ + extern void qInitResources(); + static bool initialized = false; + if (!initialized) { + qInitResources(); + initialized = true; + } +} + + I've replaced your qInitResources() with the 'official' Qt Q_INIT_RESOURCE(Resources) because on windows the rcc generates qInitResources_Resources(). Also cmake is now up to date. Peter
Re: Link failure with CMake, PB with qInitResources()
Abdelrazak Younes wrote: I guess rcc.exe need to be executed but how and when? frontend_qt4.lib(GuiToolbar.obj) : error LNK2019: unresolved external symbol "void __cdecl qInitResources(void)" (?qInitResources@@YAXXZ) referenced in function "void __cdecl initializeResources(void)" (?initializeResources@@YAXXZ) D:\devel\lyx\trunk\development\cmake\bin\Release\lyx.exe : fatal error LNK1120: 1 unresolved externals Abdel. It's fixed now. CMake also globs for the png files. -- Peter Kümmel
Re: UserGuide
> Has anybody recently actually tried to compile the UserGuide? > > On my machine LaTeX simply does not finish. Run by hand I get stuff > like it does not work for me quite long time (i remember another err messages though). e.g. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129100.html pavel
Re: UserGuide
Pavel Sanda wrote: Has anybody recently actually tried to compile the UserGuide? On my machine LaTeX simply does not finish. Run by hand I get stuff like same on windows. it does not work for me quite long time (i remember another err messages though). e.g. http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129100.html pavel -- Peter Kümmel
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 01:51:35PM -0500, Bo Peng wrote: > > > What is the advantage of doing all these? > > > > Compiled-in resources vs 600 seperately installed files? > > Makes sense. Thanks. > > BTW, you use find to get all the images under lib/images, but some of > them are unused. Scons only compiles the used ones that are listed in > scons_manifest. Would anybody object to remove the unused ones? Andre'
Re: InsetCommandParams Question
On Thu, Oct 18, 2007 at 02:47:44PM -0400, Richard Heck wrote: > So the question is: Are the added memory requirements here > objectionable? How much would that be? Andre'
Re: [Patch] use Qt resources
> > BTW, you use find to get all the images under lib/images, but some of > > them are unused. Scons only compiles the used ones that are listed in > > scons_manifest. > > Would anybody object to remove the unused ones? I am not quite sure. For example, I can add font-bold to ui/stdtoolbar.inc, and font-bold.png would better be there... Bo
Re: InsetCommandParams Question
Andre Poenitz wrote: On Thu, Oct 18, 2007 at 02:47:44PM -0400, Richard Heck wrote: So the question is: Are the added memory requirements here objectionable? How much would that be? I don't know C++ internals enough to be sure how much we're talking per inset. We're looking at, on average, a string and a half, maybe 8-10 characters, and an int, per inset, plus whatever overhead a struct and class involve. That said, InsetCommand's aren't all that common. It's not like we're dealing with math. So maybe it's trivial, in the end. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: InsetCommandParams Question
Richard Heck wrote: > The obvious way to handle this is to have something like this: > enum Optional { OPT, REQ }; > struct ParamInfo { >std::string paramName; >Optional opt; >docstring value; > } > class ParamList { >setValue(std::string name, docstring value); >getValue(std::string name); >isOptional(std::string name); >addParam(ParamInfo); > private: >std::list plist; > } > And then every InsetCommand would have an associated ParamList in its > InsetCommandParams. > > So the question is: Are the added memory requirements here > objectionable? If so, is there some natural way to continue with the > static const treatment, even assuming the acceptable parameters could > vary, and even be set at runtime? It's because I don't see how to do the > latter that this plan seems the only workable one. It looks like a sane plan and doesn't look especially expensive to me. You might even take this one step further to: enum Optional { OPT, REQ }; struct PropertyDefinition { std::string paramName; Optional opt; // Some helper functions defining what might be meant // by "valid" values. }; struct Property { PropertyDefinition propDef; docstring value; }; Doing that, you would have essentially define a schema that you could go on to use to validate your input data. Presumably "well known" insets would have hard-coded ParamLists and custom Flex insets would define them in the equivalent of a .layout file. (Whatever this thing is called for these clever beasties.) -- Angus
Re: r21033 - in /lyx-devel/trunk/src: Buffer.cpp CutAndPaste....
[EMAIL PROTECTED] wrote: > Author: younes > Date: Thu Oct 18 17:29:51 2007 > New Revision: 21033 > > URL: http://www.lyx.org/trac/changeset/21033 > Log: > Reduce header dependencies in Paragraph.h > - Move Changes.h out of Paragraph.h > - pimpl the inset list. == > --- lyx-devel/trunk/src/InsetList.cpp (original) +++ > lyx-devel/trunk/src/InsetList.cpp Thu Oct 18 17:29:51 2007 @@ -138,4 > +138,12 @@ > } > > > +void InsetList::clone() > +{ > + List::iterator it = list_.begin(); > + List::iterator end = list_.end(); > + for (; it != end; ++it) > + it->inset = it->inset->clone(); > +} > + > } // namespace lyx == > --- lyx-devel/trunk/src/Paragraph.cpp (original) +++ > lyx-devel/trunk/src/Paragraph.cpp Thu Oct 18 17:29:51 2007 @@ -21,10 > @@ -277,6 +282,8 @@ > inset_owner = p.inset_owner; > fontlist = p.fontlist; > id_ = paragraph_id++; > + insetlist_ = p.insetlist_; > + insetlist_.clone(); > } This is a very strange "clone". Why aren't you writing it: class InsetList { static InsetList clone(InsetList & rhs) { InsetList lhs = rhs; List::iterator it = lhs.begin(); List::iterator const end = lhs.end(); for (; it != end; ++it) { // Indeed, I think Inset::clone should be similar. it->inset = it->inset->clone(); } return lhs; } }; ? Angus
Re: r21050 - in /lyx-devel/trunk/src/frontends/qt4: GuiPrefs....
On 10/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Author: bpeng > Date: Fri Oct 19 05:09:14 2007 > New Revision: 21050 > > URL: http://www.lyx.org/trac/changeset/21050 > Log: > PrefShortcuts: the buttons are almost usable now > The buttons are roughly working. The next patch will handle user.bind and \unbind. Bo
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: > Commands such as \url and \index don't like latex macros in their > argument Sorry, that is true for \url only. -- Enrico
Re: [Patch] use Qt resources
On Thu, Oct 18, 2007 at 04:07:56PM -0500, Bo Peng wrote: > > > BTW, you use find to get all the images under lib/images, but some of > > > them are unused. Scons only compiles the used ones that are listed in > > > scons_manifest. > > > > Would anybody object to remove the unused ones? > > I am not quite sure. For example, I can add font-bold to > ui/stdtoolbar.inc, and font-bold.png would better be there... > > Bo +1 (Surely you mean font-strong.png :-) - Martin
Re: [Cvslog] r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
On Thu, Oct 18, 2007 at 11:03:52PM -, [EMAIL PROTECTED] wrote: > Author: poenitz > Date: Fri Oct 19 01:03:51 2007 > New Revision: 21048 > > URL: http://www.lyx.org/trac/changeset/21048 > Log: > isome more FileName shuffling [..] > +bool FileName::isWritable() const > +{ > + QFileInfo const fi(toqstr(name_)); > + return fi.isReadable(); > +} Ouch... -- Enrico
Re: UserGuide
On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: > > Has anybody recently actually tried to compile the UserGuide? > > On my machine LaTeX simply does not finish. Run by hand I get stuff > like > > > ! Use of [EMAIL PROTECTED] doesn't match its definition. > [EMAIL PROTECTED] #1->\def [EMAIL PROTECTED] { > #1}\ifx [EMAIL PROTECTED] [EMAIL > PROTECTED] \let > [EMAIL PROTECTED] > l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} > \\ > ? Commands such as \url and \index don't like latex macros in their argument, and the UserGuide is full of them: $ egrep "\\(url|index)[{].*(LyX|TeX).*[}]" UserGuide.tex | wc -l 46 This is due to the LyX -> \LyX and TeX -> \TeX translations performed by LyX. When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the argument of one of those commands, they should be marked as ERT in order to avoid their translation to a macro. -- Enrico
Re: UserGuide
On Fri, Oct 19, 2007 at 04:09:22AM +0200, Enrico Forestieri wrote: > On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: > > > Commands such as \url and \index don't like latex macros in their > > argument > > Sorry, that is true for \url only. Hmmm... that's more complicated. I had the impression that a macro could be used in the @ part of an entry, but \index{Bibliography ! [EMAIL PROTECTED] works, whereas \index{Bibliography ! [EMAIL PROTECTED] doesn't work. -- Enrico
Re: [Cvslog] r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
> > > > URL: http://www.lyx.org/trac/changeset/21048 > > Log: > > isome more FileName shuffling > > [..] > > > +bool FileName::isWritable() const > > +{ > > + QFileInfo const fi(toqstr(name_)); > > + return fi.isReadable(); > > +} > > Ouch... And I just fixed tex2lyx for you. Bo
Re: [Patch] use Qt resources
> I've replaced your qInitResources() with the 'official' Qt > Q_INIT_RESOURCE(Resources) because on windows the > rcc generates qInitResources_Resources(). > I do not know what is going on here, but Linux/qt does not have qInitResources_Resources()... and now I am getting src/frontends/qt4/GuiToolbar.cpp:50: undefined reference to `qInitResources_Resources()' Please #ifdef WIN32, or apply a proper solution. (Or should I use rcc -name option?) Bo
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: > On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: > > > > Has anybody recently actually tried to compile the UserGuide? > > > > On my machine LaTeX simply does not finish. Run by hand I get stuff > > like > > > > > > ! Use of [EMAIL PROTECTED] doesn't match its definition. > > [EMAIL PROTECTED] #1->\def [EMAIL PROTECTED] { > > #1}\ifx [EMAIL PROTECTED] [EMAIL > > PROTECTED] \let > > [EMAIL PROTECTED] > > l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} > > \\ > > ? > > Commands such as \url and \index don't like latex macros in their > argument, and the UserGuide is full of them: > > $ egrep "\\(url|index)[{].*(LyX|TeX).*[}]" UserGuide.tex | wc -l > 46 > > This is due to the LyX -> \LyX and TeX -> \TeX translations performed > by LyX. > > When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the > argument of one of those commands, they should be marked as ERT in > order to avoid their translation to a macro. > > -- > Enrico Is this something that should have beem done in lyx2lyx? - Martin
Re: UserGuide
On Fri, Oct 19, 2007 at 02:44:49AM +0200, Enrico Forestieri wrote: > On Thu, Oct 18, 2007 at 09:11:07PM +0200, Andre Poenitz wrote: > > > > Has anybody recently actually tried to compile the UserGuide? > > > > On my machine LaTeX simply does not finish. Run by hand I get stuff > > like > > > > > > ! Use of [EMAIL PROTECTED] doesn't match its definition. > > [EMAIL PROTECTED] #1->\def [EMAIL PROTECTED] { > > #1}\ifx [EMAIL PROTECTED] [EMAIL > > PROTECTED] \let > > [EMAIL PROTECTED] > > l.4770 ...{http://wiki.lyx.org/Bib\TeX{}/Programs} > > \\ > > ? > > Commands such as \url and \index don't like latex macros in their > argument, and the UserGuide is full of them: > > $ egrep "\\(url|index)[{].*(LyX|TeX).*[}]" UserGuide.tex | wc -l > 46 > > This is due to the LyX -> \LyX and TeX -> \TeX translations performed > by LyX. > > When the words LyX or TeX (or LaTeX, or BibTeX, or ...) appear in the > argument of one of those commands, they should be marked as ERT in > order to avoid their translation to a macro. It is more complicated than that. Inside \index we would really want the macro output to appear in the index entry (although LyX didn't manage that earlier either). Inside \url we don't want the macros to be expanded at all. - Martin
Re: r21048 - in /lyx-devel/trunk/src: BufferView.cpp Converte...
[EMAIL PROTECTED] wrote: > Author: poenitz > Date: Fri Oct 19 01:03:51 2007 > New Revision: 21048 > > URL: http://www.lyx.org/trac/changeset/21048 > Log: > isome more FileName shuffling http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/FileName.cpp?rev=21048 > == > --- lyx-devel/trunk/src/support/FileName.cpp (original) +++ > lyx-devel/trunk/src/support/FileName.cpp Fri Oct 19 01:03:51 2007 @@ > -16,6 +16,9 @@ > #include "support/os.h" > #include "support/qstring_helpers.h" > > +#include "debug.h" > +#include "lyxlib.h" > + > #include > #include > > @@ -67,14 +70,14 @@ > } > > > -string const FileName::toFilesystemEncoding() const > +string FileName::toFilesystemEncoding() const > { > QByteArray const encoded = QFile::encodeName(toqstr(name_)); > return string(encoded.begin(), encoded.end()); > } > > > -FileName const FileName::fromFilesystemEncoding(string const & name) > +FileName FileName::fromFilesystemEncoding(string const & name) > { > QByteArray const encoded(name.c_str(), name.length()); > return FileName(fromqstr(QFile::decodeName(encoded))); > @@ -104,6 +107,40 @@ > { > QFileInfo const fi(toqstr(name_)); > return fi.isReadable(); > +} > + > + > +bool FileName::isFileReadable() const > +{ > + QFileInfo const fi(toqstr(name_)); > + return fi.isFile() && fi.isReadable(); > +} > + > + > +bool FileName::isWritable() const > +{ > + QFileInfo const fi(toqstr(name_)); > + return fi.isReadable(); > +} > + > + > +bool FileName::isDirWritable() const > +{ > + LYXERR(Debug::FILES) << "isDirWriteable: " << *this << std::endl; > + > + FileName const tmpfl(tempName(*this, "lyxwritetest")); > + > + if (tmpfl.empty()) > + return false; > + > + unlink(tmpfl); > + return true; > +} > + > + > +FileName FileName::tempName(FileName const & dir, std::string const & > mask) +{ > + return support::tempName(dir, mask); > } This makes the source much more readable; obviously the right thing to do. However, I think it also makes sense to make that QFileInfo a member variable of FileName, no? You seem to be creating an awful lot of temporary objects for no real reason. Angus