(patch from yihui, part of #7555)
http://www.lyx.org/trac/ticket/7555#comment:18
This adds the new format "R/S code" with extension .R and a converter from .Rnw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39509 a592a061-630c-0410-9148-cb99ea01b6c8
http://www.lyx.org/trac/ticket/7555
This part is a simple cleanup:
* rename variables to start with a dot
* reset encoding after running sweave
* improve on-screen display of code chunks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39506 a592a061-630c-0410-9148-cb99ea01b6c8
The problem is with sweave when the temp file path contains spaces. This patch adds some postprocessing that removes the reference to the temp dir.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39070 a592a061-630c-0410-9148-cb99ea01b6c8
listed in file->export menu). Do not remove customized
document formats from the export menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38975 a592a061-630c-0410-9148-cb99ea01b6c8
This is dur to the use of the null device, which causes problems. Note that, as a consequence, a Rplots.pdf file is created in the document directory.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38896 a592a061-630c-0410-9148-cb99ea01b6c8
This is different from the fix proposed in bug #7555, because we have to catter for dots in temp dir path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38895 a592a061-630c-0410-9148-cb99ea01b6c8
default option. Also account for the fact that babel may be switched off.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38708 a592a061-630c-0410-9148-cb99ea01b6c8
On Cygwin, the most reliable way to tell what is the right path
separator to use is a direct check.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38646 a592a061-630c-0410-9148-cb99ea01b6c8
Flex:* format. We can't do this perfectly, but we can do so when it's done
within a single file.
Failure to do this (which mistake had been made before) was the root cause of
the problem reported by Enrico with IEEE.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38391 a592a061-630c-0410-9148-cb99ea01b6c8
- use a null device to avoid the extra Rplots.pdf file created by Sweave
- use directly setwd() instead of in the preamble of the module
- add lots of comments.
This finally fixes ticket #6623.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38359 a592a061-630c-0410-9148-cb99ea01b6c8
when latex fails with a preview. Fixes bug #7303 (IP fails with hyperref).
Patch by Ale with suggestions from Enrico
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38243 a592a061-630c-0410-9148-cb99ea01b6c8
Why do we need two separate files actually? The difference of these two files is minimal.
Couldn't we introduce a further option for "lytex" mode in lyxpreview2bitmap.py instead?
This would significantly lower the maintenance burden.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38120 a592a061-630c-0410-9148-cb99ea01b6c8
- Have InsetFlex::layoutName() report "Flex:" + the inset name.
- Do some layout2layout work so that user insets that do not have
the "Flex:" prefix get it.
Note that this will break some CopyStyle stuff, but we do not have any
decent way to do that, so users will have to make that change for
themselves. I guess we should add that to the release notes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38112 a592a061-630c-0410-9148-cb99ea01b6c8
Now we specify the output file for sweave explicitely for robustness reasons.
We also specify prefix.string (in order to have the temp files generated in lyx tmp directory.
The only annoying file now is Rplots.pdf, but I am not sure why it is generated...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37984 a592a061-630c-0410-9148-cb99ea01b6c8
- recognize foreground color in pdf route. This is not nice, but there's no better way, AFAICS.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37695 a592a061-630c-0410-9148-cb99ea01b6c8
- we might call this with 7 args, although the 7th will just be ignored (which is fine).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37673 a592a061-630c-0410-9148-cb99ea01b6c8
to create a zip or a tar.gz, to provide the output directory as an option,
and also to specify the location of the lyx2lyx script as an option.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37547 a592a061-630c-0410-9148-cb99ea01b6c8
a LyX archive. A zip archive is created on Windows and a gzip compressed
tar archive on *nix, as those are the de facto platform standards.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37525 a592a061-630c-0410-9148-cb99ea01b6c8
IsPredefined.
The point of this is that the current tag is doing both of these jobs,
and they are different. The achemso class shows this, since it uses
float.sty to define three different kinds of floats internally. We have
to set NeedsFloatPkg to false to prevent LyX from trying to redefine
them, but then we complain that there is no list command defined and so
do not enter it in Insert>List/TOC.
The new tag is not yet functional, just there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37430 a592a061-630c-0410-9148-cb99ea01b6c8
noticed that article, for example, still has a counter "chapter". This
surprised me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37193 a592a061-630c-0410-9148-cb99ea01b6c8
and use it to be able to read data files in there (bug #6623). It is probably possible to use sweave hooks instead of the module preamble. Moreover, I want to investigate the use of prefix.string argument of sweave to make sure that the output files end up in the tmp dir.
* be more subtle in the way to change default encoding to handle the case where a data file that is read does not use the same encoding as the .rnw file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36850 a592a061-630c-0410-9148-cb99ea01b6c8
not correctly handled by dvipng. When a ps special is detected in the dvi
file, the old good legacy method is used. Patch from Ale.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36685 a592a061-630c-0410-9148-cb99ea01b6c8
The required the introduction of the new converter token $$e, that holds
the iconv name of the latex file encoding.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35772 a592a061-630c-0410-9148-cb99ea01b6c8
Sweave.sty path is hardcoded if LaTeX cannot find it.
More to come.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35750 a592a061-630c-0410-9148-cb99ea01b6c8
I believe this completes the LFUN conversions, at least if RELEASE_NOTES
is complete in this respect.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35436 a592a061-630c-0410-9148-cb99ea01b6c8
prefs2prefs_lfuns.py and prefs2prefs_prefs.py. I've organized it this way because, in many ways, these are
the same task. It's very line-by-line, unlike lyx2lyx and layout2layout, where things can be more "global".
So we read the file, line by line, and give a bunch of converter functions a chance to see if they want to
modify that line.
The converter functions are all in the subsidiary files. (Only the lfun one has anything in it now.) They
take a line as argument and return a list: (Bool, NewLine), where the Bool says if we've modified anything
and the NewLine is the new line, if so.
The format of the existing files is format 0, and we'll introduce new format numbers as we proceed,
just as with layout2layout. So the conversion from format 0 to format 1 will be huge; others will
generally be simple.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35426 a592a061-630c-0410-9148-cb99ea01b6c8
the OptionalArgs tag does and is implemented by the now misnamed
InsetOptArgs, except that its content gets wrapped in "{}" rather than
"[]". Required arguments do not actually have to be provided, but they
are always output.
This will allow e.g. beamer's Block environment to be implemented
without ERT.
Documentation to follow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34591 a592a061-630c-0410-9148-cb99ea01b6c8
Things are still bit inconsistent due to the existence of
additional -- switches, but the correct fix is not so easy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34005 a592a061-630c-0410-9148-cb99ea01b6c8
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
indicates what prefix to use when constructing formatted references.
Documentation to follow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33784 a592a061-630c-0410-9148-cb99ea01b6c8
This patch introduces a "ListCommand" tag for Float layout. This tag
defines the command used to generate a list of such floats, in the cases
where float.sty is not used (i.e., where NeedsFloatPkg is true). We were
previously hardcoding the commands \listoftables and \listoffigures. But
in other cases, such as achemso.layout, which defines lists of schemes,
charts, etc, we could not output such lists.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33633 a592a061-630c-0410-9148-cb99ea01b6c8
list revealed that the former is confusing to people. The latter
indicates more clearly what the tag does.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33626 a592a061-630c-0410-9148-cb99ea01b6c8
InsetLayout, per Jurgen's suggestion, so that insets can be told to
display an abbreviated form of their content when closed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32575 a592a061-630c-0410-9148-cb99ea01b6c8
would allow us to do something after copying, if we should later want to
do that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31703 a592a061-630c-0410-9148-cb99ea01b6c8
Documentation is Customization.lyx will follow, once this stabilizes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29973 a592a061-630c-0410-9148-cb99ea01b6c8
only sweave is supported (for building documentation, not programs).
Layout files allow a new OutputFormat tag
Modules can be conditionned on a feature of the type from->to, indicating that
it should be possible to convert from format 'from' to format 'to'.
Layout format incremented to 15.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29874 a592a061-630c-0410-9148-cb99ea01b6c8
Don't go into an endless loop if layout2layout cannot produce the desired file format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28529 a592a061-630c-0410-9148-cb99ea01b6c8
Implement infrastructure to add translations to layout files and translate one .inc file.
Some others are missing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28356 a592a061-630c-0410-9148-cb99ea01b6c8
The bug is that older layout files with lines like:
Input amsmaths.inc
fail in 1.6, since that file no longer exists. This commit adds some
layout2layout that will scan for such includes and add lines like
UseModule theorems-ams
corresponding to the input lines. The downside to this commit is that
UseModule only becomes available on 25 July 2008, whereas the files
were removed in January.
My intention is to try to deal with these intermediate cases as well.
But I'm not sure that will ultimately work very well, so this will do
until I can figure that out.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26800 a592a061-630c-0410-9148-cb99ea01b6c8
update an existing counter rather than overwrite it.
This turns out to be more complicated than it might seem. There are two
large parts to the patch. One moves the counter read routine out of TextClass
and into the Counter and Counters classes. The other changes the syntax of
counters from:
Counter
Name whatever
....
to:
Counter whatever
....
This allows us to get the name of the counter right away, so we can decide
whether it is an old one or a new one. So the layout format had to be
changed (again), with corresponding layout2layout code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26779 a592a061-630c-0410-9148-cb99ea01b6c8
one that may have been triggered by an older version of python. The
problem is that the sniffer call could fail, and then dialect is
undefined.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26447 a592a061-630c-0410-9148-cb99ea01b6c8
theorems-ams module, which is what most users will want. A later commit will allow users also
to "exclude" this module, in case they wanted to do that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25880 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-31 6.2.6-8 Chris Madison <madisonblu@hotma...>
* 'convert existing-image.png -background' no longer generates a fault.
* -define pdf:use-cropbox=true actually works now.
* Slight mods to magick/xwindow.c to compile under BEOS (path provided by
henrimoi@hotma...).
* #000000 improperly set the opacity channel (bug report and patch from
digipete@shaw....).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25759 a592a061-630c-0410-9148-cb99ea01b6c8
incompatible) options are to be used to obtain the same result, it is better
to query the version and accordingly use the needed options (bug 4749).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25758 a592a061-630c-0410-9148-cb99ea01b6c8
New versions of Imagemagick do not antialias ppm images used for
screen presentation of pictures.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25475 a592a061-630c-0410-9148-cb99ea01b6c8
* src/PreviewLoader.cpp:
- add conditions for preview with pdf output
* lib/scripts/legacy_lyxpreview2ppm.py:
- if no dvi preview file is available, check for a PDF file
and process that, if found
- also produce png output, if requested.
* lib/scripts/lyxpreview2bitmap.py:
- if no dvi preview file is available, check for a PDF file
and process that, if found
* lib/scripts/lyxpreview_tools.py:
- move some common functions here
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25419 a592a061-630c-0410-9148-cb99ea01b6c8
- make output more closely to format 276. This also prevents lyx2lyx from choking
while importing a csv file into 1.6.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24626 a592a061-630c-0410-9148-cb99ea01b6c8
- set Python file encoding to utf-8
scripts/ext_copy.py: - set Python file encoding to utf-8
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18943 a592a061-630c-0410-9148-cb99ea01b6c8
The key is the new copier script lib/scripts/ext_copy.py. Usage:
ext_copy.py [-e ext1,ext2,...] <from file> <to file>
Given a <from file> and <to file>, it will copy all files in the directory
in which from_file is found that have the extensions given in the -e option,
or all files in that directory if no such argument is given. So, for example,
we can do:
python ext_copy.py -e png,html,css /path/from/file.html /path/to/file.html
and all html, png, and css files in /path/from/ will be copied to the
(possibly new) directory /path/to/file.html.LyXconv/. The -t option determines
the extension added to the output filename passed to the script ($$o, in the
copier definition), the default being "LyXconv". If just . is given, then no
extension is added.
Other changes:
* configure.py: added appropriate copier definitions for html and wordhtml
formats, as well as for the Program pseudo-format.
* lib/Makefile.am and development/scons/scons_manifest.py: add ext_copy.py.
* lib/doc/Customization.lyx: update documentation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18791 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LaTeXFeatures.C (mustProvide): new method; returns true when
isRequired is true and the feature is not provided by the
textclass.
(getPackages, getLyXSGMLEntities): use mustProvide when relevant.
* src/bufferparams.C (getEngine):
* src/buffer.C (validate): adapt to change below.
* src/lyxtextclass.C (read): replace tags ProvidesNatbib,
ProvidesMakeidx, ProvidesUrl and ProvidesAmsmath by a generic
"Provides".
(provides): take a string as argument.
* lib/scripts/layout2layout.py (convert): convert "ProvidesXxx" tags
to "Provides xxx".
* lib/layouts/*: update to format 4.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17740 a592a061-630c-0410-9148-cb99ea01b6c8
* lib/scripts/convertDefault.py: Use the cropbox option when the
source format is pdf and convert supports it.
* lib/configure.py: Don't define a PDF->PNG converter in order to
avoid the EPS->PDF->PNG route when converting EPS to a loadable
format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17668 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/ExternalSupport.C
(updateExternal): Avoid computing crc of a directory as this leads
to a crash on Cygwin.
* lib/configure.py:
Use a python script to get the current date in order to avoid
a stalling condition with the date command on Win32.
* lib/scripts/date.py:
New python script.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17168 a592a061-630c-0410-9148-cb99ea01b6c8
* buffer.C: increase LyX format to 257.
* lyxtextclass.C: increase FORMAT format to 3.
* buffer_funcs.C:
- setCaptionLabels(): new recursive function
- setCaptions(): new function
- updateLabels(): call setCaptions() for each paragraph.
* InsetCaption:
- add a virtual destructor
- overload InsetText' getStatus() and wide().
- setLabel(): only set the new private member label_.
- metrics(): don't set label here and correct for title metrics.
- draw(): don't set label here
- latex(): fix optional argument.
- plaintext(): implement!
* InsetText:
- add a virtual destructor
- add virtual to getStatus() and wide().
* output_latex.[Ch]: move latexOptArgInsets() out of anon namespace.
* text3.C: enable LFUN_CAPTION_INSERT
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16948 a592a061-630c-0410-9148-cb99ea01b6c8
* src/converter.C
(Converters::convert): Convert command to be executed to the proper
encoding. Use from_utf8 instead of from_ascii in order to avoid
assertions when displaying an alert.
* src/support/docstring.[Ch]
(to_filesystem8bit): new conversion function.
* lib/scripts/fig2pstex.py
* lib/scripts/fig2pdftex.py:
Modified to reflect the changes above.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16803 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/os.[Ch]
(python): new function, return the python command
* lib/lyx2lyx/lyx_1_5.py
(revert_font_settings): replace tabs with spaces
The rest is simply s/python/python -tt/ and
s/"python"/lyx::support::os::python()/ where appropriate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14270 a592a061-630c-0410-9148-cb99ea01b6c8
* lib/configure.py
(checkLatex): Add DraftDVI converter on windows if dv2dt and dt2dv
are available
(checkFormatEntries): Add DraftDVI entry on windows if dv2dt and
dt2dv are available
* lib/Makefile.am: add clean_dvi.py
* development/Win32/packaging/build_lyxwin.sh: remove clean_dvi.py
stuff
* development/Win32/packaging/package_lyxwin.sh: remove configure
mangling for clean_dvi.py
* development/Win32/packaging/clean_dvi.py: move to lib/scripts
* development/Win32/packaging/README: remove clean_dvi.py stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13924 a592a061-630c-0410-9148-cb99ea01b6c8
(concatenate_label): new, concatenate two labels in an intelligent way
(convert): add the TocLevel for sectioning styles
(convert): convert LabelString and StringAppendix for sectioning
styles (append counter)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13533 a592a061-630c-0410-9148-cb99ea01b6c8
Implementation is as similar as possible to the well-tested code in the
1.3.x tree.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8878 a592a061-630c-0410-9148-cb99ea01b6c8
Use pnmcrop to crop the previews and be done with all this nonsense.
Should fix the drawing problems in tables too.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5440 a592a061-630c-0410-9148-cb99ea01b6c8
Licence details can be found in the file COPYING.
and thank God for sed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5211 a592a061-630c-0410-9148-cb99ea01b6c8
takes an extra argument specifying the desired output format, ppm or png.
Qt users may want to change their preferences file to suit ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5205 a592a061-630c-0410-9148-cb99ea01b6c8
* Make it work with scary_eqns.lyx by repeating the LaTeX run if it failed
first time round, but this time remove the showlabels option from
preview.sty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4704 a592a061-630c-0410-9148-cb99ea01b6c8