Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.
This first patch does some reworking of the infrastructrue. We need to distinguish between the TextClass that a particular document is using and the layout of that document, since modules, in particular, can modify the layout. The solution adopted here is to add a TextClass pointer to BufferParams, which will hold the layout. The layout itself is then constructed from the TextClass the document is using. At present, this is completely trivial, but that will change when modules are added.
The pointer in question is a boost::shared_ptr. This is needed because CutAndPaste saves a copy of the layout with each cut or copied selection. We cannot assume the selection vanishes when the document is closed, so there are two options: (i) keep a list of all the layouts that have ever been used by any document; (ii) used some kind of smart pointer. The latter seems preferable, as the former would waste memory. More importantly, the use of a smart pointer allows modules to be modified on disk and then reloaded while LyX is running, and it will eventually allow the same for layout files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19756 a592a061-630c-0410-9148-cb99ea01b6c8
The changes are essentially of three types.
First, the std::maps previously used here for storing BibTeX data have become full-fledged classes and so what were previously just a bunch of functions have now become methods of these new classes. This leads to a lot of minor changes in other files, to adapt to the new signature. The changes in insets/ are mostly of this kind.
Second, there are some slightly more substantial changes in src/insets/InsetBibtex.cpp. We now store lists of the field names and entry types that have been used.
Finally, there are the changes to the citation UI. These are mostly straightforward, though adding the new functionality exposed some inadequacies in the previous code that also had to be fixed.
One other change: BibTeX keys are now docstring. This solves some Unicode issues.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19657 a592a061-630c-0410-9148-cb99ea01b6c8
a structure representing field->value instead of just a single string with
all the data. The data structures are defined in src/Biblio_typedefs.h, and
the main changes are to the parser code in src/insets/InsetBibtex.cpp.
-src/Biblio_typedefs.h
Contains typedefs for new representation. Separating them out limits how much
gets #include'd by other files, and also resolves a circularity problem with
Buffer.h.
-src/Biblio.{h,cpp}
Signature changes and massive simplifications to routines that report
BibTeX data, since we now have an articulate representation.
-src/insets/InsetBibtex.{h,cpp}
Re-write the parser code so we store a key->value map of the BibTeX data
rather than just one long string. This is the main work.
-src/frontends/controllers/ControlCitation.{h,cpp}
-src/insets/InsetBibitem.{h,cpp}
-src/insets/InsetCitation.cpp
Adaptations and simplifications.
-src/insets/Inset.h
-src/Buffer.{h,cpp}
-src/insets/InsetInclude.{h,cpp}
Signature changes.
-src/Makefile.am
-development/scons/scons_manifest.py
Add src/Biblio_typedefs.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19598 a592a061-630c-0410-9148-cb99ea01b6c8
information is acquired. This involves (i) moving the bulk of fillWithBibKeys()
into Biblio.cpp, (ii) introducing a virtual method Inset::fillWithBibKeys() that,
by default, does nothing, and (iii) over-riding this method in the insets that do
need to do something.
This is all preparatory for a more substantial re-working of the BibTex code,
which should follow shortly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19565 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/tempname.cpp: move code about HAVE_MKSTEMP here (only user)
* src/pch.h:
* src/Buffer.cpp:
* configure.ac: remove all traces of utime.h and HAVE_UTIME
* config/lyxinclude.m4: remove WITH_WARNING define (which be rendered useless in
a future commit from christian)
* development/scons/SConstruct: try to update.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19395 a592a061-630c-0410-9148-cb99ea01b6c8
- correct menu names
- add descriptions about index generation, font and graphic formats - to tell only examples
The document is ready except of the outliner and note descriptions.
The description of LyX's menus (Appendix A), and the preferences dialog (Appendix B) will be completed step by step, hopefully with some help.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19389 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/gzstream.h: re-introduce the stream we were using in
1.4.x. The boost iostream solution produces unreadable streams
on windows and we do not know why currently.
* src/support/Makefile.am:
* src/Buffer.cpp:
* src/Lexer.cpp:
* development/scons/scons_manifest.py: adapt.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19271 a592a061-630c-0410-9148-cb99ea01b6c8
* po/lyx_pot.py:
- new function external_l10n: parse external_templates and extract the relevant parts for translation.
* development/scons/SConstruct:
* po/Makefile.in.in:
- use external_l10n
* src/insets/InsetExternal.cpp:
* src/frontends/qt4/QExternal.cpp:
- make eveything translatable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18866 a592a061-630c-0410-9148-cb99ea01b6c8
The key is the new copier script lib/scripts/ext_copy.py. Usage:
ext_copy.py [-e ext1,ext2,...] <from file> <to file>
Given a <from file> and <to file>, it will copy all files in the directory
in which from_file is found that have the extensions given in the -e option,
or all files in that directory if no such argument is given. So, for example,
we can do:
python ext_copy.py -e png,html,css /path/from/file.html /path/to/file.html
and all html, png, and css files in /path/from/ will be copied to the
(possibly new) directory /path/to/file.html.LyXconv/. The -t option determines
the extension added to the output filename passed to the script ($$o, in the
copier definition), the default being "LyXconv". If just . is given, then no
extension is added.
Other changes:
* configure.py: added appropriate copier definitions for html and wordhtml
formats, as well as for the Program pseudo-format.
* lib/Makefile.am and development/scons/scons_manifest.py: add ext_copy.py.
* lib/doc/Customization.lyx: update documentation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18791 a592a061-630c-0410-9148-cb99ea01b6c8
As I did for decimal.lyx I leave the file in examples/de until the EmbeddedObjects manual is translated and renamed it to a German name.
(Hartmut also updated this file today.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18179 a592a061-630c-0410-9148-cb99ea01b6c8
* po/Makevar: handle messages that are to be translated into
the buffer's language
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18124 a592a061-630c-0410-9148-cb99ea01b6c8
When you run 'scons update_manifest', it tells you which files are missing
and which files are not in the source tree. It also generates a
scons_manifest.py.new file with all the missing files added to
XXX_extra_files. It will *not* change other sections of existing
manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18121 a592a061-630c-0410-9148-cb99ea01b6c8
some code is moved from QMath
to QDelimiterDialog and QMathMatrixDialog
for the rest pretty mechanical
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17872 a592a061-630c-0410-9148-cb99ea01b6c8
(please check if the Makefile entry is complete, I couldn't test this here)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17816 a592a061-630c-0410-9148-cb99ea01b6c8
be added by users to toolbars we should not delete the icon.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17785 a592a061-630c-0410-9148-cb99ea01b6c8
(The next days I'll also prepare support for europecv, the second nicht CV class that is also required to use in some fields.)
I hope I'm not too rash here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17700 a592a061-630c-0410-9148-cb99ea01b6c8
(since years now used by me successfully)
- new template for g-brief2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17699 a592a061-630c-0410-9148-cb99ea01b6c8
again (bug 3304)
* src/intl.C
(Intl::initKeyMapper): Don't set the char set of trans anymore
* src/chset.[Ch]: delete, no longer needed
* lib/kbd/*.cdef: ditto
* src/lyxrc.[Ch]: remove RC_SCREEN_FONT_ENCODING and font_norm,
these are no longer needed
* src/lyxfunc.C: adapt to lyxrc changes
* src/Makefile.am: remove deleted files
* lib/Makefile.am: ditto
* development/scons/scons_manifest.py: ditto
* src/text3.C
(LyXText::dispatch): reenable the kmap mechanism
* src/trans_mgr.[Ch]
(TransManager::setCharset): remove, no longer needed
(TransManager::insert): remove, since it would be identical to
insertVerbatim now
(TransManager::insertVerbatim): rename to insert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17665 a592a061-630c-0410-9148-cb99ea01b6c8
- new section about external material
- two hints concerning caption layout
The manual is now feature complete!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17466 a592a061-630c-0410-9148-cb99ea01b6c8
- initialiseParams(): overload ControlCommand::initialiseParams() so that we can update the model at this point (QToc is the controller _and_ the model).
- update(): new
- updateBackend(): new protected method to update the TocBackend (called for the "Update" button).
* QToc:
- is now a QObject
- modelReset: new Qt signal to indicate a model reset to associated dialog(s).
- QToc(): avoid the duplicate update() call that will be done in the show command anyway.
* Dialogs.C
- use new TocWidget in a DockView.
* TocWidget.[Ch]: renamed from QTocDialog. This striped down widget is only a widget that connects to the 'QToc' model/controller.
* DockView.h: new template class that encapsulates a given Widget inside a DockWidget and presents a Dialog::View interface.
* QTocUi.ui:
- now is a simple Widget.
- rearrange the buttons a bit
- get rid of the unneeded close button.
- modify the shortcut to "Promote" to 'r' because of a clash with "Alt-p" number (we really need real, always valid, shortcuts for all outline action!)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17416 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/lstrings.C
(uppercase): Use qt instead of non working libc/home grown solution
(lowercase): ditto
(local_lowercase): Use qt instead of libc tolower for ucs4 chars
* src/support/qstring_helpers.C
(qstring_to_ucs4): Use qchar_to_ucs4 because of the assertion
* src/support/lstrings.h: Add some documentation
* src/support/qstring_helpers.h
(is_utf16): New function: Tests whether an ucs4 character is also a
valid utf16 character
(qchar_to_ucs4): Assert on is_utf16()
(ucs4_to_qchar): Replace old assertion with better is_utf16()
* src/support/textutils.h
(isLetterChar): Delete non-working implementation
(isPrintable): Ditto
(isPrintableNonspace): Ditto
(isDigit):
* src/support/textutils.C: New file, contains new implementations
using qt of the functions in textutils.h
* src/support/Makefile.am: Add textutils.C
* development/scons/scons_manifest.py: ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17354 a592a061-630c-0410-9148-cb99ea01b6c8
What I did:
* move xx_foo.ext to xx/foo.ext
* update Makefile.am to make install work
* minimally update scons_manifest.py (I'd be surprised to see it
work).
* update i18nLibFileSearch to use the new naming scheme, and keep
temporarily some code that checks the old method.
* update image paths in .lyx files
* update name of files (examples in tutorial, for ex.) in lyx files
What is definitely broken:
* cmake (did not touch it)
* TOC files (I am not sure how the code works)
I would be surprised if nothing else was wrong.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17343 a592a061-630c-0410-9148-cb99ea01b6c8
* INSTALL.Win32: add instructin of building windows bundle installer
* development/scons/SConstruct: add bundle and bundle_dir option
* development/scons/scons_utils.py: handle bundle building
* development/Win32/packaging/installer/lyx.nsi:
allow specify bundle .exe name from command line
* development/Win32/packaging/installer/settings.user.nsh:
allow specify bundle directory from command line
* development/Win32/packaging/installer/components/external.nsh:
get files from bundle directory
* development/Win32/packaging/installer/settings.nsh
update miktex version (link needs to be updated as well?)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17081 a592a061-630c-0410-9148-cb99ea01b6c8
read from a text file.
* src/encoding.[Ch]
(Encoding::latexChar): New, output a character to LaTeX
(Encoding::validate): New, add needed preamble stuff for a character
(Encodings::read): Read new unicodesymbols file
(Encodings::isCombiningChar): New, is a character a combining char?
* src/paragraph_pimpl.C
(isEncoding): Delete, no longer needed
(getEncoding): New, get the real encoding of a font
(Paragraph::Pimpl::latexSurrogatePair): New, output a surrogate pair
to LaTeX
(Paragraph::Pimpl::simpleTeXBlanks): Use latexSurrogatePair if needed
(Paragraph::Pimpl::simpleTeXSpecialChars): Ditto, and replace several
hardcoded characters with a call of encoding.latexChar()
(Paragraph::Pimpl::validate): replace several hardcoded characters
with a call of encoding.validate()
* src/support/debugstream.h
(basic_debugstream::disable): New, disable the stream completely
(basic_debugstream::enable): New, reenable the stream
* src/lyx_main.[Ch]: Adjust to changes above
* src/paragraph.C: Ditto
* lib/unicodesymbols: New file with UCS4 -> LaTeX command mapping.
It is far from complete yet, but contains most accents on latin
characters.
* lib/Makefile.am: add lib/unicodesymbols
* development/scons/scons_manifest.py: ditto
* development/tools/unicodesymbols.py: Helper script to update
lib/unicodesymbols with new symbols
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16920 a592a061-630c-0410-9148-cb99ea01b6c8
Add the xpm version of the deleted lib/clipart/buffer-export_pdf2.png as
lib/images/buffer-export_pdf2.xpm since I discovered that we did not yet
have this icon.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16902 a592a061-630c-0410-9148-cb99ea01b6c8
* ExceptionMessage: new exception based message for errors and warnings.
* package.C.in:
- replace lyxerr based errors and warning with ExceptionMessage throwing.
- bail_out(): erased!
* os_win32.C:
- replace lyxerr based errors and warning with ExceptionMessage throwing.
- bail_out(): erased!
* tex2lyx.C: catch any exception from Package class.
* lyx_main.C: catch any exception from Package class and act accordingly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16834 a592a061-630c-0410-9148-cb99ea01b6c8
Move OS dependent code where it belongs.
* src/lyx_cb.C:
Remove unused include
* src/support/os.h
* src/support/os_unix.C
* src/support/os_win32.C
* src/support/os_cygwin.C:
Move here the code from fontutils.[Ch]
* src/support/os_cygwin.C
(external_path, external_path_list): don't differentiate anymore
on Qt/X11 or Qt/Win builds.
* src/support/environment.C
(setEnvPath): get rid of the #ifdef for cygwin.
* src/lyx_main.C
(LyX::exec): addFontResources and restoreFontResources are now
in the os namespace.
* src/support/Makefile.am
* src/client/Makefile.am
* src/tex2lyx/Makefile.am
* development/scons/scons_manifest.py:
Updated
* src/support/fontutils.[Ch]:
Removed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16655 a592a061-630c-0410-9148-cb99ea01b6c8
* lib/ui/stdmenus.ui: rename file in order not to confuse users
* lib/ui/stdtoolbars.inc:
* lib/ui/stdtoolbars.ui: rename file in order not to confuse users
* development/scons/scons_manifest.py:
* lib/doc/de_Customization.lyx:
* lib/Makefile.am:
* lib/ui/classic.ui:
* lib/ui/default.ui: adjust
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16549 a592a061-630c-0410-9148-cb99ea01b6c8