Commit Graph

4363 Commits

Author SHA1 Message Date
Georg Baum
257edda49a Fix output of getCaptionAsPlaintext() 2013-03-15 21:16:40 +01:00
Richard Heck
3f748c79c3 Add a for_search member to OutputParams, and use it to limit what
work we do when calling plaintext() for the purpose of generating
material for the advanced search function.

Here again, not only were we parsing BibTeX files, since Julien's
(sensible) introduction of plaintext output for that inset, but we
were in fact writing (to disk) complete plaintext output for
included files every time we did such a search.
2013-03-12 12:45:15 -04:00
Richard Heck
872c71ffa6 Try again to fix Kornel's slowness problem. The previous attempt was
worth doing, as we were creating too much output for tooltips anyway.
But we need to ignore BibTeX insets altogether, as the collection of
the references, etc, is too slow.
2013-03-09 12:42:56 -05:00
Richard Heck
65b74b9a1d Fix bug #8580: Do not include material in the XHTML TOC that is not
also included in the output.
2013-03-08 16:38:45 -05:00
Richard Heck
86994bf753 Add a member to TocItem that tells us whether the item in question
is included in output.
2013-03-08 16:38:18 -05:00
Richard Heck
ecef54500d Introduce max_length parameter for plaintext() output routines,
so we can write a limited amount when using this for TOC and
tooltip output.

This should solve the problem with slowness that Kornel noticed,
which was caused by our trying to write an entire plaintext
bibliography every time we updated the TOC. We did that because
he had a bibliography inside a branch, and we use plaintext for
creating the tooltip that goes with the branch list.

Other related bugs were fixed along the way. E.g., it turns out
that, if someone had an InsetInclude inside a branch, then we would
have been writing a *plaintext file* for that inset every time we
updated the TOC. I wonder if some of the other reports of slowness
we have received might be due to this kind of issue?
2013-03-08 15:12:58 -05:00
Richard Heck
f6480263e5 Whitespace. 2013-03-04 18:12:11 -05:00
Richard Heck
e987952664 Fix stupid mistake that led to bug #8574. 2013-03-04 18:07:48 -05:00
Juergen Spitzmueller
41060c9723 Allow to specify default argument for layout/inset argments
This default argument is inserted iff no inset argument is present. This is useful particularly for mandatory arguments that need to have a sensible default value.
2013-02-24 11:29:21 +01:00
Richard Heck
c4bed8dbe8 Don't convert --- and -- to entities in XHTML listings output.
Fixes bug #8561.
2013-02-21 18:12:53 -05:00
Richard Heck
eb90ac0988 Do not try to load or copy included files when we are in a comment
or doing a dryrun. We skipped some of this before, but not all of it,
which led to bug #8557.
2013-02-21 11:38:36 -05:00
Richard Heck
99402cd09c Don't hardcode listings but use InsetLayout. 2013-02-08 09:48:48 -05:00
Richard Heck
f623ded109 Fix bug #7948 by not hardcoding XHTML info for captions but instead
using InsetLayout.
2013-02-08 09:30:31 -05:00
Richard Heck
7821022ca0 Fix bug #7947 by using InsetLayout rather than hardcoding things. 2013-02-08 09:19:09 -05:00
Richard Heck
1b7d812e51 Fix really silly logic error. This should make prettyref-based
files work better when converted to refstyle.
2013-02-07 08:45:21 -05:00
Julien Rioux
cc1ce04798 Generate the citation labels before exporting to plain text. 2013-02-06 17:37:58 +01:00
Julien Rioux
6456c2262e Move label generation from InsetBibtex to BiblioInfo.
This only move the code, but does not change the displayed labels.
Thus for numerical citation, the label is set to the cite number;
for author-year citation, the abbreviated list of authors is used
i.e. "Smith et al. 2001".

