Commit Graph

326 Commits

Author SHA1 Message Date
Juergen Spitzmueller
769afefb15 documentation 2012-08-08 10:07:31 +02:00
Juergen Spitzmueller
a18af62087 Complete default_language rc removal 2012-08-08 09:31:46 +02:00
Richard Heck
c9d2794d93 Prettify the prefs2prefs file a bit. 2012-05-22 09:02:12 -04:00
Richard Heck
aeca5e6f0d Typo. 2012-05-22 08:58:55 -04:00
Richard Heck
abbc07026b Add commit to prefs2prefs. 2012-05-22 08:57:25 -04:00
Richard Heck
288c1e0faa Add "nice" flag for converters, addressing final problem with bug #4624. 2012-05-22 08:56:05 -04:00
Richard Heck
a7c3567452 Fix typo. 2012-05-22 08:14:33 -04:00
Enrico Forestieri
fbcf2486d8 Fix bug #8164: lyxpak.py fails to include filenames with spaces
People love embedding spaces in filenames, so account for that.
2012-05-20 16:32:47 +02:00
Pavel Sanda
dce6c8875c Allow Insetlayout for Branch inset (#8106).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173659.html
2012-04-19 11:56:32 +02:00
Richard Heck
12ba6a19d0 Add some comments to include_bib.py about how to set up the converter. 2012-04-17 16:58:28 -04:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Richard Heck
a71e831d23 Clean up the include_bib script a bit. 2012-03-26 12:06:04 -04: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
Georg Baum
26e5f1a8ec Use libmagic for file format detection if available.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40789 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-21 20:29:44 +00:00
Jean-Marc Lasgouttes
d6246362e6 Fix #8019 (from yihui)
* avoid creation of file Rplots.pdf in document file
* find correctly Sweave.sty on old R versions


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40703 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 22:30:38 +00:00
Jean-Marc Lasgouttes
7335b3193b Add support for R package knitr (a Sweave alternative)
This fixes #7887.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40674 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-25 22:26:31 +00:00
Kornel Benko
b64014229f Do not py-compile also on cmake build
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40648 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 13:05:37 +00:00
Georg Baum
0293746521 keywords in preferences are case insensitive
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40646 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-22 10:40:56 +00:00
Julien Rioux
06dab7972b Remove unused libreoffice2eps.py script.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40596 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-10 13:54:48 +00:00
Julien Rioux
ec1e52ca91 Add gswin64c as possible executable in legacy_lyxpreview2ppm.py (#7938).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40595 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-10 13:50:11 +00:00
Enrico Forestieri
5003431903 Fix bug #7933 (lyx2lyx error while running lyxpak.py)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40544 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-24 11:54:30 +00:00
Abdelrazak Younes
7f14df4af4 increment lyxrc version following r40515.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40516 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 11:51:26 +00:00
Richard Heck
f066a041e9 Comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40415 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 15:05:21 +00:00
Richard Heck
157319b3f6 New layout tags specifically for CSS information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40411 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-06 22:38:46 +00:00
Jean-Marc Lasgouttes
4f176ef89b Fix #7876: Problems with special characters when using sweave with xetex
When R version is >= 2.13.1, Sweave handles natively encodings. Therefore, we have to remove our own kludge.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40135 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-04 22:39:30 +00:00
Vincent van Ravesteijn
5014b38cb7 Add a preference option to specify the default length unit (cm or in).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40030 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 11:52:11 +00:00
Vincent van Ravesteijn
269695aa5f Remove the prefence default_papersize
- This preference was used for specifying the papersize to xdvi, dvipdfm,
  dvips. However, I can't seem to see any effect on the result.

- The papersize should instead be defined in the document settings.

- The global papersize default was misused to also change the tex
  output by specifying the papersize as if it was specified in the
  document settings. This caused the same lyx document to be outputted
  differently on different pcs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40028 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 11:48:16 +00:00
Julien Rioux
35b580fb30 lyxpreview: Simplify the color handling.
Let's have this in trunk for testing. The real difference maker
when it comes to color is whether we use dvipng or ghostscript.

For dvipng:

  - The color info is passed as command-line arguments.

  - The tightpage option is not necessary, and since it adds
    ps specials to the output, we shouldn't use it.

For ghostscript:

  - The color info needs to be in the latex file.

  - The foreground color is set for each preview inset.

  - The background color is set by \pagecolor in the preamble,
    which is understood by pdflatex, but ignored in dvips mode.
    Thus dvips is handled with a ps special.

  - The tightpage option is necessary to crop the images.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39797 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-03 16:43:33 +00:00
Julien Rioux
873f0f4297 lyxpreview: Simplify the handling of lilypond-book.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39796 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-03 16:35:29 +00:00
Julien Rioux
13b1277cd2 lyxpreview: Handle bibtex-generated references and bibliography.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39795 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-03 16:35:27 +00:00
Julien Rioux
2645d57d89 * lyxpreview_tool.py : Allow to look for commands with arguments.
For example, find_exe(["bibtex -min-crossrefs=7"]) should search for
bibtex and if it is found, return the string "bibtex -min-crossrefs=7".

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39794 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-03 16:35:25 +00:00
Enrico Forestieri
e75302bbce Fix another thinko from r38243.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39773 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-27 07:28:12 +00:00
Enrico Forestieri
968ab69e88 Fix the following problem with Python 2.4:
Traceback (most recent call last):
  File "/opt/src/lyx-devel/lib/scripts/lyxpreview2bitmap.py", line 535, in ?
    exit(main(sys.argv)[0])
TypeError: 'str' object is not callable



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39769 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-26 15:57:17 +00:00
Enrico Forestieri
a55f54b903 Let lyxpreview2bitmap.py also work on Windows when the PyWin extension modules
are not installed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39741 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-24 01:27:40 +00:00
Tommaso Cucinotta
71ebf846bb Adding the script missing from last commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39707 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-19 00:37:15 +00:00
Tommaso Cucinotta
b4f97b61cf Added support for natively zipped file formats that do not need decompression for being handled by converters
(e.g., compressed dia, odg, sxd, ...). These need to be marked via the "zipped=native" flag in the RC file.
The old 'dia' configuration is automatically updated (it used to be hardcoded in the code, now it is handled
via the flag).
See also http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg170974.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39705 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-19 00:12:09 +00:00
Enrico Forestieri
40d4d94b01 Also include in the archive the files referenced in ERT in the document body.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39692 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-16 14:40:40 +00:00
Enrico Forestieri
45aa989efc Use the normalized path for checking whether it has already been gathered.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39691 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-16 12:03:54 +00:00
Enrico Forestieri
517cfe9266 Check whether the filename is really a file. Also protect against recursive
inclusions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39690 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-16 10:07:56 +00:00
Julien Rioux
a55ef8346a Allow to assign several extension to a given file format (#4798).
Additionnal extensions are separated by commas (,) in lyxrc
preference files, while spaces are ignored, e.g. "jpg, jpeg".

Preference lyxrc file format incremented to 2.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39670 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-13 20:42:23 +00:00
Julien Rioux
0fb13b648c * prefs2prefs.py : Use a list of [format, conversions] pair.
Use a list of [int, list of functions] pair, representing
      - int: the format number, and
      - list of functions: what needs to be done to the file to
                           update it to the given format number.

    This matches what is done in lyx2lyx and helps keeping track of
    format numbers and their corresponding conversion routines.

    Also, add another sanity check.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39668 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-12 20:43:06 +00:00
Julien Rioux
ba02c43178 * prefs2prefs.py : Error when both -l and -p are given, update usage.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39667 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-12 20:42:53 +00:00
Julien Rioux
603be7fe2f * prefs2prefs.py : Don't choke on empty input file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39666 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-12 20:42:40 +00:00
Julien Rioux
454598b928 * layout2layout.py : Don't choke on empty input file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39665 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-12 20:42:22 +00:00
Julien Rioux
45280f6bb5 Refine the lyxpreview legacy conversion (the ghostscript one).
- Break up steps 1, 2 and 3 from the legacy preview mechanism.
    These are really separate steps.

      1) Add color info, run latex
      2) Run dvips
      3) Run ghostscript

  - In the case of pdf output, skip step 2 and go directly to step 3.
  - Make sure that we fall back to the legacy conversion whenever we can.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39661 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:23:41 +00:00
