Commit Graph

31062 Commits

Author SHA1 Message Date
Georg Baum
f2d2b7cc7d Fix some texl2yx accent bugs
This fixes bug #8554 and some recently introduced busg:
- Encodings::fromLaTeXCommand() can now handle all combining characters,
  not only the one letter ones
- The remainder returned from Encodings::fromLaTeXCommand() must never be
  thrown away in tex2lyx, but output as ERT
- No special case for combining diacritical marks needed anymore in parse_text()
- No special cases for accents and IPA combining diacritical marks needed
  anymore in parse_text()
- special tipa short cuts may only be recognized if the tipa package is loaded
- Use requirements returned by Encodings::fromLaTeXCommand() instead of
  hardcoded registering of tipa and tipax
- Get rid of the name2 variable in parse_text(): We must use name, otherwise
  the extra stuff that might have been put into name vanishes
2013-02-24 15:44:16 +01:00
Georg Baum
9229f38ecf Fix LaTeX macro for symbol 0x02f7
\textsubtilde is a combining character (0x0330), but 0x02f7 is not.
Apart from the wrong LaTeX output, having the same command for two symbols
confuses texc2lyx.
2013-02-24 15:08:36 +01: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
Juergen Spitzmueller
be4ab02dd3 de.po 2013-02-24 10:34:30 +01:00
Uwe Stöhr
d7ca904b69 German Tutorial.lyx: some corrections and translations
- also a fix for the other languages
2013-02-24 02:01:49 +01:00
Uwe Stöhr
0bef574d9d Tutorial.lyx: fix typos and other issues spotted by John Hudson
- also fox some formatting and add some info
2013-02-23 20:40:01 +01:00
Georg Baum
d2d0f1964d Fix lyx2lyx for layout files with umlauts
lyx2lyx died with UnicodeDecodeError: 'ascii' codec can't decode byte if a
layout with a non-ASCII character in the file name was used, since the
textclass member of the LyX class was of type str, and not unicode.
2013-02-23 12:23:29 +01:00
Uwe Stöhr
be18719783 Math.lyx: 2 updates
- the column limit for decorated matrices does no longer exists
- move the former "accents for operators" sections to the operators section because these are no accents but operator-specific decorations
- add a note for \sideset
- formatting adjustments
2013-02-23 05:45:45 +01:00
Georg Baum
48c9926d87 Fix bug #8552
tex2lyx skips LyX preamble code only if it thinks that the file was created
by LyX (i.e. special comments are found). I don't like that, but this is
how it works and therefore the special comment neds to be added if the
theorem commands are to be skipped. This header makes also the temporary
setting of in_lyx_preamble obsolete, which caused skipping of user preamble
commands, which were not re-added by LyX.
2013-02-22 22:21:56 +01:00
Georg Baum
b59547ebd5 Improve texl2yx refstyle support
- Convert prettyref to the autopackage mechanism
- Do not load refstyle automatically if some refstyle preamble code of LyX
  is found, since LyX will only load the package if an actual reference
  command is used. This is needed for mixed refstyle/prettyref documents.
- Only recognize refstyle commands if refstyle was detected in the preamble
- Only recognize prettyref commands if prettyref was detected in the preamble
- Add a mixed refstyle/prettyref test case
2013-02-22 21:59:23 +01:00
Jean-Marc Lasgouttes
aa3bbfc984 Fix parsing of literate chunks (bug 7838)
* use verbatimStuff for parsing chunks and make try to follow closely the sweave sytax constraints.
 * merge the two cases for parsing << (noweb or quote)
 * \verb|ff| requires that its parameter is on a single line.
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
e5a9199927 Improvements to Parser::verbatimStuff
* return a Parser:Arg pair to indicate whether parsing was successful
 * add new parameter to restrict parsing to the current line
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
683050d4f9 Some fixes to parsing in tex2lyx
* put_almost_back and putback are actually the same thing
* add Parser::dropPosition
* deparse on Parser::popPosition
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
0082d183b3 Fix confusing behavior in search when changing directions (bug 8543) 2013-02-22 15:53:40 +01:00
Kornel Benko
6c03b1ff74 Revert changes for output format dvi4
This affects commits c0d4805acf,
                     14fed1df7d
                     8e4f656aa7