Eventually, we might want to make the label customizable, or get
it from BibTeX.
2013-02-06 17:37:58 +01:00
Julien Rioux
f94d77ae88 Whitespace only. 2013-02-06 17:37:56 +01:00
Jean-Marc Lasgouttes
14e01a92a4 Rename Path.h to PathChanger.h (actual name of the class) 2013-02-06 11:51:06 +01:00
Juergen Spitzmueller
f9691aed8d Fix float label prefix (bug #8536) 2013-02-04 08:41:46 +01:00
Juergen Spitzmueller
75fb3e4b6c Do not output ZERO WIDTH NON JOINER glyph for ligature break via toString
I do not see where this is really useful (contrary to real plaintext). And it breaks spell checking with hunspell and 8bit disctionaries (part of bug #8526)
2013-01-26 09:53:53 +01:00
Scott Kostyshak
3c84267d8d Implement move row/column in tabular inset
This patch implements 'move row' and 'move column' features for tabular.
The purpose is to provide a useful behavior in tabular that is
consistent with PARAGRAPH_MOVE_UP and PARAGRAPH_MOVE_DOWN so that the
user can, for example, do alt-<up> to move a row up. Alternatively,
icons for these features are also added to the table toolbar and
context menu.

If there is any selection, the feature is disabled. This is consistent
with how PARAGRAPH_MOVE_UP works in other contexts. Additionally, 'move
row' is disabled if there is a multi-row in the current or target row;
and 'move column' is disabled if there is a multi-column in the current
or target column.

'move row' moves only the left and right borders of a cell along with
the row. Similarly, 'move column' moves only the the top and bottom
borders.

Implementing similar functionality for other insets, such as arrays and
array environments, is on my TODO list.
2013-01-20 21:54:30 -05:00
Julien Rioux
843be77e54 Remove unused include. 2013-01-15 15:34:40 +01:00
Benjamin Piwowarski
9f62413b10 Initial patch for citation-insert 2013-01-15 14:51:29 +01:00
Julien Rioux
cd17d87e47 Implement plain text export of BibTeX bibliography (fixes #8487). 2013-01-15 14:13:38 +01:00
Julien Rioux
a14e3d9a5d Use buffer().B_() instead of translateIfPossible. 2013-01-15 14:13:06 +01:00
Julien Rioux
3f8de8fe92 Better fix for #7732: Use buffer.B_().
Also handle "and others" which is translated by BibTeX to "et al.".
2013-01-15 14:12:34 +01:00
Juergen Spitzmueller
e27ee60098 Reset postcommandargs as well on resetargs (bug #8500) 2013-01-13 09:16:39 +01:00
Julien Rioux
2ffd130d2b Force BibTeX rerun upon add/remove/change citation (fixes #6955).
Reordering citations is one case where catching "Citation undefined
on page ..." doesn't catch the need for a bibtex rerun. This patch
ensures the proper ordering is obtained in pdf output without having
to resort to closing and reopening the LyX document.
2013-01-12 10:12:25 +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
Julien Rioux
e6aab49ff4 Use document language when exporting citations to LyXHTML (fixes #7732). 2013-01-07 16:00:47 +01:00
Juergen Spitzmueller
c246076ed5 Fix the 'caption inset mess' (bug #4647) 2012-12-30 18:29:02 +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
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
3934f4a36f In multi-par sequences, check for arguments in all pars 2012-12-23 17:37:50 +01:00
Vincent van Ravesteijn
bec9c1325e Introduce Layout::args() and simplify code 2012-12-17 22:26:11 +01:00
Juergen Spitzmueller
e5ebe17b92 AutoInsert option also for flex insets 2012-12-17 13:32:40 +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
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
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
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
25ef8e7eef Allow to separate menu string from label string for arguments 2012-12-09 19:15:41 +01:00
Juergen Spitzmueller
906a473e57 Do not force Flex insets to be collapsed at insertion (#8442) 2012-12-08 09:35:52 +01:00