Commit Graph

21406 Commits

Author SHA1 Message Date
Georg Baum
45052f56ab Handle text-only wasy symbols correctly.
Some macros defined by wasysym.sty work only in text mode: They either
produce an error in math mode, or wrong output. These symbols are now marked
as text symbols, so that no \ensuremath is created for LaTeX export if they
appear inside \text{}, and the correct images are created.
2013-01-10 21:22:54 +01:00
Julien Rioux
15b2501177 LyXHTML linking from citation to bib entry for LyX 2.1 (fixes #8490).
What was previously accomplished by wrapCitation is now customizable in the
layout files. What we provide by default here corresponds roughly to the
LyX 2.0 behavior.
2013-01-10 15:32:00 +01:00
Juergen Spitzmueller
b57f585109 GuiSymbols: Use a grid with appropriat size 2013-01-10 13:19:14 +01:00
Juergen Spitzmueller
0dd91a1fd7 do not setUniformItemSizes since the symbols have different width (bug #5707) 2013-01-10 11:33:09 +01:00
Kornel Benko
75483b612c Rename misleading function name from_gmtime() to form_asctime_utc() 2013-01-09 13:45:58 +01:00
Julien Rioux
30f200a7e7 Fix cache for getInfo() with/without richtext (fixes #8486). 2013-01-08 16:34:02 +01:00
Julien Rioux
f6cd5ab863 Preserve BibTeX metadata in LyXHTML output (fixes #8451). 2013-01-08 16:33:12 +01:00
Julien Rioux
24a2c57ff0 Move richtext escaping to its own postprocessing routine. 2013-01-08 16:33:11 +01:00
Julien Rioux
e6aab49ff4 Use document language when exporting citations to LyXHTML (fixes #7732). 2013-01-07 16:00:47 +01:00
Kornel Benko
e04523f77b Make change tracking in export to latex be independent of timezone 2013-01-07 15:46:47 +01:00
Juergen Spitzmueller
364de0c2ed LFUN_CAPTION_INSERT is not 'inactive' 2013-01-05 10:04:04 +01:00
Juergen Spitzmueller
3c41319f0b Disable caption-insert in mathed 2013-01-05 09:42:27 +01:00
Juergen Spitzmueller
f164ffd093 do not try to expand arguments in mathed (bug #8482) 2013-01-05 09:41:53 +01:00
Julien Rioux
2e72a0af48 Add known citation packages to LaTeXFeatures:
- achicago
  - apacite
  - apalike
  - astron
  - authordate
  - chicago
  - harvard
  - mslapa
  - named

This allows these citation packages can be Required by the document layout.
LyX handles the package ordering, loading any of these packages before natbib
when both are required by the document layout. For example, apacite can be
used with or without natbib.

The package achicago isn't compatible with natbib out-of-the-box,
but the following compatibility code makes it work:

\usepackage{achicago}
\let\achicagobib\thebibliography
\usepackage[authoryear]{natbib}
\let\thebibliography\achicagobib
\let\UnexpandableProtect\protect
\let\SCcite\astroncite
2013-01-05 00:08:55 +01:00
Kornel Benko
2f33755814 findLyxBinary():
Add program suffix test before trying to determine
and use the extension to search for the lyx-executable
2013-01-04 11:05:12 +01:00
Kornel Benko
bd2468c341 Use program suffix to address lyx-executable, according to suffix
of tex2lyx.

Still the is error in tex2lyx, which searches for invalid suffix to
find the correct lyx executable.
2013-01-03 13:02:34 +01:00
Kornel Benko
4ff3e14144 In tex2lyx tests do not compare the first 2 lines.
This removes the need to update the lyx-format of the test files too often.
(To please Vincent and me)
2013-01-01 13:23:24 +01:00
Kornel Benko
297d534fdd Adapt format to lyx-files in tex2lyx-tests 2012-12-31 18:50:35 +01:00
Georg Baum
a98f7ad02d Fine tune image generation 2012-12-31 18:22:05 +01:00
Georg Baum
9c33bddffa Let tex2lyx really produce format 458. 2012-12-31 18:22:05 +01:00
Juergen Spitzmueller
846dd9b995 Introduce new beamer frame layouts
The old layouts are still there (marked as deprecated). The new ones are more or less correctly reverted (polishment required), but the old ones not yet converted to the new. Once this is done, a further file format change should be made.
2012-12-31 13:00:46 +01:00
Juergen Spitzmueller
f94220a79c Fix LaTeX fonts availability detection (bug #8476) 2012-12-31 10:51:37 +01:00
Juergen Spitzmueller
2a273ce4c1 Remove redundant 'Caption' string 2012-12-31 10:18:05 +01:00
Uwe Stöhr
b54c480508 ColorCode.h: clarify a comment 2012-12-31 04:10:28 +01:00
Georg Baum
ee3ce572a0 Fix import of shift-jis and big5 CJK texts.
These encodings were not defined, since they must not be used as document
encodings (the characters {, } and \ may appear in high bytes, and latex
would be confused). However, they are supported by CJK.sty (which uses a
preprocessor to circumvent the limitations of the latex executable). These
encodings are now defined, but used for import in tex2lyx only.
The test case CJK.tex contained fake tests for shift-jis and big5 (the
japanese and chinese characters were entered using the utf8 encoding), and
therefore the wrong interpretation of these encoding looked as if it worked.
The comments about missing iconv support of shift-jis and big5 were wrong as
well (otherwise shift-jis-plain would not work either).
2012-12-30 20:52:50 +01:00
Georg Baum
81f1f33a79 Add tex2lyx test results to dist package.
Otherwise "make check" will fail for sources not obtained from git.
2012-12-30 20:52:50 +01:00
Georg Baum
de5e348727 Fix bug #8468: Wrong import of UTF8 CJK.
Actually, the test case showed several problems:
- ERT insets did use layout "Standard", not "Plain Layout"
- The font scale was read correctly, but tex2lyx claimed that it did ignore
  the option "scaled=0.95"
- If a third argument of the CJK environment was given, it caused the whole
  environment to be put in ERT with a broken encoding. This is now fixed for
  the bug test case by using the \font_cjk header variable, but the encoding
  problem still exists for unsupported encodings. I'll file a separate bug
  for that.
- The CJKutf8 package was not handled in the preamble parsing. Therefore the
  chinese comment in the preamble was read with a wrong encoding, and guessing
  the document language did not work.
The new file CJKutf8.tex was created by copying and modifying CJK.tex, but
unfortunately it is impossible to tell git to inherit the history of CJK.tex
for the new file (search the web for git svn copy if you want to know details).
2012-12-30 20:52:49 +01:00
Georg Baum
6c54a081fa Make ASCII test more explicit.
I will need isASCII() in tex2lyx as well.
2012-12-30 20:52:49 +01:00
Georg Baum
c51449cac6 Fix tex2lyx bug #8466: special file names.
Special characters as created by latex_path() where not converted corectly
from LaTeX macros by tex2lyx. Now this is done, even for file names containing
double quotes which are not used for quoting spaces. These file names are not
legal on windows, and will causes probelms in DVI files, but if they occur
tex2lyx does not produce invalid .lyx files.
2012-12-30 20:52:49 +01:00
Juergen Spitzmueller
c246076ed5 Fix the 'caption inset mess' (bug #4647) 2012-12-30 18:29:02 +01:00
Kornel Benko
1ccc92717c The param 'close_fds' is not allowed on windos for subprocess.popen call,
if there are also redirections to stdin, stdout or stderr.
2012-12-30 11:30:15 +01:00
Juergen Spitzmueller
3f0bf02cc7 Disable CAPTION_INSERT in tables except for longtable caption cells (bug #5777) 2012-12-29 10:31:41 +01:00
Georg Baum
56ece75ad9 Fix bug #8464: stackrel with subscript.
The fix is basically mechanical, the additional code for fraction like insets
with three arguments was stolen from \unitfrac. As any math package,
stackrel.sty needs a buffer parameter to switch it off.
I also added the two stackrel flavours to the toolbar.
2012-12-28 20:08:43 +01:00
Georg Baum
8693f5a91e Fix bug #8422.
Both problems where caused by the fact that tex2lyx did not handle
natbib/jurabib citations correctly if natbib/jurabib was loaded by the
document class. Therefore it tried to parse the standard \cite syntax, and
did not recognize \citet and \citep.
2012-12-28 20:08:42 +01:00
Georg Baum
594c83261a Update tex2lyx test cases
The recent file format changes do not change the output of the existing test
cases, so only the version number needs to be updated.
2012-12-28 20:08:42 +01:00
Kornel Benko
981b9c69d1 1.) Add format to CJK.lyx.lyx(missed in previous commit)
2.) Add lyx2lyx test to runtests.py. This is done with extra parameter only,
  and does not change the behaviour without this parameter.
2012-12-28 16:22:25 +01:00
Kornel Benko
889563984f Adapt format to test files 2012-12-28 16:19:34 +01:00
Vincent van Ravesteijn
a19a0edfc0 qt5: Use QStyleOptionTabWidgetFrame
QStyleOptionTabWidgetFrameV2 is identical to QStyleOptionTabWidgetFrame.
2012-12-28 14:07:43 +01:00
Georg Baum
23b74a9111 Add toolbar images for stmaryrd.sty symbols
These are all generated by development/tools/generate_symbols_images.py, the
only manual adjustments were renamings due to case sensitive file systems on
windows.
2012-12-28 13:25:41 +01:00
Georg Baum
6cf364d30e Generate debug output for symbol macros as well
This is useful for debugging, and it will enable
development/tools/generate_symbols_images.py to generate a few more images.
2012-12-28 13:25:41 +01:00
Juergen Spitzmueller
78cd88f5a3 Proper support for memoir epigraph (bug #8151) 2012-12-28 12:32:59 +01:00
Juergen Spitzmueller
37f41fd4b5 Support for command argument placement after the workarea argument 2012-12-28 11:21:24 +01:00
Juergen Spitzmueller
ad94e7bde7 This hack seems to be no more needed. Let's see... 2012-12-28 09:47:58 +01:00
Vincent van Ravesteijn
9d85e59c8c Fix typo 2012-12-27 11:36:51 +01:00
Juergen Spitzmueller
258280cecf Do not force latex_language in arguments (bug #8471) 2012-12-27 11:05:39 +01:00
Richard Heck
2e764c2c66 Respect InsetLayout's PassThru setting in XHTML export. 2012-12-24 12:11:51 -05:00
Juergen Spitzmueller
7af6a7b910 fix latexArgInsets for sequences qith nested paragraphs 2012-12-24 13:02:24 +01:00
Juergen Spitzmueller
7c9254b723 LFUN_ENVIRONMENT_SPLIT: simplification 2012-12-24 11:22:23 +01:00
Juergen Spitzmueller
3e8bfd8bd6 Convenience LFUN to split an environment 2012-12-23 18:57:32 +01:00
Juergen Spitzmueller
3934f4a36f In multi-par sequences, check for arguments in all pars 2012-12-23 17:37:50 +01:00
Juergen Spitzmueller
0dd741e4da Load babel with English-only documents (bug 8423) 2012-12-23 11:34:38 +01:00
Enrico Forestieri
25e4bf4b27 Fix bug #8467: "Corrupted NFSS tables" error when Cyrillic character in an equation 2012-12-22 23:06:18 +01:00
Juergen Spitzmueller
483b99193f Support for beamer \frametitle
The \frametitle command is less convenient to use than the \frame argument, but it provides more options (overlay/action and short title). We thus provide this additionally to the option, like beamer itself does.
2012-12-22 16:28:43 +01:00
Juergen Spitzmueller
a8b81312b3 There is no good reason to disallow nesting of bibliography 2012-12-22 12:07:29 +01:00
Juergen Spitzmueller
b0aa0db10a Bump layout format 2012-12-22 11:39:04 +01:00
Juergen Spitzmueller
4f36061811 Proper support for beamer overprint environment
This has a list-like structure (with \onslide item commands). The previous implementation was rather useless, since it required lots of ERT. Since the new implementation is so different, we use ERT for conersion/reversion.

The lyx2lyx routines are not yet perfect, though.
2012-12-19 19:33:39 +01:00
Juergen Spitzmueller
c3aa718151 Make the \item command in lists customizable 2012-12-19 16:55:22 +01:00
Vincent van Ravesteijn
1b3871b302 Add custom target to run tests
This target can depend on the individual test projects and this makes sure
that the test projects are build before running the tests.
2012-12-17 22:26:14 +01:00
Vincent van Ravesteijn
bec9c1325e Introduce Layout::args() and simplify code 2012-12-17 22:26:11 +01:00
Vincent van Ravesteijn
8db4faa160 Move LengthCombo into namespace lyx::frontend 2012-12-17 21:38:57 +01:00
Vincent van Ravesteijn
92dff25c30 Fix whitespace 2012-12-17 21:38:55 +01:00
Vincent van Ravesteijn
d87c43d1b9 The first include must be <config.h> 2012-12-17 21:38:53 +01:00
Juergen Spitzmueller
e5ebe17b92 AutoInsert option also for flex insets 2012-12-17 13:32:40 +01:00
Georg Baum
01a6d4252b Full delimiter support for llbracket and rrbracket
stmaryrd.sty sets these symbols up as variable size math delimiters (i.e.
they may be used with \left and \right). Now LyX knows about that and offers
them in the delimiter dialog as well as single symbols.
2012-12-16 15:49:42 +01:00
Georg Baum
8838648858 Add script for automatic toolbar image creation.
Manually created toolbar images are needed in many cases, but for simple
symbols automatically generated ones are better than nothing.
2012-12-16 14:44:18 +01:00
Juergen Spitzmueller
dd21e57bd3 Option to auto-insert a paragraph style option, particularly useful for specific mandatory arguments (such as beamer block or frame titles) 2012-12-16 13:37:14 +01:00
Georg Baum
3d4da7fa61 Do not call tex2lyx in roundtrip mode for tests 2012-12-15 17:47:09 +01:00
Juergen Spitzmueller
dcaab11b09 Correctly handle environment sequences in TOC
Only the first paragraph in those sequences goes into the TOC, since the environment is merged.

This is needed to handle the forthcoming beamer environments properly in the outliner.
2012-12-15 16:50:08 +01:00
Kornel Benko
9f7c8be6d7 Cmake build tex2lyx testing:
To please Georg:
1.) Do _not_ use globbing to get test file
2.) Do not evaluate stderr output of tex2lyx
2012-12-15 15:38:48 +01:00
Georg Baum
f67cf6f4bb Add support for stmaryrd.sty (bug #8434)
The stmaryrd package adds support for lots of math symbols, using a font
designed to accompany the computer modern fonts. The changes in detail:

- Fix generate_symbols_list.py to work with stmaryrd.sty. It loooks like it
  was automatically translated from a perl version and never used.
- Generate the new symbols in lib/symbols using generate_symbols_list.py and
  add some manual adjustments
- Generate stmary10.ttf by a simple ttf export from stmary10.sfd with fontforge
- Add license info for stmary10.ttf
- Create a test file with all symbols from stmaryrd.sty. Actually it would be
  nice to have this for the other fonts as well.
- The mechanics: lyx2lyx, tex2lyx, font machinery etc.
2012-12-15 13:10:31 +01:00
Vincent van Ravesteijn
3a96ef6dca qt5: add/remove some includes 2012-12-15 11:11:55 +01:00
Vincent van Ravesteijn
ce8d52f813 qt5: Use Qt::WindowFlags instead of Qt::WFlags 2012-12-15 11:07:35 +01:00
Vincent van Ravesteijn
6e227f18ae Fix a crash in PreviewLoader for command-line xhtml output
While exporting from the command-line, theApp() doesn't exist.
The colors foreground and background are only needed when
previewing, so ignore this during buffer export.

This replaces the fix in 4285b0b3 (Tommaso Cucinotta, 10-12-2012).
In this case, we do not need to pull in Qt dependencies.
2012-12-15 11:05:55 +01:00
Vincent van Ravesteijn
752f2e4811 Revert "While exporting from the command-line, theApp() doesn't exist."
This reverts commit 4285b0b316.
2012-12-15 11:05:21 +01:00
Vincent van Ravesteijn
e78e987649 Revert "Cmake build: Make PreviewLoader.cpp compilable again"
This reverts commit 0a2c70636a.
2012-12-15 11:05:09 +01:00
Vincent van Ravesteijn
0cd8c03d17 CMake: Put projects into subdirs
This patch puts all projects into subfolders (at least for MSVS). In this
way, there is a better overview (especially if the number of test projects
will be increasing).
2012-12-15 11:02:06 +01:00
Kornel Benko
892e237fe1 Cmake build: Testing
Make this all more the cmake way
2012-12-15 00:15:59 +01:00
Kornel Benko
78470fba03 Cmake build: tex2lyx
Retrieve and name the test-cases with a globbing expression
2012-12-14 19:47:43 +01:00
Kornel Benko
2b66f1b1ac Split roundtrip tests (at least on cmake build)
to show better grained output
2012-12-14 19:07:28 +01:00
Kornel Benko
8c0ca33295 Roundtrip test. Forgotten in previous commit 2012-12-14 13:33:56 +01:00
Kornel Benko
c3256a2d52 Roundtrip test corrected, due to changes of tex2lyx (less emty lines) 2012-12-14 13:31:21 +01:00
Jean-Marc Lasgouttes
275b889501 tex2lyx: there is no need to have a blank line after \begin_layout
I think it used to be the case in LyX, but not anymore. Removing this extra line helps to do lyx>tex>lyx roundtrip analysis
2012-12-14 12:50:46 +01:00
Jean-Marc Lasgouttes
f775add258 Whitespace only 2012-12-14 12:33:39 +01:00
Kornel Benko
81500fc99b Cmake build:
Move definitions of target ${_lyx} and ${_tex2lyx} to top-most directory,
to make them overall available
2012-12-14 12:23:17 +01:00
Stephan Witt
2bd5b250c4 use correct format string for alert message 2012-12-13 22:23:06 +01:00
Kornel Benko
96dd1363a2 Cmake build: all tests
1.) Rename tests to show their grouping
2.) Adapt the roundtrip tests to new lyx-format
2012-12-13 15:35:04 +01:00
Kornel Benko
0a2c70636a Cmake build: Make PreviewLoader.cpp compilable again 2012-12-12 20:42:58 +01:00
Tommaso Cucinotta
4285b0b316 While exporting from the command-line, theApp() doesn't exist.
It was only needed for getting hex names of colors. So, get them
directly from a ColorCache object with default mapping.
2012-12-12 19:22:42 +00:00
Scott Kostyshak
1954458817 Keep outer tabular borders when delete row/column
Fix #4981:
If the first or last column is deleted, the borders are preserved.
Similarly for the last row, but not for the first row.  Selections are
supported.

Based on a patch by Zahari Dimitrov.
2012-12-12 04:04:39 -05:00
Scott Kostyshak
4b706051b7 Fix a bug when selecting a cell in InsetTabular
Fix the following bug:
When in tabular, enter "ab" in a cell. Place the cursor before "b". Hold
shift and press <right>, then (still holding shift) <right> again. On
the second <right> nothing appears to happen.

Related to #1802.
2012-12-12 03:46:12 -05:00
Scott Kostyshak
5cc1adf7c7 Fix another selection bug in InsetTabular
Fix #4981:
In tabular if a vertical selection is made with the keyboard (e.g.
LFUN_UP_SELECT), the selection is drawn if there are two cells selected.
Previously, the selection would be drawn only if there were more than
two selected.
2012-12-12 03:44:17 -05:00
Scott Kostyshak
776e66688f Fix a selection bug in InsetTabular
If you have a selection across cells in tabular, moving the cursor
vertically up or down (e.g. LFUN_UP) now removes the drawn selection.
Before, the selection was set to false but it was not repainted.
2012-12-12 03:43:53 -05:00
Jean-Marc Lasgouttes
146b754f1d Fix crash related to undo and continuous spell checking
The cursor member new_word_ should not be saved in undo.
Move it from CursorData to Cursor.
2012-12-11 10:14:47 +01:00
Juergen Spitzmueller
e93f4d470d Possibility to specify a preset argument
This will be needed for beamer plain and fragile frame support.
2012-12-10 14:09:51 +01:00
Juergen Spitzmueller
625e25264b Consider filtering when selecting from categorized combo (#8452) 2012-12-10 12:52:23 +01:00
Juergen Spitzmueller
99ee47f0cd Disallow the insertion of multiplenon-item arguments of the same type in a sequence of merged environment pars 2012-12-10 09:19:56 +01:00
Juergen Spitzmueller
25ef8e7eef Allow to separate menu string from label string for arguments 2012-12-09 19:15:41 +01:00
Juergen Spitzmueller
d073cfb458 Support for beamer block arguments (#3280) 2012-12-09 17:19:21 +01:00
Georg Baum
99ffb47cc3 Replace some hard coded numbers with names
And prevent a crash if LaTeX is accidentally output for a math font.
2012-12-09 13:05:19 +01:00
Juergen Spitzmueller
30b53ba4a0 beamer revision, part 1: support for overlay arguments 2012-12-09 11:04:56 +01:00
Juergen Spitzmueller
906a473e57 Do not force Flex insets to be collapsed at insertion (#8442) 2012-12-08 09:35:52 +01:00
Jean-Marc Lasgouttes
0425500be5 Set window title correctly at start up 2012-12-05 22:46:29 +01:00
Richard Heck
ae7bc12ab6 Disentangle moduleCanBeAdded for ordinary layout modules and the
new (but not yet functioning, it seems) citation modules. This
fixes a bug reported on the list:
  http://marc.info/?l=lyx-users&m=135456590710371&w=2
2012-12-05 11:16:21 -05:00
Richard Heck
255ca92be2 Minor formatting stuff. 2012-12-05 10:49:35 -05:00
Juergen Spitzmueller
1f720826d6 Fix InsetCaption::getArgument (subfigure problems reported by Kornel, but also listings caption) 2012-12-04 17:06:52 +01:00
Juergen Spitzmueller
a84a98b545 Also add support for URW Garamond math fonts (via newtx) 2012-12-04 12:55:47 +01:00
Juergen Spitzmueller
53626a8beb tex2lyx updates for the recent format change 2012-12-04 12:20:34 +01:00
Juergen Spitzmueller
52c2fb81e9 Support for the URW Garamond LaTeX fonts 2012-12-04 12:14:26 +01:00
Juergen Spitzmueller
39ec866f68 make \lyxadded and \lyxdeleted robust (#8435) 2012-12-03 13:55:20 +01:00
Vincent van Ravesteijn
fdee77a6b5 Fix monolithic build 2012-12-02 15:50:45 +01:00
Juergen Spitzmueller
df7f2a074f Fix greyedout notes UI color (#6682) as good as it gets ATM 2012-12-02 10:41:49 +01:00
Juergen Spitzmueller
2b40823d8e Implement resetArgs to InsetLayout (#8437) 2012-12-02 10:16:26 +01:00
Juergen Spitzmueller
d7e0798ade Fix argument status detection for InsetText 2012-12-01 11:49:24 +01:00
Juergen Spitzmueller
ee0860e403 Fix shaded box UI color (#7395) as good as it gets ATM 2012-11-30 17:11:07 +01:00
Juergen Spitzmueller
ecf18084ff allow linebreak in argument delimiter string 2012-11-30 09:13:38 +01:00
Juergen Spitzmueller
3931331b56 update tex2lyx test files 2012-11-30 09:08:54 +01:00
Juergen Spitzmueller
1500e44cba Support for \item arguments 2012-11-29 15:34:20 +01:00
Juergen Spitzmueller
a7f8fb8c5f Provide option to force a local language switch where a global is not allowed (fixes #8033) 2012-11-28 20:55:21 +01:00
Juergen Spitzmueller
9b589ba9d9 Don't know how this slipped in 2012-11-28 19:13:22 +01:00
Juergen Spitzmueller
53002538fa Pass local font to arguments and assure pass_thru is inherited 2012-11-28 19:02:07 +01:00
Jean-Marc Lasgouttes
4f6c0b5202 Fix # 8414: Use the noweb module instead of literate-* article layouts
Now that we have module support for literate programming, it is possible to do a noweb cleanup. This is basically a patch from Kayvan Sylvan:

- get rid of literate-xxx classes
- rename Scrap to Chunk, since this is the name noweb doc uses (Scrap is from nuweb)
- update lyx file format and add lyx2lyx support for gettting rid of literate-xxx classes
- update documentation

On the top of it, update tex2lyx to
- avoid creating files with literate-xxx class
- fix conflict between parsing << as a quote and parsing it as a Chunk
- create Chunk layouts instead of Scrap ones.
2012-11-28 14:11:47 +01:00
Juergen Spitzmueller
4d1b495139 LaTeXParam and Argument do not necessarily exclude each other 2012-11-26 13:09:54 +01:00
Juergen Spitzmueller
41014dec49 Merge branch 'master' of git.lyx.org:lyx 2012-11-26 09:10:34 +01:00
Juergen Spitzmueller
e0f392e075 Allow for some argument visual customization 2012-11-26 09:10:14 +01:00
Uwe Stöhr
7725e35439 IEEEtran: update layout and example; fileformat change
- the 2 generic lyx2lyx conversion routines can also be used for other layout updates
2012-11-26 02:50:53 +01:00
Juergen Spitzmueller
9c4929ca40 Merge branch 'master' of git.lyx.org:lyx 2012-11-25 19:10:40 +01:00
Juergen Spitzmueller
6f086763ae Add LeftDelim and RightDelim to the Style and InsetLayout repertoire 2012-11-25 19:10:16 +01:00
Georg Baum
89c60f388a guard against dereferencing null pointers 2012-11-25 19:07:57 +01:00
Juergen Spitzmueller
b1ce750589 allow arguments in PassThru insets 2012-11-25 18:13:57 +01:00
Juergen Spitzmueller
bf83ca75ef Further fixes for InsetLayout argument (for environments and empty latex names) 2012-11-25 17:29:08 +01:00
Juergen Spitzmueller
07a01f40f9 Add author 2012-11-25 17:28:03 +01:00
Georg Baum
f952882bc8 Update tex2lyx tests to new file format 2012-11-25 12:42:40 +01:00
Pavel Sanda
ad42e885e6 Rescue monolithic build after 32fde61c8f. 2012-11-24 17:48:47 +01:00
Juergen Spitzmueller
4b4e9560d1 Fix splitting of layout string 2012-11-24 16:46:44 +01:00
Juergen Spitzmueller
a41bdfa453 Missing pieces for InsetLayout arguments 2012-11-24 15:46:20 +01:00
Richard Heck
1252c22fd3 Some minor cleanup of new InsetArguments stuff that I did while
reading the patch....
2012-11-23 20:40:38 -05:00
Juergen Spitzmueller
182d13ee6a Do not separate the shortcut from the label string 2012-11-23 18:26:02 +01:00
Juergen Spitzmueller
9914f21bce Context menu for InsetArgument 2012-11-23 14:44:45 +01:00
Juergen Spitzmueller
32d2e30e3d Increase Layout format also in the source 2012-11-23 10:27:30 +01:00
Juergen Spitzmueller
99f84aab95 Merge remote-tracking branch 'origin/master' into features/latexargs 2012-11-23 09:11:55 +01:00
Jean-Marc Lasgouttes
7ec2721d18 Show status of branches even when inset is closed 2012-11-20 23:39:16 +01:00
Juergen Spitzmueller
34ef91bb70 Allow arguments in PassThru environments (bug #7646) 2012-11-20 19:00:06 +01:00
Juergen Spitzmueller
b95c17cfdd Merge remote-tracking branch 'origin/master' into features/latexargs
Conflicts:
	src/Text3.cpp
2012-11-20 18:11:14 +01:00
Juergen Spitzmueller
aafd52f441 Merge branch 'master' of git.lyx.org:lyx 2012-11-20 18:10:18 +01:00
Juergen Spitzmueller
d3488d6f86 Whitespace 2012-11-20 18:09:38 +01:00
Juergen Spitzmueller
99e611b2d8 Allow arguments in PassThru environments (bug #7646) 2012-11-20 16:58:51 +01:00
Juergen Spitzmueller
0f866762b2 Fix function disabling 2012-11-20 15:48:59 +01:00
Juergen Spitzmueller
a4feac9d0b Whitespace 2012-11-20 15:25:58 +01:00
Juergen Spitzmueller
973481a4ff typos 2012-11-20 13:30:52 +01:00
Juergen Spitzmueller
4309dd54c7 extend comments and fix caption argument conversion 2012-11-20 12:58:36 +01:00
Juergen Spitzmueller
49b738bdfd Some documentation 2012-11-19 18:44:59 +01:00
Juergen Spitzmueller
fffc46a4f7 Workaround to let tex2lyx handle the new argument syntax. This needs to be implemented properly (proper argument number) 2012-11-19 15:50:43 +01:00
Juergen Spitzmueller
2e69c66195 InsetArgument revision, first working version 2012-11-19 14:21:02 +01:00
Uwe Stöhr
63295f9dc5 Font.cpp: fix bug #8424
We must group the content which should be changed in size wit a pair of braces because the LaTeX size commands are otherwise switches. We already do so for many case, but not for the case that a size command is inside another command. This patch adds now always a brace pair around the selected text which is the safest method.
2012-11-19 01:13:37 +01:00
Pavel Sanda
4375b44dd6 Comment some headers before I ditch them again. 2012-11-18 17:42:32 +01:00
Georg Baum
9d99d3dbea Implement extractFromVC() for CVS and SVN.
Both cvs and svn are able to retrieve non-existing files from repository,
but this was only implemented for rcs. This is a prerequisite for the
planned move and copy VCV operations. I also improved error schecking and
used extractFromVC() also for files specified on the command line if they
do not exist (in GUI mode, it was already the case in non-GUI mode).
2012-11-15 22:01:19 +01:00
Georg Baum
b07383b026 improve documentation 2012-11-13 21:53:13 +01:00
Georg Baum
393e7924bd Add missing VCS updates after filename changes 2012-11-13 21:52:38 +01:00
Georg Baum
56e3d2153f Get rid of redundant CVS/SVN file_ member
It did always point to the buffer's file name, so it is not needed and it was
not used in most cases anyway. Instead, ensure that owner_ is always set and
cannot be changed later.
2012-11-13 21:44:36 +01:00
Uwe Stöhr
b53243295a unicode.cpp: make it compile again
the removal of this header in [ea1d9cb3/lyxgit] was too much
2012-11-13 00:27:46 +01:00
Pavel Sanda
8d135a9819 Typeinfo needed in Ubuntu. 2012-11-12 13:06:22 +01:00
Enrico Forestieri
cabf8e86b5 Make it compile again on systems that don't USE_WCHAR_T 2012-11-12 12:11:42 +01:00
Pavel Sanda
ea1d9cb39f Less headers in unicode.
Now lets wait for the scream from people on other compilers.
2012-11-12 03:20:50 +01:00
Pavel Sanda
d692d6f27e Less headers in docstring. 2012-11-12 03:05:30 +01:00
Pavel Sanda
2257040be4 More headers from lstrings. 2012-11-12 03:02:28 +01:00
Pavel Sanda
7cda6b9d57 Header no more needed. 2012-11-12 02:45:29 +01:00
Jean-Marc Lasgouttes
2e25a65c25 Revert "Correctly clean lyxclient.cpp in monolithic build."
Sanda has been faster than me... See 39e23a.

This reverts commit 1b74d3e729.
2012-11-06 20:48:51 +01:00
Jean-Marc Lasgouttes
1b74d3e729 Correctly clean lyxclient.cpp in monolithic build. 2012-11-05 14:28:26 +01:00
Pavel Sanda
d7ed0ba7e4 Autosaving is now always threaded. 2012-11-04 16:51:18 +01:00
Pavel Sanda
4f24d123b2 Next leftover. 2012-11-04 01:38:34 +01:00
Pavel Sanda
eb9151c599 Close tab button started with 4.5. 2012-11-04 01:37:54 +01:00
Pavel Sanda
38c836f65d Leftover. 2012-11-04 01:29:08 +01:00
Pavel Sanda
4a0911f25e Header sorting. 2012-11-04 01:26:11 +01:00
Pavel Sanda
0a9735c5f7 LyX 2.1 will support only Qt>=4.5.
(http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg175737.html)

Now start with simple cases.
2012-11-04 01:22:32 +01:00
Pavel Sanda
39e23a8c5c Let lyxclient.cpp be cleaned by make clean.
I would wait with backporting for 2.0.6.
2012-11-03 23:58:33 +01:00
Pavel Sanda
f47215c5e7 * doxy 2012-11-03 19:08:37 +01:00
Kornel Benko
d91d6e3343 Cmake build:
Cleanup the use of path-variables
2012-11-02 13:33:22 +01:00
Kornel Benko
854b168d17 Cmake build:
Correct dependencies for version-info also at build-time
(not only at configure time)
2012-11-01 13:00:19 +01:00
Lars Gullik Bjønnes
6b2232a29c src/*.cpp: reformatting to increase consistency 2012-10-28 17:42:07 +01:00
Lars Gullik Bjønnes
76a5f726a7 InsetLine.cpp: add <cstdlib>
This fixes a problem introduced in bc51243587
2012-10-28 09:20:59 +01:00
Lars Gullik Bjønnes
bc51243587 insets/InsetLine.cpp: use std::abs
Use std::abs in stead of std::max(v, -v).
2012-10-27 01:25:39 +02:00
Lars Gullik Bjønnes
d52c9fda34 Use new T not new T() 2012-10-27 01:25:38 +02:00
Lars Gullik Bjønnes
43f6b1672b Use empty() to check empty and non-empty'ness not size()
Also add FormatList::empty().
2012-10-27 01:25:38 +02:00
Lars Gullik Bjønnes
62394258da WS cleanup, remove extraeneous spaces 2012-10-27 01:25:38 +02:00
Lars Gullik Bjønnes
b6a626d8d9 Buffer.cpp: drop unused <stack> 2012-10-27 01:25:38 +02:00
Georg Baum
78a7743166 Import theorems correctly (bugs #5702, #5776)
Actually tex2lyx can handle modules since some time (#5702), but not
theorems (#5776). Now the following issues are fixed:
- Modules that depend on other modules can be loaded, since the dependencies
  are loaded first
- Default moduls of the text class are loaded correctly
- \newtheorem is recognized as a command that defines new environments and
  treated similar to \newenvironment
2012-10-26 22:23:16 +02:00
Lars Gullik Bjønnes
dd2189656b More idiomatic way of checking if a shared_ptr has an associated managed object 2012-10-25 12:12:49 +02:00
Kornel Benko
1b65a03c13 Cmake build: cleanup 2012-10-25 11:19:09 +02:00
Kornel Benko
d1ca207e94 Cmake build:
Next try to create Resources.qrc on the fly.
This time using a cmake-script instead of trying to rebuild the cache
2012-10-25 10:45:28 +02:00
Juergen Spitzmueller
7c6ae4d740 Update tex2lyx test files 2012-10-25 07:47:42 +02:00
Lars Gullik Bjønnes
46a5f60d3d Merge branch 'enable-cxx11' 2012-10-25 00:45:20 +02:00
Lars Gullik Bjønnes
54d1cb1880 support/Messages.cpp: add space to not be taken as user defined literal
In C++11 you are not allowed to have non-literal specifiers right
after a string literal.
2012-10-24 23:46:42 +02:00
Georg Baum
02b1c4aa51 Fix test targets for some build trees
The old targets only worked if the build tree was below the source tree.
2012-10-24 22:11:05 +02:00
Juergen Spitzmueller
08375b191c update TODO 2012-10-24 20:21:09 +02:00
Lars Gullik Bjønnes
abc81db388 src/lyxfind.cpp: use local typedef to simplify
Use a local typedef pair<string, string> P to avoid having to repeat
that multiple times.
2012-10-23 23:48:35 +02:00
Lars Gullik Bjønnes
48bba7fb74 src/lyxfind.cpp: use make_pair
Use make_pair(...) instead of pair<T, U>(...).
2012-10-23 23:48:25 +02:00
Lars Gullik Bjønnes
cf193344d0 src/lyxfind.cpp: cleanup formatting
Remove some eol space
re-indent where required
make some ?: constructs a bit easier to read.
2012-10-23 23:48:25 +02:00
Lars Gullik Bjønnes
435fad1463 src/Format.cpp: use make_pair
Use make_pair(...) instead of pair<T, U>(...).
2012-10-23 23:48:25 +02:00
Georg Baum
ecf24f1cb5 Add xfig import test 2012-10-23 22:09:26 +02:00
Georg Baum
b8648dea16 Implement tex2lyx -m switch (bug #8393)
With this new command line switch a list of modules can be loaded
unconditionally. This seems to be needed for the literate programming formats,
and it is useful to work around bug #5702 as well.
2012-10-23 20:45:21 +02:00
Georg Baum
8c0c28e485 Update tex2lyx manpage
Add forgotten options and remove a commented paragraph that is no longer
needed since bug #5907 is closed as WONTFIX.
2012-10-22 21:31:26 +02:00
Tommaso Cucinotta
0e81930597 Fixed bug in escape sequence, showing up with ignore format off (addressing #8380). 2012-10-22 01:05:29 +01:00
Juergen Spitzmueller
db1c1389e3 Add support for the URW Classico (Optima) LaTeX font
Patch by Liviu Andronic
2012-10-21 18:55:24 +02:00
Kornel Benko
f7680c696d Cmake build:
Added dependencies to target `test'. Now all the needed executables
are recreated prior to running tests if not already existant.
2012-10-21 16:58:45 +02:00
Kornel Benko
ed5dfa9cd7 Cmake tests:
Add tests the cmake-way. Now there is only _one_ target `test'
2012-10-21 12:05:50 +02:00
Kornel Benko
1822a10639 Cmake build:
Supply the correct path to created executable (use ${CMAKE_CFG_INTDIR})
2012-10-20 15:27:30 +02:00
Georg Baum
fbabfdfa46 Add -skipchildren command line switch (bug #4435)
This allows to skip generated files, e.g. an alternative xfig export which
we do not understand, as mentioned in bug #4435.
2012-10-18 22:01:32 +02:00
Georg Baum
33c3e63f40 Forgot to remove obsolete comment 2012-10-18 20:57:03 +02:00
Georg Baum
75ba5d3db5 Add automatic color package loading for listings
The listings inset does automatically load the color package if any parameter
contains \color. As mentioned in bug #8066 tex2lyx needs to be aware of this,
so the \usepckage{color} is automatically skipped in these cases.
2012-10-18 20:41:23 +02:00
Stephan Witt
a5317f6594 add QT_QTGUI_LIBRARY to link libraries of check programs to get access to QDesktopServices on Mac OS X 2012-10-16 22:36:23 +02:00
Kornel Benko
63ead2010d Cmake build: support tests
Next try to make it to work on APPLE (and maybe on WIN32)
a.) Create the needed data-dir at configure time
b.) Use different target names for executable and data created with them
2012-10-16 16:35:28 +02:00
Kornel Benko
419f32df91 Cmake build:
Creating LYX_DATE dynamically at configure-time caused unwanted recompilation
of the whole directories (src + src/tex2lyx) because all the relevant objects
were dependent of a common file (flags.make in case of "Unix makefiles") which changed
accordingly.
There is now a new include (lyx_date.h, with only one definition)

Nothing changes for automake, since in this case LYX_DATE is defined in config.h
2012-10-15 22:50:39 +02:00
Scott Kostyshak
250f60f36b Simplify LFUN_BUFFER_FORALL
buffer-forall only takes one parameter now, which is the LFUN to
dispatch on all non-hidden buffers. A hidden buffer is defined as being
internally open in LyX, but not visible in any window (view).

Thanks, JMarc.
2012-10-15 10:05:20 -04:00
Kornel Benko
3a5c0f66a0 Sorry, this line disappeared unintentionally in previous commit 2012-10-15 13:30:19 +02:00
Kornel Benko
24206e2c67 Cmake build:
Partially revert 75d63ad1f2
It caused recompiling everything at each commit.
Now use definition of LYX_DATE only when compiling version.cpp
2012-10-15 13:16:08 +02:00
Stephan Witt
593276f87d MenuTranslator::translate() should be const 2012-10-14 14:36:18 +02:00
Stephan Witt
70ff68b580 Inset::setMouseHover() is const - InsetExternal::setMouseHover should be const too 2012-10-14 14:34:46 +02:00
Stephan Witt
de6ff1fec2 correct format for unsigned long argument, remoteCloseLink is oneway void 2012-10-14 14:30:47 +02:00
Stephan Witt
318f6b39b7 add missing argument for log message 2012-10-14 14:29:01 +02:00
Stephan Witt
652ed30e92 correct unsigned integer compare operations 2012-10-14 14:28:19 +02:00
Kornel Benko
20359572ed Patch from Benjamin Piwowarski
Just some comments on the patch:

- The executable name has to match the information in Info.plist (development/MacOSX/Info.plist.in and CMakeLists.txt).  The autoconf config/lyxinclude.m4 file has been modified to make it work with autotools.

- The process to build OS X bundle is to first add all the files to be included to the bundle when calling add_executable (src/CMakeLists.txt) and then by calling setting the source file property of each of these files (development/cmake/Install.cmake, l.14) so that the files are properly located into the bundle. This is also why Install.cmake has to be included two times in src/CMakeLists.txt (once to build the list of files, once to set the location of the list of files).

- in CMakeLists.txt there is a line
install(CODE "set(BU_CHMOD_BUNDLE_ITEMS 1)")
What it does is to fix the owner permissions within the bundle - this is necessary because some libraries are copied within the bundle and might be owned by root

- An empty qt.conf is included in the bundle so that QT does not try to link to other QT libraries (which will not be included in the bundle)

- In development/cmake/Install.cmake, some OS X specific files (*.sdef, qt.conf, *.icns) have to be included in the bundle

Benjamin
2012-10-13 09:53:20 +02:00
Vincent van Ravesteijn
9547725c38 Disambiguate std::bind, boost::bind, std::ref, boost::ref (2)
This fixes compilation with MSVC2012.

See also [2b0a7a5e/lyxgit].
2012-10-12 21:29:57 +02:00
Vincent van Ravesteijn
926bb4b41a support/tests: Fix compilation on Windows 2012-10-12 21:24:03 +02:00
Juergen Spitzmueller
47673f560f Correctly initialize bool. Thanks, Pavel. 2012-10-11 12:55:43 +02:00
Jean-Marc Lasgouttes
06f394a3d4 Show keyboard binding when a layout selection is done in LayoutBox
The obnoxious messages in Private::setFilter cover any message set by lyx::dispatch. The solution I chose is to return early when the filter is not changed.

If this makes sense, then the same optimization should be added to CategorizedCombo, IMO.
2012-10-11 00:21:38 +02:00
Richard Heck
98656dd15b Bump layout format to 40, in preparation for conversion of layout
categories.
2012-10-10 13:22:54 -04:00
Kornel Benko
648e197021 Cmake build: Define for 'DEVEL_VERSION' already done in development/cmake/config.h.cmake 2012-10-09 22:45:12 +02:00
Kornel Benko
acddee2465 Cmake build: Define for 'DEVEL_VERSION' already done in development/cmake/config.h.cmake 2012-10-09 22:43:24 +02:00
Juergen Spitzmueller
c85135090e Stick to bformat 2012-10-09 16:12:32 +02:00
Juergen Spitzmueller
81bc1c1ff4 Fix widget relation 2012-10-09 10:16:38 +02:00
Juergen Spitzmueller
006b50b222 Really put uncategorized items at the end if sortCats is true 2012-10-09 08:51:39 +02:00
Juergen Spitzmueller
be5965ae91 remove unneeded header and declaration 2012-10-09 07:36:17 +02:00
Juergen Spitzmueller
b4dd69ee83 GUI for categorized text classes 2012-10-09 07:22:48 +02:00
Juergen Spitzmueller
32fde61c8f Add new CategorizedCombo widget
This is a combo box that provides categorization and on-the fly filtering.

Heavily derived from LayoutBox (same look and feel).
2012-10-09 07:19:55 +02:00
Juergen Spitzmueller
f18af303fe Introduce textclass categories
The categories are ascribed by \DeclareCategory{<category>} in the layout file header.
UI follows.
2012-10-09 07:17:36 +02:00
Vincent van Ravesteijn
2b0a7a5e01 Disambiguate std::bind, boost::bind, std::ref, boost::ref
This fixes compilation with MSVC2012.
2012-10-08 21:29:40 +02:00
Vincent van Ravesteijn
3bc9cbcdc8 Do not rely on make_pair converting string to FileName
This fixes compilation with MSVC2012.
2012-10-08 21:29:32 +02:00
Georg Baum
53694874f3 Make tex2lyx tests almost compilable
If the original tests cannot ve compiled with latex/pdflatex/xelatex it is
difficult to compare the visual output.
2012-10-08 21:23:11 +02:00
Juergen Spitzmueller
04d39dd5be Proper string translation 2012-10-08 17:04:02 +02:00
Scott Kostyshak
4ab8e4a009 Add tab with build information to Help > About LyX
The tab displays the same information as the 'lyx --version' command.
2012-10-07 11:30:58 -04:00
Juergen Spitzmueller
e55aa4359f Do not check for LaTeX fonts if we use nonTeXFont 2012-10-06 15:51:35 +02:00
Georg Baum
269a942294 Fix wrong parsing of \framebox[3in][s]{...}
s is a valid horizontal position for framebox (as well as for makebox, which
was already parsed correctly). There was even a test case, but with a wrong
reference.
2012-10-06 15:23:36 +02:00
Georg Baum
e119ba6094 Refine tex2lyx -copyfiles logic.
Now all files are copied if the resulting path is valid.
Before the regressions tests would fail depending on the build directory
location.
2012-10-06 13:55:25 +02:00
Georg Baum
23d7d6449f Set CJK document language instead of adding a note.
Instead of annoying the user with an automatically created note in the output
document which she needs to delete manually, determine the document language
automatically for documents that use CJK. This is done using a heuristic which
roughly counts the number of characters in each language and sets the one that
is used most often. This is not perfect, but it works for the two major use
cases: A document with only some CJK parts (in this case the babel language is
used), and a document which is mainly written in one CJK language. It is only
a minor problem if the heuristic is wrong, since the TeX export is still
correct, and there is no spell checking support for CJK anyway.
Now all regression tests do pass except for some relative path issues
depending on the location of the build directory.
2012-10-06 09:38:14 +02:00
Georg Baum
8863ac62aa Really output file format 444
The previous output was read correctly by LyX as well, but the new version is
more similar to the files written by LyX. Also update TODO with recent file
format changes.
2012-10-06 00:29:16 +02:00
Georg Baum
fce4f66718 Acknowledge additional \lang command 2012-10-05 23:58:16 +02:00
Georg Baum
c85228432c Update file format of test references 2012-10-05 23:50:28 +02:00
Georg Baum
87641e506e Fix typo 2012-10-05 23:44:21 +02:00
Georg Baum
28dc8a77ee Fix regression introduced in commit 7cfac95
Commit 7cfac95 got rid of empty lines that were created by removing \usepackage
statements. However, it added an additional newline in case the \usepackage
was not at the end of the line. This is now fixed.
2012-10-05 22:16:46 +02:00
Juergen Spitzmueller
63612ca99b Restore buffer parenthood if we exit already after the preamble 2012-10-05 19:26:07 +02:00
Juergen Spitzmueller
e6afdf1b2b Prevent the PreviewLoader from orphaning children 2012-10-05 18:28:38 +02:00
Kornel Benko
ce649ca9fd Added check for support tests in cmake build.
New target: checkregfiles
This will create the regfiles and compare with the data in source.
2012-10-05 16:56:29 +02:00
Juergen Spitzmueller
b6ecb3213b Add master's perspective in children's source preview 2012-10-05 14:30:20 +02:00
Juergen Spitzmueller
08157b5050 Merge branch 'master' of git.lyx.org:lyx 2012-10-05 10:00:13 +02:00
Jean-Marc Lasgouttes
4729b1c35d Fix make check target
A dummy getGuiMessages function was missing. Instead of adding it everywhere, a new file is created that contains all the dummy functions needed by the tests.
2012-10-05 11:55:23 +02:00
Juergen Spitzmueller
2fa840b771 Do not let the children's buffer params leak into the master (#5941) 2012-10-05 09:59:44 +02:00
Georg Baum
2f7f0c7631 Really fix bug #4468.
The old fix was incomplete (\verb~\~ was translated to \verb~~ in roundtrip).
The real cause for this bug (and also the mistranslation of \href{...}{\}})
was the misbehaviour of Token::character() (see comment in Parser.h): This
method even returns a character if the category is catEscape, and this is not
wanted in most (all?) cases.
2012-10-05 00:12:18 +02:00
Georg Baum
5afe35cc59 Compile tex2lyx before running tests 2012-10-04 22:29:43 +02:00
Kornel Benko
66cb259a96 tex2lyx tests adapted to cmake build 2012-10-03 17:04:00 +02:00
Georg Baum
d56295bcdf Add make target to update tex2lyx test references
Now "make check" does not overwrite the test references anymore, use the
updatetests target instead. "make check" now also recognizes test failures.
2012-10-03 15:23:09 +02:00
Georg Baum
adcd2281af Add evaluation for tex2lyx regression tests 2012-10-03 15:01:54 +02:00
Georg Baum
133ceaf0d4 Support out of source tests in tex2lyx test runner 2012-10-03 13:59:20 +02:00
Georg Baum
24181cf28e Add -copyfiles command line option to tex2lyx
If this option is given, included files will be copied to the output directory.
Also -roundtrip is now allowed with given output file.
-copyfiles is useful if you want to ensure that no file (not even an included
one) is overwritten by a subsequent export from LyX. Both changes are needed
for unit tests that do not write to the source directory.
2012-10-03 13:23:27 +02:00
Juergen Spitzmueller
02c73cd721 Do not let the parent interfere when I child document is exported/view standalone (#8100, #8101) 2012-10-03 10:41:07 +02:00
Juergen Spitzmueller
e3e6befc54 Ronen's patch for lfun language set
This adds an optional 'set' argument to the language lfun and reintroduces toggling.

Additions by me reintroduce the possibility to reset to the document language via 'language reset' or just 'language'
2012-10-03 07:27:36 +02:00
Scott Kostyshak
3b9c75ce27 Make text selectable in Help > About LyX > Version
This might encourage users to post this information when reporting bugs
and sometimes it's useful to be able to copy the paths of the Library
and User directories.
2012-10-02 05:39:57 -04:00
Tommaso Cucinotta
ad827243fc Adding preferences format update as due to commit 4985015 (new close_buffer_with_last_view option). 2012-10-01 22:30:13 +01:00
Pavel Sanda
536a0b44b7 Move layout editor zombie to attic. 2012-10-01 17:14:34 +02:00
Juergen Spitzmueller
f881835da2 Ask for saving changes when branch state in child was altered 2012-10-01 12:37:16 +02:00
Juergen Spitzmueller
31c7ccd4b3 Trigger preview when inserting preview inset on selection 2012-09-30 18:36:22 +02:00
Juergen Spitzmueller
3588f2f696 Context menu item to add unknown branch (rest of #7643) 2012-09-30 17:32:00 +02:00
Juergen Spitzmueller
fab7d42608 Whitespace 2012-09-30 16:27:11 +02:00
Juergen Spitzmueller
6f4b2dd4b0 Whitespace 2012-09-30 16:12:52 +02:00
Georg Baum
ccd3ecf1e9 Fix tex2lyx path handling for relative file names
The input and output file names of tex2lyx may be relative. In this case,
getMasterFilePath() and getParentFilePath() return relative paths as well.
Now the file name translation logic for all kinds of included files can
cope with that.
2012-09-30 15:06:18 +02:00
Juergen Spitzmueller
e26635bfb9 UI for separate control of master/child branch state (#7642, part of #7643) 2012-09-30 14:59:24 +02:00
Enrico Forestieri
bb67e670ef Make some strings translatable again.
These strings were inadvertently broken in [4985015e/lyxgit].
2012-09-30 00:42:55 +02:00
Pavel Sanda
86473d5556 Bump LFUN format for LyX 2.1 2012-09-29 20:06:39 +02:00
Pavel Sanda
5d9c14a322 Realign numbering. 2012-09-29 18:52:52 +02:00
Pavel Sanda
074277baf1 Next zombies found: LFUN_GETBUFNAME, LFUN_LINEATCURSOR, LFUN_LO?VIEW. 2012-09-29 18:40:48 +02:00
Pavel Sanda
49a9d3ad63 Kill LFUN_HFILL_INSERT zombie. 2012-09-29 18:34:38 +02:00
Pavel Sanda
541828ebf5 Another witch hunting case: break-paragraph -> paragraph-break. 2012-09-29 18:06:42 +02:00
Pavel Sanda
d1297047e7 Move similar LFUNs to one place. 2012-09-29 17:42:27 +02:00
Pavel Sanda
e9a28c8000 Correct naming for view-split. 2012-09-29 17:33:46 +02:00
Pavel Sanda
a72b75c50c Proper naming for tab-group-close. 2012-09-29 17:16:52 +02:00
Juergen Spitzmueller
c9f9107a7f Fix issues with xref dialog in read-only documents (#8177) 2012-09-29 16:12:31 +02:00
Juergen Spitzmueller
0b2c308a68 sort table 2012-09-29 16:11:09 +02:00
Tommaso Cucinotta
4985015e89 Now LyX closes the current document WA only by default (other WAs remain open).
If the WA is the last one showing a buffer, then the buffer may either be
closed or kept hidden, or the user is asked. The behaviour is controlled
by a new preference option.
For discussion, see http://comments.gmane.org/gmane.editors.lyx.devel/142638
2012-09-28 23:12:38 +01:00
Juergen Spitzmueller
5801ee2f9a validate encodable characters in href inset (#8357) 2012-09-28 09:27:39 +02:00
Pavel Sanda
c1e9632beb Remove leftover from 16fd47ad8f.
Catch by Kayvan Sylvan.
2012-09-28 01:09:23 +02:00
Georg Baum
a08c693f90 Add test for Parser::getFullArg()
It shows that the special handling of a single backslash in the argument
(whcih is supposed to fix bug #4468) does not work.
2012-09-25 22:25:55 +02:00
Stephan Witt
e0787e839f C++ style to avoid compiler warning for non-NLS implementation of Messages::available 2012-09-25 16:20:43 +02:00
Juergen Spitzmueller
1d84423e76 A font a day keeps the doctor away: Support for the Biolinum LaTeX font 2012-09-25 11:07:33 +02:00
Juergen Spitzmueller
398b1a450a properly validate unicode-math 2012-09-24 13:56:37 +02:00
Juergen Spitzmueller
8bf5d4b461 Very basic support for unicode-math
With non-TeX fonts, you can select a 'Non-TeX Font Default' math font, which simply loads unicode-math without actually selecting a math font, this then uses the default math otf font, currently Latin Modern. Other fonts still need to be set manually in the preamble, via \setmathfont.

The implementation suppresses unneeded package requests from unicodesymbols, but the output still uses macros instead of full unicode (both is possible with unicode-math).

The whole thing is a proof of concept, and it needs to be tested. I have tested it with the math manual, which compiles and seems to display correctly if I remove some hardcoded package loadings. OTOH I have not much experience with math.

This addresses #7449 partly.
2012-09-24 13:19:25 +02:00
Juergen Spitzmueller
909963fd5a thinko: if we have requires, do not test package 2012-09-24 08:41:44 +02:00
Uwe Stöhr
237cb51fb1 GuiTabular.cpp: don't rely on a string but on the combobox data
It was not safe in changeset 9d05ac5c to search for a text because it can be translated, better search for the data, thanks Pavel for spotting
2012-09-24 02:10:21 +02:00
Juergen Spitzmueller
ba1d137769 Support for the NewTX Math fonts (newtx, libertine, minion) 2012-09-23 18:33:04 +02:00
Juergen Spitzmueller
a41dcb5768 Recognize Provides from math fonts 2012-09-23 17:40:44 +02:00
Vincent van Ravesteijn
a1bda4e045 Fix bug #8296: Crash when clicking on completion in math
When the user clicks on the completion, the completion disappears. This
means that we have to fix the cursor before setting it.
2012-09-23 16:44:22 +02:00
Stephan Witt
273ebbef19 avoid deprecated functions on Mac - use Qt instead 2012-09-23 16:06:56 +02:00
Stephan Witt
f1ab5dfc58 remove unnecessary Carbon include 2012-09-23 16:06:56 +02:00
Stephan Witt
5a9aa21350 correct Messages class implementation for non-NLS 2012-09-23 16:06:56 +02:00
Stephan Witt
404ef2467c moving Reconfigure to LyX menu does not work 2012-09-23 16:06:55 +02:00
Juergen Spitzmueller
5170489b98 More no-math fonts
For the sake of completeness, it is now also possible to load fourier and the mathdesign fonts without changing the default math font.
2012-09-23 12:30:19 +02:00
Vincent van Ravesteijn
29e64597d0 Fix bug #6389: Make columns RTL in RTL document 2012-09-22 23:15:53 +02:00
Vincent van Ravesteijn
6b8ed2fa1d Initialize toolbar pop menu button on start
In 0aead96461 it was introduced that the toolbar popup menu buttons are not
initialized until they are being used (i.e. pressed at for the first
time). As a consequence, these buttons are always enabled on start. Now
that we have the sticky button for view and update, I'm now annoyed by
this every time I start LyX.
2012-09-22 23:15:51 +02:00
Vincent van Ravesteijn
0a2024139f InsetIPAMacro: Fix warnings about conversion from double to int 2012-09-22 19:21:00 +02:00
Juergen Spitzmueller
8f9898994d Basic UI for math (TeX) fonts
This addresses #6543 by adding an option to prevent fonts such as Palatino and Times to automatically adapt the math font (IOW it lets you load the text font only for a bunch of fonts where this is easily possible).

Furthermore it adds an interface to select a specific math font, which is defined in latexfonts. Currently, this is only euler (the only one I know), but if there are other math-only tex fonts, they can be added easily (but note that this changes the file format).

Non-TeX math fonts are not yet supported. Eventually, unicode-math support can use the existing UI, but this is not on my agenda.
2012-09-22 17:44:00 +02:00
Juergen Spitzmueller
89df1de885 No need to pass these 2012-09-22 12:14:24 +02:00
Juergen Spitzmueller
a5151c92a9 Much more flexible implementation of alternative (LaTeX) fonts
The LaTeX font now do not specify simply alternative packages or packages for OT1 encoding etc., but they refer to complete AltFonts (which are not directly accessible via the GUI). This way, alternative fonts can also have options (osf, sc etc.), and they can use all sorts of initializing methods (\usepackage, \setrmfamily etc.).
2012-09-22 10:59:53 +02:00
Juergen Spitzmueller
e2173f14ec Follow Lars' advice 2012-09-20 16:24:59 +02:00
Pavel Sanda
13dfbd1927 Simplify translation string. 2012-09-20 13:35:53 +02:00
Juergen Spitzmueller
e9ca6b6bf4 Support for the Minion Pro LaTeX font 2012-09-19 17:46:55 +02:00
Juergen Spitzmueller
f4261030e2 Implement Provides tag to LaTeXFonts
This allows to suppress conflicting packages, such as amssymb with mathdesign.
2012-09-19 15:46:19 +02:00
Juergen Spitzmueller
4517c6f9a5 Do not propose existing labels 2012-09-19 10:20:19 +02:00
Juergen Spitzmueller
86cccf1077 Do not update refs on new label creation (#8147)
This assures that refs to existing labels are not being touched if a new label with a duplicate name is created, and the name then changed by the duplicate checker.

Branch candidate.
2012-09-19 10:14:56 +02:00
Juergen Spitzmueller
f5b4cd90a3 Merge branch 'master' of git.lyx.org:lyx 2012-09-17 11:36:47 +02:00
Juergen Spitzmueller
6bf00d9fed rc.preview and rc.display_graphics are completely unrelated (bug 7562) 2012-09-17 11:36:29 +02:00
Jean-Marc Lasgouttes
538570a1e5 Fix bug #8342: Endless undo group messages
Fix thinko in Undo::endUndoGroup.
Do not reset undo groups in Undo::clean

The underlying problem remains: the various VC functions should not
always reload the buffer or at least should use the parameter
clearUndo=false.
2012-09-17 11:24:39 +02:00
Scott Kostyshak
51c380440b Constify some catches and others 2012-09-17 04:05:34 -04:00
Juergen Spitzmueller
ec078bd29d Do not search for empty string 2012-09-17 09:32:47 +02:00
Juergen Spitzmueller
e8a01d099a Calibrate log file parser
Filenames embraced in <...> can occur anywhere on the line and multiple times. This fixes for me the case that graphics included via ERT were not tracked. It probably also fixes #8336.

This is a candidate for branch.
2012-09-17 08:59:41 +02:00
Juergen Spitzmueller
ba792c4d35 Clarify the logic of fragmental file name checking
No change in functionality.
2012-09-17 07:37:49 +02:00
Scott Kostyshak
80c126b092 Typos
Clean up some comments, LFUN documentation, an error message,
and lyx --help output.
2012-09-12 19:38:26 -04:00
Scott Kostyshak
58dd5698ac Fix some typos for LFUNs.lyx 2012-09-12 18:52:16 -04:00
Uwe Stöhr
66e650e5da InsetTabular: fix resetting reset decimal alignment
If no special alignment is set the default is center not left - my mistake
2012-09-13 00:41:57 +02:00
Uwe Stöhr
b64d17e9dc GuiTabular.cpp: don't hardcode decimal align combobox item 2012-09-11 23:51:50 +02:00
Uwe Stöhr
6f157533a1 fix multirow/column logic in table dialog
GuiTabular.cpp: a cell can either be a multicolumn or multirow, not both the same time, this is already respected by the toolbar and context menu, only the dialog allowed to set this although this was correctly never applied

should also go to branch
2012-09-11 21:58:13 +02:00
Scott Kostyshak
4c1d45aac9 -help, -version, & unqualified -dbg now go to cout
Makes output consistent with other programs and allows for piping that
is more user-friendly.
2012-09-11 01:22:23 -04:00
Scott Kostyshak
1451c7cf66 Get rid of a Qt-generated stderr message
The stderr message "Object::disconnect: Unexpected null parameter"
often appeared when closing and opening buffers.
GuiView::on_currentWorkAreaChanged should not pass a null pointer
to Object::disconnect.
2012-09-10 23:18:22 -04:00
Uwe Stöhr
9d05ac5c91 Fix UI for decimal table alignment (bug #8285)
Fixes 2 issues:
1. LyX uses for a decimal alignment a multicolumn and having for a cell a multicolumn _and_ a multirow is invalid LaTeX.
2. It was impossible to unset a decimal alignment via the context menu or toolbar button.
2012-09-11 02:10:29 +02:00
Jean-Marc Lasgouttes
740c83637d Correctly initialize a member variable
This has be diagnosed by valgrind, I do not know how important it is.
2012-09-08 16:59:19 +02:00
Jean-Marc Lasgouttes
7a7b9abf1b Tracking correctly available translations (take 2)
The previous scheme of loading all possible translations and checking
whether the work is a bit too much "brute force" and causes problems
on Mac OS X (documents loaded with the wrong language).

Now there is an helper static method in Messages class that checks
whether a readable .mo file exist for the language. There should be an
API in gettext for doing that, but alas it is not possible.

As a consequence the method Language::translated() has been removed,
along with its cache.
2012-09-08 16:59:19 +02:00
Jean-Marc Lasgouttes
a86de5d3c0 Revert "Read list of translated languages from a file"
This reverts commit ed1515ef69.
2012-09-08 16:59:18 +02:00
Enrico Forestieri
91afc2430d Protect underlined \ref{} commands by enclosing them in \mbox{}.
This is the same protection used for \cite{}. Although "ulem" commands
don't strictly need this protection with \ref{} and friends, this helps
when one wants to use another package souch as "soul".
Indeed, ulem's \uline{} doesn't hyphenate words, while soul's \ul{} does,
and thus the output is much nicer.

With this patch, replacing ulem with soul is as simple as adding
\usepackage{soul}
\renewcommand{\uline}[1]{\ul{#1}}
to the preamble, without worrying about manually enclosing in \mbox the
\ref commands. In any case, the output from ulem remains unchanged.

Another possibility offered by soul is that of typesetting as
"yellow highlighted" the underlined text. This is achieved by adding
\usepackage{color,soul}
\renewcommand{\uline}[1]{\hl{#1}}
to the preamble.
2012-08-30 14:09:23 +02:00
Juergen Spitzmueller
458c143e49 Fix forward search with okular
Implement a placeholder 2008f which points to the tex file with full path, since this is what okular expects nowadays.
2012-08-26 11:42:43 +02:00
Juergen Spitzmueller
719ec62e28 Fix thinkos in LaTeX font reading 2012-08-25 10:48:37 +02:00
Juergen Spitzmueller
2a22d999b2 Implement plaintext for tie bars 2012-08-24 10:12:17 +02:00
Juergen Spitzmueller
706c5d25de Fix documentation 2012-08-23 17:47:12 +02:00
Juergen Spitzmueller
ee1fc9130a Add support for some basic non-unicoded IPA macros
We now support everything on the IPA chart via the toolbar
2012-08-23 17:42:53 +02:00
Juergen Spitzmueller
b6a63bfce8 An IPA toolbar
Translators: sorry ;-)
2012-08-21 14:56:34 +02:00
Juergen Spitzmueller
042a1c4d3b Make tipa shortcuts work for combining chars 2012-08-21 12:48:34 +02:00
Enrico Forestieri
f251e01892 Fix bug #8305: ^ symbol does not render into upward arrow when using mhchem
The mhchem package treats the caret both as a shorthand for \uparrow or
as a superscript operator according to whether it is surrounded by
spaces or not. The \ce and \cf insets allow inserting spaces but there
is no provision for inserting a space after the caret, which is always
considered by LyX as a superscript operator. The solution here is to
insert a space after the caret if the superscript is empty or an empty
brace inset.

Mathed does not allow empty superscripts, so an empty brace has to be
inserted when working in LyX. On the other hand, when importing latex
code, an empty superscript is retained.

This has no effect whatsoever for normal latex code, as a space after
the caret is ignored. In any case, the output is only changed if an
empty brace inset is used as superscript. Specifically, the output is
changed from "^{{}}" to "^ {}".
2012-08-21 01:30:51 +02:00
Jean-Marc Lasgouttes
3a99e351d9 Merge branch 'master' of git.lyx.org:lyx 2012-08-20 17:39:25 +02:00
Jean-Marc Lasgouttes
6a936d63d3 Fix crash with undo in nested insets introduced by commit 6ec1683
The code in DocIterator::sanitize now follows more closely the
previous StableDocIterator::asDocIterator code. In particular, it adds
the slices one by one, since fixIfBroken will chop the cursor
otherwise.
2012-08-20 17:20:59 +02:00
Juergen Spitzmueller
c235e73301 Merge branch 'master' of git.lyx.org:lyx 2012-08-20 09:32:04 +02:00
Juergen Spitzmueller
1267319117 The tipa tone macro requires the tone package from the tipa bundle 2012-08-20 08:52:42 +02:00
Stephan Witt
4674c3e1c5 Patch from Benjamin Piwowar - see ticket #8185:
In order to interact with native osx applications, AppleScript support is a plus.
Here is a patch that makes LyX respond to a simple command (run) and that allows to communicate with LyX as with the LyX client.
Example of use:
	tell application "LyX" to run "server-get-filename" with argument ""'
returns
	message:/Users/bpiwowar/newfile1.lyx, code:0
with a message and the error code
2012-08-19 22:27:20 +02:00
Juergen Spitzmueller
66729e434e TIPA fixes 2012-08-19 16:59:53 +02:00
Juergen Spitzmueller
54c41ce26e Support for the TeX Gyre fonts (#4332) 2012-08-19 11:57:48 +02:00
Tommaso Cucinotta
0f97ae5480 Avoid that, if an error dialog pops up during a long operation, it freezes LyX. 2012-08-18 22:45:21 +01:00
Juergen Spitzmueller
b501845b2c Support for the mathdesign fonts (#6072) 2012-08-18 14:45:41 +02:00
Juergen Spitzmueller
6dd333b432 Add missing option commas 2012-08-18 13:29:14 +02:00
Juergen Spitzmueller
c409c9e3d1 Allow for general package options for LaTeX font packages (needed e.g. by mathdesign) 2012-08-18 13:10:34 +02:00
Juergen Spitzmueller
a9ad5c3337 Factor out duplicated code 2012-08-18 11:57:16 +02:00
Juergen Spitzmueller
924f71c792 Remove unused variable 2012-08-18 10:14:32 +02:00
Juergen Spitzmueller
03943ef730 Issue a warning if a LaTeX font is not available
Also output font in source preview notwithstanding availability.
2012-08-18 09:58:19 +02:00
Juergen Spitzmueller
292f48d6b5 Add support for the txtt font (#4979) 2012-08-17 18:24:18 +02:00
Juergen Spitzmueller
bfec6d2552 typo 2012-08-17 17:24:09 +02:00
Juergen Spitzmueller
37137f43f4 Support for the libertine font (#3881) 2012-08-17 14:11:02 +02:00
Pavel Sanda
f4fe5a8fa0 Another attempt at #8295.
This bug occur only at certain Qt versions and systems and we do
not really understand what is going on.

Quoting Stephan - the parent path of "." e.g. never should be ".".
The inconsistency between the name of FileName and the internal QFileInfo
state looks very dangerous.
2012-08-16 20:33:43 +02:00
Stephan Witt
2ecc895775 ensure VCS::checkparentdirs() starts with an absolute path (ticket #8295) 2012-08-16 13:47:27 +02:00
Juergen Spitzmueller
869b84aef9 Clean up LaTeX font handling (#4999)
The LaTeX font information are now centralized and outsourced. This removes a lot of hardcoding and duplication and makes it easier to support new LaTeX fonts.
2012-08-16 13:23:39 +02:00
Stephan Witt
4f1fb3f6d1 add debug messages to VCS::checkparentdirs (ticket #8295) 2012-08-15 17:50:24 +02:00
Juergen Spitzmueller
4950bb5ebc Comments 2012-08-08 17:23:02 +02:00
Juergen Spitzmueller
1db9ff9b1a Add a way to surpass special English treatment in useBabel
Normally, we do not load babel when English is the only language. However, if we check if babel is used from Font::validate, we need to surpass this test, else no secondary language is registered if English is the main language.
2012-08-08 17:02:12 +02:00
Juergen Spitzmueller
8f451fdbef Add missing breaks in switch 2012-08-08 11:27:37 +02:00
Juergen Spitzmueller
a18af62087 Complete default_language rc removal 2012-08-08 09:31:46 +02:00
Juergen Spitzmueller
2dd84b3417 Remove lyxrc \default_language which has been dropped from the GUI some time ago
The default language of new documents is set via the template
2012-08-07 08:29:46 +02:00
Juergen Spitzmueller
6d2ed04800 Decouple lyxrc-default_language from useLanguagePackage() 2012-08-07 08:00:42 +02:00
Richard Heck
166deba79b Wow, that last commit was dumb. So let's fix #8278 properly. 2012-08-05 17:31:00 -04:00
Richard Heck
2375982f7e Fix bug #8278, as suggested there by Ronen. 2012-08-04 17:33:47 -04:00
Stephan Witt
a9de2597ed Merge branch 'master' of git.lyx.org:lyx 2012-07-30 14:34:12 +02:00
Stephan Witt
430cf3ee5e Fix the wrong cursor move when forward flag is false:
The forward flag is used to place the cursor behind the replaced text if it's true.
But it's not correct to move the cursor if it's false. The cursor is in front of the
replacement already after the replaceSelectionWithString() was done.
2012-07-30 14:32:29 +02:00
Kornel Benko
ea76d6de95 Roundtrip tex2lyx, cmake-build:
1.) test.ltx, test.lyx.tex in build-dir (missed this one in previous commit)
2.) Added dependency to "lyx" to work on clean build dir too
2012-07-30 10:04:45 +02:00
Kornel Benko
6fa12b0971 Adapt tex2lyx roundtrip to cmake build.
Use build tree only.
2012-07-30 09:30:16 +02:00
Stephan Witt
44b3278006 Fix bug #8238: correct the forward argument of replace2string() in on_replacePB_clicked(). 2012-07-27 00:34:17 +02:00
Juergen Spitzmueller
b55a6454d9 Whitespace 2012-07-23 14:59:45 +02:00
Juergen Spitzmueller
0b5c20fc0f Fix direction of brackets in Hebrew when using Polyglossia (bug #8251) 2012-07-23 14:56:00 +02:00
Juergen Spitzmueller
6c1326cdeb Rework language package detection
This puts the diverse use[LangPack] function into one (less error-prone) function and differentiates the custom package from the babel case
2012-07-23 14:34:24 +02:00
Juergen Spitzmueller
508dd27e44 Fix thinko 2012-07-23 11:39:41 +02:00
Juergen Spitzmueller
566a5f2b75 Fixes to the language package call
* Assure that really no language package is called when none is selected.
* Only call global custom package if global is desired.
This is a candidate for branch as well.
2012-07-23 11:36:55 +02:00
Juergen Spitzmueller
a1e2e12ba4 Suppress babel RTL commands when using polyglossia (part of #8251) 2012-07-23 08:40:37 +02:00
Juergen Spitzmueller
f30d6acb04 Compile fix
Richard, please check.
2012-07-22 11:45:39 +02:00
Richard Heck
394e559ffc Add a FIXME about when the appendix should be enabled. 2012-07-21 14:19:10 -04:00
Richard Heck
894569e601 Fix a long-standing FIXME by resetting only the counter for top-level
sectioning when we see an appendix. This fixes bug #8271, whose root
cause was the fact that we were resetting all the counters inside ERT.
2012-07-21 14:19:10 -04:00
Jean-Marc Lasgouttes
6774176aab Implement new LFUN buffer-forall [<BUFFER-TYPE>] <LFUN-COMMAND>
This is a patch from Scott Kostyshak. See the thread here for some
background info:
http://thread.gmane.org/gmane.editors.lyx.devel/142300/focus=142362
2012-07-20 10:50:29 +02:00
Jean-Marc Lasgouttes
ed1515ef69 Read list of translated languages from a file
The previous scheme of loading all possible translations and checking whether the work
is a bit too much "brute force" and causes problems on Mac OS X (documents loaded
with the wrong language).

In the new scheme, autotools install a file lib/installed_translations that contains a list of installed languages (the .gmo files that got installed). This file is read
in Languages::readInstalledTranslations and allows to set the translated() property
of each language.
2012-07-19 00:21:28 +02:00
Jean-Marc Lasgouttes
c999e35e54 Make sure that undo is recorded when magic tricks are played with InsetBibitem.
Fixes bug #7111: Assertion with undo and InsetBibitem

  * add Paragraph::brokenBiblio(), with tells whether there is something to fix.
  * rename Paragraph::checkBiblio to fixBiblio; simplify it greatly by using
    InsetList methods
  * In TextMetrics::redoParagraph, call recordUndo before fixBiblio (only when
    there is something to fix obviously)

Special care is taken to update cursor only when it makes sense. Note
that there are cases where undo information is not recorded (current
cursor not in the slice where action happens)
2012-07-18 15:36:58 +02:00
Juergen Spitzmueller
4d5bef1bdc Add \makeat switches to babel settings if necessary.
Babel settings might contain @ characters. Check for this and wrap the settings into \makeatletter ... \makeatother switches if necessary (see discussion at #8265).
2012-07-18 12:41:53 +02:00
Jean-Marc Lasgouttes
467422f9df Do not kill the undo stack when doing a Save As...
The code does a reload on the buffer to avoid loose pointers if the
file changes directory. This commit adds a bool parameter to
Buffer::reload to allow for keeping the undo stack intact. This is of
couse only wanted in this case, not when reloading an earlier version
of the file.
2012-07-18 10:31:47 +02:00
Jean-Marc Lasgouttes
6ec1683aee Fix crash introduced in my previous commit f6b1c24b
Cursor::fixIfBroken does not do what I thought it did. Lift some code
from StableDocIterator::asDocIterator instead.
2012-07-17 22:26:44 +02:00
Jean-Marc Lasgouttes
e2b42b1726 Fix bug #8242: undo fails for longest label width
In the existing code for setting layout of pragraph parameters,
Text::undoSpan is used to "guess" which paragraphs should be saved in Undo.
With this patch the approach is more precise: before every explicit change
to a paragraph, a Cursor::recordUndo call is inserted. This is much more robust than trying to guess.

In particular, we do not look at depth changes at all, since they are now
handled in updateBuffer since #8159 has been fixed.
2012-07-16 23:39:24 +02:00
Jean-Marc Lasgouttes
02ce050fb8 Make the toolbar code less noisy when the session file is not found 2012-07-16 23:11:26 +02:00
Jean-Marc Lasgouttes
2e1c618824 Typo introduced in commit 16fd47ad. 2012-07-16 00:30:28 +02:00
Pavel Sanda
7b1b9823ff Add comment in lstrings.h 2012-07-15 23:25:58 +02:00
Jean-Marc Lasgouttes
16fd47ad8f Fix bug #7741: incorrect locale when starting R from LyX?
The goal here is to get rid of the old code that modified variables
LANGUAGE and LC_ALL, therefore creating the problems mentionned
in the ticket.

In the new system, there is no explicit "GUI" message handler, that
needs to be reset at each language change. Instead, getGuiMessages
calls getMessages with the correct parameter. This allows to simplify
greatly the code and to remove a lot of old cruft.
2012-07-15 22:22:10 +02:00
Jean-Marc Lasgouttes
f6b1c24b99 Fix bug #5204: Undo removes text selection
This commit does a bit more than fix selection, since it saves the full cursor state
in the undo stack. This means that undo now restores:
* the selection
* the current font
* transient mark (shall we keep this one?), logical position...

In order to do that, it introduces an intermediate class between Cursor and DotIterator: CursorData.
The new inheritance diagram is thus
  DocIteraator -> CursorData -> Cursor

CursorData contains all the members of Cursor that define the current position, but not the stuff
related to current view of dispatch mechanism. It may make sense in the future to move members
between CursorData and Cursor and to move some member functions to CursorData.

Now UndoElement uses CursorData for cur_before and cur_after, but not for the cell. The undo API uses
also CursorData instead of DocIterator.
2012-07-15 18:16:09 +02:00
Richard Heck
a0afcdb391 LFUN_CLOSE_TAB_GROUP does exactly the same thing as
LFUN_BUFFER_CLOSE_ALL if there's only one tab group open, so there's
no need to enable it in that case.
2012-07-14 22:13:40 -04:00
Richard Heck
5400ae0720 Fix bug #8160 by updating the dtd for MathML. 2012-07-10 18:07:07 -04:00
Richard Heck
17c5791454 Fix stupid typo. 2012-07-10 17:11:58 -04:00
Georg Baum
af322ba9b4 Make CJK.lyx exportable.
If there was an encoding set by the inputenc package, it must not be ignored.
Now all tex2lyx test cases can be exported to .tex again by LyX (although
there are still some differences in the .lyx output).
2012-07-08 22:35:22 +02:00
Georg Baum
c3731b25da Fix tex2lyx -roundtrip for XeTeX documents 2012-07-08 21:35:40 +02:00
Uwe Stöhr
f0335cef1e tex2lyx: fix a regression
Preamble.cpp: - partly revert [e1b181dd/lyxgit] because the math packages cannot by default be loaded as the user might have defined special commands
2012-07-08 21:32:26 +02:00
Georg Baum
840f6fda51 Don't stop testing after first error.
This was the reason why I forgot to update the last test file in the last
commit.
2012-07-08 20:52:26 +02:00
Georg Baum
45fd75fe96 Manually update test results to current format.
Now you can see the regressions without differences caused by real
fixes or file format updates.
2012-07-08 20:09:02 +02:00
Georg Baum
1c0bd0132c Add very simple tex2lyx regression test suite.
It is invoked by 'make check' (automake only, it would be nice if someone
could add it to cmake as well), or by calling

python src/tex2lyx/test/runtests.py <path to tex2lyx binary>

by hand. Currently, it does not compare the output (this comes later).
The added .lyx files are from tex2lyx around mid of april, so that you
can see the regressions of the current version if you run the test
yourself (simply run git diff afterwards).

The home made test runner is quite stupid, but better than nothing.
Feel free to improve it or replace it with something better, as long
as running it stays as simple as now.
2012-07-08 19:28:19 +02:00
Georg Baum
57a8ea32c0 Include the recently added test files in package 2012-07-08 18:12:26 +02:00
Uwe Stöhr
4e69b9bac5 tex2lyx/text.cpp: fix typos 2012-07-07 13:40:07 +02:00
Uwe Stöhr
fe5a4c8c81 tex2lyx: improve CJK handling
- tex2lyx/text.cpp:
 - fix bug that swallowed valid braces
 - the encoding is "Bg5" not "BIG5"
 - add and update comments

- CJK.tex: add an example for the Bg5 encoding
2012-07-07 13:37:26 +02:00
Uwe Stöhr
d8611f25f2 tex2lyx: remove some superfluous code
text.cpp: besides that eat_whitespace does nothing these calls would be wrong as whitespace is allowed as argument of the box commands
2012-07-06 23:35:33 +02:00
Uwe Stöhr
02b6586ad7 update a tex2lyx test file
box-color-size-space-align.tex:
 - add all possible math spaces
 - remove 2 invalid non-math spaces
2012-07-06 23:33:28 +02:00
Uwe Stöhr
487c8b5bd3 tex2lyx: update a command
Parser.cpp: improve a command as discussed
2012-07-03 00:39:41 +02:00
Juergen Spitzmueller
555ae019b8 update tex2lyx TODO 2012-07-01 14:48:20 +02:00
Juergen Spitzmueller
11f7efe2eb Set the appropriate quote style when switching the main language 2012-07-01 11:27:42 +02:00
Juergen Spitzmueller
837869452a Add quote style information to languages 2012-07-01 11:25:52 +02:00
Juergen Spitzmueller
507302b444 Whitespace 2012-07-01 08:38:54 +02:00
Uwe Stöhr
56f0e0c4fc tex2lyx/Parser.cpp: refine \verb handling 2012-07-01 02:12:56 +02:00
Uwe Stöhr
d10063fd20 polyglossia tex2lyx coding style improvement
- Preamble.cpp/:
 - move list definition out of anon namespace
 - declare lists and a function in the class

- text.cpp: remove the now already defined list
2012-07-01 01:47:39 +02:00
Uwe Stöhr
85c479f4e7 test-structure.tex: add checks for \verb 2012-06-30 15:29:53 +02:00
Juergen Spitzmueller
e903d0158e Whitespace
If someone can tell me how I can tell QtCreator to actually use tabs, not spaces, I would be most grateful (yes, I have set Tab Policy to Tabs Only in Prefs)
2012-06-30 13:45:58 +02:00
Juergen Spitzmueller
5eb9ece39e Properly escape splitindex shortcut and try to encode splitindex name properly (part of bug #8227) 2012-06-30 13:34:49 +02:00
Juergen Spitzmueller
51d591d168 Factor out method to get a properly encoded latex string 2012-06-30 13:30:48 +02:00
Uwe Stöhr
708979fb0e tex2lyx: whitespace only 2012-06-30 03:38:02 +02:00
Uwe Stöhr
80884330d1 tex2lyx: fix handling of \verb
- Parser.cpp: \verb can have any character as delimiter (except of ASCII letters) not only '+', therefore partly revert [3943b887/lyxgit] and fix it for all cases
2012-06-30 03:25:19 +02:00
Uwe Stöhr
85ef627eac fix mistake in tex2lyx testfile
- XeTeX-polyglossia.tex: Hebrew is used in the file and so it must be declared
2012-06-30 02:21:15 +02:00
Juergen Spitzmueller
0062538a54 Add some more characters that need to be escaped in labels etc. 2012-06-30 01:24:40 +02:00
Jean-Marc Lasgouttes
bbbc2b6541 Fix to #8159: Undo doesn't restore environment depth correctly
The idea is to record undo at the place where the document is modified:

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used (because updateBuffer is const but
   modifies the document, go figure).

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-29 15:25:47 +02:00
Jean-Marc Lasgouttes
c22334eb3b Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b.
2012-06-29 15:22:24 +02:00
Pavel Sanda
e43f9d3bbd Revert a6e42e5079.
Removing debug.h makes debugging via lyxerr<< twice as hard.
2012-06-28 20:52:20 +02:00
Juergen Spitzmueller
6de47fa873 fix bug #8209: polyglossia commands ignored partial source preview 2012-06-28 18:15:43 +02:00
Uwe Stöhr
2c9310d935 tex2lyx: fix a typo
tex2lyx/text.cpp: the encoding must be _set_ here
2012-06-27 23:58:16 +02:00
Uwe Stöhr
8f7195a251 tex2lyx: fix a logic mistake
Preamble.cpp: set missing begin position for the search; thanks Vincent for spotting
2012-06-27 23:18:02 +02:00
Uwe Stöhr
d1800d4d5a tex2lyx: reprivatize another variable 2012-06-27 22:48:22 +02:00
Uwe Stöhr
b6192b7c7f texlyx: re-privatize a variable as suggested 2012-06-27 22:32:36 +02:00
Uwe Stöhr
62db3d535d tex2lyx: fix some issues spotted by Vincent 2012-06-27 02:52:09 +02:00
Uwe Stöhr
4ab764c845 BoxUi.ui: revert unintended commit [a6e42e50/lyxgit] 2012-06-26 22:46:06 +02:00
Uwe Stöhr
a6e42e5079 removed unused includes
these files don't use the debug.h and also don't contain commented out debug code
2012-06-26 22:41:53 +02:00
Vincent van Ravesteijn
dfb8dc91c1 Update the button text of InsetInclude insets
The button text of InsetInclude insets shows whether the child document is
included or excluded from compilation. Changing this for a child document
in the document settings does not get reflected on screen. This patch
updates the button text on the updateBuffer() call.
2012-06-26 20:41:25 +02:00
Uwe Stöhr
2e8ed3b3b5 tex2lyx: support fontspec scale option
Preamble.cpp:
 - support the font scaling
 - improve coding style

text.cpp: - improve logic/coding style

XeTeX-polyglossia.tex:
 - add scaling
 - change document so that it is compilable using the Libertine font
2012-06-26 00:46:02 +02:00
Uwe Stöhr
d3bcdb24cc tex2lyx/text.cpp: fix bug #8223
LyX does not yet support \framebox without an option we therefore cannot use our parse_outer_box routine (this is only for supported boxes)
2012-06-25 22:58:21 +02:00
Vincent van Ravesteijn
8941e980b9 BufferParams: Remove superfluous '\n'
This extra '\n' seems to have been an unintended side-effect of d7eaaba9 (Juergen Spitzmueller, "support for CJK font argument"; Jun 5 2008).
2012-06-25 11:28:38 +02:00
Vincent van Ravesteijn
e20238e21f tex2lyx: Remove superfluous '\n'
Instead of adding the extra '\n' to tex2lyx, we should remove it from
BufferParams.cpp because it was introduced there unintendedly in d7eaaba9
(Juergen Spitzmueller; "support for CJK font argument"; Jun 5 2008).

This partly reverts commit c2810f922665c591a7c32d4c679e58e55132505a.
2012-06-25 11:26:20 +02:00
Jean-Marc Lasgouttes
2a13b02a94 Fix bug #8220: tex2lyx crashes on single-character commands
Fix commit [aa9fed93/lyxgit]: it is never a good idea to call substr(4) on a string without checking its length. Moreover, it is even better in this case to check that the first letters are "text" as the reminder of the code assumes...
2012-06-25 11:04:56 +02:00
Uwe Stöhr
66e3ac003f fix bug #8210
we need to store the document language from the beginning of the document in the context to be able to handle all kinds of language switch commands
2012-06-24 18:24:28 +02:00
Uwe Stöhr
8e7b5eebf0 update tex2lyx todo list
- Japanese is now supported as well as CJK
- also all XeTeX issues are now ironed out
- the support for ArmTeX has been dropped meanwhile
2012-06-24 18:20:19 +02:00
Uwe Stöhr
5ad84b9fbd support non-CJK Japanese for tex2lyx
We cannot know the exact encoding and thus con only assume one (the one that Koji uses for the docs) and output a not at the beginning
2012-06-24 18:10:36 +02:00
Uwe Stöhr
adb0d7f63f support synctex in tex2lyx.cpp
- tex2lyx/Preamble.cpp/h: handle \synctex and package srcltx
- tex2lyx/test/test-structure.tex: add \synctex
2012-06-24 16:59:21 +02:00
Uwe Stöhr
5d79cd531d tex2lyx/Preamble.cpp: fix a typo 2012-06-24 15:37:51 +02:00
Uwe Stöhr
e1b181ddd4 update tex2lyx header format really to fileformat 433
- tex2lyx/Preamble.cpp/h: not all new header definitions since fileformat 413 have yet been added to texl2yx, so do it now; also change some new default values
2012-06-24 15:29:32 +02:00
Juergen Spitzmueller
4c2ae219e1 whitespace 2012-06-24 15:15:31 +02:00
Uwe Stöhr
47f7d44747 fix bug #8215
Font.cpp: CJK parts must not have a closing brace because they are within an environment
2012-06-24 14:42:23 +02:00
Uwe Stöhr
e7d1e5b0c9 tex2lyx comment corrections
tex2lyx/Preamble.cpp, tex2lyx/text.cpp: add info about CJK languages
2012-06-24 14:39:57 +02:00
Juergen Spitzmueller
dac9ec0c13 Merge branch 'master' of git.lyx.org:lyx 2012-06-24 10:57:02 +02:00
Juergen Spitzmueller
5b374e0c29 do not output empty language switch commands (bug #8216) 2012-06-24 10:56:08 +02:00
Uwe Stöhr
a3f4f2d1e3 CJK support for tex2lyx
- support as best as possible; setting a document language is however not possible
- fixes bug #4377
2012-06-24 06:38:33 +02:00
Uwe Stöhr
3943b887a8 tex2lyx/Parser.cpp: fix bug #4468: single '\' are allowed in the special case of '+' as comment argument delimiter 2012-06-23 20:00:49 +02:00
Uwe Stöhr
d37bb54e7b - language: Kurmanji is since 2009 also supported by babel; no fileformat change necessary because Kurmanji is already covered by fileformat 432
- tex2lyx/Preamble.cpp: babel support for Kurmanji and remove comment residues of ArmTeX whose support was removed by fileformat 433
2012-06-23 18:56:10 +02:00
Uwe Stöhr
7a103ba6d7 tex2lyx/Preamble.cpp: remove a FIXME, the problem was only in trunk (bug #8211) and is now fixed 2012-06-23 16:57:22 +02:00
Juergen Spitzmueller
ca16190006 fix bug #8208: missing \end for polyglossia-only languages at buffer end 2012-06-23 15:44:25 +02:00
Juergen Spitzmueller
20d7e088fa less opaque bool naming and consistent use 2012-06-23 15:41:05 +02:00
Juergen Spitzmueller
f42c9e50df fix bug #8211: \setotherlanguage not set for non-babel languages 2012-06-23 13:50:40 +02:00
Uwe Stöhr
89b8f380cc tex2lyx/text.cpp: 2 typos 2012-06-23 05:20:39 +02:00
Uwe Stöhr
e31981a414 Merge branch 'master' of git.lyx.org:lyx 2012-06-23 04:29:16 +02:00
Uwe Stöhr
828f7171e8 - tex2lyx: support for the polyglossia language variants
- XeTeX-polyglossia.tex: simplifications, added some more testcases
2012-06-23 04:28:52 +02:00
Pavel Sanda
369e697352 Add hint for backward search (cf #8054) 2012-06-23 04:12:08 +02:00
Uwe Stöhr
f1f63fcad0 tex2lyx/text.cpp: whitespace fix 2012-06-23 00:53:35 +02:00
Uwe Stöhr
73f0f4dd6c - Preamble.cpp: handle \setxxxlanguage with options
- text.cpp: handle the commands \textxxx with options
- XeTeX-polyglossia.tex: add 2 more testcases
2012-06-22 17:19:46 +02:00
Uwe Stöhr
79352b9882 tex2lyx/XeTeX-polyglossia.tex: add a further test 2012-06-22 15:40:40 +02:00
Uwe Stöhr
46051b57ae XeTeX-polyglossia.tex: add missing \setotherlanguages 2012-06-22 04:43:33 +02:00
Uwe Stöhr
e8f4ce5726 tex2lyx/text.cpp: \lang is already handled by parse_text 2012-06-22 04:41:08 +02:00
Uwe Stöhr
aa9fed9322 - tex2lyx/text.cpp:
- bugfix for the parsing of polyglossia's paragraph environments
 - new support for polyglossia's language change commands \textxxx
- XeTeX-polyglossia.tex: add more testcases and add a missing \end
2012-06-22 03:41:00 +02:00
Uwe Stöhr
c695e5fb38 - FORMAT: notice fileformat change
- version.h: fix comments
2012-06-22 01:20:29 +02:00
Uwe Stöhr
1ea2abc77f drop support for ArmTeX as its non-standard armscii8 encoding was quite unusable in real life, use polyglossia/XeTeX instead as clean solution via Unicode; fileformat change; fixes the second part of bug #8026 2012-06-22 01:12:43 +02:00
Uwe Stöhr
8afad998ed LaTeXFeatures.cpp: polyglossia is only required if a language is not supported by babel _and_ also no other special package; patch by Jürgen, to fix the regression mentioned in bug #8026 2012-06-22 01:08:51 +02:00
Uwe Stöhr
dda1bfc949 tex2lyx/table.cpp: please Vincent as discussed 2012-06-21 13:14:16 +02:00
Uwe Stöhr
c00fd8f8be tex2lyx/table.cpp: fix bug #8204, also OK for branch or too late? 2012-06-20 23:24:35 +02:00
Pavel Sanda
35e4c1c9a6 Allow dead caron to be recognized in our key bindings.
This allows to workaround the problem in #8198 - on some systems
we get dead caron as a single character instead of whole combined
character. I suppose this has rather something to do with X settings
than LyX per se.
2012-06-14 12:44:16 +02:00
Jean-Marc Lasgouttes
92e3cc456f Make debug messages more readable
Shorten the file names output by LYXERR so that they start right after /src/.
2012-06-11 15:03:29 +02:00
Juergen Spitzmueller
4698ebd2b7 Let getOutputFlavor return the correct flavors for the latex varieties 2012-06-09 15:11:34 +02:00
Juergen Spitzmueller
f71a55a279 some less language hardcoding 2012-06-09 11:32:34 +02:00
Juergen Spitzmueller
f84c8c56f5 Whitespace 2012-06-08 20:31:20 +02:00
Juergen Spitzmueller
a2f32db171 avoid empty class options 2012-06-08 19:48:24 +02:00
Juergen Spitzmueller
785332f305 re-add change_adapter triggering 2012-06-08 19:21:30 +02:00
Juergen Spitzmueller
040fb73b9c Do not hardcode polyglossia-only languages 2012-06-08 12:54:57 +02:00
Uwe Stöhr
ceb180cebd GuiDocument.cpp: some languages only work with polyglossia, therefore enable non-TeX fonts when one of them is used as document language 2012-06-08 05:39:00 +02:00
Uwe Stöhr
2872f35a51 - FORMAT: document latest change
- tex2lyx/text.cpp: fix a comment
2012-06-08 02:42:22 +02:00
Uwe Stöhr
7eca5d94d1 - support a bunch of new languages (fileformat change)
- tex2lyx support for
  - fontspec fonts
  - polyglossia
2012-06-08 02:37:36 +02:00
Juergen Spitzmueller
a4ea17e0e9 Restore default output format after tex fonts switch (#8191) 2012-06-07 21:27:01 +02:00
Jean-Marc Lasgouttes
c7549c1b54 Fix bug #8027: Edit->Paste Special->... does not replace selected text
Delete the selection before all paste-like lfuns. This was previoulsy done
only for LFUN_PASTE, the others at best unset the selection.
2012-06-07 18:14:17 +02:00
Jean-Marc Lasgouttes
0ef36860c3 Handle sending a FuncRequest object to lyxerr
* Implement the corresponding operator<<

  * Use it in a couple new places
2012-06-07 17:21:49 +02:00
Richard Heck
9e678569ad Typo. 2012-06-06 18:20:02 -04:00
Richard Heck
b7ac2d69e7 Allow LyX format to be written to View>Source window. 2012-06-05 10:24:15 -04:00
Richard Heck
cfc43d772d Move TexRow stuff near where it is used. 2012-06-05 10:24:15 -04:00
Jean-Marc Lasgouttes
bcd6990eca Revert "Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly""
This is becoming crazy :)

This reverts commit 5b531b56ef.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
9a3b6733c0 Revert "Second tentative fix to #8159: Undo doesn't restore environment depth correctly"
Did not mean to commit that.

This reverts commit 8f01556236.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
992eae2524 Typos 2012-06-05 12:22:13 +02:00
Jean-Marc Lasgouttes
8f01556236 Second tentative fix to #8159: Undo doesn't restore environment depth correctly
In this version, the idea is to record undo at the place where the document is modified, which is definitely cleaner.

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-05 11:32:56 +02:00
Jean-Marc Lasgouttes
5b531b56ef Revert "Tentative fix to #8159: Undo doesn't restore environment depth correctly"
This reverts commit e3854bb59b.
2012-06-05 11:32:56 +02:00
Richard Heck
8b2aab9b3d Style. 2012-06-04 13:42:46 -04:00
Richard Heck
7ef8df460a Fix crash reported by Tommaso:
http://marc.info/?l=lyx-devel&m=133876924408431&w=2
The problem here is that the copy_params() routine in FindAndReplace.cpp
created a new DocumentClass, but it never updated its Buffer to reflect
that new DocumentClass. So its Paragraphs still contained points to the
Layouts in the old DocumentClass which, since ead697d4b6, gets garbage
collected once it is no longer needed. So the Layout doesn't exist, and
we crash.
2012-06-04 13:39:24 -04:00
Richard Heck
1078dba130 Fix crash reported by Scott. Forgot to change some pointers to
shared_ptr.
2012-06-04 13:04:26 -04:00
Jean-Marc Lasgouttes
ad7deaabeb Fix bug #7956: Assertion When Trying to Paste Into Table
For some unknown reason, the paste code likes to call Cursor::setSelection(), which is not appropriate here since we are not trying to set a selection at this point.
2012-06-04 17:05:43 +02:00
Juergen Spitzmueller
af59dffeda Add missing undo recording.
This adds a change of the printindex type (with multiple indices) to the undo stack and marks the buffer dirty on that action (bug #8182)
2012-06-03 10:31:38 +02:00
Richard Heck
ead697d4b6 Deal with memory issue reported some time ago in connection with DocumentClass
objects. The problem that led to the leak is that these objects can be held in
memory long after the Buffer that created them is gone, mostly due to their
use in the CutStack. So they were previously held in a storage facility, the
DocumentClassBundle. Unfortunately, they were now being created too often,
especially by cloning. It's not really a leak, because they're accessible, but
we weren't ever destroying them.

This new approach uses a shared_ptr instead.

Thanks to Vincent for pointing out const_pointer_cast.
2012-05-31 12:34:29 -04:00
Richard Heck
03da96e0f7 Minor cleanup: We should use the usual conventions for
InsetLayout names.
2012-05-31 12:24:08 -04:00
Richard Heck
be89d37bd4 Properly initialize variable. This should fix the problem
reported here:
	http://marc.info/?l=lyx-devel&m=133775786222603&w=2
by Scott.
2012-05-31 12:04:09 -04:00
Pavel Sanda
262c2e95a9 Tabular.ui: Moving Latex argument field to column section.
Forgotten patch from John Tapsell.

Documentation moved from UI to User Guide.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173987.html

This was here for ages, no need to rush into branch.
2012-05-31 15:36:33 +02:00
Pavel Sanda
f692181917 Fix #8180: Page break on current row can't be unchecked.
Patch from John Tapsell
2012-05-31 13:56:07 +02:00
Juergen Spitzmueller
ab3491adef Fix crash when removing last converter (bug 8178) 2012-05-29 14:21:29 +02:00
Juergen Spitzmueller
9fc92f783c Load bibtopic after hyperref (bug #8005) 2012-05-29 13:25:30 +02:00
Richard Heck
c1e3d795f6 A few more small optimizations noted along the way. 2012-05-28 18:21:22 -04:00
Jean-Marc Lasgouttes
a756403301 "Performance" fixes suggested by cppcheck
While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
2012-05-28 22:42:44 +02:00
Juergen Spitzmueller
6ddcfb87e4 Fix macro termination in IPA inset if next character uses a TIPA shortcut 2012-05-26 16:36:24 +02:00
Pavel Sanda
1b1f9d05d9 compile fix 2012-05-26 10:16:20 +02:00
Vincent van Ravesteijn
655a4f5515 Fix painting of hidden tabbar on gtk
When there is a single document open, the tabbar gets hidden. The only and selected tab is still visible though as a break in the line delining the tabwidget. To fix this we paint the tabwidget ourselves and remove the presence of the hidden tab.
2012-05-25 19:17:48 +02:00
Vincent van Ravesteijn
4c3a97d96e Fix bug #8170: Crash when client disconnects unexpectedly
When the socket does not exist anymore, we should not try to access it. In
trying to do so, std::map will create a new shared_ptr but this pointer
doesn't point at anything. To prevent this, we explicitly check whether
the socket is available.
2012-05-24 13:55:41 +02:00
Richard Heck
9d983562fe Style. 2012-05-23 08:53:14 -04:00
Vincent van Ravesteijn
d20cb73b87 Fix bug #8166: Crash on clicking away from empty last paragraph
This reverts the previous fix in [0a33374c/lyxgit] and fixes it
differently.

We always have to call 'notifyCursorLeaves', but we only have to make sure
that we call the 'fixIfBroken()' functions first.
2012-05-23 08:02:40 +02:00
Vincent van Ravesteijn
0a33374c0d Fix bug #8166: Crash on clicking away from empty paragraph
We rely on the 'or' operator to prevent us from calling
'notifyCursorLeaves' if one of the two cursors is broken. This doesn't
work when using the '|' operator. The compiler 'optimizes' the code in
such a way that we always call notifyCursorLeaves anyway. Using the '||'
operator fixes this.
2012-05-23 01:31:43 +02:00
Jean-Marc Lasgouttes
e3854bb59b Tentative fix to #8159: Undo doesn't restore environment depth correctly
The undo range is extended to encompass all the paragraph after the end that
are a non-zero depth. The reason is that these paragraphs may see their depth
reduced if the last paragraph sees its depth reduced.

Note that there is a memory cost, since we store paragraphs than may not be
modified in practice. This may matter for some pathological files (people
putting all their document at depth 1 for a weird reason?)

I tried to be careful, but this can introduce new bugs. Please test.
2012-05-22 22:18:34 +02:00
Pavel Sanda
255b218ce3 Just comment 2012-05-22 15:54:26 +02:00
Richard Heck
cd05753107 Forgot to change format in LyXRC.cpp. 2012-05-22 08:58:40 -04:00
Richard Heck
288c1e0faa Add "nice" flag for converters, addressing final problem with bug #4624. 2012-05-22 08:56:05 -04:00
Lars Gullik Bjønnes
fb3ecca01c TextMetrics.cpp: comment out addressBreakPoint function
Only user of this function is code that has been commented out, comment
out this function as well.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-05-20 11:08:20 +02:00
Juergen Spitzmueller
ab1434dce3 If a file is saved as, reset its master if it has any, thus preventing a crash (bug 8161) 2012-05-19 10:16:28 +02:00
Pavel Sanda
436cb86ff1 * doxy 2012-05-17 19:12:27 +02:00
Vincent van Ravesteijn
30475664d3 Allow an unnamed buffer to be saved with the same name
The check whether fname != oldname does not work for unnamed buffers.
Therefore, we check explicitly whether the Buffer that already exists with
the same name isn't really the buffer we are trying to save.
2012-05-14 15:26:51 +02:00
Richard Heck
d89158df2a We need to clean the HTML id before writing it. 2012-05-14 08:30:04 -04:00
unknown
b17250d7eb Fix bug #7641: Freeze when removing itemized first paragraph
Text::outerFont looks recursively for paragraphs before the current one
which has a lower depth. If such a paragraph cannot be found, depthHook
and outerHook return the current paragraph. As such, we end up in an
infinite loop. So, if we find a par_depth that was the same as the
previous one, we apparently can't find a suitable paragraph and we should
quit the loop.
2012-05-14 14:24:53 +02:00
Enrico Forestieri
93ebb7a863 Fix bug #7982: LyX does not work if working directory a hard disk drive like D:\
In this case, the working dir has already a slash at the end.
Appending another one would result in a path ending with a double slash,
which has a special meaning when used in TEXINPUTS (all subdirs would
be recursively scanned). So, avoid doing that.
2012-05-14 13:08:30 +02:00
Richard Heck
207d7e4ada Fix bug #8156.
We want the key as id, not the label (which is optional).
We also need a kind of namespace for the citation ids.
We should also clean the id tag before using it.
2012-05-13 14:00:44 -04:00
Richard Heck
319e35188a Style. 2012-05-13 13:40:22 -04:00
Georg Baum
de00ce40aa Forgot the test case for bug #8116. 2012-05-13 18:54:14 +02:00
Georg Baum
3ded1c8506 Fix bug #8116.
The string we parse as name may contain backslashes if \csname ... \endcsname
is used. Therefore we have to output it using asInput() instead of cs().
2012-05-13 18:41:51 +02:00
Vincent van Ravesteijn
6cf1847b31 New function BufferList::newInternalBuffer
This solves the problem that newBuffer() already use Buffer::isInternal
but there was no chance to set it yet.
2012-05-12 14:36:13 +02:00
Vincent van Ravesteijn
fa438c1699 Remove read_only parameter from newBuffer
This parameter defaults to false and it is never set to true. So, we can
better remove the parameter.
2012-05-12 14:35:04 +02:00
Richard Heck
f2fc334cd5 Whitespace. 2012-05-10 15:44:25 -04:00
Vincent van Ravesteijn
6df750aa18 TextMetrics::leftMargin(): Explain why the disabled code is wrong 2012-05-10 10:46:35 +02:00
Vincent van Ravesteijn
92ac678715 Fix bug #8152: Uneditable long rows for 'Right addresses'
As long as leftMargin() is not correctly implemented for
MARGIN_RIGHT_ADDRESS_BOX, we should also not do this here. Otherwise, long
rows will be painted off the screen and will not be editable.
2012-05-10 10:46:32 +02:00
Pavel Sanda
f78d74f40d Fix buddies in tabular dialog, patch from John Tapsell. 2012-05-09 12:22:40 +02:00
Pavel Sanda
ba88f39624 GuiViewSource - prevent null-pointer crash if backend format is not found.
Patch from John Tapsell.
2012-05-09 09:14:55 +02:00
Georg Baum
b86c984bf4 Disentangle amsmath and amssymb loading.
This is needed if you load a font package incompatible to amssymb manually
(see bug #5058).
2012-05-06 20:49:49 +02:00
Vincent van Ravesteijn
5279d5a8a5 Properly mark a buffer as internal
Checking the extension of the temporary filename doesn't work anymore
since the naming of temporary files was corrected.
2012-05-06 20:12:17 +02:00
Georg Baum
cd691081b4 Import table cells in turn environment.
This is a part of bug #8081: Translate cells in
\begin{turn}{number}...\end{turn} to native syntax.
2012-05-06 19:12:51 +02:00
Georg Baum
c90e02ff0d Import table cells in sideways environment.
This is a part of bug #8081: Translate cells in
\begin{sideways}...\end{sideways} to native syntax. The turn environment
comes in a later commit, since this one os suitable for backporting.
2012-05-06 18:47:53 +02:00
Georg Baum
7cfac958f2 Do not swallow newlines after \usepackage. 2012-05-06 17:37:09 +02:00
Georg Baum
c9f68139cb Do not swallow math comments in tex2lyx.
This is not needed, since LyX supports comments in math. Data loss with math
comments containing a backslash in LyX has been fixed as well.
The test case was found in bug #8104.
2012-05-06 16:48:44 +02:00
Pavel Sanda
4ce24954aa Strip gecos on Unix systems on user name only.
Patch from Scott Kostyshak.
2012-05-06 13:36:54 +02:00
Vincent van Ravesteijn
9541e6b851 Fix compilation
Compile fix for [b0b8e5f5/lyxgit].
2012-05-03 17:58:02 +02:00