Commit Graph

75 Commits

Author SHA1 Message Date
Julien Rioux
e6aab49ff4 Use document language when exporting citations to LyXHTML (fixes #7732). 2013-01-07 16:00:47 +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
43f6b1672b Use empty() to check empty and non-empty'ness not size()
Also add FormatList::empty().
2012-10-27 01:25:38 +02:00
Richard Heck
319e35188a Style. 2012-05-13 13:40:22 -04:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Julien Rioux
1e947e3a18 Move the citation engine machinery to layouts.
Add a new layout syntax CiteEngine to define the citation commands
available for a given citation engine.

Also extend the CiteFormat syntax to allow more customization. This
mechanism, previously used to produce bibliography entries in the
citation GUI based on the BibTeX entrytype, is now also used to
produce the textual labels for citation insets in the buffer view.

Thus citation styles are almost completely customizable by modules.
Modules for the basic, jurabib and natbib engines are implemented.

Layout format incremented to 37.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40820 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 00:41:30 +00:00
Julien Rioux
e3f65fd088 Buffer param \cite_engine_type (authoryear|numerical).
To avoid duplicity, remove natbib_authoryear and natbib_numerical
and replace them by natbib, and keep track of the engine `type'
in the new \cite_engine_type document setting. This will make it
easier to add more citation engines.

LyX format incremented to 424.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40592 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:38 +00:00
Georg Baum
bb0432d74a Beautify output of \usepckage statements (each statement is on its own line
now) and move more packages to the new exclude mechanism.
The remaining ones are not so easy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40442 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 20:05:51 +00:00
Julien Rioux
467c955507 This is not limited to BibTeX. Missing citation keys can also happen for standard bibitem.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40378 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 13:17:55 +00:00
Julien Rioux
7aee04217d Give a visual feedback that the BibTeX key could not be found.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40349 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-03 22:24:44 +00:00
Julien Rioux
dfdcc56cba Remove extra whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40346 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-03 22:15:11 +00:00
Vincent van Ravesteijn
3ec0733fce Remove unneeded includes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40057 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 11:22:17 +00:00
Julien Rioux
772325ff70 Allow \nocite again with the basic citation engine.
Fix a bug introduced in r26547. Also reorders the entries for
natbib-numerical into a more natural, visually pleasing order.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39777 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-27 17:13:07 +00:00
Richard Heck
f567dd2bc1 Fix problem with citation dialog. The code changes here missed the need
for this part.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38353 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-12 17:32:16 +00:00
Richard Heck
b5d2e9d285 Fix output of HTML tags in bibliography info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35388 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 13:50:17 +00:00
Peter Kümmel
615d42d357 TR1: use std::tr1 regex with msvc10
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34725 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-29 17:09:40 +00:00
Richard Heck
2a21c12eab There are other ways we can get in trouble, so let's impose the limit
slightly differently.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33927 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 20:52:07 +00:00
Richard Heck
bc6ee8d251 Do the translation the right way.
By the way, has anyone noticed that _() returns empty if you call it
on a string we don't know how to translate? Might it be better if it
returned the original string?



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33925 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 20:21:30 +00:00
Richard Heck
808ff6650c Introduce a simple macro facility for citation formats. Also introduce
simple, translatable units for use in such formats.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33924 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 20:01:28 +00:00
Richard Heck
f1912e1c33 Read the citation formats from a file, rather than hardcoding them. This
allows for layout- or module-level customization of the display in the
citation dialog and of the XHTML bibliography output.

There is more of this to come, by the way. The next step is to allow
macros. That will make it easier to deal with translation issues, which
ought to be the final step.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33920 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 18:37:25 +00:00
Vincent van Ravesteijn
e73c866edf Squash warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33900 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-28 22:22:24 +00:00
Richard Heck
8c115c7185 Whitespace and comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33886 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-28 02:18:22 +00:00
Richard Heck
9667514c86 Make a couple of important bibliographic phrases translatable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33885 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-28 02:12:40 +00:00
Richard Heck
60434e6a00 These can just be strings, and will need to be so later.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33884 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-27 22:51:38 +00:00
Richard Heck
5696be2a66 Allow the use of rich text in citation formats. And use them in the
citaton dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33880 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-27 13:54:14 +00:00
Richard Heck
206ca45751 This is the first step towards allowing customization of how BibTeX
entries are represented, both in LyX and in XHTML output. Try looking at
the InsetCitation dialog and, in particular, at entries that have
crossref fields and you will see the benefit there.

The next step is to allow this stuff to be read from a file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33879 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-27 12:58:26 +00:00
Richard Heck
a56f7bff1c Fix other bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33466 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-13 15:22:49 +00:00
Jürgen Spitzmüller
ce349ad806 Fix encoding issues in bibitems (bug #6534)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33452 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-12 16:08:30 +00:00
Richard Heck
9a327ccc51 Fix non-BibTeX detection of "author (year)" labels.
Jurgen, this one is actually for branch, too.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33142 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 19:48:53 +00:00
Richard Heck
782db81f77 Author-year citations for XHTML output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32969 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 16:11:55 +00:00
Richard Heck
833e7085dd A little cleanup of some of the BibTeX info access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32915 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-09 16:57:08 +00:00
Richard Heck
2098f1d8c2 Routines for calculating numerical labels for BibTeX citations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32891 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 18:19:13 +00:00
Richard Heck
012be55afd Move the collection of citations and sorting routines into BiblioInfo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32887 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 16:40:41 +00:00
Richard Heck
9f6c1b8ccb Fix warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32514 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-13 21:14:36 +00:00
Jürgen Spitzmüller
e960a2bcd3 * BiblioInfo.cpp (convertLaTeXCommands):
- fix parsing of thin space (\,).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32504 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-13 09:50:30 +00:00
Peter Kümmel
daba8bda2e cmake: fix merge build
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31891 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-07 12:50:30 +00:00
Jürgen Spitzmüller
fc63c87e2e * BiblioInfo.cpp:
- convert author/editor to proper unicode.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30072 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-12 14:29:39 +00:00
Enrico Forestieri
411b7a1dec Fix display of BibTeX entries in the info field of the citation
dialog by only converting text mode latex macros to unicode points.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30070 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-12 14:03:57 +00:00
Richard Heck
f50c47d4be Introduce a field for keeping track of the citation label.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30047 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-11 20:29:37 +00:00
Richard Heck
1b160bd82d Just rearranging and adding some comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29158 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-09 12:55:47 +00:00
Richard Heck
bd8a0686fb Fix the year display in InsetCitation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29095 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-04 21:10:35 +00:00
Richard Heck
f7164212b1 Simplify.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29094 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-04 21:04:26 +00:00
Richard Heck
0596363567 Localize a couple strings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28219 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-17 18:12:02 +00:00
Richard Heck
4856342a1e Whoops. Was programming in perl yesterday....
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28218 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-17 18:04:54 +00:00
Richard Heck
01d60968f9 This can be a const ref now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28194 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-17 00:29:32 +00:00
Richard Heck
32950f6c6c Improve the display of BibTeX info in InsetCitation by retrieving missing
fields from the crossref.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28193 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-17 00:16:31 +00:00
Richard Heck
bb24f02188 We'll do the unicode conversion where it's actually needed: where we
calculate what to display.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28191 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-16 23:42:16 +00:00
Richard Heck
d8bf83a85a Cache the getInfo() return value. This will matter shortly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28190 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-16 23:40:37 +00:00
Richard Heck
9d48ad4f74 Improvements to the parser that extracts the "family name". We now get
the last name, with the "von" part, even when commas are not used in the
BibTeX file.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27989 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-04 23:35:08 +00:00
Richard Heck
69e95a3ed9 The comment preceding getValueForField() reflected an earlier implmentation.
There is now no reason not to use operator[] here, which is more natural.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27635 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-19 04:16:12 +00:00