Julien Rioux
bb55234cac Better error and progress messages for lyxpreview.
Introduce --debug and --verbose flags to control output. Also, use the
python subprocess module to capture stderr from external commands, thus
bumping the python requirement to version 2.4 or later.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39660 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:23:29 +00:00
Julien Rioux
81420e405f Merge the preview mechanism for japanese with the standard one.
- Japanese is now handled by passing the option --latex=platex
    to the standard lyxpreview script. This is done in PreviewLoader.
  - Remove obsoleted file lyxpreview-platex2bitmap.py and the
    corresponding lines in the configure script.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39659 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:23:15 +00:00
Julien Rioux
10868c31ac Merge the preview mechanism for lilypond-book with the standard one.
- Handle the preprocessing in the main lyxpreview script with the
    command-line arguments --lilypond and --lilypond-book=exe.
  - Remove the obsoleted file lyxpreview-lytex2bitmap.py and the
    corresponding lines in configure.py.

Fix for the japanese preview still to come.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39658 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:22:59 +00:00
Julien Rioux
2bd747fad4 Add command-line arguments to lyxpreview2bitmap.py
Add command-line arguments in a standard unix fashion, using getopt.

    Usage: ./lyxpreview2bitmap.py <options> <input file>

    Options:
      -h, --help:    Show this help screen and exit
      --dpi=<res>:   Resolution per inch (default: 128)
      --png, --ppm:  Select the output format (default: png)
      --fg=<color>:  Foreground color (default: black, ie '000000')
      --bg=<color>:  Background color (default: white, ie 'ffffff')
      --latex=<exe>: Specify the executable for latex (default: latex)

    The colors are hexadecimal strings, eg 'faf0e6'.

The changes to PreviewLoader.cpp break the preview of lilypond-book
and japanese files, but they will be handled in the next commits.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39657 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:22:43 +00:00
Julien Rioux
675f233f34 Some clean up of the lyxpreview code.
Move some common variables to lyxpreview_tools. Otherwise,
add a few variable names, making it easier to track things.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39656 a592a061-630c-0410-9148-cb99ea01b6c8
2011-09-11 18:22:29 +00:00