2013-02-22 12:06:31 +01:00
Jean-Marc Lasgouttes
05a4c7f908 Typo 2013-02-22 10:50:49 +01:00
Uwe Stöhr
22101c1044 tex2lyx/text.cpp: whitespace only 2013-02-22 01:21:17 +01:00
Uwe Stöhr
2ba1360509 tex2lyx/text.cpp: logic fix for previous commit
- continue; is here not necessary
2013-02-22 01:18:45 +01:00
Uwe Stöhr
a47e61e666 tex2lyx: support further characters
- support for Cyrillic characters
- support for \textifsymbol and \ascii (fixes bug #8556)
- support for \ding
- tex2lyx/text.cpp: correct an indentation and use "name2" because "name" is already defined in this clause
2013-02-22 01:11:30 +01:00
Uwe Stöhr
0fe19982da chkconfig.ltx: we use "tfrupee" in unicodesymbols 2013-02-22 01:03:34 +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
Uwe Stöhr
8254e84f8f Merge branch 'master' of git.lyx.org:lyx 2013-02-21 23:13:57 +01:00
Uwe Stöhr
e7c75296d6 tex2lyx/text.cpp: correction for TIPA character support
- for all TIPA characters the tipa and tipx package must always be registered because these characters are also allowed outside a TIPA inset
- include \textvertline because we again reached the maximum number of if statements allowed by MSCV (so safe at least one for now)
2013-02-21 23:13:05 +01:00
Georg Baum
84e176851d Add a note about ERT environment
The LyX file format only supports one CJK font mapping per document.
Therefore all CJK environments which use a different mapping than the main
one are output in ERT. THis is now explained in the test case, and also the
converion to ERT is improved (although it is still wrong e.g. for paragraphs).
2013-02-21 22:31:22 +01:00
Georg Baum
eb53c60a8f Complete the NoInsetLayout format change 2013-02-21 21:57:59 +01: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
Scott Kostyshak
28104a7496 Add templates to export tests (CMake & autotools) 2013-02-21 08:25:13 -05:00
Kornel Benko
9183c922ea Sort export tests in cmake build according to language 2013-02-20 13:26:01 +01:00
Kornel Benko
7b7f268552 tex2lyx tests: Sort test files 2013-02-20 12:43:36 +01:00
Georg Baum
9f93983b61 Extend unicodesymbols force flag
As suggested by Günter Milde.
2013-02-19 22:19:10 +01:00
Kornel Benko
b353a0b037 Adapt tex2lyx testcases to new format 2013-02-19 15:44:11 +01:00
Jean-Marc Lasgouttes
30cbe535c3 Make annoying debug message optional 2013-02-19 13:48:48 +01:00
Jean-Marc Lasgouttes
efe06103f3 Add test case for bug #5312 2013-02-19 12:36:06 +01:00
Jean-Marc Lasgouttes
3d2dcab03f Handle properly insets which have the PassThru property
This fixes in particular bug 5312:
  % escape in \url{} treated as TeX comment start by importer
2013-02-19 12:04:41 +01:00
Kornel Benko
c0d4805acf Set default format to dvi4 for some japanes doc files.
The rest (Tutorial.lyx, Math.lyx, EmbeddedObjects.lyx, UserGuide.lyx,
Intro.lyx and Additional.lyx) are left untouched, because
still not compilable with platex
2013-02-19 09:59:08 +01:00
Kornel Benko
14fed1df7d set default format to dvi4 for japanes example files 2013-02-19 09:46:17 +01:00
Kornel Benko
c741a148c9 Merge branch 'master' of git.lyx.org:lyx 2013-02-19 09:28:49 +01:00
Kornel Benko
8e4f656aa7 Add new output format dvi4 ( == DVI(pLaTeX)
Add converter for this format (platex without extra parameters)
2013-02-19 09:26:05 +01:00
Juergen Spitzmueller
05ec893d07 typo 2013-02-19 09:17:35 +01:00
Juergen Spitzmueller
c4899948d4 Fix font encoding with japanese
Since japanese omits fontencoding, the encoding of latin text in fact is OT1.

Candidate for branch, but I would welcome Koji's input.
2013-02-19 08:58:45 +01:00
Scott Kostyshak
3d8065923d sweave.lyx: generate both pdf files and eps files
In the figure chunks, now both pdf and eps files are generated.
This way all of latex, pdflatex, and luatex work out of the box.
2013-02-19 00:58:52 -05:00
Uwe Stöhr
df6589a97e Merge branch 'master' of git.lyx.org:lyx 2013-02-19 00:07:42 +01:00
Uwe Stöhr
6deb2b7680 tex2lyx: support further TIPA characters
- support for \textdoublevertline, \textvertline, \textglobfall
- support \!o and \!b and \!d and \!g and \!G and \!j
- support  and \*k and \*r and \*t and \*w
- register the package "tipa" if \textipa is detected in an equation
- add a \textipa equation to the testfile

(I failed to implement support for the TIPA character "\t*{ }" and the command "\=*".)
2013-02-19 00:07:24 +01:00
Julien Rioux
9dd1b7c578 Use the LyX name of encodings instead of the LaTeX names.
- Use the LyX name of encodings instead of the LaTeX names.
  The LyX name must be unique, while the name used by LaTeX
  not necessarily, e.g. different packages might implement
  support for the same encoding.

- Rename koi8 to koi8-r, so that the LyX and LaTeX names match.

- Rename euc-jp-plain to euc-jp-platex, jis-plain to jis-platex
  and shift-jis-plain to shift-jis-platex.

- Add utf8-platex encoding (fixes #8408).

LyX file format incremented to 463.
2013-02-18 23:52:42 +01:00
Scott Kostyshak
4367d81b01 exemple-powerdot.lyx: set default format to ps2pdf
This way compilation works out of the box.
2013-02-18 15:53:14 -05:00
Georg Baum
2a1eb2fe9b Fix encoding for japanese documents
The header parameter \inputenc uses the LaTeX name, so we need must not set
it to the LyX name for japanese documents.
2013-02-18 21:22:21 +01:00
Georg Baum
4061e5bbdb Fix missing language option for CJKutf8.tex 2013-02-18 20:05:33 +01:00
Kornel Benko
248c6ded33 Cmake tests: Add lyx-files for export testing recursively. 2013-02-18 16:34:19 +01:00
Juergen Spitzmueller
09a2598556 linguistics.lyx: document diacritics insertion 2013-02-18 16:26:07 +01:00
Richard Heck
ef88b88aec Typo. 2013-02-18 09:44:27 -05:00