Merge branch 'master' of git.lyx.org:lyx

Conflicts:
	po/de.po

Signed-off-by: Jürgen Spitzmüller <jspitzm@linux-np7j.(none)>
This commit is contained in:
Jürgen Spitzmüller 2012-04-29 11:51:07 +02:00
commit 8995a8387a
122 changed files with 9268 additions and 7362 deletions

14
.gitignore vendored Normal file
View File

@ -0,0 +1,14 @@
*.o
*~
.deps/
Makefile
Makefile.in
aclocal.m4
configure
autom4te.cache/
config.h.in
config.h
config.log
config.status
lyx.1
stamp-h1

View File

@ -8,7 +8,7 @@ Pre-compiled packages with dependencies are provided for this environment.
Compiling with Microsoft Visual C++
===================================
These instructions assume the LyX source code is installed in C:\LyX\lyx-20
These instructions assume the LyX source code is in C:\LyX\lyx-20
You can also use another directory if you prefer.
1 Install MSVC 2010
@ -16,80 +16,77 @@ Compiling with Microsoft Visual C++
If you don't have Visual C++ 2010 installed, get the free Express edition from
http://www.microsoft.com/express/Downloads/
All dependencies are linked against the MSVC 2010 runtime and won't work in
combination with MSVC 2008. You'll get crashes and other unexpected issues.
(All dependencies are linked against the MSVC 2010 runtime and won't work in
combination with MSVC 2008. You'll get crashes and other unexpected issues.)
2 Compile Qt
2 Install Qt
Download the latest Qt everywhere open source version from
http://get.qt.nokia.com/qt/source/ (e.g. qt-everywhere-opensource-src-4.7.1.zip).
Follow the instructions on http://doc.qt.nokia.com/4.7/install-win.html to
compile using MSVC 2010.
The pre-compiled version of Qt cannot be used. It uses the 2008 version of the
MSVC runtime which will result in crashes.
Download the latest Qt for Open Source C++ development on Windows (VS2010)
from http://qt.nokia.com/downloads/windows-cpp-vs2010.
3 Install Python
Install the latest Python 2.x version from
Install the latest Python 2.x version (not Python 3.x !) from
http://www.python.org/download/
4 Install CMake
Install the latest CMake from http://www.cmake.org
Install the latest CMakescript from
http://sourceforge.net/projects/cmakescript/files/latest/download
5 Configure
- Run the CMake GUI.
Open the script file build.bat that you find in your LyX folder
C:\LyX\lyx-20\development\cmake
with a text editor. Now:
- Set the source code path to C:\LyX\lyx-20
Set the build path to C:\LyX\lyx-20-build
Click Configure and set the generator to Visual Studio 10.
- Change there "D:\Qt\bin" to the path where you installed Qt
- Enable LYX_DEPENDENCIES_DOWNLOAD and click Configure.
Pre-compiled dependencies will automatically be downloaded.
- Set the GNUWIN32_DIR to "C:\LyX\lyx-20\msvc2010-deps"
(or wherever you have copied the LyX dependencies)
- Set the LYX_SOURCE to "C:\LyX\lyx-20"
(or wherever you have copied the LyX source files)
- Set the LYX_BUILD to "C:\LyX\lyx-20-build"
(or wherever you want to store the compilation result)
- Set QT_QMAKE_EXECUTABLE to e.g.
C:\Qt\qt-everywhere-opensource-src-4.7.1\bin\qmake.exe
and Configure again.
- Enable the LYX_INSTALL option, set CMAKE_INSTALL_PREFIX to
C:\LyX\lyx-20-install and click Configure.
- Check the Advanced checkbox.
Set GETTEXT_MSGFMT_EXECUTABLE to
C:\LyX\lyx-20-build\msvc2010-deps\deps20\gettext-tools\msgfmt.exe,
and do the same for the other gettext tools.
- Click Generate.
(- If you don't want to use the fast compilation mode for debug builds,
remove the statement "-GNinja".)
6 Compile
A Microsoft Visual C++ solution should have been generated at
C:\LyX\lyx-20-build\lyx.sln
Compile the INSTALL project to get a LyX installation in
C:\LyX\lyx-20-install
- Open a MSVC Command prompt via Windows' start menu and switch
to the folder
C:\LyX\lyx-20\development\cmake
- To build LyX with debugging information for development, execute
the build script with the command
build devel
- To build LyX for a release, execute
the script with the command
build install
7 Copy dependencies
7 Copy dependencies
Copy
- C:\LyX\lyx-20-build\msvc2010-deps\deps20\bin
- C:\LyX\lyx-20-build\msvc2010-deps\deps20\imagemagick
- C:\LyX\lyx-20-build\msvc2010-deps\deps20\python
- C:\LyX\lyx-20-build\msvc2010-deps\deps20\ghostscript
- C:\LyX\lyx-20-build\msvc2010-deps\deps20\Resources
to C:\LyX\lyx-20-install
Copy
- C:\LyX\lyx-20\msvc2010-deps\deps20\bin
- C:\LyX\lyx-20\msvc2010-deps\deps20\imagemagick
- C:\LyX\lyx-20\msvc2010-deps\deps20\python
- C:\LyX\lyx-20\msvc2010-deps\deps20\ghostscript
- C:\LyX\lyx-20\msvc2010-deps\deps20\Resources
to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build)
or to C:\LyX\lyx-20-build\bin\Debug (debug build)
And copy from the Qt bin directory
(e.g. C:\Qt\qt-everywhere-opensource-src-4.7.1\bin)
(e.g. C:\Qt\bin)
QtCore4.dll
QtGui4.dll
QtCore4d.dll (if compiling Debug version)
QtGui4d.dll (if compiling Debug version)
to C:\LyX\lyx-20-install\bin
to C:\LyX\lyx-20-build\LYX_INSTALLED\bin (install build)
or to C:\LyX\lyx-20-build\bin\Debug (debug build)
8 Define path prefix
8 Define path prefix
Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist,
Add the following line to C:\LyX\lyx-20-install\Resources\lyxrc.dist,
so LyX will find the bundled tools such as Python, ImageMagick
and Ghostscript:

View File

@ -87,3 +87,8 @@ Known issues in version 2.1.0
Caveats when upgrading from earlier versions to 2.1.x
-------------------------------------------------------
In order to improve reported scrolling slowness, we changed the way screen
painting is done. This, however, can slow down the performance on remote
X connections and we provide RC_USE_QIMAGE variable, which brings back
the old way of painting (when set to false).

1
boost/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
liblyxboost.a

6
config/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
config.guess
config.sub
depcomp
install-sh
missing
py-compile

1
development/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lyx.spec

View File

@ -11,8 +11,17 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
-----------------------
2012-04-16 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* Format incremented to 430 (2773345)
Support \lstlistoflistings in InsetTOC
2012-03-21 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 429 (ea54461d85)
support for table rotation
(table option "rotate" specifies now a number with the rotation angle)
2012-03-16 Uwe Stöhr <uwestoehr@web.de>
* Format incremented to 428
* Format incremented to 428 (7a46910f)
support for table cell rotation
(table cell option "rotate" specifies now a number with the rotation angle)

2
development/MacOSX/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
Info.plist
lyxrc.dist

View File

@ -79,7 +79,7 @@ if [%2]==[] (
if "%1%" == "devel" (
REM Build solution to develop LyX
cmake %LYX_SOURCE% -G%USED_STUDIO% -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE %DEPENDENCIES_DOWNLOAD%
cmake %LYX_SOURCE% -GNinja -G%USED_STUDIO% -DLYX_MERGE_FILES=0 -DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE %DEPENDENCIES_DOWNLOAD%
msbuild lyx.sln /p:Configuration=Debug /t:LyX /t:tex2lyx
)

1
development/cygwin/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lyxrc.dist

6
lib/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
lyx.desktop
lyx.desktop-temp
lyx.png
lyx.svg
*.pyc

View File

@ -149,7 +149,7 @@
@iE-mail: edscott () xfce ! org
Bug fixes
@bIgnacio García
@iE-mail: ignacio.garcia () tele2 ! es
@iE-mail: ignacio.gmorales () gmail ! com
Spanish translation of documentations
@bMichael Gerz
@iE-mail: michael.gerz () teststep ! org

View File

@ -265,7 +265,6 @@
\TestPackage{eso-pic}
\TestPackage{fontspec}
\TestPackage{hhline}
\TestPackage{ifsym}
\TestPackage{ifthen}
\TestPackage{fancybox}
\TestPackage{fancyhdr}
@ -317,7 +316,6 @@
\TestPackage{url}
\TestPackage{varioref}
\TestPackage{wasy}
\TestPackage{wasysym}
\TestPackage{wrapfig}
\TestPackage{xargs}
\TestPackage{xcolor}
@ -365,6 +363,16 @@
\TestPackage{tipx}
% necessary to get correct size for InstantPreview images created by dvipng
\TestPackage[c70fs.fd]{zhmetrics}
% symbol packakges supported by LyX for items and the special character dialog
% see the unicodesymbols file
\TestPackage{ascii}
\TestPackage{bbding}
\TestPackage{ifsym}
\TestPackage{marvosym}
\TestPackage{pmboxdraw}
\TestPackage{textgreek}
\TestPackage{txfonts}
\TestPackage{wasysym}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -62,7 +62,7 @@ def cmdOutput(cmd):
'''
if os.name == 'nt':
b = False
cmd = 'cmd /d /c ' + cmd
cmd = 'cmd /d /c pushd ' + os.getcwd() + '&' + cmd
else:
b = True
pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \

View File

@ -132,6 +132,7 @@ End
\html_css_as_file 0
\html_be_strict true
\author -195340706 "Georg Baum"
\author 5863208 "ab"
\end_header
\begin_body
@ -978,6 +979,40 @@ languages
\end_inset
this file contains a list of all the languages currently supported by LyX.
\change_inserted -195340706 1334775793
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
\change_inserted -195340706 1334775793
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -195340706 1334775793
layouttranslations
\end_layout
\end_inset
this file contains translations for internationalized paragraph styles
(see sec.
\begin_inset space \thinspace{}
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:I18n"
\end_inset
).
\change_unchanged
\end_layout
\begin_layout Section
@ -13028,8 +13063,25 @@ babel
\begin_layout Standard
One important point to note here is that the translations are provided by
LyX itself, through the same mechanism it uses for internationalization
of the user interface.
LyX itself, through the
\change_inserted -195340706 1334775793
file
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -195340706 1334775793
layouttranslations
\end_layout
\end_inset
\change_deleted -195340706 1334775793
same mechanism it uses for internationalization of the user interface
\change_unchanged
.
This means, in effect, that
\begin_inset Flex Code
status collapsed
@ -13052,9 +13104,34 @@ BabelPreamble
are really only of use in layout files that are provided with LyX, since
text entered in user-created layout files will not be seen by LyX's internation
alization routines.
alization routines
\change_inserted -195340706 1334775793
unless the
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted -195340706 1334775793
layouttranslations
\end_layout
\end_inset
file is modified accordingly
\change_unchanged
.
That said, however, any layout created with the intention that it will
be included with LyX should use these tags where appropriate.
\change_inserted -195340706 1334775793
Please note that the paragraph style translations provided by LyX will
never change with a minor update (e.g.
from version 2.1.x to 2.1.y).
It is however quite likely that a major update (e.g.
from 2.0.x to 2.1.y) will introduce new translations or corrections.
\change_unchanged
\end_layout
\begin_layout Subsection
@ -13961,7 +14038,12 @@ status collapsed
\end_inset
indicates the inset whose layout is being defined, and here there are two
indicates the inset whose layout is being defined, and here there are
\change_inserted 5863208 1334489266
three
\change_deleted 5863208 1334489267
two
\change_unchanged
cases.
\end_layout
@ -14238,6 +14320,65 @@ LyXType
\end_inset
entry, declaring which type of inset it defines.
\change_inserted 5863208 1334489312
\end_layout
\begin_layout Enumerate
\change_inserted 5863208 1334492248
The layout for user specific branch is being defined.
In this case,
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted 5863208 1334489384
<Type>
\end_layout
\end_inset
must be of the form
\begin_inset Quotes eld
\end_inset
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted 5863208 1334489392
Branch:<name>
\end_layout
\end_inset
\begin_inset Quotes erd
\end_inset
, where
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
\change_inserted 5863208 1334489384
name
\end_layout
\end_inset
may be be any valid identifier of branch defined in user's document.
The identifier may include spaces, but in that case the whole thing must
be wrapped in quotes.
The main purpose of this feature is to allow LaTeX wrapping around specific
branches as user needs.
\change_unchanged
\end_layout
\begin_layout Standard
@ -14254,6 +14395,33 @@ InsetLayout
definition can contain the following entries:
\end_layout
\begin_layout Description
\change_inserted -195340706 1333913893
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
BabelPreamble
\end_layout
\end_inset
Preamble for changing languages.
See section
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:I18n"
\end_inset
.
\end_layout
\begin_layout Description
\begin_inset Flex Code
status collapsed
@ -14906,6 +15074,33 @@ Branch
) modify this label on the fly.
\end_layout
\begin_layout Description
\change_inserted -195340706 1333913893
\begin_inset Flex Code
status collapsed
\begin_layout Plain Layout
LangPreamble
\end_layout
\end_inset
Language dependent preamble.
See section
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:I18n"
\end_inset
.
\end_layout
\begin_layout Description
\begin_inset Flex Code
status collapsed

View File

@ -39685,6 +39685,27 @@ reference "lst:Example-Listing"
\end_inset
\change_inserted -195340706 1334604968
.
A list of listings which contains all listings with captions can be created
via the
\family sans
Insert\SpecialChar \menuseparator
List
\begin_inset space ~
\end_inset
/
\begin_inset space ~
\end_inset
TOC\SpecialChar \menuseparator
List of Listings
\family default
submenu.
The list entries are the listing caption and the listing number.
\change_unchanged
\end_layout
\begin_layout Standard

View File

@ -209,11 +209,12 @@
\bullet 1 0 6 -1
\bullet 2 2 35 -1
\bullet 3 2 7 -1
\tracking_changes false
\tracking_changes true
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author -1853239151 "scott"
\end_header
\begin_body
@ -292,9 +293,9 @@ braket, cancel, eurosym, mathdots, mhchem
was
\series default
should be installed.
If they are not installed the document can be export anyway but the sections
If they are not installed the document can be exported anyway but the sections
where the packages are required will not appear in the output.
An exeption is
An exception is
\series bold
mhchem
\series default
@ -353,7 +354,7 @@ Insert
\series default
Math
\family default
, or the
or the
\family sans
math
\family default
@ -376,7 +377,7 @@ If not specially mentioned the commands are only available within formulas.
\family sans
Use AMS math package
\family default
must be used in the document settings (menu
must be checked in the document settings (menu
\family sans
Document\SpecialChar \menuseparator
Settings\SpecialChar \menuseparator
@ -496,7 +497,7 @@ arg "math-mode"
\end_inset
.
\begin_inset Newline newline
\end_inset
@ -510,8 +511,8 @@ Formula ! display style
\end_inset
that will appear bigger and in an own paragraph, use one of these shortcuts:
which will appear bigger, has a different format, and will be in a separate
paragraph, use one of these shortcuts:
\begin_inset Info
type "shortcuts"
arg "math-display"
@ -735,7 +736,7 @@ Preamble
\begin_layout Standard
To edit matrices, case differentiations and multiline formulas subsequently,
the menus
use the menus
\family sans
Edit\SpecialChar \menuseparator
Math
@ -757,7 +758,7 @@ Columns,
\family sans
table toolbar
\family default
can be used.
.
When lines and columns are swapped via the menu, the column or line where
the cursor is in is exchanged with the column to the right or the line
below, respectively.
@ -840,7 +841,7 @@ text
.
The text appears black in LyX and can therefore be distinguished from the
other formula parts that appear blue.
other formula parts which appear blue.
In the output mathematical text is set upright, in contrary to other formula
parts.
\end_layout
@ -870,7 +871,7 @@ argument}
\end_layout
\begin_layout Standard
A command starts always with a backslash
A command always starts with a backslash
\begin_inset Quotes gld
\end_inset
@ -898,8 +899,8 @@ T@TeX-braces
\end_inset
.
If you add in a formula a left brace to a command name, LyX creates automatical
ly a TeX-brace.
If you add in a formula a left brace to a command name, LyX automatically
creates a TeX-brace.
In all other cases TeX-braces are created in formulas with the command
\series bold
@ -908,7 +909,7 @@ ly a TeX-brace.
{
\series default
.
TeX-braces appear red in LyX, in contrary to normal braces that appear
TeX-braces appear red in LyX, in contrary to normal braces which appear
blue.
In TeX-mode no command is needed to get TeX-braces.
TeX-braces don't appear in the output.
@ -929,8 +930,8 @@ always
\begin_layout Standard
A protected space is inserted with
\begin_inset Info
type "shortcut"
arg "space-insert protected"
type "shortcuts"
arg "command-alternatives space-insert protected ; math-space"
\end_inset
.
@ -998,6 +999,35 @@ An arrow like
\end_inset
denotes the usage of the corresponding arrow key on the keyboard.
\change_inserted -1853239151 1332304617
\family sans
Tab
\family default
can often be used to replace
\begin_inset Formula $\to$
\end_inset
and
\begin_inset Formula $\downarrow$
\end_inset
, and
\family sans
Shift+Tab
\family default
for
\begin_inset Formula $\leftarrow$
\end_inset
and
\begin_inset Formula $\uparrow$
\end_inset
.
\change_unchanged
\end_layout
\begin_layout Subsection*
@ -1521,7 +1551,7 @@ _
\end_inset
, exponents with a caret
, exponents with a caret
\begin_inset Quotes eld
\end_inset
@ -1678,14 +1708,14 @@ As the caret is in some languages an accent, vowels will be accentuated
status collapsed
\begin_layout Plain Layout
Depending on the used keyboard settings this can also happen for other character
s than vowels.
Depending on the used keyboard settings this can also happen for characters
other than vowels.
\end_layout
\end_inset
.
To get in this case exponents, press
To get exponents in this case, press
\family sans
Space
\family default
@ -1771,8 +1801,7 @@ dfrac
\end_inset
a fraction can be created that has in any case the size of a display style
formula.
a fraction can be created that always has the size of a display style formula.
With
\series bold
@ -2188,15 +2217,13 @@ cfrac
\end_layout
\begin_layout Standard
\begin_inset Formula $\cfrac[l]{A}{B+C}$
\end_inset
,
\begin_inset Formula $\cfrac{A}{B+C}$
\end_inset
\series bold
\begin_inset Formula
\[
\cfrac[l]{A}{B+C}\,,\,\cfrac{A}{B+C}\,,\,\cfrac[r]{A}{B+C}
\]
,
\begin_inset Formula $\cfrac[r]{A}{B+C}$
\end_inset
@ -2370,6 +2397,13 @@ reference "sub:Self-defined-Fractions"
.
\end_layout
\begin_layout Standard
\begin_inset Newpage newpage
\end_inset
\end_layout
\begin_layout Subsection
Roots
\begin_inset Index idx
@ -2746,19 +2780,19 @@ binom
\end_inset
.
Analog to fractions (
As with fractions (
\series bold
\backslash
frac
\series default
) there are besides
) in addition to
\series bold
\backslash
binom
\series default
the commands
there are the commands
\series bold
\backslash
@ -3251,7 +3285,7 @@ After inserting
\backslash
cases
\series default
or the usage of the math toolbar button
or pressing the math toolbar button
\begin_inset Graphics
filename ../images/math/cases.png
scale 85
@ -3305,7 +3339,7 @@ Negations
\end_layout
\begin_layout Standard
By inserting of
By inserting
\series bold
\backslash
@ -3441,8 +3475,8 @@ parallel
\end_layout
\begin_layout Standard
The last example shows, that not all negations look good.
Therefore there are for some negations special commands (see
The last example shows that not all negations look good.
Therefore there are special commands for some negations (see
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Mathematical-Symbols"
@ -4024,7 +4058,7 @@ vphantom
\end_layout
\begin_layout Standard
For example creates
For example the command
\series bold
\backslash
@ -4049,7 +4083,7 @@ a
\backslash
int
\series default
space for the height of the integral sign,
creates space for the height of the integral sign,
\begin_inset Foot
status collapsed
@ -4084,7 +4118,7 @@ reference "sub:Multiline-Brackets"
\end_layout
\begin_layout Standard
Placeholders can also be used for text when it is inserted via the menu
Placeholders can also be used for text when they are inserted via the menu
\family sans
Insert\SpecialChar \menuseparator
@ -4356,15 +4390,7 @@ underline
\end_layout
\begin_layout Standard
To double underline e.
\begin_inset space \thinspace{}
\end_inset
g.
\begin_inset space \space{}
\end_inset
results, one uses
To double underline use
\series bold
\backslash
@ -5068,7 +5094,7 @@ dotfill
\end_inset
the rest of a line with dots.
The effect of these commands is the same like with
The effect of these commands is the same as with
\series bold
\backslash
@ -5115,7 +5141,7 @@ B
\end_layout
\begin_layout Standard
Analog to
Similar to
\series bold
\backslash
@ -5191,8 +5217,7 @@ Matrix
.
In the matrix dialog you can specify the number of columns and rows, the
alignment and the decoration.
The vertical alignment is hereby only of importance for matrices in inline
formulas:
The vertical alignment is only of importance for matrices in inline formulas:
\end_layout
\begin_layout Standard
@ -5254,8 +5279,8 @@ matrix where the first column is left aligned, the second and third are
lccr
\series default
.
Normally are in a matrix all columns centered, therefore the default is
for every column is a
Normally in a matrix all columns are centered, therefore the default for
every column is a
\series bold
c
\series default
@ -6538,7 +6563,7 @@ textbackslash
\backslash
\series default
produces there a line break.
produces a line break there.
\end_layout
\end_inset
@ -7942,7 +7967,7 @@ reference "sub:Predefined-Space"
status collapsed
\begin_layout Plain Layout
because a bracket is not handled as character, see
because a bracket is not handled as a character, see
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Binary-Operators"
@ -8053,7 +8078,7 @@ The first formula row is the same as the second row of the previous example,
with the difference that the brace is above.
The second row contains the formula together with the second brace.
To avoid that there is space between the upper brace in the first row and
the formula, the row spacing need to be reduced.
the formula, the row spacing needs to be reduced.
This is not easily possible due to a bug in LyX
\begin_inset Foot
status collapsed
@ -8072,7 +8097,7 @@ target "http://www.lyx.org/trac/ticket/1505"
\end_inset
.
As solution for the problem, the global formula row separation
As a solution for the problem, the global formula row separation
\series bold
\backslash
@ -8897,7 +8922,7 @@ dasharrow
\begin_inset VSpace medskip
\end_inset
Arrows used as accent like e.
Arrows used as accents like e.
\begin_inset space \thinspace{}
\end_inset
@ -9479,7 +9504,7 @@ nwarrow
\begin_inset VSpace medskip
\end_inset
Vertical arrows can be used also as delimiter together with the commands
Vertical arrows can be used also as delimiters together with the commands
described in
\begin_inset CommandInset ref
LatexCommand ref
@ -10656,7 +10681,7 @@ overset
\backslash
underset
\series default
also symbols and characters can be accented; with
symbols and characters can also be accented; with
\series bold
\backslash
@ -11219,11 +11244,11 @@ Space ! horizontal ! predefined
\end_layout
\begin_layout Standard
Sometimes it is necessary to insert horizontal space to a formula.
Sometimes it is necessary to insert horizontal space into a formula.
This is done by inserting a protected space (shortcut
\begin_inset Info
type "shortcut"
arg "space-insert protected"
arg "command-alternatives space-insert protected ; math-space"
\end_inset
).
@ -11651,7 +11676,7 @@ Result
\begin_layout Standard
Negative spaces can lead to characters overlapping each other.
Thus they can be used to enforce ligatures, what is e.
Thus they can be used to enforce ligatures, which are e.
\begin_inset space \thinspace{}
\end_inset
@ -12146,8 +12171,7 @@ spce
.
The length may also be negative.
To insert so many space that the formula uses all available space, the
command
To insert as much space as is available, the command
\series bold
\backslash
@ -12495,7 +12519,7 @@ setlength
\end_inset
that has the following scheme:
which has the following scheme:
\end_layout
\begin_layout Standard
@ -12679,7 +12703,7 @@ Boxes ! with frame
\end_layout
\begin_layout Standard
It is possible to frame formulas or parts of it with the commands
It is possible to frame a formula or part of one with the commands
\series bold
\backslash
@ -12719,7 +12743,7 @@ boxed
\end_layout
\begin_layout Standard
When one of these commands is inserted to a formula, a blue box appears
When one of these commands is inserted in a formula, a blue box appears
within a frame to enter formula parts.
For
\series bold
@ -12762,13 +12786,13 @@ boxed
\end_layout
\begin_layout Standard
As extension to
An extension to
\series bold
\backslash
fbox
\series default
there is the command
is the command
\series bold
\backslash
@ -12827,7 +12851,7 @@ r
\begin_inset Newline newline
\end_inset
Is no width given, also no position can be given.
If no width is given, also no position can be given.
In this case the frame width is adjusted to the box content like for
\series bold
@ -13683,8 +13707,8 @@ When text is colored somewhere in the document with a predefined color,
color
\series default
automatically.
Thus it is possible that the package is loaded twice, but this doesn't
arise problems.
Thus it is possible that the package is loaded twice, but this does not
cause problems.
\end_layout
\end_inset
@ -14020,7 +14044,7 @@ C=D
colorbox
\series default
only colors the box but not the characters in the box.
To color all characters, the whole formula is highlighted and the wanted
To color all characters, the whole formula is highlighted and the desired
color is chosen in the
\family sans
Text
@ -14048,7 +14072,7 @@ Style\SpecialChar \menuseparator
Customized
\family default
.
The formula number has then the same color as the formula.
The formula number then has the same color as the formula.
When the formula number should get another color than the formula characters,
the color must be changed within the formula.
\end_layout
@ -14486,7 +14510,7 @@ Boxes ! as paragraph
\end_layout
\begin_layout Standard
A box that can contain several lines and paragraphs, a so called paragraph
A box that can contain several lines and paragraphs, a so-called paragraph
box (parbox), can be created with the menu
\family sans
Insert\SpecialChar \menuseparator
@ -14556,7 +14580,7 @@ Such a box is created by right-clicking on the gray box inset.
\emph on
Decoration
\emph default
: Recangular box,
: Rectangular box,
\emph on
Inner Box
\emph default
@ -14597,7 +14621,7 @@ parbox
\end_inset
that has the following scheme:
which has the following scheme:
\end_layout
\begin_layout Standard
@ -14622,13 +14646,29 @@ t
\emph on
b
\emph default
for bottom means that the box is aligned within the surrounding text with
its last line.
for
\begin_inset Quotes eld
\end_inset
bottom
\begin_inset Quotes erd
\end_inset
means that the box is aligned within the surrounding text with its last
line.
With
\emph on
t
\emph default
for top this is done with the first line.
for
\begin_inset Quotes eld
\end_inset
top
\begin_inset Quotes erd
\end_inset
this is done with the first line.
When no position is given, the box will be vertically centered, see section
\emph on
@ -14834,7 +14874,7 @@ fboxsep 3pt
\begin_inset VSpace medskip
\end_inset
As a parbox is used as argument of
As a parbox is used as the argument of
\series bold
\backslash
@ -15745,7 +15785,7 @@ The operators are called big because they are bigger than the sometimes
\end_layout
\begin_layout Standard
For all integral operators there is a second version available, ending on
For all integral operators there is a second version available, ending in
\series bold
op
@ -16697,7 +16737,7 @@ Operators ! binary
\begin_layout Standard
Binary operators are surrounded by space when there is a character before
and behind them.
and after them.
\begin_inset VSpace medskip
\end_inset
@ -19225,8 +19265,8 @@ tiny
\end_layout
\begin_layout Standard
The size produced by the commands depends on the document font size, that
corresponds with the command
The size produced by the commands depends on the document font size, which
corresponds to the command
\series bold
\backslash
@ -24913,7 +24953,7 @@ italic
\end_inset
.
Therefore there are predefined functions, that are additionally a bit separated
Therefore there are predefined functionswhich are additionally a bit separated
from prefactors.
They are inserted as commands starting with a backslash before their name.
\end_layout
@ -25567,7 +25607,7 @@ Write the formula as usual, mark the formula name, in our example the letters
sgn
\emph default
, and change it to mathematical text.
At last a space is inserted between prefactor and function.
Finally, a space is inserted between prefactor and function.
\end_layout
\begin_layout Standard
@ -25692,7 +25732,7 @@ Limits
\end_layout
\begin_layout Standard
For limits there are defined besides
For limits, in addition to the commands
\series bold
\backslash
@ -25722,7 +25762,7 @@ liminf
\backslash
limsup
\series default
furthermore the following functions:
the following functions are defined:
\end_layout
\begin_layout Standard
@ -28181,6 +28221,11 @@ reference "sub:Standard-align-Environment"
\end_inset
.
\change_inserted -1853239151 1334713000
The align environment is recommended.
\change_unchanged
\end_layout
\begin_layout Standard
@ -28673,7 +28718,7 @@ Long formulas can be typeset using these methods:
\end_layout
\begin_layout Itemize
When one side of the equation is much shorther than the line width, this
When one side of the equation is much shorter than the line width, this
one is chosen for the left side and the right side is typeset over two
lines:
\begin_inset Formula
@ -28685,7 +28730,7 @@ H & = & W_{SB}+W_{mv}+W_{D}-\frac{\hbar^{2}}{2m_{0}}\Delta-\frac{\hbar^{2}}{2m_{
\end_inset
The minus sign at the beginning of the second line does normally not appear
as operator because it is the first character of the line.
as an operator because it is the first character of the line.
Thus it would not be surrounded by space and could not be distinguished
from the fraction bar.
To avoid this, 3
@ -28703,7 +28748,7 @@ hspace
status collapsed
\begin_layout Plain Layout
more about
for more about
\series bold
\backslash
@ -28734,6 +28779,10 @@ hspace
\end_inset
\change_inserted -1853239151 1334712095
Note that the label is only applied to the second line.
\change_unchanged
\end_layout
\begin_layout Itemize
@ -28756,8 +28805,8 @@ lefteqn
\end_inset
is used.
It is inserted to the first column of the first line and effects that all
further insertions overwrite the following columns:
It is inserted in the first column of the first line and causes all further
insertions to overwrite the following columns:
\begin_inset Formula
\begin{eqnarray}
\lefteqn{4x^{2}\left(B^{2}+x_{0}^{2}\right)+4x_{0}x\left(D-B^{2}\right)+B^{2}\left(B^{2}-2r_{g}^{2}+2x_{0}^{2}-2r_{k}^{2}\right)+D^{2}}\nonumber \\
@ -29085,7 +29134,7 @@ Align Environments
\begin_layout Standard
Align environments can be used for every kind of multiline formulas.
They are specially useful to set several formulas side by side.
They are especially useful to set several formulas side by side.
\end_layout
\begin_layout Standard
@ -29666,7 +29715,7 @@ Formula ! multiline ! formula parts
\begin_layout Standard
To display only parts of a formula with multiple lines, one of the following
environments are used:
environments is used:
\series bold
aligned
\series default
@ -30019,7 +30068,7 @@ arg "math-number-toggle"
\end_inset
).
The formula number is displayed in LyX behind the formula as number sign
The formula number is displayed in LyX behind the formula as a number sign
in parentheses.
The number sign is replaced in the output by the formula number.
\end_layout
@ -30124,7 +30173,19 @@ section labels.
Insert\SpecialChar \menuseparator
Label
\family default
is used again.
is used again
\change_inserted -1853239151 1334715366
or you can right-click on the formula and click on
\begin_inset Quotes eld
\end_inset
equation label
\begin_inset Quotes erd
\end_inset
\change_unchanged
.
\end_layout
\begin_layout Standard
@ -30693,7 +30754,7 @@ spce
something
\series default
was inserted to the formula.
was inserted in the formula.
\end_layout
\begin_layout Standard
@ -32690,7 +32751,7 @@ To create the relations there are the following commands:
\series bold
@VVV
\series default
an down arrow and
a down arrow and
\series bold
@|
\series default
@ -32711,7 +32772,7 @@ All arrows can be labeled as follows:
\end_layout
\begin_layout Itemize
Is text inserted between the first and second < or >, resp., it is placed
If text inserted between the first and second < or >, resp., it is placed
above the arrow.
When it is inserted between the second and third one, it appears under
the arrow.
@ -33317,7 +33378,7 @@ To create a new command for
\backslash
fcolorbox
\series default
where the color for the box needn't to be specified, the argument for the
where the color for the box need not be specified, the argument for the
color is defined optional:
\begin_inset VSpace medskip
\end_inset
@ -33646,7 +33707,7 @@ Macros
\begin_layout Standard
User-defined commands are especially convenient for complex expressions.
When you are for example dealing in a document with quadratic equations,
When you are for example dealing with a document that has quadratic equations,
the same solution type occurs several times.
The general form of a quadratic equation is
\begin_inset Formula
@ -33862,7 +33923,11 @@ g
.
Argument placeholders are displayed red.
Maximum 9 arguments are possible.
A maximum of 9
\begin_inset space ~
\end_inset
arguments are possible.
Optional arguments are created with the toolbar button
\begin_inset Graphics
filename ../images/math-macro-add-optional-param.png
@ -34032,7 +34097,7 @@ newcommand
\end_layout
\begin_layout Standard
Math macros can also be directly be created from a
Math macros can also be directly created from a
\series bold
\backslash
@ -34074,8 +34139,8 @@ newcommand
\end_layout
\begin_layout Standard
Math macros currently yet have the problem that further formulas in macro
definitions are handled wrongly.
Math macros currently have the problem that further formulas in macro definition
s are handled wrongly.
Therefore the example
\series bold
@ -36366,7 +36431,7 @@ usepackage{multicol}
status open
\begin_layout Plain Layout
Note herby that the setting
Note that in this case the setting
\family sans
Two-column
\begin_inset space ~
@ -36761,7 +36826,7 @@ reference "eq:within"
\end_inset
consists of five columns whereas in the first two columns contain the equation,
consists of five columns where in the first two columns contain the equation,
the third the matrix and the last one an empty TeX-brace.
\begin_inset Formula
\begin{flalign}
@ -36897,8 +36962,8 @@ upgreek
\end_inset
They are created when the command for a small Greek letters is started
with
They are created when the command for a small Greek letter is started with
\series bold
up
\series default
@ -37099,7 +37164,7 @@ rs.
\begin_layout Standard
The encoding of several characters is saved in definition files.
Fore example the encoding
For example the encoding
\series bold
latin9
\series default
@ -37107,11 +37172,11 @@ latin9
\series bold
latin9.def
\series default
that is in the installation folder of LaTeX.
which is in the installation folder of LaTeX.
Encodings should only be changed via the LaTeX-preamble and not in the
definition files.
Otherwise own documents could not be edited by other LyX users working
on other computers.
Otherwise documents could not be edited by other LyX users working on other
computers.
\end_layout
\begin_layout Standard
@ -37119,8 +37184,8 @@ latin9.def
\end_inset
Besides the centered dot, in this document the degree sign ° is defined
with the following LaTeX-preamble line so that it can directly be inserted
to a formula:
with the following LaTeX-preamble line so that it can be directly inserted
into a formula:
\end_layout
\begin_layout Standard

View File

@ -134,7 +134,7 @@ enumitem
\html_math_output 0
\html_css_as_file 0
\html_be_strict true
\author 424524441 "rgheck"
\author 5863208 "ab"
\author 2090807402 "usti"
\end_header
@ -29285,6 +29285,28 @@ Inside math, the same effect can be achieved using math macros, see the
Math
\emph default
manual.
\change_inserted 5863208 1334492666
\end_layout
\begin_layout Standard
\change_inserted 5863208 1334493356
Each type of branch is allowed to have its specific style defined in layout
files (e.g.
any branch inset can be automatically wrapped by your own LaTeX commands.).
For this advanced usage, please study Customization manual (in particular
section
\begin_inset Quotes eld
\end_inset
Flex insets and InsetLayout
\begin_inset Quotes erd
\end_inset
).
\change_unchanged
\end_layout
\begin_layout Section

View File

@ -2165,15 +2165,11 @@ cfrac
\begin_layout Standard
\series bold
\begin_inset Formula $\cfrac[l]{A}{B+C}$
\end_inset
\begin_inset Formula
\[
\cfrac[l]{A}{B+C}\,,\,\cfrac{A}{B+C}\,,\,\cfrac[r]{A}{B+C}
\]
,
\begin_inset Formula $\cfrac{A}{B+C}$
\end_inset
,
\begin_inset Formula $\cfrac[r]{A}{B+C}$
\end_inset
@ -2347,6 +2343,13 @@ reference "sub:Selbstdefinierte-Brüche"
erklärt.
\end_layout
\begin_layout Standard
\begin_inset Newpage newpage
\end_inset
\end_layout
\begin_layout Subsection
Wurzeln
\begin_inset Index idx
@ -8902,7 +8905,7 @@ dasharrow
\begin_inset VSpace medskip
\end_inset
Als Akzent verwendete Pfeile, wie z.
Als Akzente verwendete Pfeile, wie z.
\begin_inset space \thinspace{}
\end_inset
@ -14620,13 +14623,29 @@ t
\emph on
b
\emph default
steht für bottom und bedeutet, dass die letzte Absatzzeile in den umstehenden
Text eingepasst wird.
steht für
\begin_inset Quotes gld
\end_inset
bottom
\begin_inset Quotes grd
\end_inset
(unten) und bedeutet, dass die letzte Absatzzeile in den umstehenden Text
eingepasst wird.
Bei
\emph on
t
\emph default
wie top geschieht dies für die erste Zeile.
wie
\begin_inset Quotes gld
\end_inset
top
\begin_inset Quotes grd
\end_inset
(oben) geschieht dies für die erste Zeile.
Wird keine Position angegeben, wird der Absatz in mittlerer Höhe eingepasst,
siehe das Kapitel
\emph on
@ -33971,7 +33990,11 @@ B.
.
Argumentplatzhalter werden rot dargestellt.
Es sind maximal 9 Argumente möglich.
Es sind maximal 9
\begin_inset space ~
\end_inset
Argumente möglich.
Optionale Argumente werden mit dem Werkzeugleistenknopf
\begin_inset Graphics
filename ../../images/math-macro-add-optional-param.png

View File

@ -37016,7 +37016,7 @@ Grafik
\end_layout
\begin_layout Standard
Fügt a Grafik ein.
Fügt eine Grafik ein.
Grafiken sind Abschnitt
\begin_inset space ~
\end_inset

View File

@ -2153,15 +2153,13 @@ Estas fracciones muestran las distintas alineaciones:
\end_layout
\begin_layout Standard
\begin_inset Formula $\cfrac[l]{A}{B+C}$
\end_inset
;
\begin_inset Formula $\cfrac{A}{B+C}$
\end_inset
\series bold
\begin_inset Formula
\[
\cfrac[l]{A}{B+C}\,,\,\cfrac{A}{B+C}\,,\,\cfrac[r]{A}{B+C}
\]
;
\begin_inset Formula $\cfrac[r]{A}{B+C}$
\end_inset
@ -2313,6 +2311,12 @@ reference "sub:Fracciones-personalizadas"
se explica cómo componer fracciones personalizadas en las que la raya de
fracción se puede cambiar.
\end_layout
\begin_layout Standard
\begin_inset Newpage newpage
\end_inset
\end_layout
@ -34468,7 +34472,11 @@ e
\series default
.
Los colocadores de argumento se muestran en rojo.
Se pueden poner 9 argumentos como máximo.
Se pueden poner 9
\begin_inset space ~
\end_inset
argumentos como máximo.
Con el botón
\begin_inset Graphics
filename ../../images/math-macro-add-optional-param.png

View File

@ -2106,15 +2106,11 @@ cfrac
\begin_layout Standard
\series bold
\begin_inset Formula $\cfrac[l]{A}{B+C}$
\end_inset
\begin_inset Formula
\[
\cfrac[l]{A}{B+C}\,,\,\cfrac{A}{B+C}\,,\,\cfrac[r]{A}{B+C}
\]
,
\begin_inset Formula $\cfrac{A}{B+C}$
\end_inset
,
\begin_inset Formula $\cfrac[r]{A}{B+C}$
\end_inset
@ -2288,7 +2284,14 @@ reference "sub:Fractions-personnalisées"
\end_inset
on explique comment définir des fractions personnalisées en modifiant les
barres de fractions .
barres de fractions.
\end_layout
\begin_layout Standard
\begin_inset Newpage newpage
\end_inset
\end_layout
\begin_layout Subsection
@ -14567,13 +14570,29 @@ t
\emph on
b
\emph default
pour bas (bottom) signifie que la boîte est alignée au sein du texte qui
l'entoure, au niveau de sa dernière ligne.
pour
\begin_inset Quotes fld
\end_inset
bas
\begin_inset Quotes frd
\end_inset
(bottom) signifie que la boîte est alignée au sein du texte qui l'entoure,
au niveau de sa dernière ligne.
Avec
\emph on
t
\emph default
pour haut (top) l'alignement se fait avec la première ligne.
pour
\begin_inset Quotes fld
\end_inset
haut
\begin_inset Quotes frd
\end_inset
(top) l'alignement se fait avec la première ligne.
Si aucune position n'est précisée, la boîte est centrée verticalement,
voir la section
\emph on
@ -33929,7 +33948,11 @@ newmacroname est le nom qui est donné implicitement à la macro et qui doit
\end_inset
de la barre d'outils macro.
On peut avoir au maximum 9 arguments.
On peut avoir au maximum 9
\begin_inset space ~
\end_inset
arguments.
Les arguments optionnels sont créés avec le bouton
\begin_inset Graphics
filename ../../images/math-macro-add-optional-param.png

View File

@ -1994,21 +1994,13 @@ cfracright
cfrac
\series default
は中央揃えです。以下の各分数は、それぞれの揃え位置を示しています。
\begin_inset Newline newline
\end_inset
\series bold
\begin_inset Formula $\cfrac[l]{A}{B+C}$
\end_inset
\begin_inset Formula
\[
\cfrac[l]{A}{B+C}\,,\,\cfrac{A}{B+C}\,,\,\cfrac[r]{A}{B+C}
\]
,
\begin_inset Formula $\cfrac{A}{B+C}$
\end_inset
,
\begin_inset Formula $\cfrac[r]{A}{B+C}$
\end_inset

View File

@ -382,6 +382,44 @@ fggf
\end_inset
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "float,language={C++}"
inline false
status open
\begin_layout Plain Layout
\begin_inset Caption
\begin_layout Plain Layout
ccc
\end_layout
\end_inset
while(true);
\end_layout
\end_inset
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
lstlistoflistings{}
\end_layout
\end_inset
\end_layout
\end_body

View File

@ -706,7 +706,7 @@ contributers = [
u"Bug fixes"),
contributer(u"Ignacio García",
"ignacio.garcia () tele2 ! es",
"ignacio.gmorales () gmail ! com",
"GPL",
"Re: es_EmbeddedObjects",
"m=117079592919653",

View File

@ -222,6 +222,50 @@ Style Subsection*
OptionalArgs 0
End
# Subsubsection style definition
Style Subsubsection
Category Section
Margin First_Dynamic
LatexType Command
LatexName lyxframeend{}\subsubsection
NeedProtect 1
NextNoIndent 1
LabelSep xx
ParSkip 0.4
TopSep 2
BottomSep 0.25
ParSep 0.5
Align Left
LabelType Counter
LabelCounter subsubsection
LabelString "Subsubsection \arabic{section}.\arabic{subsection}.\arabic{subsubsection}"
RefPrefix sub
OptionalArgs 1
# standard font definition
Font
Family Roman
Series Bold
Size large
EndFont
LabelFont
Color latex
EndFont
LabelStringAppendix "\arabic{section}.\arabic{subsection}.\arabic{subsubsection}"
TocLevel 2
End
# Subsubsection* style definition
Style Subsubsection*
CopyStyle Subsubsection
Category Unnumbered
Margin Static
LatexName lyxframeend{}\subsubsection*
LabelType No_Label
OptionalArgs 0
End
# Frame control definition
Style BeginFrame
Category Frames
@ -645,7 +689,7 @@ End
# Blocks section
Style Block
Category Blocks
Margin First_Dynamic
Margin Dynamic
LatexType Environment
NextNoIndent 0
ParIndent MM

View File

@ -4,7 +4,7 @@
#
# Detailed format description is available in the customization manual
Format 36
Format 38
Provides stdinsets 1
@ -170,8 +170,38 @@ InsetLayout Phantom
ForcePlain true
End
InsetLayout ListOfListings
# We need the [[List of Listings]] context, since "Listings" is also
# the name of the inset and translated differently.
# "Listings[[List of Listings]]" is the name of the "List of listings"
# ("Listings" is the predefined english name) in listings.sty, so it
# must be used here as well.
BabelPreamble
\addto\captions$$lang{\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}}
EndBabelPreamble
# The command does not need to be defined in LangPreamble, since
# listings.sty does that already. However it needs to be redefined
# in order to be used for non-english single-language documents.
LangPreamble
\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
EndLangPreamble
End
InsetLayout IncludeListings
BabelPreamble
\addto\captions$$lang{\renewcommand{\lstlistingname}{_(Listing)}}
EndBabelPreamble
# The command does not need to be defined in LangPreamble, since
# listings.sty does that already. However it needs to be redefined
# in order to be used for non-english single-language documents.
LangPreamble
\renewcommand{\lstlistingname}{_(Listing)}
EndLangPreamble
End
InsetLayout Listings
LabelString Listings
CopyStyle IncludeListings
LabelString Listings[[inset]]
LatexType none
Decoration minimalistic
Font
@ -445,3 +475,27 @@ InsetLayout Preview
Decoration minimalistic
MultiPar true
End
InsetLayout Script
LatexType command
MultiPar false
ForcePlain 1
CustomPars 0
InToc 1
HTMLIsBlock 0
End
InsetLayout Script:superscript
CopyStyle Script
LaTeXName textsuperscript
HTMLTag sup
End
InsetLayout Script:subscript
CopyStyle Script
Requires subscript
LaTeXName textsubscript
HTMLTag sub
End

View File

@ -30,6 +30,8 @@ Translation ar
"List of Graphs" "قائمة الرسوم البيانية"
"List of Schemes" "قائمة التصميمات"
"List of Tableaux" "قائمة الجداول"
"Listing" "عمل قوائم"
"Listings[[List of Listings]]" "Listings"
"Notation" "تدوين"
"Note" "ملاحظة"
"Problem" "مشكلة"
@ -106,6 +108,8 @@ Translation ca
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
"Listing" "Llistat"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notació"
"Note" "Nota"
"Problem" "Problema"
@ -145,6 +149,8 @@ Translation cs
"List of Graphs" "Seznam grafů"
"List of Schemes" "Seznam schémat"
"List of Tableaux" "Seznam tabel"
"Listing" "Výpis"
"Listings[[List of Listings]]" "Listings"
"Notation" "Značení"
"Note" "Poznámka"
"Problem" "Úloha"
@ -184,6 +190,8 @@ Translation da
"List of Graphs" "Grafliste"
"List of Schemes" "Schemaliste"
"List of Tableaux" "Tableauliste"
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Notat"
"Problem" "Problem"
@ -223,6 +231,8 @@ Translation de
"List of Graphs" "Liste der Graphen"
"List of Schemes" "Liste der Schemata"
"List of Tableaux" "Tableaux-Verzeichnis"
"Listing" "Listing"
"Listings[[List of Listings]]" "Verzeichnis der Listings"
"Notation" "Notation"
"Note" "Notiz"
"Problem" "Problem"
@ -266,6 +276,8 @@ Translation el
"List of Graphs" "Λίστα Γραφημάτων"
"List of Schemes" "Λίστα Σχεδίων"
"List of Tableaux" "Λίστα Ταμπλό"
"Listing" "Καταλογοποίηση"
"Listings[[List of Listings]]" "Listings"
"Notation" "Σημειογραφία"
"Note" "Σημείωση"
"Problem" "Πρόβλημα"
@ -305,6 +317,8 @@ Translation en
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Note"
"Problem" "Problem"
@ -344,6 +358,8 @@ Translation es
"List of Graphs" "Índice de gráficos"
"List of Schemes" "Índice de esquemas"
"List of Tableaux" "Índice de Tableaux"
"Listing" "Listado"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notación"
"Note" "Nota"
"Problem" "Problema"
@ -383,6 +399,8 @@ Translation eu
"List of Graphs" "Grafikoen zerrenda"
"List of Schemes" "Eskemen zerrenda"
"List of Tableaux" "Taulen zerrenda"
"Listing" "Zerrenda"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notazioa"
"Note" "Ohar"
"Problem" "Buruketa"
@ -401,10 +419,10 @@ End
Translation fi
"Acknowledgement" "Kiitos"
"Algorithm" "Algoritmi"
"Assumption" "Assumption"
"Assumption" "Oletus"
"Axiom" "Aksiooma"
"Case" "Tapaus"
"Chart" "Chart"
"Chart" "Kaavio"
"Claim" "Väite"
"Conclusion" "Päätelmä"
"Condition" "Ehto"
@ -415,13 +433,15 @@ Translation fi
"Example" "Esimerkki"
"Exercise" "Harjoitus"
"Fact" "Fakta"
"Graph" "Graph"
"Graph" "Kuvaaja"
"Lemma" "Lemma"
"List of Algorithms" "Algoritmien taulukko"
"List of Charts" "List of Charts"
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
"List of Charts" "Kaavioiden luettelo"
"List of Graphs" "Kuvaajien luettelo"
"List of Schemes" "Kuvausten lettelo"
"List of Tableaux" "Taulujen luettelo"
"Listing" "Listaus"
"Listings[[List of Listings]]" "Listausten luettelo"
"Notation" "Merkintätapa"
"Note" "Muistiinpano"
"Problem" "Ongelma"
@ -430,10 +450,10 @@ Translation fi
"Proposition" "Väittämä"
"Question" "Kysymys"
"Remark" "Huomautus"
"Scheme" "Scheme"
"Scheme" "Kuvaus"
"Solution" "Ratkaisu"
"Summary" "Yhteenveto"
"Tableau" "Tableau"
"Tableau" "Taulu"
"Theorem" "Lause"
End
@ -461,6 +481,8 @@ Translation fr
"List of Graphs" "Liste des graphiques"
"List of Schemes" "Liste des schémas"
"List of Tableaux" "Liste des tableaux (TO)"
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Note"
"Problem" "Problème"
@ -500,6 +522,8 @@ Translation gl
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
"Listing" "Lista"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notación"
"Note" "Nota"
"Problem" "Problema"
@ -539,6 +563,8 @@ Translation he
"List of Graphs" "רשימת גרפים"
"List of Schemes" "רשימת סכמות"
"List of Tableaux" "List of Tableaux"
"Listing" "רישום קוד"
"Listings[[List of Listings]]" "Listings"
"Notation" "צורת רישום"
"Note" "הערה"
"Problem" "בעיה"
@ -578,6 +604,8 @@ Translation hu
"List of Graphs" "Grafikonok listája"
"List of Schemes" "Sémák listája"
"List of Tableaux" "Csoportképek listája"
"Listing" "Lista"
"Listings[[List of Listings]]" "Listings"
"Notation" "Jelölés"
"Note" "Megjegyzés"
"Problem" "Probléma"
@ -617,6 +645,8 @@ Translation ia
"List of Graphs" "Lista de graphicos"
"List of Schemes" "Lista de schemas"
"List of Tableaux" "Lista de tableau"
"Listing" "Listar"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Nota"
"Problem" "Problema"
@ -656,6 +686,8 @@ Translation id
"List of Graphs" "Daftar Grafik"
"List of Schemes" "Daftar Skema"
"List of Tableaux" "Daftar Tableaux"
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notasi"
"Note" "Nota"
"Problem" "Masalah"
@ -695,6 +727,8 @@ Translation it
"List of Graphs" "Elenco dei grafici"
"List of Schemes" "Elenco degli schemi"
"List of Tableaux" "Elenco dei tableau"
"Listing" "Listato"
"Listings[[List of Listings]]" "Elenco dei listati"
"Notation" "Notazione"
"Note" "Nota"
"Problem" "Problema"
@ -734,6 +768,8 @@ Translation ja
"List of Graphs" "グラフ一覧"
"List of Schemes" "スキーム一覧"
"List of Tableaux" "絵画一覧"
"Listing" "リスト"
"Listings[[List of Listings]]" "Listings"
"Notation" "記法"
"Note" "注釈"
"Problem" "問題"
@ -810,6 +846,8 @@ Translation nb
"List of Graphs" "Grafer"
"List of Schemes" "Struktruformler"
"List of Tableaux" "Tablåer"
"Listing" "«Listing»"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notasjon"
"Note" "Merknad"
"Problem" "Problem"
@ -849,6 +887,8 @@ Translation nl
"List of Graphs" "Grafiekenlijst"
"List of Schemes" "Schema-lijst"
"List of Tableaux" "Lijst van Tableaus"
"Listing" "Opsomming"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notatie"
"Note" "Noot"
"Problem" "Opgave"
@ -888,6 +928,8 @@ Translation nn
"List of Graphs" "Liste over grafar"
"List of Schemes" "Liste over skjema"
"List of Tableaux" "Liste over tablå"
"Listing" "Kodeliste"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notasjon"
"Note" "Notis"
"Problem" "Problem"
@ -927,6 +969,8 @@ Translation pl
"List of Graphs" "Lista grafów"
"List of Schemes" "Lista schematów"
"List of Tableaux" "List of Tableaux"
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notacja"
"Note" "Notka"
"Problem" "Problem"
@ -966,6 +1010,8 @@ Translation pt
"List of Graphs" "Lista de Gráficos"
"List of Schemes" "Lista de Esquemas"
"List of Tableaux" "Lista de Quadros"
"Listing" "Listagem"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notação"
"Note" "Nota"
"Problem" "Problema"
@ -1010,6 +1056,8 @@ Translation ro
"List of Graphs" "Listă de Grafice"
"List of Schemes" "Listă de Scheme"
"List of Tableaux" "Listă de Tabele"
"Listing" "Listare"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notație"
"Note" "Notă"
"Problem" "Problemă"
@ -1049,6 +1097,8 @@ Translation ru
"List of Graphs" "Список графиков"
"List of Schemes" "Список схем"
"List of Tableaux" "Список таблиц"
"Listing" "Листинг"
"Listings[[List of Listings]]" "Listings"
"Notation" "Нотация"
"Note" "Заметка"
"Problem" "Проблема"
@ -1088,6 +1138,8 @@ Translation sk
"List of Graphs" "Zoznam grafík"
"List of Schemes" "Zoznam náčrtkov"
"List of Tableaux" "Zoznam tablov"
"Listing" "Výpis"
"Listings[[List of Listings]]" "Zoznam výpisov"
"Notation" "Notácia"
"Note" "Poznámka"
"Problem" "Problém"
@ -1164,6 +1216,8 @@ Translation sr
"List of Graphs" "Spisak Grafikona"
"List of Schemes" "Spisak Šema"
"List of Tableaux" "Spisak Tabela "
"Listing" "Listing"
"Listings[[List of Listings]]" "Listings"
"Notation" "Zabeleška"
"Note" "Napomena"
"Problem" "Problem"
@ -1203,6 +1257,8 @@ Translation sv
"List of Graphs" "Lista över grafer"
"List of Schemes" "Lista över scheman"
"List of Tableaux" "Lista över tablåer"
"Listing" "Listning"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Not"
"Problem" "Problem"
@ -1242,6 +1298,8 @@ Translation tr
"List of Graphs" "List of Graphs"
"List of Schemes" "Plan Listesi"
"List of Tableaux" "Tablo Listesi"
"Listing" "Liste"
"Listings[[List of Listings]]" "Listings"
"Notation" "Notasyon"
"Note" "Not"
"Problem" "Problem"
@ -1281,6 +1339,8 @@ Translation uk
"List of Graphs" "Список графіків"
"List of Schemes" "Список схем"
"List of Tableaux" "Список табло"
"Listing" "Текст програми"
"Listings[[List of Listings]]" "Listings"
"Notation" "Позначення"
"Note" "Примітка"
"Problem" "Проблема"
@ -1320,6 +1380,8 @@ Translation zh_CN
"List of Graphs" "图形列表"
"List of Schemes" "方案列表"
"List of Tableaux" "场景列表"
"Listing" "列表"
"Listings[[List of Listings]]" "Listings"
"Notation" "记号"
"Note" "备忘"
"Problem" "问题"
@ -1359,6 +1421,8 @@ Translation zh_TW
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
"Listing" "列表"
"Listings[[List of Listings]]" "Listings"
"Notation" "記法"
"Note" "註記"
"Problem" "問題"

View File

@ -8,7 +8,6 @@ ar
bg
ca
el
fi
gl
ko
ru (Acknowledgement string issue only)
@ -21,3 +20,6 @@ zh_TW
Before LyX 2.1.0 release these strings should be reviewed again by the translators:
"Property"
"Solution"
"Listing"
"Listings"
already checked: fi

1
lib/lyx2lyx/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lyx2lyx_version.py

View File

@ -60,7 +60,7 @@ latex_length(slen):
'''
import string
from parser_tools import find_token
from parser_tools import find_token, find_end_of_inset
from unicode_symbols import unicode_reps
@ -132,6 +132,37 @@ def put_cmd_in_ert(arg):
return ret
def get_ert(lines, i):
'Convert an ERT inset into LaTeX.'
if not lines[i].startswith("\\begin_inset ERT"):
return ""
j = find_end_of_inset(lines, i)
if j == -1:
return ""
while i < j and not lines[i].startswith("status"):
i = i + 1
i = i + 1
ret = ""
first = True
while i < j:
if lines[i] == "\\begin_layout Plain Layout":
if first:
first = False
else:
ret = ret + "\n"
while i + 1 < j and lines[i+1] == "":
i = i + 1
elif lines[i] == "\\end_layout":
while i + 1 < j and lines[i+1] == "":
i = i + 1
elif lines[i] == "\\backslash":
ret = ret + "\\"
else:
ret = ret + lines[i]
i = i + 1
return ret
def lyx2latex(document, lines):
'Convert some LyX stuff into corresponding LaTeX stuff, as best we can.'

View File

@ -34,10 +34,10 @@ from parser_tools import del_token, find_token, find_end_of, find_end_of_inset,
#find_token_backwards, is_in_inset, get_value, get_quoted_value, \
#del_token, check_token
from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert
from lyx2lyx_tools import add_to_preamble, put_cmd_in_ert, get_ert
#from lyx2lyx_tools import insert_to_preamble, \
# put_cmd_in_ert, lyx2latex, latex_length, revert_flex_inset, \
# lyx2latex, latex_length, revert_flex_inset, \
# revert_font_attrs, hex2ratio, str2bool
####################################################################
@ -581,7 +581,6 @@ def revert_cell_rotation(document):
try:
while True:
# first, let's find out if we need to do anything
# cell type 3 is multirow begin cell
i = find_token(document.body, '<cell ', i)
if i == -1:
return
@ -590,14 +589,14 @@ def revert_cell_rotation(document):
k = document.body[i].find('"', j + 8)
value = document.body[i][j + 8 : k]
if value == "0":
rgx = re.compile(r'rotate="[^"]+?"')
rgx = re.compile(r' rotate="[^"]+?"')
# remove rotate option
document.body[i] = rgx.sub('', document.body[i])
elif value == "90":
rgx = re.compile(r'rotate="[^"]+?"')
rgx = re.compile(r' rotate="[^"]+?"')
document.body[i] = rgx.sub('rotate="true"', document.body[i])
else:
rgx = re.compile(r'rotate="[^"]+?"')
rgx = re.compile(r' rotate="[^"]+?"')
load_rotating = True
# remove rotate option
document.body[i] = rgx.sub('', document.body[i])
@ -620,7 +619,6 @@ def convert_cell_rotation(document):
i = 0
while True:
# first, let's find out if we need to do anything
# cell type 3 is multirow begin cell
i = find_token(document.body, '<cell ', i)
if i == -1:
return
@ -633,6 +631,105 @@ def convert_cell_rotation(document):
i += 1
def revert_table_rotation(document):
"Revert table rotations to TeX-code"
load_rotating = False
i = 0
try:
while True:
# first, let's find out if we need to do anything
i = find_token(document.body, '<features ', i)
if i == -1:
return
j = document.body[i].find('rotate="')
if j != -1:
end_table = find_token(document.body, '</lyxtabular>', j)
k = document.body[i].find('"', j + 8)
value = document.body[i][j + 8 : k]
if value == "0":
rgx = re.compile(r' rotate="[^"]+?"')
# remove rotate option
document.body[i] = rgx.sub('', document.body[i])
elif value == "90":
rgx = re.compile(r'rotate="[^"]+?"')
document.body[i] = rgx.sub('rotate="true"', document.body[i])
else:
rgx = re.compile(r' rotate="[^"]+?"')
load_rotating = True
# remove rotate option
document.body[i] = rgx.sub('', document.body[i])
# write ERT
document.body[end_table + 3 : end_table + 3] = \
put_cmd_in_ert("\\end{turn}")
document.body[i - 2 : i - 2] = \
put_cmd_in_ert("\\begin{turn}{" + value + "}")
i += 1
finally:
if load_rotating:
add_to_preamble(document, ["\\@ifundefined{turnbox}{\usepackage{rotating}}{}"])
def convert_table_rotation(document):
'Convert table rotation statements from "true" to "90"'
i = 0
while True:
# first, let's find out if we need to do anything
i = find_token(document.body, '<features ', i)
if i == -1:
return
j = document.body[i].find('rotate="true"')
if j != -1:
rgx = re.compile(r'rotate="[^"]+?"')
# convert "true" to "90"
document.body[i] = rgx.sub('rotate="90"', document.body[i])
i += 1
def convert_listoflistings(document):
'Convert ERT \lstlistoflistings to TOC lstlistoflistings inset'
# We can support roundtrip because the command is so simple
i = 0
while True:
i = find_token(document.body, "\\begin_inset ERT", i)
if i == -1:
return
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of ERT inset")
i += 1
continue
ert = get_ert(document.body, i)
if ert == "\\lstlistoflistings{}":
document.body[i:j] = ["\\begin_inset CommandInset toc", "LatexCommand lstlistoflistings", ""]
i = i + 4
else:
i = j + 1
def revert_listoflistings(document):
'Convert TOC lstlistoflistings inset to ERT lstlistoflistings'
i = 0
while True:
i = find_token(document.body, "\\begin_inset CommandInset toc", i)
if i == -1:
return
if document.body[i+1] == "LatexCommand lstlistoflistings":
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Malformed lyx document: Can't find end of TOC inset")
i += 1
continue
subst = put_cmd_in_ert("\\lstlistoflistings{}")
document.body[i:j+1] = subst
add_to_preamble(document, ["\\usepackage{listings}"])
i = i + 1
##
# Conversion hub
#
@ -653,10 +750,14 @@ convert = [
[425, []],
[426, []],
[427, []],
[428, [convert_cell_rotation]]
[428, [convert_cell_rotation]],
[429, [convert_table_rotation]],
[430, [convert_listoflistings]],
]
revert = [
[429, [revert_listoflistings]],
[428, [revert_table_rotation]],
[427, [revert_cell_rotation]],
[426, [revert_tipa]],
[425, [revert_verbatim]],

View File

@ -9,6 +9,22 @@
# Full author contact details are available in file CREDITS
# This script is intended to include a BibTeX-generated biblography
# in a LaTeX file, as publishers often want. It can be run manually
# on an exported LaTeX file, though it needs to be compiled first,
# so the bbl file will exist.
#
# It should also be possible to create a LyX converter to run this
# automatically. To set it up, create a format "ltxbbl"; make sure to
# check it as a document format. Then create a LaTeX-->ltxbbl converter,
# with the command:
# python -tt $$s/scripts/include_bib.py $$i $$0
# and give it the "needaux" flag. You'll then have it in the export menu.
# We do not activate this converter by default, because there are problems
# when one tries to use multiple bibliographies.
#
# Please report any problems on the devel list.
import sys, os
class secbib:
@ -41,8 +57,6 @@ def InsertBib(fil, out):
elif "\\begin{btSect}" in line:
raise BibError("Cannot export sectioned bibliographies")
filenew = fil[:-4] + "-bibinc.tex" #The new .tex file
if len(biblist) > 1:
raise BibError("Cannot export multiple bibliographies.")
if not biblist:
@ -58,9 +72,35 @@ def InsertBib(fil, out):
outfile = open(out, 'w')
outfile.write("".join(newlist))
outfile.close()
return filenew
return out
def usage():
print r'''
Usage: python include_bib.py file.tex [outfile.tex]
Includes the contents of file.bbl, which must exist in the
same directory as file.tex, in place of the \bibliography
command, and creates the new file outfile.tex. If no name
for that file is given, we create: file-bbl.tex.
'''
if __name__ == "__main__":
newfile = InsertBib(sys.argv[1], sys.argv[2])
print "Wrote " + newfile
args = len(sys.argv)
if args <= 1 or args > 3:
usage()
sys.exit(0)
# we might should make sure this is a tex file....
infile = sys.argv[1]
if infile[-4:] != ".tex":
print "Error: " + infile + " is not a TeX file"
usage()
sys.exit(1)
if args == 3:
outfile = sys.argv[2]
else:
outfile = infile[:-4] + "-bbl.tex"
newfile = InsertBib(infile, outfile)
print "Wrote " + outfile

View File

@ -129,6 +129,12 @@ import os, re, string, sys
# Implement the citation engine machinery in layouts.
# Change CiteFormat to CiteFormat (default|authoryear|numerical).
# Incremented to format 38, 08 April 2012 by gb
# Introduce LangPreamble and BabelPreamble for InsetLayout.
# Incremented to format 39, 15 April 2012 by sanda
# Introduce styling of branches via "InsetLayout Branch:".
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
@ -136,7 +142,7 @@ import os, re, string, sys
# development/tools/updatelayouts.sh script to update all
# layout files to the new format.
currentFormat = 37
currentFormat = 39
def usage(prog_name):
@ -322,6 +328,14 @@ def convert(lines):
i += 1
continue
if format == 38:
i += 1
continue
if format == 37:
i += 1
continue
if format == 36:
match = re_CiteFormat.match(lines[i]);
if match and match.group(4) == "":

View File

@ -451,6 +451,7 @@ Menuset
Item "Table of Contents|C" "inset-insert toc"
FloatListInsert
IndicesLists
Item "List of Listings|L" "inset-insert toc CommandInset toc LatexCommand lstlistoflistings \end_inset"
Item "Nomenclature|N" "nomencl-print"
Item "BibTeX Bibliography...|B" "dialog-show-new-inset bibtex"
End

View File

@ -163,7 +163,7 @@ ToolbarSet
Item "Align bottom" "command-alternatives inset-modify tabular m-valign-bottom;inset-modify tabular valign-bottom"
Separator
Item "Rotate cell by 90 degrees or unset rotation" "inset-modify tabular toggle-rotate-cell"
Item "Rotate table" "inset-modify tabular toggle-rotate-tabular"
Item "Rotate table by 90 degrees or unset rotation" "inset-modify tabular toggle-rotate-tabular"
Item "Set multi-column" "inset-modify tabular multicolumn"
Item "Set multi-row" "inset-modify tabular multirow"
End

View File

@ -34,10 +34,15 @@
# - combining This is a combining char that will get combined with a base char
# - force Always output replacement command
# - mathalpha This character is considered as a math variable in mathmode
# - notermination Do not terminate this command (by {} or space).
# - notermination=text Do not terminate this textcommand (by {} or space).
# This is set by default if textcommand ends with }.
# - notermination=math Do not terminate this mathcommand (by {} or space).
# This is set by default if mathcommand ends with }.
# - notermination=both Do not terminate this textcommand and mathcommand (by {} or space).
# - notermination=none Always terminate this textcommand and mathcommand (by {} or space).
# - tipashortcut=<shortcut> Shortcut notation for TIPA
0x00a0 "~" "" "notermination" "~" "" # NO-BREAK SPACE
0x00a0 "~" "" "notermination=both" "~" "" # NO-BREAK SPACE
0x00a1 "\\textexclamdown" "" "" # INVERTED EXCLAMATION MARK
0x00a2 "\\textcent" "textcomp" "" #"\\mathcent" "txfonts|pxfonts" # CENT SIGN
0x00a3 "\\pounds" "" "" "\\pounds" "" # £ POUND SIGN
@ -50,7 +55,7 @@
0x00aa "\\textordfeminine" "textcomp" "" # FEMININE ORDINAL INDICATOR
0x00ab "\\guillemotleft" "" "" # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
0x00ac "\\textlnot" "textcomp" "force" "\\neg" "" # ¬ NOT SIGN
0x00ad "\\-" "" "notermination" # SOFT HYPHEN
0x00ad "\\-" "" "notermination=text" "" "" # SOFT HYPHEN
0x00ae "\\textregistered" "textcomp" "force" "\\circledR" "amssymb" # REGISTERED SIGN # the force flag is only needed due to a bug in teTeX 3 / TeXLive 2005
0x00af "\\textasciimacron" "textcomp" "" # MACRON
0x00b0 "\\textdegree" "textcomp" "force" "{^\\circ}" "" # DEGREE SIGN # the force flag is only needed due to a bug in teTeX 3 / TeXLive 2005
@ -61,7 +66,7 @@
0x00b5 "\\textmu" "textcomp" "force" "\\mu" "" # µ MICRO SIGN
0x00b6 "\\textparagraph" "textcomp" "" # PILCROW SIGN # not equal to \textpilcrow
0x00b7 "\\textperiodcentered" "" "" "\cdot" # MIDDLE DOT
0x00b8 "\\c\\ " "" "" # CEDILLA (command from latin1.def)
0x00b8 "\\c\\ " "" "notermination=text" "" "" # CEDILLA (command from latin1.def)
0x00b9 "\\textonesuperior" "textcomp" "force" "{{}^1}" "" # ¹ SUPERSCRIPT ONE
0x00ba "\\textordmasculine" "textcomp" "" # MASCULINE ORDINAL INDICATOR
0x00bb "\\guillemotright" "" "" # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
@ -85,7 +90,7 @@
0x00cd "\\'{I}" "" "mathalpha" "\\acute{I}" # LATIN CAPITAL LETTER I WITH ACUTE
0x00ce "\\^{I}" "" "mathalpha" "\\hat{I}" # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
0x00cf "\\\"{I}" "" "mathalpha" "\\ddot{I}" # LATIN CAPITAL LETTER I WITH DIAERESIS
0x00d0 "\\DH" "" "mathalpha" "\\mkern2mu\\rule[0.75ex]{0.75ex}{0.06ex}\\mkern-8mu D" # LATIN CAPITAL LETTER ETH
0x00d0 "\\DH" "" "mathalpha,notermination=math" "\\mkern2mu\\rule[0.75ex]{0.75ex}{0.06ex}\\mkern-8mu D" # LATIN CAPITAL LETTER ETH
0x00d1 "\\~{N}" "" "mathalpha" "\\tilde{N}" # LATIN CAPITAL LETTER N WITH TILDE
0x00d2 "\\`{O}" "" "mathalpha" "\\grave{O}" # LATIN CAPITAL LETTER O WITH GRAVE
0x00d3 "\\'{O}" "" "mathalpha" "\\acute{O}" # LATIN CAPITAL LETTER O WITH ACUTE
@ -149,8 +154,8 @@
0x010d "\\v{c}" "" "mathalpha" "\\check{c}" # LATIN SMALL LETTER C WITH CARON
0x010e "\\v{D}" "" "mathalpha" "\\check{D}" # LATIN CAPITAL LETTER D WITH CARON
0x010f "\\v{d}" "" "mathalpha" "\\check{d}" # LATIN SMALL LETTER D WITH CARON
0x0110 "\\DJ" "" "mathalpha" "\\mkern2mu\\rule[0.75ex]{0.75ex}{0.06ex}\\mkern-8mu D" # LATIN CAPITAL LETTER D WITH STROKE
0x0111 "\\dj" "" "mathalpha" "\\mkern3mu\\mathchar'26\\mkern-12mu d" # LATIN SMALL LETTER D WITH STROKE
0x0110 "\\DJ" "" "mathalpha,notermination=math" "\\mkern2mu\\rule[0.75ex]{0.75ex}{0.06ex}\\mkern-8mu D" # LATIN CAPITAL LETTER D WITH STROKE
0x0111 "\\dj" "" "mathalpha,notermination=math" "\\mkern3mu\\mathchar'26\\mkern-12mu d" # LATIN SMALL LETTER D WITH STROKE
0x0112 "\\={E}" "" "mathalpha" "\\bar{E}" # LATIN CAPITAL LETTER E WITH MACRON
0x0113 "\\={e}" "" "mathalpha" "\\bar{e}" # LATIN SMALL LETTER E WITH MACRON
0x0114 "\\u{E}" "" "mathalpha" "\\breve{E}" # LATIN CAPITAL LETTER E WITH BREVE
@ -168,7 +173,7 @@
0x0120 "\\.{G}" "" "mathalpha" "\\dot{G}" # LATIN CAPITAL LETTER G WITH DOT ABOVE
0x0121 "\\.{g}" "" "mathalpha" "\\dot{g}" # LATIN SMALL LETTER G WITH DOT ABOVE
0x0122 "\\c{G}" "" "mathalpha" "\\cedilla{G}" "accents,cedilla" # LATIN CAPITAL LETTER G WITH CEDILLA
0x0123 "\\accent96 g" "" "mathalpha,notermination" "\\mathaccent96 g" # LATIN SMALL LETTER G WITH CEDILLA
0x0123 "\\accent96 g" "" "mathalpha,notermination=both" "\\mathaccent96 g" "" # LATIN SMALL LETTER G WITH CEDILLA
0x0124 "\\^{H}" "" "mathalpha" "\\hat{H}" # LATIN CAPITAL LETTER H WITH CIRCUMFLEX
0x0125 "\\^{h}" "" "mathalpha" "\\hat{h}" # LATIN SMALL LETTER H WITH CIRCUMFLEX
#0x0126 "" "" "" "" "" # LATIN CAPITAL LETTER H WITH STROKE
@ -183,8 +188,8 @@
0x012f "\\k{i}" "" "mathalpha" "\\ogonek{i}" "accents,tipasymb,ogonek" # LATIN SMALL LETTER I WITH OGONEK
0x0130 "\\.{I}" "" "mathalpha" "\\dot{I}" # LATIN CAPITAL LETTER I WITH DOT ABOVE
0x0131 "\\i" "" "mathalpha" "\\imath" # LATIN SMALL LETTER DOTLESS I
0x0132 "IJ" "" "mathalpha,notermination" "IJ" # LATIN CAPITAL LIGATURE IJ
0x0133 "ij" "" "mathalpha,notermination" "ij" # LATIN SMALL LIGATURE IJ
0x0132 "IJ" "" "mathalpha,notermination=both" "IJ" "" # LATIN CAPITAL LIGATURE IJ
0x0133 "ij" "" "mathalpha,notermination=both" "ij" "" # LATIN SMALL LIGATURE IJ
0x0134 "\\^{J}" "" "mathalpha" "\\hat{J}" # LATIN CAPITAL LETTER J WITH CIRCUMFLEX
0x0135 "\\^{\\j}" "" "mathalpha" "\\hat{\\jmath}" # LATIN SMALL LETTER J WITH CIRCUMFLEX
0x0136 "\\c{K}" "" "mathalpha" "\\cedilla{K}" "accents,cedilla" # LATIN CAPITAL LETTER K WITH CEDILLA
@ -198,8 +203,8 @@
0x013e "\\v{l}" "" "mathalpha" "l\\mkern-5mu\\mathchar19" # LATIN SMALL LETTER L WITH CARON
#0x013f "" "" "" "" "" # LATIN CAPITAL LETTER L WITH MIDDLE DOT
#0x0140 "" "" "" "" "" # LATIN SMALL LETTER L WITH MIDDLE DOT
0x0141 "\\L" "" "mathalpha" "\\mkern2mu\\mathchar'40\\mkern-7mu L" # LATIN CAPITAL LETTER L WITH STROKE
0x0142 "\\l" "" "mathalpha" "\\mathchar'40\\mkern-5mu l" # LATIN SMALL LETTER L WITH STROKE
0x0141 "\\L" "" "mathalpha,notermination=math" "\\mkern2mu\\mathchar'40\\mkern-7mu L" # LATIN CAPITAL LETTER L WITH STROKE
0x0142 "\\l" "" "mathalpha,notermination=math" "\\mathchar'40\\mkern-5mu l" # LATIN SMALL LETTER L WITH STROKE
0x0143 "\\'{N}" "" "mathalpha" "\\acute{N}" # LATIN CAPITAL LETTER N WITH ACUTE
0x0144 "\\'{n}" "" "mathalpha" "\\acute{n}" # LATIN SMALL LETTER N WITH ACUTE
0x0145 "\\c{N}" "" "mathalpha" "\\cedilla{N}" "accents,cedilla" # LATIN CAPITAL LETTER N WITH CEDILLA
@ -331,7 +336,7 @@
0x01c0 "\\textpipe" "tipa" "force,tipashortcut=|" # LATIN LETTER DENTAL CLICK
0x01c1 "\\textdoublepipe" "tipa" "force,tipashortcut=||" # LATIN LETTER LATERAL CLICK
0x01c2 "\\textdoublebarpipe" "tipa" "force" # LATIN LETTER ALVEOLAR CLICK
0x01c3 "!" "" "notermination" # LATIN LETTER RETROFLEX CLICK
0x01c3 "!" "" "notermination=text" "" "" # LATIN LETTER RETROFLEX CLICK
#0x01c4 "" "" "" # LATIN CAPITAL LETTER DZ WITH CARON
#0x01c5 "" "" "" # LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
#0x01c6 "" "" "" # LATIN SMALL LETTER DZ WITH CARON
@ -611,8 +616,8 @@
#0x02d3 "" "" "" # MODIFIER LETTER CENTRED LEFT HALF RING
0x02d4 "\\textraising{ }" "tipa" "force" # MODIFIER LETTER UP TACK
0x02d5 "\\textlowering{ }" "tipa" "force" # MODIFIER LETTER DOWN TACK
0x02d6 "" "" "" "+" # MODIFIER LETTER PLUS SIGN
0x02d7 "" "" "" "-" # MODIFIER LETTER MINUS SIGN
0x02d6 "" "" "notermination=math" "+" # MODIFIER LETTER PLUS SIGN
0x02d7 "" "" "notermination=math" "-" # MODIFIER LETTER MINUS SIGN
0x02d8 "\\u{ }" "" "" # BREVE
0x02d9 "\\.{ }" "" "" # DOT ABOVE
0x02da "\\r{ }" "" "" # RING ABOVE
@ -652,15 +657,15 @@
#
# Combining diacritical marks
#
0x0300 "\\`" "" "combining,force" # COMBINING GRAVE ACCENT
0x0301 "\\'" "" "combining,force" # COMBINING ACUTE ACCENT
0x0302 "\\^" "" "combining,force" # COMBINING CIRCUMFLEX ACCENT
0x0303 "\\~" "" "combining,force" # COMBINING TILDE
0x0304 "\\=" "" "combining,force" # COMBINING MACRON
0x0300 "\\`" "" "combining,force,notermination=text" "" "" # COMBINING GRAVE ACCENT
0x0301 "\\'" "" "combining,force,notermination=text" "" "" # COMBINING ACUTE ACCENT
0x0302 "\\^" "" "combining,force,notermination=text" "" "" # COMBINING CIRCUMFLEX ACCENT
0x0303 "\\~" "" "combining,force,notermination=text" "" "" # COMBINING TILDE
0x0304 "\\=" "" "combining,force,notermination=text" "" "" # COMBINING MACRON
#0x0305 "" "" "combining,force" # COMBINING OVERLINE
0x0306 "\\u" "" "combining,force" # COMBINING BREVE
0x0307 "\\." "" "combining,force" # COMBINING DOT ABOVE
0x0308 "\\\"" "" "combining,force" # COMBINING DIAERESIS
0x0307 "\\." "" "combining,force,notermination=text" "" "" # COMBINING DOT ABOVE
0x0308 "\\\"" "" "combining,force,notermination=text" "" "" # COMBINING DIAERESIS
#0x0309 "" "" "combining,force" # COMBINING HOOK ABOVE
0x030a "\\r" "" "combining,force" # COMBINING RING ABOVE
0x030b "\\H" "" "combining,force" # COMBINING DOUBLE ACUTE ACCENT
@ -718,7 +723,7 @@
#0x033f "" "" "combining,force" # COMBINING DOUBLE OVERLINE
#0x0340 "" "" "combining,force" # COMBINING GRAVE TONE MARK
#0x0341 "" "" "combining,force" # COMBINING ACUTE TONE MARK
0x0342 "\\~" "textgreek" "combining,force" # COMBINING GREEK PERISPOMENI
0x0342 "\\~" "textgreek" "combining,force,notermination=text" "" "" # COMBINING GREEK PERISPOMENI
#0x0343 "" "" "combining,force" # COMBINING GREEK KORONIS
#0x0344 "" "" "combining,force" # COMBINING GREEK DIALYTIKA TONOS
#0x0345 "" "" "combining,force" # COMBINING GREEK YPOGEGRAMMENI
@ -845,16 +850,16 @@
#0x03d5 "" "" "" "" "" # GREEK PHI SYMBOL
#0x03d6 "" "" "" "" "" # GREEK PI SYMBOL
#0x03d7 "" "" "" "" "" # GREEK KAI SYMBOL
0x03d8 "\\textgreek{\\char21}" "textgreek" "" # GREEK LETTER ARCHAIC KOPPA
0x03d9 "\\textgreek{\\char19}" "textgreek" "" # GREEK SMALL LETTER ARCHAIC KOPPA
0x03d8 "\\textgreek{\\char21}" "textgreek" "" "" "" # GREEK LETTER ARCHAIC KOPPA
0x03d9 "\\textgreek{\\char19}" "textgreek" "" "" "" # GREEK SMALL LETTER ARCHAIC KOPPA
#0x03da "" "" "" "" "" # GREEK LETTER STIGMA
0x03db "\\textgreek{\\char6}" "textgreek" "" # GREEK SMALL LETTER STIGMA
0x03dc "\\textgreek{\\char195}" "textgreek" "" # GREEK LETTER DIGAMMA
0x03db "\\textgreek{\\char6}" "textgreek" "" "" "" # GREEK SMALL LETTER STIGMA
0x03dc "\\textgreek{\\char195}" "textgreek" "" "" "" # GREEK LETTER DIGAMMA
0x03dd "\\textgreek{\\char147}" "textgreek" "" "\\digamma" "amssymb" # GREEK SMALL LETTER DIGAMMA
#0x03de "" "" "" "" "" # GREEK LETTER KOPPA
0x03df "\\textgreek{\\char18}" "textgreek" "" # GREEK SMALL LETTER KOPPA
0x03e0 "\\textgreek{\\char23}" "textgreek" "" # GREEK LETTER SAMPI
0x03e1 "\\textgreek{\\char27}" "textgreek" "" # GREEK SMALL LETTER SAMPI
0x03df "\\textgreek{\\char18}" "textgreek" "" "" "" # GREEK SMALL LETTER KOPPA
0x03e0 "\\textgreek{\\char23}" "textgreek" "" "" "" # GREEK LETTER SAMPI
0x03e1 "\\textgreek{\\char27}" "textgreek" "" "" "" # GREEK SMALL LETTER SAMPI
0x03f6 "" "" "" "\\backepsilon" "amssymb" # ϶ GREEK REVERSED LUNATE EPSILON SYMBOL
#
# Cyrillic
@ -1580,9 +1585,9 @@
0x2001 "\\quad" "" "" "\\quad" "" # EM QUAD
0x2002 "\\enskip" "" "" "\\enskip" "" # EN SPACE
0x2003 "\\quad" "" "" "\\quad" "" # EM SPACE
0x2004 "\\;" "" "notermination" "\\;" "" # THREE-PER-EM SPACE
0x2005 "\\:" "" "notermination" "\\:" "" # FOUR-PER-EM SPACE
0x2006 "\\," "" "notermination" "\\," "" # SIX-PER-EM SPACE
0x2004 "\\;" "" "notermination=both" "\\;" "" # THREE-PER-EM SPACE
0x2005 "\\:" "" "notermination=both" "\\:" "" # FOUR-PER-EM SPACE
0x2006 "\\," "" "notermination=both" "\\," "" # SIX-PER-EM SPACE
0x2007 "\\LyXFigureSpace" "\\newcommand*\\LyXFigureSpace{\\hphantom{0}}" "" "\\LyXFigureSpace" "\\newcommand*\\LyXFigureSpace{\\hphantom{0}}" # FIGURE SPACE
0x2008 "\\LyXPunctSpace" "\\newcommand*\\LyXPunctSpace{\\hphantom{,}}" "" "\\LyXPunctSpace" "\\newcommand*\\LyXPunctSpace{\\hphantom{,}}" # PUNCTUATION SPACE
0x2009 "\\LyXThinSpace" "\\newcommand*\\LyXThinSpace{\\,\\hspace{0pt}}" "" "\\LyXThinSpace" "\\newcommand*\\LyXThinSpace{\\,\\hspace{0pt}}" # THIN SPACE
@ -1592,14 +1597,14 @@
#0x200d "" "" "" "" "" # ZERO WIDTH JOINER
#0x200e "" "" "" "" "" # LEFT-TO-RIGHT MARK
#0x200f "" "" "" "" "" # RIGHT-TO-LEFT MARK
0x2010 "-" "" "notermination" "" "" # HYPHEN # identic in LaTeX to FIGURE DASH
0x2011 "\\nobreakdash-" "amsmath" "notermination" "" "" # NON-BREAKING HYPHEN
0x2012 "-" "" "notermination" # FIGURE DASH
0x2010 "-" "" "notermination=text" "" "" # HYPHEN # identic in LaTeX to FIGURE DASH
0x2011 "\\nobreakdash-" "amsmath" "notermination=text" "" "" # NON-BREAKING HYPHEN
0x2012 "-" "" "notermination=text" "" "" # FIGURE DASH
0x2013 "\\textendash" "" "" # EN DASH
0x2014 "\\textemdash" "" "" # EM DASH
# use the following macro for the character HORIZONTAL BAR
0x2015 "\\LyXbar" "\\newcommand*\\LyXbar{\\rule[0.585ex]{1.2em}{0.25pt}}" ""
0x2016 "\\textbardbl" "textcomp" "" "\\|" "" # DOUBLE VERTICAL LINE
0x2016 "\\textbardbl" "textcomp,notermination=math" "" "\\|" "" # DOUBLE VERTICAL LINE
0x2017 "\\subdoublebar{ }" "tipa" "" "" "" # DOUBLE LOW LINE
0x2018 "\\textquoteleft" "" "" # LEFT SINGLE QUOTATION MARK
0x2019 "\\textquoteright" "" "" # RIGHT SINGLE QUOTATION MARK
@ -1613,10 +1618,10 @@
0x2021 "\\ddag" "" "" "\\ddagger" "" # DOUBLE DAGGER
0x2022 "\\textbullet" "textcomp" "" # BULLET
0x2023 "\\textifsymbol[ifgeo]{116}" "ifsym" "" # TRIANGULAR BULLET # ≈ 0x25b8
0x2024 "." "" "notermination" # ONE DOT LEADER # ≈ FULL STOP
0x2025 ".\\,." "" "notermination" # TWO DOT LEADER
0x2024 "." "" "notermination=text" "" "" # ONE DOT LEADER # ≈ FULL STOP
0x2025 ".\\,." "" "notermination=text" "" "" # TWO DOT LEADER
0x2026 "\\ldots" "" "" "\\ldots" "" # HORIZONTAL ELLIPSIS
0x2027 "\\-" "" "notermination" "" "" # HYPHENATION POINT
0x2027 "\\-" "" "notermination=text" "" "" # HYPHENATION POINT
#0x2028 "" "" "" "" "" # LINE SEPARATOR
#0x2029 "" "" "" "" "" # PARAGRAPH SEPARATOR
#0x202a "" "" "" "" "" # LEFT-TO-RIGHT EMBEDDING
@ -1624,7 +1629,7 @@
#0x202c "" "" "" "" "" # POP DIRECTIONAL FORMATTING
#0x202d "" "" "" "" "" # LEFT-TO-RIGHT OVERRIDE
#0x202e "" "" "" "" "" # RIGHT-TO-LEFT OVERRIDE
0x202f "\\," "" "notermination" "\\," "" # NARROW NO-BREAK SPACE
0x202f "\\," "" "notermination=both" "\\," "" # NARROW NO-BREAK SPACE
0x2030 "\\textperthousand" "textcomp" "" # PER MILLE SIGN
0x2031 "\\textpertenthousand" "textcomp" "" # PER TEN THOUSAND SIGN
0x2032 "\\textasciiacute" "textcomp" "" "\\prime" "" # PRIME
@ -1633,24 +1638,24 @@
0x2035 "\\textasciigrave" "textcomp" "" "\\backprime" "amssymb" # REVERSED PRIME
0x2036 "\\textgravedbl" "textcomp" "" # REVERSED DOUBLE PRIME
#0x2037 "" "" "" # REVERSED TRIPLE PRIME
0x2038 "\\^{}" "" "notermination" # CARET
0x2038 "\\^{}" "" "" "" "" # CARET
0x2039 "\\guilsinglleft" "" "" # SINGLE LEFT-POINTING ANGLE QUOTATION MARK
0x203a "\\guilsinglright" "" "" # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
0x203b "\\textreferencemark" "textcomp" "" # REFERENCE MARK
0x203c "!!" "" "notermination" # DOUBLE EXCLAMATION MARK # ≈ 2×EXCLAMATION MARK
0x203c "!!" "" "notermination=text" "" "" # DOUBLE EXCLAMATION MARK # ≈ 2×EXCLAMATION MARK
0x203d "\\textinterrobang" "textcomp" "" # INTERROBANG
# use the following macro for the character OVERLINE
0x203e "\\LyXoverline" "\\newcommand*\\LyXoverline{\\raisebox{2.6ex}{\\_}}" ""
0x2044 "\\textfractionsolidus" "textcomp" "" # FRACTION SLASH
0x2045 "\\textlquill" "textcomp" "" # LEFT SQUARE BRACKET WITH QUILL
0x2046 "\\textrquill" "textcomp" "" # RIGHT SQUARE BRACKET WITH QUILL
0x2047 "??" "" "notermination" # DOUBLE QUESTION MARK # ≈ 2×QUESTION MARK
0x2048 "?!" "" "notermination" # QUESTION EXCLAMATION MARK
0x2049 "!?" "" "notermination" # EXCLAMATION QUESTION MARK
0x2047 "??" "" "notermination=text" "" "" # DOUBLE QUESTION MARK # ≈ 2×QUESTION MARK
0x2048 "?!" "" "notermination=text" "" "" # QUESTION EXCLAMATION MARK
0x2049 "!?" "" "notermination=text" "" "" # EXCLAMATION QUESTION MARK
0x2052 "\\textdiscount" "textcomp" "" # COMMERCIAL MINUS SIGN
0x205d "\\vdots" "" "" # TRICOLON # ≈ VERTICAL ELLIPSIS
#0x205e "" "" "" "" "" # VERTICAL FOUR DOTS
0x205f "" "" "" "\\:" "" # MEDIUM MATHEMATICAL SPACE
0x205f "" "" "notermination=math" "\\:" "" # MEDIUM MATHEMATICAL SPACE
#0x2060 "" "" "" "" "" # WORD JOINER
0x2070 "\\textsuperscript{0}" "" "" "{{}^0}" "" # SUPERSCRIPT ZERO
0x2071 "\\textsuperscript{i}" "" "" "{{}^i}" "" # SUPERSCRIPT LATIN SMALL LETTER I
@ -1716,13 +1721,13 @@
0x2105 "\\LyXcareof" "\\newcommand*\\LyXcareof{\\mbox{\\raisebox{.8ex}{c}\\kern-.175em\\raisebox{.2ex}{/}\\kern-.18em\\raisebox{-.2ex}{o}}}" ""
# use the following macro for the character CADA UNA
0x2106 "\\LyXcadauna" "\\newcommand*\\LyXcadauna{\\mbox{\\raisebox{.8ex}{c}\\kern-.175em\\raisebox{.2ex}{/}\\kern-.18em\\raisebox{-.2ex}{u}}}" ""
0x2109 "°{}F" "" "notermination" # DEGREE FARENHEIT
0x2109 "°{}F" "" "notermination=text" "" "" # DEGREE FAHRENHEIT
# mathrsfs has no small letters
#0x210a "" "" "" "\\mathscr{g}" "mathrsfs" # SCRIPT SMALL G
0x210b "" "" "" "\\mathscr{H}" "mathrsfs" # SCRIPT CAPITAL H
0x210c "" "" "" "\\mathfrak{H}" "amssymb" # BLACK-LETTER CAPITAL H
0x210d "" "" "" "\\mathbb{H}" "amssymb" # DOUBLE-STUCK CAPITAL H
0x210e "" "" "" "h" # PLANCK CONSTANT
0x210e "" "" "notermination=math" "h" # PLANCK CONSTANT
0x210f "" "" "" "\\hbar" "amssymb" # PLANCK CONSTANT OVER TWO PI
0x2110 "" "" "" "\\mathscr{I}" "mathrsfs" # SCRIPT CAPITAL I
0x2111 "" "" "" "\\mathfrak{I}" "amssymb" # BLACK-LETTER CAPITAL I
@ -1748,7 +1753,7 @@
0x2127 "\\textmho" "textcomp" "" "\\mho" "amssymb" # INVERTED OHM SIGN
0x2128 "" "" "" "\\mathfrak{Z}" "amssymb" # BLACK-LETTER CAPITAL Z
#0x2129 "" "" "" "" "" # TURNED GREEK SMALL LETTER IOTA
0x212a "K" "" "notermination" # KELVIN SIGN
0x212a "K" "" "notermination=text" "" "" # KELVIN SIGN
0x212b "\\AA" "" "" # ANGSTROM SIGN
0x212c "" "" "" "\\mathscr{B}" "mathrsfs" # SCRIPT CAPITAL B
0x212d "" "" "" "\\mathfrak{C}" "amssymb" # BLACK-LETTER CAPITAL C
@ -1843,15 +1848,15 @@
0x2193 "\\textdownarrow" "textcomp" "" "\\downarrow" # DOWNWARDS ARROW
0x2194 "" "" "" "\\leftrightarrow" # LEFT RIGHT ARROW
0x2195 "" "" "" "\\updownarrow" # UP DOWN ARROW
0x2196 "Home" "" "notermination" "\\nwarrow" "amssymb" # Qt::Key_Home, NORTH WEST ARROW
0x2198 "End" "" "notermination" "\\searrow" "" # Qt::Key_End, SOUTH EAST ARROW
0x2196 "Home" "" "notermination=text" "\\nwarrow" "amssymb" # Qt::Key_Home, NORTH WEST ARROW
0x2198 "End" "" "notermination=text" "\\searrow" "" # Qt::Key_End, SOUTH EAST ARROW
0x21a8 "{\\ascii\\ETB}" "ascii" "" # UP DOWN ARROW WITH BASE
0x21b5 "{\\Pisymbol{psy}{191}}" "pifont" "" # DOWNWARDS ARROW WITH CORNER LEFTWARDS, Return key
0x21de "Option-Up Arrow" "" "notermination" "" # Qt::Key_PageUp, UPWARDS ARROW WITH DOUBLE STROKE = page up
0x21df "Option-Down Arrow" "" "notermination" "" # Qt::Key_PageDown, DOWNWARDS ARROW WITH DOUBLE STROKE = page down
0x21e4 "Shift-Tab" "" "notermination" "" # Qt::Key_Backtab, LEFTWARDS ARROW TO BAR = leftward tab
0x21e5 "Tab" "" "notermination" "" # Qt::Key_Tab, RIGHTWARDS ARROW TO BAR = rightward tab
0x21ea "Caps Lock" "" "notermination" "" # Qt::Key_CapsLock, UPWARDS WHITE ARROW FROM BAR = caps lock
0x21de "Option-Up Arrow" "" "notermination=text" "" "" # Qt::Key_PageUp, UPWARDS ARROW WITH DOUBLE STROKE = page up
0x21df "Option-Down Arrow" "" "notermination=text" "" "" # Qt::Key_PageDown, DOWNWARDS ARROW WITH DOUBLE STROKE = page down
0x21e4 "Shift-Tab" "" "notermination=text" "" "" # Qt::Key_Backtab, LEFTWARDS ARROW TO BAR = leftward tab
0x21e5 "Tab" "" "notermination=text" "" "" # Qt::Key_Tab, RIGHTWARDS ARROW TO BAR = rightward tab
0x21ea "Caps Lock" "" "notermination=text" "" "" # Qt::Key_CapsLock, UPWARDS WHITE ARROW FROM BAR = caps lock
#
# mathematical operators
#
@ -1873,7 +1878,7 @@
0x220f "" "" "" "\\prod" # N-ARY PRODUCT
0x2210 "" "" "" "\\coprod" "" # N-ARY COPRODUCT
0x2211 "" "" "" "\\sum" # N-ARY SUMMATION
0x2212 "\\textminus" "textcomp" "" "-" "" # MINUS SIGN
0x2212 "\\textminus" "textcomp" "notermination=math" "-" "" # MINUS SIGN
0x2213 "" "" "" "\\mp" "" # MINUS-OR-PLUS SIGN
0x2214 "" "" "" "\\dotplus" "amssymb" # DOT PLUS
0x2215 "" "" "" "\\slash" # DIVISION SLASH
@ -1967,10 +1972,10 @@
0x231a "\\Clocklogo" "marvosym" "" # WATCH
#0x2320 "" "" "" # TOP HALF INTEGRAL
#0x2321 "" "" "" # BOTTOM HALF INTEGRAL
0x2326 "Delete" "" "notermination" "" # Qt::Key_Delete, ERASE TO THE RIGHT = delete to the right key
0x2326 "Delete" "" "notermination=text" "" "" # Qt::Key_Delete, ERASE TO THE RIGHT = delete to the right key
0x2328 "\\Keyboard" "marvosym" "" # KEYBOARD
0x232b "Backspace" "" "notermination" "" # Qt::Key_Backspace, ERASE TO THE LEFT = delete to the left key
0x238b "Escape" "" "notermination" "" # Qt::Key_Escape, BROKEN CIRCLE WITH NORTHWEST ARROW = escape
0x232b "Backspace" "" "notermination=text" "" "" # Qt::Key_Backspace, ERASE TO THE LEFT = delete to the left key
0x238b "Escape" "" "notermination=text" "" "" # Qt::Key_Escape, BROKEN CIRCLE WITH NORTHWEST ARROW = escape
#
# control pictures
#
@ -2267,11 +2272,11 @@
#
# ligatures
#
0xfb00 "ff" "" "force,notermination" # LATIN SMALL LIGATURE FF
0xfb01 "fi" "" "force,notermination" # LATIN SMALL LIGATURE FI
0xfb02 "fl" "" "force,notermination" # LATIN SMALL LIGATURE FL
0xfb03 "ffi" "" "force,notermination" # LATIN SMALL LIGATURE FFI
0xfb04 "ffl" "" "force,notermination" # LATIN SMALL LIGATURE FFL
0xfb00 "ff" "" "force,notermination=text" "" "" # LATIN SMALL LIGATURE FF
0xfb01 "fi" "" "force,notermination=text" "" "" # LATIN SMALL LIGATURE FI
0xfb02 "fl" "" "force,notermination=text" "" "" # LATIN SMALL LIGATURE FL
0xfb03 "ffi" "" "force,notermination=text" "" "" # LATIN SMALL LIGATURE FFI
0xfb04 "ffl" "" "force,notermination=text" "" "" # LATIN SMALL LIGATURE FFL
#
# mathematical alphanumeric symbols
#
@ -2327,57 +2332,57 @@
0x1d431 "" "" "" "\\mathbf{x}" "" # 𝐱 MATHEMATICAL BOLD SMALL X
0x1d432 "" "" "" "\\mathbf{y}" "" # 𝐲 MATHEMATICAL BOLD SMALL Y
0x1d433 "" "" "" "\\mathbf{z}" "" # 𝐳 MATHEMATICAL BOLD SMALL Z
0x1d434 "" "" "" "A" "" # 𝐴 MATHEMATICAL ITALIC CAPITAL A
0x1d435 "" "" "" "B" "" # 𝐵 MATHEMATICAL ITALIC CAPITAL B
0x1d436 "" "" "" "C" "" # 𝐶 MATHEMATICAL ITALIC CAPITAL C
0x1d437 "" "" "" "D" "" # 𝐷 MATHEMATICAL ITALIC CAPITAL D
0x1d438 "" "" "" "E" "" # 𝐸 MATHEMATICAL ITALIC CAPITAL E
0x1d439 "" "" "" "F" "" # 𝐹 MATHEMATICAL ITALIC CAPITAL F
0x1d43a "" "" "" "G" "" # 𝐺 MATHEMATICAL ITALIC CAPITAL G
0x1d43b "" "" "" "H" "" # 𝐻 MATHEMATICAL ITALIC CAPITAL H
0x1d43c "" "" "" "I" "" # 𝐼 MATHEMATICAL ITALIC CAPITAL I
0x1d43d "" "" "" "J" "" # 𝐽 MATHEMATICAL ITALIC CAPITAL J
0x1d43e "" "" "" "K" "" # 𝐾 MATHEMATICAL ITALIC CAPITAL K
0x1d43f "" "" "" "L" "" # 𝐿 MATHEMATICAL ITALIC CAPITAL L
0x1d440 "" "" "" "M" "" # 𝑀 MATHEMATICAL ITALIC CAPITAL M
0x1d441 "" "" "" "N" "" # 𝑁 MATHEMATICAL ITALIC CAPITAL N
0x1d442 "" "" "" "O" "" # 𝑂 MATHEMATICAL ITALIC CAPITAL O
0x1d443 "" "" "" "P" "" # 𝑃 MATHEMATICAL ITALIC CAPITAL P
0x1d444 "" "" "" "Q" "" # 𝑄 MATHEMATICAL ITALIC CAPITAL Q
0x1d445 "" "" "" "R" "" # 𝑅 MATHEMATICAL ITALIC CAPITAL R
0x1d446 "" "" "" "S" "" # 𝑆 MATHEMATICAL ITALIC CAPITAL S
0x1d447 "" "" "" "T" "" # 𝑇 MATHEMATICAL ITALIC CAPITAL T
0x1d448 "" "" "" "U" "" # 𝑈 MATHEMATICAL ITALIC CAPITAL U
0x1d449 "" "" "" "V" "" # 𝑉 MATHEMATICAL ITALIC CAPITAL V
0x1d44a "" "" "" "W" "" # 𝑊 MATHEMATICAL ITALIC CAPITAL W
0x1d44b "" "" "" "X" "" # 𝑋 MATHEMATICAL ITALIC CAPITAL X
0x1d44c "" "" "" "Y" "" # 𝑌 MATHEMATICAL ITALIC CAPITAL Y
0x1d44d "" "" "" "Z" "" # 𝑍 MATHEMATICAL ITALIC CAPITAL Z
0x1d44e "" "" "" "a" "" # 𝑎 MATHEMATICAL ITALIC SMALL A
0x1d44f "" "" "" "b" "" # 𝑏 MATHEMATICAL ITALIC SMALL B
0x1d450 "" "" "" "c" "" # 𝑐 MATHEMATICAL ITALIC SMALL C
0x1d451 "" "" "" "d" "" # 𝑑 MATHEMATICAL ITALIC SMALL D
0x1d452 "" "" "" "e" "" # 𝑒 MATHEMATICAL ITALIC SMALL E
0x1d453 "" "" "" "f" "" # 𝑓 MATHEMATICAL ITALIC SMALL F
0x1d454 "" "" "" "g" "" # 𝑔 MATHEMATICAL ITALIC SMALL G
0x1d456 "" "" "" "i" "" # 𝑖 MATHEMATICAL ITALIC SMALL I
0x1d457 "" "" "" "j" "" # 𝑗 MATHEMATICAL ITALIC SMALL J
0x1d458 "" "" "" "k" "" # 𝑘 MATHEMATICAL ITALIC SMALL K
0x1d459 "" "" "" "l" "" # 𝑙 MATHEMATICAL ITALIC SMALL L
0x1d45a "" "" "" "m" "" # 𝑚 MATHEMATICAL ITALIC SMALL M
0x1d45b "" "" "" "n" "" # 𝑛 MATHEMATICAL ITALIC SMALL N
0x1d45c "" "" "" "o" "" # 𝑜 MATHEMATICAL ITALIC SMALL O
0x1d45d "" "" "" "p" "" # 𝑝 MATHEMATICAL ITALIC SMALL P
0x1d45e "" "" "" "q" "" # 𝑞 MATHEMATICAL ITALIC SMALL Q
0x1d45f "" "" "" "r" "" # 𝑟 MATHEMATICAL ITALIC SMALL R
0x1d460 "" "" "" "s" "" # 𝑠 MATHEMATICAL ITALIC SMALL S
0x1d461 "" "" "" "t" "" # 𝑡 MATHEMATICAL ITALIC SMALL T
0x1d462 "" "" "" "u" "" # 𝑢 MATHEMATICAL ITALIC SMALL U
0x1d463 "" "" "" "v" "" # 𝑣 MATHEMATICAL ITALIC SMALL V
0x1d464 "" "" "" "w" "" # 𝑤 MATHEMATICAL ITALIC SMALL W
0x1d465 "" "" "" "x" "" # 𝑥 MATHEMATICAL ITALIC SMALL X
0x1d466 "" "" "" "y" "" # 𝑦 MATHEMATICAL ITALIC SMALL Y
0x1d467 "" "" "" "z" "" # 𝑧 MATHEMATICAL ITALIC SMALL Z
0x1d434 "" "" "notermination=math" "A" "" # 𝐴 MATHEMATICAL ITALIC CAPITAL A
0x1d435 "" "" "notermination=math" "B" "" # 𝐵 MATHEMATICAL ITALIC CAPITAL B
0x1d436 "" "" "notermination=math" "C" "" # 𝐶 MATHEMATICAL ITALIC CAPITAL C
0x1d437 "" "" "notermination=math" "D" "" # 𝐷 MATHEMATICAL ITALIC CAPITAL D
0x1d438 "" "" "notermination=math" "E" "" # 𝐸 MATHEMATICAL ITALIC CAPITAL E
0x1d439 "" "" "notermination=math" "F" "" # 𝐹 MATHEMATICAL ITALIC CAPITAL F
0x1d43a "" "" "notermination=math" "G" "" # 𝐺 MATHEMATICAL ITALIC CAPITAL G
0x1d43b "" "" "notermination=math" "H" "" # 𝐻 MATHEMATICAL ITALIC CAPITAL H
0x1d43c "" "" "notermination=math" "I" "" # 𝐼 MATHEMATICAL ITALIC CAPITAL I
0x1d43d "" "" "notermination=math" "J" "" # 𝐽 MATHEMATICAL ITALIC CAPITAL J
0x1d43e "" "" "notermination=math" "K" "" # 𝐾 MATHEMATICAL ITALIC CAPITAL K
0x1d43f "" "" "notermination=math" "L" "" # 𝐿 MATHEMATICAL ITALIC CAPITAL L
0x1d440 "" "" "notermination=math" "M" "" # 𝑀 MATHEMATICAL ITALIC CAPITAL M
0x1d441 "" "" "notermination=math" "N" "" # 𝑁 MATHEMATICAL ITALIC CAPITAL N
0x1d442 "" "" "notermination=math" "O" "" # 𝑂 MATHEMATICAL ITALIC CAPITAL O
0x1d443 "" "" "notermination=math" "P" "" # 𝑃 MATHEMATICAL ITALIC CAPITAL P
0x1d444 "" "" "notermination=math" "Q" "" # 𝑄 MATHEMATICAL ITALIC CAPITAL Q
0x1d445 "" "" "notermination=math" "R" "" # 𝑅 MATHEMATICAL ITALIC CAPITAL R
0x1d446 "" "" "notermination=math" "S" "" # 𝑆 MATHEMATICAL ITALIC CAPITAL S
0x1d447 "" "" "notermination=math" "T" "" # 𝑇 MATHEMATICAL ITALIC CAPITAL T
0x1d448 "" "" "notermination=math" "U" "" # 𝑈 MATHEMATICAL ITALIC CAPITAL U
0x1d449 "" "" "notermination=math" "V" "" # 𝑉 MATHEMATICAL ITALIC CAPITAL V
0x1d44a "" "" "notermination=math" "W" "" # 𝑊 MATHEMATICAL ITALIC CAPITAL W
0x1d44b "" "" "notermination=math" "X" "" # 𝑋 MATHEMATICAL ITALIC CAPITAL X
0x1d44c "" "" "notermination=math" "Y" "" # 𝑌 MATHEMATICAL ITALIC CAPITAL Y
0x1d44d "" "" "notermination=math" "Z" "" # 𝑍 MATHEMATICAL ITALIC CAPITAL Z
0x1d44e "" "" "notermination=math" "a" "" # 𝑎 MATHEMATICAL ITALIC SMALL A
0x1d44f "" "" "notermination=math" "b" "" # 𝑏 MATHEMATICAL ITALIC SMALL B
0x1d450 "" "" "notermination=math" "c" "" # 𝑐 MATHEMATICAL ITALIC SMALL C
0x1d451 "" "" "notermination=math" "d" "" # 𝑑 MATHEMATICAL ITALIC SMALL D
0x1d452 "" "" "notermination=math" "e" "" # 𝑒 MATHEMATICAL ITALIC SMALL E
0x1d453 "" "" "notermination=math" "f" "" # 𝑓 MATHEMATICAL ITALIC SMALL F
0x1d454 "" "" "notermination=math" "g" "" # 𝑔 MATHEMATICAL ITALIC SMALL G
0x1d456 "" "" "notermination=math" "i" "" # 𝑖 MATHEMATICAL ITALIC SMALL I
0x1d457 "" "" "notermination=math" "j" "" # 𝑗 MATHEMATICAL ITALIC SMALL J
0x1d458 "" "" "notermination=math" "k" "" # 𝑘 MATHEMATICAL ITALIC SMALL K
0x1d459 "" "" "notermination=math" "l" "" # 𝑙 MATHEMATICAL ITALIC SMALL L
0x1d45a "" "" "notermination=math" "m" "" # 𝑚 MATHEMATICAL ITALIC SMALL M
0x1d45b "" "" "notermination=math" "n" "" # 𝑛 MATHEMATICAL ITALIC SMALL N
0x1d45c "" "" "notermination=math" "o" "" # 𝑜 MATHEMATICAL ITALIC SMALL O
0x1d45d "" "" "notermination=math" "p" "" # 𝑝 MATHEMATICAL ITALIC SMALL P
0x1d45e "" "" "notermination=math" "q" "" # 𝑞 MATHEMATICAL ITALIC SMALL Q
0x1d45f "" "" "notermination=math" "r" "" # 𝑟 MATHEMATICAL ITALIC SMALL R
0x1d460 "" "" "notermination=math" "s" "" # 𝑠 MATHEMATICAL ITALIC SMALL S
0x1d461 "" "" "notermination=math" "t" "" # 𝑡 MATHEMATICAL ITALIC SMALL T
0x1d462 "" "" "notermination=math" "u" "" # 𝑢 MATHEMATICAL ITALIC SMALL U
0x1d463 "" "" "notermination=math" "v" "" # 𝑣 MATHEMATICAL ITALIC SMALL V
0x1d464 "" "" "notermination=math" "w" "" # 𝑤 MATHEMATICAL ITALIC SMALL W
0x1d465 "" "" "notermination=math" "x" "" # 𝑥 MATHEMATICAL ITALIC SMALL X
0x1d466 "" "" "notermination=math" "y" "" # 𝑦 MATHEMATICAL ITALIC SMALL Y
0x1d467 "" "" "notermination=math" "z" "" # 𝑧 MATHEMATICAL ITALIC SMALL Z
0x1d49c "" "" "" "\\mathcal{A}" "" # 𝒜 MATHEMATICAL SCRIPT CAPITAL A
0x1d49e "" "" "" "\\mathcal{C}" "" # 𝒞 MATHEMATICAL SCRIPT CAPITAL C
0x1d49f "" "" "" "\\mathcal{D}" "" # 𝒟 MATHEMATICAL SCRIPT CAPITAL D

7
po/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
POTFILES
POTFILES.in
lyx*.pot
*.gmo
stamp-po
remove-potcdate.sed

7279
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -13707,12 +13707,12 @@ msgid "Align bottom"
msgstr ""
#: lib/ui/stdtoolbars.inc:165
msgid "Rotate cell"
msgstr ""
msgid "Rotate cell by 90 degrees or unset rotation"
msgstr "Rotate cell by 90° or unset rotation"
#: lib/ui/stdtoolbars.inc:166
msgid "Rotate table"
msgstr ""
msgid "Rotate table by 90 degrees or unset rotation"
msgstr "Rotate table by 90° or unset rotation"
#: lib/ui/stdtoolbars.inc:167
msgid "Set multi-column"

1667
po/fi.po

File diff suppressed because it is too large Load Diff

1425
po/it.po Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -336,6 +336,8 @@ def layouts_l10n(input_files, output, base, layouttranslations):
keys.append(key)
keys.sort()
ContextRe = re.compile(r'(.*)(\[\[.*\]\])')
print >> out, '''# This file has been automatically generated by po/lyx_pot.py.
# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to regenerate
# this file from the translations, run `make ../lib/layouttranslations' in po.
@ -372,8 +374,13 @@ def layouts_l10n(input_files, output, base, layouttranslations):
# also print untranslated entries to help translators
elif not lang in oldlanguages:
key = key.replace('\\', '\\\\').replace('"', '\\"')
res = ContextRe.search(key)
if res != None:
val = res.group(1)
else:
val = key
print >> out, '\t"%s" "%s"' % \
(key.encode('utf-8'), key.encode('utf-8'))
(key.encode('utf-8'), val.encode('utf-8'))
print >> out, 'End'
out.close()

2258
po/sk.po

File diff suppressed because it is too large Load Diff

808
po/uk.po

File diff suppressed because it is too large Load Diff

1
sourcedoc/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
Doxyfile

6
src/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
lyx
liblyxcore.a
liblyxgraphics.a
liblyxinsets.a
liblyxmathed.a
moc_Compare.cpp

View File

@ -169,14 +169,17 @@ docstring convertLaTeXCommands(docstring const & str)
// unicodesymbols has things in the form: \"{u},
// whereas we may see things like: \"u. So we'll
// look for that and change it, if necessary.
// FIXME: This is a sort of mini-tex2lyx.
// Use the real tex2lyx instead!
static lyx::regex const reg("^\\\\\\W\\w");
if (lyx::regex_search(to_utf8(val), reg)) {
val.insert(3, from_ascii("}"));
val.insert(2, from_ascii("{"));
}
bool termination;
docstring rem;
docstring const cnvtd = Encodings::fromLaTeXCommand(val,
Encodings::TEXT_CMD, rem);
Encodings::TEXT_CMD, termination, rem);
if (!cnvtd.empty()) {
// it did, so we'll take that bit and proceed with what's left
ret += cnvtd;

View File

@ -789,6 +789,7 @@ int Buffer::readHeader(Lexer & lex)
params().html_latex_end.clear();
params().html_math_img_scale = 1.0;
params().output_sync_macro.erase();
params().local_layout.clear();
for (int i = 0; i < 4; ++i) {
params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
@ -1508,9 +1509,8 @@ void Buffer::writeLaTeXSource(otexstream & os,
Encoding const * const enc = runparams.encoding;
if (enc) {
for (size_t n = 0; n < inputpath.size(); ++n) {
docstring const glyph =
docstring(1, inputpath[n]);
if (enc->latexChar(inputpath[n], true) != glyph) {
if (!enc->encodable(inputpath[n])) {
docstring const glyph(1, inputpath[n]);
LYXERR0("Uncodable character '"
<< glyph
<< "' in input path!");
@ -1769,7 +1769,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
bool const output_preamble =
output == FullSource || output == OnlyPreamble;
bool const output_body =
output == FullSource || output == OnlyBody;
output == FullSource || output == OnlyBody || output == IncludedFile;
if (output_preamble) {
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@ -1852,11 +1852,14 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
}
if (output_body) {
os << "<body>\n";
bool const output_body_tag = (output != IncludedFile);
if (output_body_tag)
os << "<body>\n";
XHTMLStream xs(os);
params().documentClass().counters().reset();
xhtmlParagraphs(text(), *this, xs, runparams);
os << "</body>\n";
if (output_body_tag)
os << "</body>\n";
}
if (output_preamble)
@ -3303,9 +3306,7 @@ void Buffer::getSourceCode(odocstream & os, string const format,
texrow.newline();
texrow.newline();
// output paragraphs
if (params().isDocBook())
docbookParagraphs(text(), *this, os, runparams);
else if (runparams.flavor == OutputParams::HTML) {
if (runparams.flavor == OutputParams::HTML) {
XHTMLStream xs(os);
setMathFlavor(runparams);
xhtmlParagraphs(text(), *this, xs, runparams);
@ -3315,6 +3316,8 @@ void Buffer::getSourceCode(odocstream & os, string const format,
// Probably should have some routine with a signature like them.
writePlaintextParagraph(*this,
text().paragraphs()[par_begin], os, runparams, dummy);
} else if (params().isDocBook()) {
docbookParagraphs(text(), *this, os, runparams);
} else {
// latex or literate
otexstream ots(os, texrow);
@ -3332,11 +3335,16 @@ void Buffer::getSourceCode(odocstream & os, string const format,
d->texrow.reset();
d->texrow.newline();
d->texrow.newline();
if (params().isDocBook())
writeDocBookSource(os, absFileName(), runparams, output);
else if (runparams.flavor == OutputParams::HTML)
if (runparams.flavor == OutputParams::HTML) {
writeLyXHTMLSource(os, runparams, output);
else {
} else if (runparams.flavor == OutputParams::TEXT) {
if (output == OnlyPreamble) {
os << _("% Plaintext does not have a preamble.");
} else
writePlaintextFile(*this, os, runparams);
} else if (params().isDocBook()) {
writeDocBookSource(os, absFileName(), runparams, output);
} else {
// latex or literate
otexstream ots(os, d->texrow);
writeLaTeXSource(ots, string(), runparams, output);
@ -3695,7 +3703,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
}
return ExportNoPathToFormat;
}
runparams.flavor = converters.getFlavor(path);
runparams.flavor = converters.getFlavor(path, this);
} else {
backend_format = format;
@ -3749,7 +3757,8 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
return ExportTexPathHasSpaces;
} else {
runparams.nice = false;
bool const success = makeLaTeXFile(FileName(filename), string(), runparams);
bool const success = makeLaTeXFile(
FileName(filename), filePath(), runparams);
if (d->cloned_buffer_)
d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"];
if (!success)

View File

@ -294,6 +294,7 @@ public:
enum OutputWhat {
FullSource,
OnlyBody,
IncludedFile,
OnlyPreamble,
CurrentParagraph
};

View File

@ -357,7 +357,7 @@ docstring getLaTeXMarkup(docstring const & macro, docstring const & author,
docstring author_latexed;
for (size_t n = 0; n < author.size(); ++n) {
try {
author_latexed += runparams.encoding->latexChar(author[n]);
author_latexed += runparams.encoding->latexChar(author[n]).first;
} catch (EncodingException & /* e */) {
if (runparams.dryrun) {
ods << "<" << _("LyX Warning: ")

View File

@ -175,16 +175,25 @@ void Converters::add(string const & from, string const & to,
}
converter.readFlags();
// If we have both latex & pdflatex, we set latex_command to latex.
// The latex_command is used to update the .aux file when running
// a converter that uses it.
if (converter.latex
&& (latex_command_.empty() || converter.latex_flavor == "latex"))
latex_command_ = subst(command, token_from, "");
// Similarly, set xelatex_command to xelatex.
if (converter.latex
&& (xelatex_command_.empty() || converter.latex_flavor == "xelatex"))
xelatex_command_ = subst(command, token_from, "");
if (converter.latex) {
if (latex_command_.empty() ||
converter.latex_flavor == "latex")
latex_command_ = subst(command, token_from, "");
if (dvilualatex_command_.empty() ||
converter.latex_flavor == "dvilualatex")
dvilualatex_command_ = subst(command, token_from, "");
if (lualatex_command_.empty() ||
converter.latex_flavor == "lualatex")
lualatex_command_ = subst(command, token_from, "");
if (pdflatex_command_.empty() ||
converter.latex_flavor == "pdflatex")
pdflatex_command_ = subst(command, token_from, "");
if (xelatex_command_.empty() ||
converter.latex_flavor == "xelatex")
xelatex_command_ = subst(command, token_from, "");
}
if (it == converterlist_.end()) {
converterlist_.push_back(converter);
@ -237,12 +246,15 @@ void Converters::updateLast(Formats const & formats)
}
OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path)
OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path,
Buffer const * buffer)
{
for (Graph::EdgePath::const_iterator cit = path.begin();
cit != path.end(); ++cit) {
Converter const & conv = converterlist_[*cit];
if (conv.latex)
if (conv.latex) {
if (conv.latex_flavor == "latex")
return OutputParams::LATEX;
if (conv.latex_flavor == "xelatex")
return OutputParams::XETEX;
if (conv.latex_flavor == "lualatex")
@ -251,10 +263,12 @@ OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path)
return OutputParams::DVILUATEX;
if (conv.latex_flavor == "pdflatex")
return OutputParams::PDFLATEX;
}
if (conv.xml)
return OutputParams::XML;
}
return OutputParams::LATEX;
return buffer ? buffer->params().getOutputFlavor()
: OutputParams::LATEX;
}
@ -318,7 +332,7 @@ bool Converters::convert(Buffer const * buffer,
// buffer is only invalid for importing, and then runparams is not
// used anyway.
OutputParams runparams(buffer ? &buffer->params().encoding() : 0);
runparams.flavor = getFlavor(edgepath);
runparams.flavor = getFlavor(edgepath, buffer);
if (buffer) {
runparams.use_japanese = buffer->params().bufferFormat() == "platex";
@ -391,14 +405,33 @@ bool Converters::convert(Buffer const * buffer,
if (!runLaTeX(*buffer, command, runparams, errorList))
return false;
} else {
if (conv.need_aux && !run_latex
&& !latex_command_.empty()) {
string const command = (buffer && buffer->params().useNonTeXFonts) ?
xelatex_command_ : latex_command_;
LYXERR(Debug::FILES, "Running " << command
<< " to update aux file");
if (!runLaTeX(*buffer, command, runparams, errorList))
return false;
if (conv.need_aux && !run_latex) {
string command;
switch (runparams.flavor) {
case OutputParams::DVILUATEX:
command = dvilualatex_command_;
break;
case OutputParams::LUATEX:
command = lualatex_command_;
break;
case OutputParams::PDFLATEX:
command = pdflatex_command_;
break;
case OutputParams::XETEX:
command = xelatex_command_;
break;
default:
command = latex_command_;
break;
}
if (!command.empty()) {
LYXERR(Debug::FILES, "Running "
<< command
<< " to update aux file");
if (!runLaTeX(*buffer, command,
runparams, errorList))
return false;
}
}
// FIXME UNICODE

View File

@ -113,7 +113,8 @@ public:
///
Graph::EdgePath getPath(std::string const & from, std::string const & to);
///
OutputParams::FLAVOR getFlavor(Graph::EdgePath const & path);
OutputParams::FLAVOR getFlavor(Graph::EdgePath const & path,
Buffer const * buffer = 0);
/// Flags for converting files
enum ConversionFlags {
/// No special flags
@ -156,6 +157,12 @@ private:
///
std::string latex_command_;
///
std::string dvilualatex_command_;
///
std::string lualatex_command_;
///
std::string pdflatex_command_;
///
std::string xelatex_command_;
/// If \p from = /path/file.ext and \p to = /path2/file2.ext2 then
/// this method moves each /path/file*.ext file to /path2/file2*.ext2

View File

@ -23,7 +23,7 @@
#include "insets/Inset.h"
#include "mathed/InsetMath.h"
#include "mathed/MathData.h"
#include "mathed/MathMacro.h"
#include "support/lassert.h"
@ -61,8 +61,10 @@ Paragraph & CursorSlice::paragraph() const
pos_type CursorSlice::lastpos() const
{
LASSERT(inset_, /**/);
return inset_->asInsetMath() ? cell().size()
: (text()->empty() ? 0 : paragraph().size());
InsetMath const * math = inset_->asInsetMath();
bool paramless_macro = math && math->asMacro() && !math->asMacro()->nargs();
return math ? (paramless_macro ? 0 : cell().size())
: (text()->empty() ? 0 : paragraph().size());
}

View File

@ -256,13 +256,13 @@ pasteSelectionHelper(Cursor const & cur, ParagraphList const & parlist,
if (ref->getParam("reference") == oldname)
ref->setParam("reference", newname);
} else if (itt->lyxCode() == MATH_REF_CODE) {
InsetMathHull * mi = itt->asInsetMath()->asHullInset();
InsetMathRef * mi = itt->asInsetMath()->asRefInset();
// this is necessary to prevent an uninitialized
// buffer when the RefInset is in a MathBox.
// FIXME audit setBuffer calls
mi->setBuffer(const_cast<Buffer &>(buffer));
if (mi->asRefInset()->getTarget() == oldname)
mi->asRefInset()->changeTarget(newname);
if (mi->getTarget() == oldname)
mi->changeTarget(newname);
}
}
}
@ -286,14 +286,13 @@ pasteSelectionHelper(Cursor const & cur, ParagraphList const & parlist,
if (ref.getParam("reference") == oldname)
ref.setParam("reference", newname);
} else if (itt->lyxCode() == MATH_REF_CODE) {
InsetMathHull & mi =
static_cast<InsetMathHull &>(*itt);
InsetMathRef * mi = itt->asInsetMath()->asRefInset();
// this is necessary to prevent an uninitialized
// buffer when the RefInset is in a MathBox.
// FIXME audit setBuffer calls
mi.setBuffer(const_cast<Buffer &>(buffer));
if (mi.asRefInset()->getTarget() == oldname)
mi.asRefInset()->changeTarget(newname);
mi->setBuffer(const_cast<Buffer &>(buffer));
if (mi->getTarget() == oldname)
mi->changeTarget(newname);
}
}
break;
@ -1112,7 +1111,7 @@ void pasteSelection(Cursor & cur, ErrorList & errorList)
}
void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwards)
void replaceSelectionWithString(Cursor & cur, docstring const & str)
{
cur.recordUndo();
DocIterator selbeg = cur.selectionBegin();
@ -1131,13 +1130,6 @@ void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwa
// Cut the selection
cutSelection(cur, true, false);
// select the replacement
if (backwards) {
selbeg.pos() += str.length();
cur.setSelection(selbeg, -int(str.length()));
} else
cur.setSelection(selbeg, str.length());
}

View File

@ -41,12 +41,9 @@ docstring selection(size_t sel_index);
/**
* Replace using the font of the first selected character and select
* the new string. When \c backwards == false, set anchor before
* cursor; otherwise set cursor before anchor.
* Does handle undo.
* the new string. Does handle undo.
*/
void replaceSelectionWithString(Cursor & cur, docstring const & str,
bool backwards);
void replaceSelectionWithString(Cursor & cur, docstring const & str);
/// If a selection exists, delete it without pushing it to the cut buffer.
/// Does handle undo.
void replaceSelection(Cursor & cur);

View File

@ -228,6 +228,21 @@ char_type const arabic_start = 0x0621;
char_type const arabic_end = 0x06cc;
enum CharInfoFlags {
///
CharInfoCombining = 1,
///
CharInfoTextFeature = 2,
///
CharInfoMathFeature = 4,
///
CharInfoForce = 8,
///
CharInfoTextNoTermination = 16,
///
CharInfoMathNoTermination = 32,
};
/// Information about a single UCS4 character
struct CharInfo {
/// LaTeX command (text mode) for this character
@ -239,20 +254,24 @@ struct CharInfo {
/// Needed LaTeX preamble (or feature) for math mode
string mathpreamble;
/// Is this a combining character?
bool combining;
bool combining() const { return flags & CharInfoCombining ? true : false; }
/// Is \c textpreamble a feature known by LaTeXFeatures, or a raw LaTeX
/// command?
bool textfeature;
bool textfeature() const { return flags & CharInfoTextFeature ? true : false; }
/// Is \c mathpreamble a feature known by LaTeXFeatures, or a raw LaTeX
/// command?
bool mathfeature;
bool mathfeature() const { return flags & CharInfoMathFeature ? true : false; }
/// Always force the LaTeX command, even if the encoding contains
/// this character?
bool force;
bool force() const { return flags & CharInfoForce ? true : false; }
/// TIPA shortcut
string tipashortcut;
/// This macro needs no termination (such as {} or space).
bool notermination;
/// \c textcommand needs no termination (such as {} or space).
bool textnotermination() const { return flags & CharInfoTextNoTermination ? true : false; }
/// \c mathcommand needs no termination (such as {} or space).
bool mathnotermination() const { return flags & CharInfoMathNoTermination ? true : false; }
///
unsigned int flags;
};
@ -320,7 +339,7 @@ void Encoding::init() const
continue;
char_type const uc = ucs4[0];
CharInfoMap::const_iterator const it = unicodesymbols.find(uc);
if (it == unicodesymbols.end() || !it->second.force)
if (it == unicodesymbols.end() || !it->second.force())
encodable_.insert(uc);
}
} else {
@ -332,7 +351,7 @@ void Encoding::init() const
vector<char> const eightbit = ucs4_to_eightbit(&c, 1, iconvName_);
if (!eightbit.empty()) {
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
if (it == unicodesymbols.end() || !it->second.force)
if (it == unicodesymbols.end() || !it->second.force())
encodable_.insert(c);
}
}
@ -348,19 +367,25 @@ void Encoding::init() const
}
docstring Encoding::latexChar(char_type c, bool no_commands) const
bool Encoding::encodable(char_type c) const
{
// assure the used encoding is properly initialized
init();
if (iconvName_ == "UTF-8" && package_ == none)
return docstring(1, c);
return true;
if (c < start_encodable_ && !encodings.isForced(c))
return docstring(1, c);
return true;
if (encodable_.find(c) != encodable_.end())
return docstring(1, c);
if (no_commands)
return docstring();
return true;
return false;
}
pair<docstring, bool> Encoding::latexChar(char_type c) const
{
if (encodable(c))
return make_pair(docstring(1, c), false);
// c cannot (or should not) be encoded in this encoding
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
@ -368,8 +393,9 @@ docstring Encoding::latexChar(char_type c, bool no_commands) const
throw EncodingException(c);
// at least one of mathcommand and textcommand is nonempty
if (it->second.textcommand.empty())
return "\\ensuremath{" + it->second.mathcommand + '}';
return it->second.textcommand;
return make_pair(
"\\ensuremath{" + it->second.mathcommand + '}', false);
return make_pair(it->second.textcommand, !it->second.textnotermination());
}
@ -393,10 +419,14 @@ vector<char_type> Encoding::symbolsList() const
bool Encodings::latexMathChar(char_type c, bool mathmode,
Encoding const * encoding, docstring & command)
Encoding const * encoding, docstring & command,
bool & needsTermination)
{
command = empty_docstring();
if (encoding)
command = encoding->latexChar(c, true);
if (encoding->encodable(c))
command = docstring(1, c);
needsTermination = false;
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
if (it == unicodesymbols.end()) {
@ -411,10 +441,12 @@ bool Encodings::latexMathChar(char_type c, bool mathmode,
(!mathmode && it->second.textcommand.empty());
if (use_math) {
command = it->second.mathcommand;
needsTermination = !it->second.mathnotermination();
addMathCmd(c);
} else {
if (!encoding || command.empty()) {
command = it->second.textcommand;
needsTermination = !it->second.textnotermination();
addTextCmd(c);
}
if (mathmode)
@ -425,35 +457,40 @@ bool Encodings::latexMathChar(char_type c, bool mathmode,
char_type Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
bool & combining, set<string> * req)
bool & combining, bool & needsTermination, set<string> * req)
{
CharInfoMap::const_iterator const end = unicodesymbols.end();
CharInfoMap::const_iterator it = unicodesymbols.begin();
for (combining = false; it != end; ++it) {
docstring const math = it->second.mathcommand;
docstring const text = it->second.textcommand;
if ((cmdtype && MATH_CMD) && math == cmd) {
combining = it->second.combining;
if (req && it->second.mathfeature &&
if ((cmdtype & MATH_CMD) && math == cmd) {
combining = it->second.combining();
needsTermination = !it->second.mathnotermination();
if (req && it->second.mathfeature() &&
!it->second.mathpreamble.empty())
req->insert(it->second.mathpreamble);
return it->first;
}
if ((cmdtype & TEXT_CMD) && text == cmd) {
combining = it->second.combining;
if (req && it->second.textfeature &&
combining = it->second.combining();
needsTermination = !it->second.textnotermination();
if (req && it->second.textfeature() &&
!it->second.textpreamble.empty())
req->insert(it->second.textpreamble);
return it->first;
}
}
needsTermination = false;
return 0;
}
docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
docstring & rem, set<string> * req)
bool & needsTermination, docstring & rem, set<string> * req)
{
needsTermination = false;
rem = empty_docstring();
bool const mathmode = cmdtype & MATH_CMD;
bool const textmode = cmdtype & TEXT_CMD;
docstring symbols;
@ -536,11 +573,15 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
j = k - 1;
i = j + 1;
unicmd_size = cur_size;
if (math == tmp)
needsTermination = !it->second.mathnotermination();
else
needsTermination = !it->second.textnotermination();
if (req) {
if (math == tmp && it->second.mathfeature &&
if (math == tmp && it->second.mathfeature() &&
!it->second.mathpreamble.empty())
req->insert(it->second.mathpreamble);
if (text == tmp && it->second.textfeature &&
if (text == tmp && it->second.textfeature() &&
!it->second.textpreamble.empty())
req->insert(it->second.textpreamble);
}
@ -548,9 +589,20 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
}
if (unicmd_size)
symbols += c;
else if (j + 1 == cmdend)
else if (j + 1 == cmdend) {
// No luck. Return what remains
rem = cmd.substr(i);
if (needsTermination && !rem.empty()) {
if (rem.substr(0, 2) == "{}") {
rem = rem.substr(2);
needsTermination = false;
} else if (rem[0] == ' ') {
needsTermination = false;
// LaTeX would swallow all spaces
rem = ltrim(rem);
}
}
}
}
return symbols;
}
@ -609,7 +661,7 @@ void Encodings::validate(char_type c, LaTeXFeatures & features, bool for_mathed)
// with utf8-plain, we only load packages when in mathed (see #7766)
if (math_mode || (use_math && !plain_utf8)) {
if (!it->second.mathpreamble.empty()) {
if (it->second.mathfeature) {
if (it->second.mathfeature()) {
string feats = it->second.mathpreamble;
while (!feats.empty()) {
string feat;
@ -623,7 +675,7 @@ void Encodings::validate(char_type c, LaTeXFeatures & features, bool for_mathed)
// with utf8-plain, we do not load packages (see #7766)
if (use_text && !plain_utf8) {
if (!it->second.textpreamble.empty()) {
if (it->second.textfeature) {
if (it->second.textfeature()) {
string feats = it->second.textpreamble;
while (!feats.empty()) {
string feat;
@ -684,7 +736,7 @@ bool Encodings::isCombiningChar(char_type c)
{
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
if (it != unicodesymbols.end())
return it->second.combining;
return it->second.combining();
return false;
}
@ -728,15 +780,6 @@ bool Encodings::isMathAlpha(char_type c)
}
bool Encodings::needsTermination(char_type c)
{
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
if (it != unicodesymbols.end())
return !it->second.notermination;
return true;
}
Encoding const * Encodings::fromLyXName(string const & name) const
{
EncodingList::const_iterator const it = encodinglist.find(name);
@ -806,22 +849,31 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
break;
flags = symbolslex.getString();
info.combining = false;
info.textfeature = false;
info.force = false;
info.notermination = false;
info.flags = 0;
if (suffixIs(info.textcommand, '}'))
info.flags |= CharInfoTextNoTermination;
if (suffixIs(info.mathcommand, '}'))
info.flags |= CharInfoMathNoTermination;
while (!flags.empty()) {
string flag;
flags = split(flags, flag, ',');
if (flag == "combining") {
info.combining = true;
info.flags |= CharInfoCombining;
} else if (flag == "force") {
info.force = true;
info.flags |= CharInfoForce;
forced.insert(symbol);
} else if (flag == "mathalpha") {
mathalpha.insert(symbol);
} else if (flag == "notermination") {
info.notermination = true;
} else if (flag == "notermination=text") {
info.flags |= CharInfoTextNoTermination;
} else if (flag == "notermination=math") {
info.flags |= CharInfoMathNoTermination;
} else if (flag == "notermination=both") {
info.flags |= CharInfoTextNoTermination;
info.flags |= CharInfoMathNoTermination;
} else if (flag == "notermination=none") {
info.flags &= ~CharInfoTextNoTermination;
info.flags &= ~CharInfoMathNoTermination;
} else if (contains(flag, "tipashortcut=")) {
info.tipashortcut = split(flag, '=');
} else {
@ -861,15 +913,18 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
info.mathpreamble = "esint|amsmath";
if (!info.textpreamble.empty())
info.textfeature = info.textpreamble[0] != '\\';
if (info.textpreamble[0] != '\\')
info.flags |= CharInfoTextFeature;
if (!info.mathpreamble.empty())
info.mathfeature = info.mathpreamble[0] != '\\';
if (info.mathpreamble[0] != '\\')
info.flags |= CharInfoMathFeature;
LYXERR(Debug::INFO, "Read unicode symbol " << symbol << " '"
<< to_utf8(info.textcommand) << "' '" << info.textpreamble
<< "' " << info.combining << ' ' << info.textfeature
<< " '" << to_utf8(info.mathcommand) << "' '"
<< info.mathpreamble << "' " << info.mathfeature);
<< " '" << info.textfeature() << ' ' << info.textnotermination()
<< ' ' << to_utf8(info.mathcommand) << "' '" << info.mathpreamble
<< "' " << info.mathfeature() << ' ' << info.mathnotermination()
<< ' ' << info.combining() << ' ' << info.force());
// we assume that at least one command is nonempty when using unicodesymbols
if (!info.textcommand.empty() || !info.mathcommand.empty())

View File

@ -67,6 +67,8 @@ public:
std::string const & iconvName() const { return iconvName_; }
///
bool const & hasFixedWidth() const { return fixedwidth_; }
/// \p c is representable in this encoding without a LaTeX macro
bool encodable(char_type c) const;
/**
* Convert \p c to something that LaTeX can understand.
* This is either the character itself (if it is representable
@ -74,8 +76,10 @@ public:
* If the character is not representable in this encoding, but no
* LaTeX macro is known, a warning is given of lyxerr, and the
* character is returned.
* \return the converted character and a flag indicating whether
* the command needs to be terminated by {} or a space.
*/
docstring latexChar(char_type c, bool no_commands = false) const;
std::pair<docstring, bool> latexChar(char_type c) const;
/// Which LaTeX package handles this encoding?
Package package() const { return package_; }
/// A list of all characters usable in this encoding
@ -195,11 +199,6 @@ public:
* letters and accented characters that are output as math commands.
*/
static bool isMathAlpha(char_type c);
/**
* Do we need to terminate this command (by {} or space)?
* This is true if the "notermination" flag is not set.
*/
static bool needsTermination(char_type c);
/**
* Register \p c as a mathmode command.
*/
@ -231,16 +230,22 @@ public:
/**
* If \p c cannot be encoded in the given \p encoding, convert
* it to something that LaTeX can understand in mathmode.
* \p needsTermination indicates whether the command needs to be
* terminated by {} or a space.
* \return whether \p command is a mathmode command
*/
static bool latexMathChar(char_type c, bool mathmode,
Encoding const * encoding, docstring & command);
Encoding const * encoding, docstring & command,
bool & needsTermination);
/**
* Convert the LaTeX command in \p cmd to the corresponding unicode
* point and set \p combining to true if it is a combining symbol
* point and set \p combining to true if it is a combining symbol.
* \p needsTermination indicates whether the command needs to be
* terminated by {} or a space.
*/
static char_type fromLaTeXCommand(docstring const & cmd, int cmdtype,
bool & combining, std::set<std::string> * req = 0);
bool & combining, bool & needsTermination,
std::set<std::string> * req = 0);
///
enum LatexCmd {
///
@ -255,9 +260,12 @@ public:
* unconverted commands are returned in \p rem.
* The \p cmdtype parameter can be used to limit recognized
* commands to math or text mode commands only.
* \p needsTermination indicates whether the command needs to be
* terminated by {} or a space.
*/
static docstring fromLaTeXCommand(docstring const & cmd, int cmdtype,
docstring & rem, std::set<std::string> * req = 0);
bool & needsTermination, docstring & rem,
std::set<std::string> * req = 0);
/**
* Add the preamble snippet needed for the output of \p c to
* \p features.

View File

@ -35,6 +35,7 @@ public:
TOOLBAR, // A toolbar icon
KEYBOARD, // a keyboard binding
COMMANDBUFFER,
LYXSERVER,
TOC
};

View File

@ -38,6 +38,7 @@
#include "support/filetools.h"
#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/regex.h"
#include <algorithm>
@ -1159,7 +1160,7 @@ docstring const getFloatI18nPreamble(docstring const & type,
// Check whether name can be encoded in the buffer encoding
bool encodable = true;
for (size_t i = 0; i < name.size(); ++i) {
if (enc.latexChar(name[i], true)[0] != name[i]) {
if (!enc.encodable(name[i])) {
encodable = false;
break;
}
@ -1181,6 +1182,49 @@ docstring const getFloatI18nPreamble(docstring const & type,
<< "{\\renewcommand{\\" << type << "name}{" << translated << "}}\n";
return os.str();
}
docstring const i18npreamble(docstring const & templ, Language const * lang,
Encoding const & enc, bool const polyglossia)
{
if (templ.empty())
return templ;
string preamble = polyglossia ?
subst(to_utf8(templ), "$$lang", lang->polyglossia()) :
subst(to_utf8(templ), "$$lang", lang->babel());
string const langenc = lang->encoding()->iconvName();
string const texenc = lang->encoding()->latexName();
string const bufenc = enc.iconvName();
// First and second character of plane 15 (Private Use Area)
string const s1 = "\xf3\xb0\x80\x80"; // U+F0000
string const s2 = "\xf3\xb0\x80\x81"; // U+F0001
// FIXME UNICODE
// lyx::regex is not unicode-safe.
// Should use QRegExp or (boost::u32regex, but that requires ICU)
static regex const reg("_\\(([^\\)]+)\\)");
smatch sub;
while (regex_search(preamble, sub, reg)) {
string const key = sub.str(1);
docstring const name = lang->translateLayout(key);
// Check whether name can be encoded in the buffer encoding
bool encodable = true;
for (size_t i = 0; i < name.size(); ++i) {
if (!enc.encodable(name[i])) {
encodable = false;
break;
}
}
string const translated = encodable ? to_utf8(name)
: "\\inputencoding{" + texenc + "}"
+ s1 + langenc + s2 + to_utf8(name)
+ s1 + bufenc + s2;
preamble = subst(preamble, sub.str(), translated);
}
return from_utf8(preamble);
}
}
@ -1197,17 +1241,20 @@ docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel, bool use_po
list<docstring>::const_iterator end = usedLayouts_.end();
for (; cit != end; ++cit) {
// language dependent commands (once per document)
snippets.insert(tclass[*cit].langpreamble(buffer().language(),
snippets.insert(i18npreamble(tclass[*cit].langpreamble(),
buffer().language(),
buffer().params().encoding(),
use_polyglossia));
// commands for language changing (for multilanguage documents)
if ((use_babel || use_polyglossia) && !UsedLanguages_.empty()) {
snippets.insert(tclass[*cit].babelpreamble(
snippets.insert(i18npreamble(
tclass[*cit].babelpreamble(),
buffer().language(),
buffer().params().encoding(),
use_polyglossia));
for (lang_it lit = lbeg; lit != lend; ++lit)
snippets.insert(tclass[*cit].babelpreamble(
snippets.insert(i18npreamble(
tclass[*cit].babelpreamble(),
*lit,
buffer().params().encoding(),
use_polyglossia));
@ -1251,6 +1298,34 @@ docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel, bool use_po
}
}
cit = usedInsetLayouts_.begin();
end = usedInsetLayouts_.end();
TextClass::InsetLayouts const & ils = tclass.insetLayouts();
for (; cit != end; ++cit) {
TextClass::InsetLayouts::const_iterator it = ils.find(*cit);
if (it == ils.end())
continue;
// language dependent commands (once per document)
snippets.insert(i18npreamble(it->second.langpreamble(),
buffer().language(),
buffer().params().encoding(),
use_polyglossia));
// commands for language changing (for multilanguage documents)
if ((use_babel || use_polyglossia) && !UsedLanguages_.empty()) {
snippets.insert(i18npreamble(
it->second.babelpreamble(),
buffer().language(),
buffer().params().encoding(),
use_polyglossia));
for (lang_it lit = lbeg; lit != lend; ++lit)
snippets.insert(i18npreamble(
it->second.babelpreamble(),
*lit,
buffer().params().encoding(),
use_polyglossia));
}
}
odocstringstream tcpreamble;
set<docstring>::const_iterator const send = snippets.end();
set<docstring>::const_iterator it = snippets.begin();

View File

@ -53,7 +53,9 @@ docstring const Language::translateLayout(string const & m) const
if (it != layoutTranslations_.end())
return it->second;
return from_ascii(m);
docstring t = from_ascii(m);
cleanTranslation(t);
return t;
}

View File

@ -24,7 +24,6 @@
#include "support/lassert.h"
#include "support/lstrings.h"
#include "support/Messages.h"
#include "support/regex.h"
#include "support/textutils.h"
@ -859,72 +858,6 @@ void Layout::readSpacing(Lexer & lex)
}
namespace {
docstring const i18npreamble(Language const * lang, Encoding const & enc,
docstring const & templ, bool const polyglossia)
{
if (templ.empty())
return templ;
string preamble = polyglossia ?
subst(to_utf8(templ), "$$lang", lang->polyglossia()) :
subst(to_utf8(templ), "$$lang", lang->babel());
#ifdef TEX2LYX
// tex2lyx does not have getMessages()
LASSERT(false, /**/);
(void)enc;
#else
string const langenc = lang->encoding()->iconvName();
string const texenc = lang->encoding()->latexName();
string const bufenc = enc.iconvName();
// First and second character of plane 15 (Private Use Area)
string const s1 = "\xf3\xb0\x80\x80"; // U+F0000
string const s2 = "\xf3\xb0\x80\x81"; // U+F0001
// FIXME UNICODE
// lyx::regex is not unicode-safe.
// Should use QRegExp or (boost::u32regex, but that requires ICU)
static regex const reg("_\\(([^\\)]+)\\)");
smatch sub;
while (regex_search(preamble, sub, reg)) {
string const key = sub.str(1);
docstring const name = lang->translateLayout(key);
// Check whether name can be encoded in the buffer encoding
bool encodable = true;
for (size_t i = 0; i < name.size(); ++i) {
if (enc.latexChar(name[i], true)[0] != name[i]) {
encodable = false;
break;
}
}
string const translated = encodable ? to_utf8(name)
: "\\inputencoding{" + texenc + "}"
+ s1 + langenc + s2 + to_utf8(name)
+ s1 + bufenc + s2;
preamble = subst(preamble, sub.str(), translated);
}
#endif
return from_utf8(preamble);
}
}
docstring const Layout::langpreamble(Language const * lang,
Encoding const & enc, bool const polyglossia) const
{
return i18npreamble(lang, enc, langpreamble_, polyglossia);
}
docstring const Layout::babelpreamble(Language const * lang,
Encoding const & enc, bool const polyglossia) const
{
return i18npreamble(lang, enc, babelpreamble_, polyglossia);
}
string const & Layout::htmltag() const
{
if (htmltag_.empty())

View File

@ -14,7 +14,6 @@
#ifndef LAYOUT_H
#define LAYOUT_H
#include "Encoding.h"
#include "FontInfo.h"
#include "LayoutEnums.h"
#include "Spacing.h"
@ -25,7 +24,6 @@
namespace lyx {
class Language;
class Lexer;
class TextClass;
@ -96,10 +94,10 @@ public:
docstring const & preamble() const { return preamble_; }
/// Get language dependent macro definitions needed for this layout
/// for language \p lang
docstring const langpreamble(Language const * lang, Encoding const & enc, bool const polyglossia) const;
docstring const langpreamble() const { return langpreamble_; }
/// Get language and babel dependent macro definitions needed for
/// this layout for language \p lang
docstring const babelpreamble(Language const * lang, Encoding const & enc, bool const polyglossia) const;
docstring const babelpreamble() const { return babelpreamble_; }
///
std::set<std::string> const & requires() const { return requires_; }
///

View File

@ -150,7 +150,7 @@ void PDFOptions::writeLaTeX(OutputParams & runparams, otexstream & os,
bool need_unicode = false;
if (enc) {
for (size_t n = 0; n < hs.size(); ++n) {
if (enc->latexChar(hs[n], true) != docstring(1, hs[n]))
if (!enc->encodable(hs[n]))
need_unicode = true;
}
}

View File

@ -858,8 +858,8 @@ int Paragraph::Private::latexSurrogatePair(otexstream & os, char_type c,
// FIXME: change tracking
// Is this correct WRT change tracking?
Encoding const & encoding = *(runparams.encoding);
docstring const latex1 = encoding.latexChar(next);
docstring const latex2 = encoding.latexChar(c);
docstring const latex1 = encoding.latexChar(next).first;
docstring const latex2 = encoding.latexChar(c).first;
if (docstring(1, next) == latex1) {
// the encoding supports the combination
os << latex2 << latex1;
@ -975,7 +975,7 @@ int Paragraph::Private::writeScriptChars(otexstream & os,
// Stop here if there is a font attribute or encoding change.
if (found && cit != end && prev_font != cit->font())
break;
docstring const latex = encoding.latexChar(next);
docstring const latex = encoding.latexChar(next).first;
docstring::size_type const b1 =
latex.find_first_of(from_ascii("{"));
docstring::size_type const b2 =
@ -1168,7 +1168,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
if (style.pass_thru || runparams.pass_thru) {
if (c != '\0') {
Encoding const * const enc = runparams.encoding;
if (enc && enc->latexChar(c, true).empty())
if (enc && !enc->encodable(c))
throw EncodingException(c);
os.put(c);
}
@ -1273,41 +1273,41 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
}
}
string script;
docstring latex = encoding.latexChar(c);
pair<docstring, bool> latex = encoding.latexChar(c);
docstring nextlatex;
if (next != '\0' && next != META_INSET)
nextlatex = encoding.latexChar(next);
nextlatex = encoding.latexChar(next).first;
bool tipas = false;
if (runparams.inIPA) {
string const tipashortcut = Encodings::TIPAShortcut(c);
if (!tipashortcut.empty()) {
latex = from_ascii(tipashortcut);
latex.first = from_ascii(tipashortcut);
latex.second = false;
tipas = true;
}
}
if (Encodings::isKnownScriptChar(c, script)
&& prefixIs(latex, from_ascii("\\" + script)))
column += writeScriptChars(os, latex,
&& prefixIs(latex.first, from_ascii("\\" + script)))
column += writeScriptChars(os, latex.first,
running_change, encoding, i) - 1;
else if (Encodings::needsTermination(c)
&& !prefixIs(nextlatex, from_ascii("\\"))
&& !prefixIs(nextlatex, from_ascii("{"))
&& !prefixIs(nextlatex, from_ascii("}"))
&& latex.length() > 1 && latex[latex.length() - 1] != '}'
&& latex[latex.length() - 1] != '-' && !tipas) {
else if (latex.second
&& !prefixIs(nextlatex, '\\')
&& !prefixIs(nextlatex, '{')
&& !prefixIs(nextlatex, '}')
&& !tipas) {
// Prevent eating of a following
// space or command corruption by
// following characters
if (next == ' ' || next == '\0') {
column += latex.length() + 1;
os << latex << "{}";
column += latex.first.length() + 1;
os << latex.first << "{}";
} else {
column += latex.length();
os << latex << " ";
column += latex.first.length();
os << latex.first << " ";
}
} else {
column += latex.length() - 1;
os << latex;
column += latex.first.length() - 1;
os << latex.first;
}
break;
}

View File

@ -1173,10 +1173,10 @@ void Server::callback(string const & msg)
// connect to the lyxfunc in the single GuiView we
// support currently. (Lgb)
FuncRequest const fr(lyxaction.lookupFunc(cmd), arg);
FuncRequest fr(lyxaction.lookupFunc(cmd), arg);
fr.setOrigin(FuncRequest::LYXSERVER);
DispatchResult dr;
theApp()->dispatch(fr, dr);
theApp()->dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE));
string const rval = to_utf8(dr.message());
// all commands produce an INFO or ERROR message

View File

@ -141,9 +141,10 @@ void ServerSocket::dataCallback(int fd)
string const key = line.substr(0, pos);
if (key == "LYXCMD") {
string const cmd = line.substr(pos + 1);
FuncRequest fr(lyxaction.lookupFunc(cmd));
fr.setOrigin(FuncRequest::LYXSERVER);
DispatchResult dr;
theApp()->dispatch(lyxaction.lookupFunc(cmd), dr);
theApp()->dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE));
theApp()->dispatch(fr, dr);
string const rval = to_utf8(dr.message());
if (dr.error())
client->writeln("ERROR:" + cmd + ':' + rval);

View File

@ -71,7 +71,7 @@ public:
* inset that is alowed inside a font change.
*/
void setInsetFont(BufferView const & bv, pit_type pit, pos_type pos,
Font const & font, bool toggleall = false);
Font const & font);
/// what you expect when pressing \<enter\> at cursor position
/// \param inverse_logic if false, the same layout is set for the
@ -104,8 +104,7 @@ public:
void setFont(Cursor & cur, Font const &, bool toggleall = false);
/// Set font from \p begin to \p end and rebreak.
void setFont(BufferView const & bv, CursorSlice const & begin,
CursorSlice const & end, Font const &,
bool toggleall = false);
CursorSlice const & end, Font const &);
///
void toggleFree(Cursor & cur, Font const &, bool toggleall = false);

View File

@ -163,7 +163,7 @@ void Text::setCharFont(pit_type pit,
void Text::setInsetFont(BufferView const & bv, pit_type pit,
pos_type pos, Font const & font, bool toggleall)
pos_type pos, Font const & font)
{
Inset * const inset = pars_[pit].getInset(pos);
LASSERT(inset && inset->resetFontEdit(), /**/);
@ -176,7 +176,7 @@ void Text::setInsetFont(BufferView const & bv, pit_type pit,
CursorSlice cellend = cs;
cellend.pit() = cellend.lastpit();
cellend.pos() = cellend.lastpos();
text->setFont(bv, cs, cellend, font, toggleall);
text->setFont(bv, cs, cellend, font);
}
}
}
@ -321,15 +321,67 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
// Ok, we have a selection.
cur.recordUndoSelection();
Font newfont = font;
if (toggleall) {
// Toggling behaves as follows: We check the first character of the
// selection. If it's (say) got EMPH on, then we set to off; if off,
// then to on. With families and the like, we set it to INHERIT, if
// we already have it.
CursorSlice const & sl = cur.selBegin();
Text const & text = *sl.text();
Paragraph const & par = text.getPar(sl.pit());
// get font at the position
Font oldfont = par.getFont(cur.bv().buffer().params(), sl.pos(),
text.outerFont(sl.pit()));
FontInfo const & oldfi = oldfont.fontInfo();
FontInfo & newfi = newfont.fontInfo();
FontFamily newfam = newfi.family();
if (newfam != INHERIT_FAMILY && newfam != IGNORE_FAMILY &&
newfam == oldfi.family())
newfi.setFamily(INHERIT_FAMILY);
FontSeries newser = newfi.series();
if (newser == BOLD_SERIES && oldfi.series() == BOLD_SERIES)
newfi.setSeries(INHERIT_SERIES);
FontShape newshp = newfi.shape();
if (newshp != INHERIT_SHAPE && newshp != IGNORE_SHAPE &&
newshp == oldfi.shape())
newfi.setShape(INHERIT_SHAPE);
ColorCode newcol = newfi.color();
if (newcol != Color_none && newcol != Color_inherit
&& newcol != Color_ignore && newcol == oldfi.color())
newfi.setColor(Color_none);
// ON/OFF ones
if (newfi.emph() == FONT_TOGGLE)
newfi.setEmph(oldfi.emph() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.underbar() == FONT_TOGGLE)
newfi.setUnderbar(oldfi.underbar() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.strikeout() == FONT_TOGGLE)
newfi.setStrikeout(oldfi.strikeout() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.uuline() == FONT_TOGGLE)
newfi.setUuline(oldfi.uuline() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.uwave() == FONT_TOGGLE)
newfi.setUwave(oldfi.uwave() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.noun() == FONT_TOGGLE)
newfi.setNoun(oldfi.noun() == FONT_OFF ? FONT_ON : FONT_OFF);
if (newfi.number() == FONT_TOGGLE)
newfi.setNumber(oldfi.number() == FONT_OFF ? FONT_ON : FONT_OFF);
}
setFont(cur.bv(), cur.selectionBegin().top(),
cur.selectionEnd().top(), font, toggleall);
cur.selectionEnd().top(), newfont);
}
void Text::setFont(BufferView const & bv, CursorSlice const & begin,
CursorSlice const & end, Font const & font,
bool toggleall)
CursorSlice const & end, Font const & font)
{
Buffer const & buffer = bv.buffer();
@ -347,11 +399,11 @@ void Text::setFont(BufferView const & bv, CursorSlice const & begin,
if (inset && inset->resetFontEdit()) {
// We need to propagate the font change to all
// text cells of the inset (bugs 1973, 6919).
setInsetFont(bv, pit, pos, font, toggleall);
setInsetFont(bv, pit, pos, font);
}
TextMetrics const & tm = bv.textMetrics(this);
Font f = tm.displayFont(pit, pos);
f.update(font, language, toggleall);
f.update(font, language);
setCharFont(pit, pos, f, tm.font_);
// font change may change language...
// spell checker has to know that

View File

@ -57,10 +57,10 @@ namespace lyx {
// could. See LayoutFileList::addEmptyClass() and, especially, the
// definition of the layoutpost string.
// You should also run (or ask someone who has bash to run) the
// development/updatelayouts.sh script, to update the format of
// development/tools/updatelayouts.sh script, to update the format of
// all of our layout files.
//
int const LAYOUT_FORMAT = 37; //jrioux : move citation engine stuff into layouts
int const LAYOUT_FORMAT = 39; //sanda branch styling
namespace {

2
src/client/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
lyxclient
lyxclient.1

1
src/frontends/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
liblyxfrontends.a

5
src/frontends/qt4/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
Resources.cpp
Resources.qrc
liblyxqt4.a
ui_*.h
moc_*.cpp

View File

@ -1140,7 +1140,12 @@ void GuiApplication::dispatch(FuncRequest const & cmd)
// This is done unless explicitly requested otherwise
dr.screenUpdate(Update::FitCursor);
dispatch(cmd, dr);
updateCurrentView(cmd, dr);
}
void GuiApplication::updateCurrentView(FuncRequest const & cmd, DispatchResult & dr)
{
if (!current_view_)
return;
@ -1311,6 +1316,13 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
return;
};
if (cmd.origin() == FuncRequest::LYXSERVER) {
if (current_view_ && current_view_->currentBufferView())
current_view_->currentBufferView()->cursor().saveBeforeDispatchPosXY();
// we will also need to redraw the screen at the end
dr.screenUpdate(Update::FitCursor);
}
// Assumes that the action will be dispatched.
dr.dispatched(true);
@ -1663,6 +1675,9 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
current_view_->dispatch(cmd, dr);
break;
}
if (cmd.origin() == FuncRequest::LYXSERVER)
updateCurrentView(cmd, dr);
}

View File

@ -192,6 +192,8 @@ private:
///
void validateCurrentView();
///
void updateCurrentView(FuncRequest const & cmd, DispatchResult & dr);
///
bool closeAllViews();
/// read the given ui (menu/toolbar) file
bool readUIFile(QString const & name, bool include = false);

View File

@ -37,6 +37,9 @@
#include <QColor>
#include <QColorDialog>
#ifdef KeyPress
#undef KeyPress
#endif
namespace lyx {
namespace frontend {

View File

@ -574,7 +574,7 @@ void PreambleModule::closeEvent(QCloseEvent * e)
/////////////////////////////////////////////////////////////////////
LocalLayout::LocalLayout() : current_id_(0), is_valid_(false)
LocalLayout::LocalLayout() : current_id_(0), validated_(false)
{
connect(locallayoutTE, SIGNAL(textChanged()), this, SLOT(textChanged()));
connect(validatePB, SIGNAL(clicked()), this, SLOT(validatePressed()));
@ -606,13 +606,26 @@ void LocalLayout::apply(BufferParams & params)
void LocalLayout::textChanged()
{
static const QString unknown = qt_("Press button to check validity...");
static const QString message =
qt_("Press button to check validity...");
string const layout =
fromqstr(locallayoutTE->document()->toPlainText().trimmed());
is_valid_ = false;
validLB->setText(unknown);
validatePB->setEnabled(true);
convertPB->setEnabled(false);
changed();
if (layout.empty()) {
validated_ = true;
validatePB->setEnabled(false);
validLB->setText("");
convertPB->hide();
convertLB->hide();
changed();
} else if (!validatePB->isEnabled()) {
// if that's already enabled, we shouldn't need to do anything.
validated_ = false;
validLB->setText(message);
validatePB->setEnabled(true);
convertPB->setEnabled(false);
changed();
}
}
@ -649,17 +662,11 @@ void LocalLayout::validate() {
string const layout =
fromqstr(locallayoutTE->document()->toPlainText().trimmed());
if (layout.empty()) {
is_valid_ = true;
validatePB->setEnabled(false);
validLB->setText("");
convertPB->hide();
convertLB->hide();
} else {
if (!layout.empty()) {
TextClass::ReturnValues const ret = TextClass::validate(layout);
is_valid_ = (ret == TextClass::OK) || (ret == TextClass::OK_OLDFORMAT);
validated_ = (ret == TextClass::OK) || (ret == TextClass::OK_OLDFORMAT);
validatePB->setEnabled(false);
validLB->setText(is_valid_ ? vtext : ivtext);
validLB->setText(validated_ ? vtext : ivtext);
if (ret == TextClass::OK_OLDFORMAT) {
convertPB->show();
convertPB->setEnabled(true);
@ -1424,7 +1431,7 @@ GuiDocument::GuiDocument(GuiView & lv)
docPS->addPanel(pdfSupportModule, qt_("PDF Properties"));
docPS->addPanel(mathsModule, qt_("Math Options"));
docPS->addPanel(floatModule, qt_("Float Placement"));
docPS->addPanel(listingsModule, qt_("Listings"));
docPS->addPanel(listingsModule, qt_("Listings[[inset]]"));
docPS->addPanel(bulletsModule, qt_("Bullets"));
docPS->addPanel(branchesModule, qt_("Branches"));
docPS->addPanel(outputModule, qt_("Output"));

View File

@ -287,7 +287,7 @@ public:
LocalLayout();
void update(BufferParams const & params, BufferId id);
void apply(BufferParams & params);
bool isValid() const { return is_valid_; }
bool isValid() const { return validated_; }
Q_SIGNALS:
/// signal that something's changed in the Widget.
@ -303,7 +303,7 @@ private Q_SLOTS:
private:
BufferId current_id_;
bool is_valid_;
bool validated_;
};

View File

@ -143,6 +143,8 @@ GuiTabular::GuiTabular(QWidget * parent)
this, SLOT(checkEnabled()));
connect(rotateTabularCB, SIGNAL(clicked()),
this, SLOT(checkEnabled()));
connect(rotateTabularAngleSB, SIGNAL(valueChanged(int)),
this, SLOT(checkEnabled()));
connect(rotateCellCB, SIGNAL(clicked()),
this, SLOT(checkEnabled()));
connect(rotateCellAngleSB, SIGNAL(valueChanged(int)),
@ -213,14 +215,12 @@ void GuiTabular::checkEnabled()
decimalLA->setEnabled(dalign);
bool const setwidth = TableAlignCO->currentText() == qt_("Middle")
&& !longTabularCB->isChecked() && !rotateTabularCB->isChecked();
&& !longTabularCB->isChecked();
tabularWidthLA->setEnabled(setwidth);
tabularWidthED->setEnabled(setwidth);
tabularWidthUnitLC->setEnabled(setwidth);
bool const is_tabular_star = !tabularWidthED->text().isEmpty();
rotateTabularCB->setDisabled(is_tabular_star);
rotateTabularAngleSB->setEnabled(rotateTabularCB->isChecked());
rotateCellAngleSB->setEnabled(rotateCellCB->isChecked());
bool const enable_valign =
@ -239,6 +239,7 @@ void GuiTabular::checkEnabled()
interlinespaceUnitLC->setEnabled(interlinespaceCO->currentIndex() == 2);
// setting as longtable is not allowed when table is inside a float
bool const is_tabular_star = !tabularWidthED->text().isEmpty();
longTabularCB->setEnabled(!is_tabular_star && funcEnabled(Tabular::SET_LONGTABULAR));
bool const longtabular = longTabularCB->isChecked();
longtableGB->setEnabled(true);
@ -449,7 +450,7 @@ docstring GuiTabular::dialogToParams() const
// apply the column alignment
// multirows inherit the alignment from the column; if a column width
// is set, multicolumns are always left-aligned so that in this case
// is set, multirows are always left-aligned so that in this case
// its alignment must not be applied (see bug #8084)
if (!(multirowCB->isChecked() && width != "0pt"))
setHAlign(param_str);
@ -559,17 +560,18 @@ docstring GuiTabular::dialogToParams() const
setParam(param_str, Tabular::SET_MULTIROW);
else
setParam(param_str, Tabular::UNSET_MULTIROW);
//
// store the table rotation angle
string const tabular_angle = convert<string>(rotateTabularAngleSB->value());
if (rotateTabularCB->isChecked())
setParam(param_str, Tabular::SET_ROTATE_TABULAR);
setParam(param_str, Tabular::SET_ROTATE_TABULAR, tabular_angle);
else
setParam(param_str, Tabular::UNSET_ROTATE_TABULAR);
setParam(param_str, Tabular::UNSET_ROTATE_TABULAR, tabular_angle);
// store the cell rotation angle
string angle = convert<string>(rotateCellAngleSB->value());
string const cell_angle = convert<string>(rotateCellAngleSB->value());
if (rotateCellCB->isChecked())
setParam(param_str, Tabular::SET_ROTATE_CELL, angle);
setParam(param_str, Tabular::SET_ROTATE_CELL, cell_angle);
else
setParam(param_str, Tabular::UNSET_ROTATE_CELL, angle);
setParam(param_str, Tabular::UNSET_ROTATE_CELL, cell_angle);
//
if (longTabularCB->isChecked())
setParam(param_str, Tabular::SET_LONGTABULAR);
@ -706,11 +708,16 @@ void GuiTabular::paramsToDialog(Inset const * inset)
multirowCB->setChecked(multirow);
rotateCellCB->setChecked(tabular.getRotateCell(cell) != 0);
if (tabular.getRotateCell(cell) != 0)
rotateCellAngleSB->setValue(tabular.getRotateCell(cell));
else
rotateCellAngleSB->setValue(90);
rotateTabularCB->setChecked(tabular.rotate);
if (rotateCellCB->isChecked()) {
if (tabular.getRotateCell(cell) != 0)
rotateCellAngleSB->setValue(tabular.getRotateCell(cell));
else
rotateCellAngleSB->setValue(90);
}
rotateTabularCB->setChecked(tabular.rotate != 0);
if (rotateTabularCB->isChecked())
rotateTabularAngleSB->setValue(tabular.rotate != 0 ? tabular.rotate : 90);
longTabularCB->setChecked(tabular.is_long_tabular);

View File

@ -29,6 +29,7 @@
#include "support/lstrings.h"
#include <QAbstractItemModel>
#include <QCompleter>
#include <QHeaderView>
#include <QLineEdit>
#include <QPushButton>
@ -80,6 +81,10 @@ GuiThesaurus::GuiThesaurus(GuiView & lv)
languageCO->setModel(language_model);
languageCO->setModelColumn(2);
//bug #8138
if (entryCO->completer())
entryCO->completer()->setCompletionMode(QCompleter::PopupCompletion);
bc().setCancel(closePB);
bc().setApply(replacePB);
bc().addReadOnly(replaceED);

View File

@ -496,9 +496,11 @@ void TocWidget::filterContents()
static QString decodeType(QString const & str)
{
QString type = str;
if (type.contains("tableofcontents")) {
if (type.contains("tableofcontents"))
type = "tableofcontents";
} else if (type.contains("floatlist")) {
else if (type.contains("lstlistoflistings"))
type = "listing";
else if (type.contains("floatlist")) {
if (type.contains("\"figure"))
type = "figure";
else if (type.contains("\"table"))

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>497</width>
<height>400</height>
<height>402</height>
</rect>
</property>
<property name="windowTitle">
@ -107,7 +107,7 @@
<string>&amp;Table Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0" colspan="3">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="GroupBox12">
<property name="title">
<string>Column settings</string>
@ -307,115 +307,6 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="specialAlignmentLA">
<property name="text">
<string>LaTe&amp;X argument:</string>
</property>
<property name="buddy">
<cstring>specialAlignmentED</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="specialAlignmentED">
<property name="toolTip">
<string>Custom column format (LaTeX)</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="tabAlignmentGB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Table-wide settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QLabel" name="tabularWidthLA">
<property name="text">
<string>Table w&amp;idth:</string>
</property>
<property name="buddy">
<cstring>tabularWidthED</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="LengthCombo" name="tabularWidthUnitLC"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="tabularWidthED"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="TableAlignLA">
<property name="text">
<string>Verti&amp;cal alignment:</string>
</property>
<property name="buddy">
<cstring>vAlignCO</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="TableAlignCO">
<property name="toolTip">
<string>Vertical alignment of the table</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Top</string>
</property>
</item>
<item>
<property name="text">
<string>Middle</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2">
<spacer name="spacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>153</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="rotateTabularCB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Rotate the table by 90 degrees</string>
</property>
<property name="text">
<string>&amp;Rotate table 90 degrees</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@ -468,7 +359,7 @@
</layout>
</widget>
</item>
<item row="1" column="1" colspan="2">
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Cell setting</string>
@ -539,6 +430,154 @@
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QGroupBox" name="tabAlignmentGB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Table-wide settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="tabularWidthLA">
<property name="text">
<string>W&amp;idth:</string>
</property>
<property name="buddy">
<cstring>tabularWidthED</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="tabularWidthED"/>
</item>
<item row="0" column="2">
<widget class="LengthCombo" name="tabularWidthUnitLC"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="TableAlignLA">
<property name="text">
<string>Verti&amp;cal alignment:</string>
</property>
<property name="buddy">
<cstring>vAlignCO</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="TableAlignCO">
<property name="toolTip">
<string>Vertical alignment of the table</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Top</string>
</property>
</item>
<item>
<property name="text">
<string>Middle</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2">
<spacer name="spacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>153</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="rotateTabularCB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Rotate the table by 90 degrees</string>
</property>
<property name="text">
<string>&amp;Rotate</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="rotateTabularAngleSB">
<property name="maximumSize">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
<property name="toolTip">
<string>rotation angle</string>
</property>
<property name="minimum">
<number>-180</number>
</property>
<property name="maximum">
<number>180</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>90</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="rotateTabularLA">
<property name="text">
<string>degrees</string>
</property>
<property name="buddy">
<cstring>tabularWidthED</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="specialAlignmentLA">
<property name="text">
<string>LaTe&amp;X argument:</string>
</property>
<property name="buddy">
<cstring>specialAlignmentED</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="specialAlignmentED">
<property name="toolTip">
<string>Custom column format (LaTeX)</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Borders">

View File

@ -1,113 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<ui version="4.0" >
<class>ViewSourceUi</class>
<widget class="QWidget" name="ViewSourceUi">
<property name="geometry">
<widget class="QWidget" name="ViewSourceUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>528</width>
<height>205</height>
<height>139</height>
</rect>
</property>
<property name="windowTitle">
<property name="windowTitle" >
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="5">
<widget class="QTextEdit" name="viewSourceTV">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Ignored">
<layout class="QGridLayout" name="gridLayout" >
<item rowspan="5" row="0" column="0" >
<widget class="QTextEdit" name="viewSourceTV" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Ignored" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<property name="whatsThis" >
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="outputFormatLA">
<property name="text">
<item row="0" column="1" >
<widget class="QLabel" name="outputFormatLA" >
<property name="text" >
<string>F&amp;ormat:</string>
</property>
<property name="buddy">
<property name="buddy" >
<cstring>outputFormatCO</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="outputFormatCO">
<property name="enabled">
<item row="0" column="2" >
<widget class="QComboBox" name="outputFormatCO" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="toolTip">
<property name="toolTip" >
<string>Select the output format</string>
</property>
<property name="sizeAdjustPolicy">
<property name="sizeAdjustPolicy" >
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="contentsCO">
<item row="1" column="1" colspan="2" >
<widget class="QComboBox" name="contentsCO" >
<item>
<property name="text">
<property name="text" >
<string>Current Paragraph</string>
</property>
</item>
<item>
<property name="text">
<property name="text" >
<string>Complete Source</string>
</property>
</item>
<item>
<property name="text">
<property name="text" >
<string>Preamble Only</string>
</property>
</item>
<item>
<property name="text">
<property name="text" >
<string>Body Only</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QCheckBox" name="autoUpdateCB">
<property name="text">
<string>Automatic update</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QPushButton" name="updatePB">
<property name="enabled">
<item row="3" column="1" colspan="2" >
<widget class="QPushButton" name="updatePB" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text">
<property name="text" >
<string>&amp;Update</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="2" column="1" colspan="2" >
<widget class="QCheckBox" name="autoUpdateCB" >
<property name="text" >
<string>Automatic update</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>85</height>
</size>
<property name="checked" >
<bool>true</bool>
</property>
</spacer>
</widget>
</item>
</layout>
<zorder>viewSourceTV</zorder>
<zorder>outputFormatLA</zorder>
<zorder>outputFormatCO</zorder>
<zorder>contentsCO</zorder>
<zorder>updatePB</zorder>
<zorder>autoUpdateCB</zorder>
</widget>
<tabstops>
<tabstop>viewSourceTV</tabstop>
@ -115,7 +107,7 @@
<tabstop>updatePB</tabstop>
</tabstops>
<includes>
<include location="local">qt_i18n.h</include>
<include location="local" >qt_i18n.h</include>
</includes>
<resources/>
<connections/>

View File

@ -57,8 +57,8 @@ string const readBB_from_PSFile(FileName const & file)
return string();
}
static lyx::regex bbox_re(
"^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)");
static lyx::regex bbox_re("^%%BoundingBox:\\s*([-]*[[:digit:]]+)"
"\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)");
ifstream is(file_.toFilesystemEncoding().c_str());
while (is) {
string s;

View File

@ -294,7 +294,7 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
docstring latex_lbl;
for (size_t n = 0; n < lbl.size(); ++n) {
try {
latex_lbl += runparams.encoding->latexChar(lbl[n]);
latex_lbl += runparams.encoding->latexChar(lbl[n]).first;
} catch (EncodingException & /* e */) {
if (runparams.dryrun) {
latex_lbl += "<" + _("LyX Warning: ")

View File

@ -58,7 +58,7 @@ namespace os = support::os;
InsetBibtex::InsetBibtex(Buffer * buf, InsetCommandParams const & p)
: InsetCommand(buf, p)
{
buffer().invalidateBibinfoCache();
buffer().invalidateBibfileCache();
buffer().removeBiblioTempFiles();
}

View File

@ -109,7 +109,7 @@ private:
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
docstring layoutName() const { return from_ascii("Branch"); }
docstring layoutName() const { return from_ascii("Branch:") + branch(); }
///
Inset * clone() const { return new InsetBranch(*this); }

View File

@ -376,7 +376,7 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams,
for (size_t n = 0; n < command.size(); ++n) {
try {
char_type const c = command[n];
docstring const latex = runparams.encoding->latexChar(c);
docstring const latex = runparams.encoding->latexChar(c).first;
result += latex;
if (latex.length() > 1 && latex[latex.length() - 1] != '}') {
// Prevent eating of a following

View File

@ -43,6 +43,7 @@ InsetFlex::InsetFlex(InsetFlex const & in)
{}
// special code for InsetFlex when there is not the explicit Flex:: prefix
InsetLayout const & InsetFlex::getLayout() const
{
if (!buffer_)

View File

@ -793,7 +793,7 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const
if (all_pars) {
op.par_begin = 0;
op.par_end = 0;
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::OnlyBody);
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile);
} else
xs << XHTMLStream::ESCAPE_NONE
<< "<!-- Included file: "
@ -905,6 +905,7 @@ void InsetInclude::validate(LaTeXFeatures & features) const
features.includeFile(include_label, writefile);
features.useInsetLayout(getLayout());
if (isVerbatim(params()))
features.require("verbatim");
else if (isListings(params()))
@ -997,6 +998,13 @@ Inset::DisplayType InsetInclude::display() const
}
docstring InsetInclude::layoutName() const
{
if (isListings(params()))
return from_ascii("IncludeListings");
return InsetCommand::layoutName();
}
//
// preview stuff

View File

@ -79,6 +79,8 @@ public:
DisplayType display() const;
///
InsetCode lyxCode() const { return INCLUDE_CODE; }
///
docstring layoutName() const;
/** Fills \c key
* \param keys the list of bibkeys in the child buffer.
* \param it not used here

View File

@ -137,7 +137,7 @@ void InsetIndex::latex(otexstream & os, OutputParams const & runparams_in) const
docstring spart2;
for (size_t n = 0; n < spart.size(); ++n) {
try {
spart2 += runparams.encoding->latexChar(spart[n]);
spart2 += runparams.encoding->latexChar(spart[n]).first;
} catch (EncodingException & /* e */) {
LYXERR0("Uncodable character in index entry. Sorting might be wrong!");
}
@ -662,9 +662,12 @@ struct IndexEntry
bool operator<(IndexEntry const & lhs, IndexEntry const & rhs)
{
return lhs.main < rhs.main
|| (lhs.main == rhs.main && lhs.sub < rhs.sub)
|| (lhs.main == rhs.main && lhs.sub == rhs.sub && lhs.subsub < rhs.subsub);
int comp = compare_no_case(lhs.main, rhs.main);
if (comp == 0)
comp = compare_no_case(lhs.sub, rhs.sub);
if (comp == 0)
comp = compare_no_case(lhs.subsub, rhs.subsub);
return (comp < 0);
}
} // anon namespace

View File

@ -113,8 +113,8 @@ void InsetLabel::updateReferences(docstring const & old_label,
for (; it != end; ++it) {
buffer().undo().recordUndo(it->second);
if (it->first->lyxCode() == MATH_REF_CODE) {
InsetMathHull * mi = it->first->asInsetMath()->asHullInset();
mi->asRefInset()->changeTarget(new_label);
InsetMathRef * mi = it->first->asInsetMath()->asRefInset();
mi->changeTarget(new_label);
} else {
InsetCommand * ref = it->first->asInsetCommand();
ref->setParam("reference", new_label);

View File

@ -75,6 +75,7 @@ InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str)
bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
{
enum {
IL_BABELPREAMBLE,
IL_BGCOLOR,
IL_CONTENTASLABEL,
IL_COPYSTYLE,
@ -98,6 +99,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
IL_INTOC,
IL_LABELFONT,
IL_LABELSTRING,
IL_LANGPREAMBLE,
IL_LATEXNAME,
IL_LATEXPARAM,
IL_LATEXTYPE,
@ -117,6 +119,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
LexerKeyword elementTags[] = {
{ "babelpreamble", IL_BABELPREAMBLE },
{ "bgcolor", IL_BGCOLOR },
{ "contentaslabel", IL_CONTENTASLABEL },
{ "copystyle", IL_COPYSTYLE },
@ -142,6 +145,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
{ "keepempty", IL_KEEPEMPTY },
{ "labelfont", IL_LABELFONT },
{ "labelstring", IL_LABELSTRING },
{ "langpreamble", IL_LANGPREAMBLE },
{ "latexname", IL_LATEXNAME },
{ "latexparam", IL_LATEXPARAM },
{ "latextype", IL_LATEXTYPE },
@ -311,6 +315,12 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
case IL_PREAMBLE:
preamble_ = from_utf8(lex.getLongString("EndPreamble"));
break;
case IL_BABELPREAMBLE:
babelpreamble_ = from_utf8(lex.getLongString("EndBabelPreamble"));
break;
case IL_LANGPREAMBLE:
langpreamble_ = from_utf8(lex.getLongString("EndLangPreamble"));
break;
case IL_REFPREFIX:
lex >> refprefix_;
break;

View File

@ -82,6 +82,11 @@ public:
ColorCode bgcolor() const { return bgcolor_; }
///
docstring preamble() const { return preamble_; }
/// Get language dependent macro definitions needed for this inset
docstring const langpreamble() const { return langpreamble_; }
/// Get language and babel dependent macro definitions needed for
/// this inset
docstring const babelpreamble() const { return babelpreamble_; }
///
docstring counter() const { return counter_; }
///
@ -183,6 +188,10 @@ private:
docstring counter_;
///
docstring preamble_;
/// Language dependent macro definitions needed for this inset
docstring langpreamble_;
/// Language and babel dependent macro definitions needed for this inset
docstring babelpreamble_;
///
docstring refprefix_;
///

View File

@ -176,7 +176,7 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const
// we can only output characters covered by the current
// encoding!
try {
if (runparams.encoding->latexChar(c) == docstring(1, c))
if (runparams.encoding->encodable(c))
code += c;
else if (runparams.dryrun) {
code += "<" + _("LyX Warning: ")

View File

@ -279,7 +279,7 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams)
docstring latex_symb;
for (size_t n = 0; n < symb.size(); ++n) {
try {
latex_symb += runparams.encoding->latexChar(symb[n]);
latex_symb += runparams.encoding->latexChar(symb[n]).first;
} catch (EncodingException & /* e */) {
if (runparams.dryrun) {
latex_symb += "<" + _("LyX Warning: ")

View File

@ -145,7 +145,7 @@ InsetScript::~InsetScript()
docstring InsetScript::layoutName() const
{
return from_ascii("script:" + scripttranslator().find(params_.type));
return from_ascii("Script:" + scripttranslator().find(params_.type));
}
@ -326,29 +326,6 @@ docstring InsetScript::toolTip(BufferView const &, int, int) const
}
void InsetScript::validate(LaTeXFeatures & features) const
{
if (params_.type == InsetScriptParams::Subscript)
features.require("subscript");
InsetText::validate(features);
}
void InsetScript::latex(otexstream & os, OutputParams const & runparams) const
{
switch (params_.type) {
case InsetScriptParams::Subscript:
os << "\\textsubscript{";
break;
case InsetScriptParams::Superscript:
os << "\\textsuperscript{";
break;
}
InsetText::latex(os, runparams);
os << "}";
}
int InsetScript::plaintext(odocstream & os, OutputParams const & runparams) const
{
odocstringstream oss;
@ -402,25 +379,6 @@ int InsetScript::docbook(odocstream & os, OutputParams const & runparams) const
}
docstring InsetScript::xhtml(XHTMLStream & xs, OutputParams const & runparams) const
{
string cmdname;
switch (params_.type) {
case InsetScriptParams::Subscript:
cmdname = "sub";
break;
case InsetScriptParams::Superscript:
cmdname = "sup";
break;
}
xs << html::StartTag(cmdname);
docstring const ret = InsetText::xhtml(xs, runparams);
xs << html::EndTag(cmdname);
return ret;
}
string InsetScript::contextMenuName() const
{
return "context-script";

View File

@ -82,20 +82,10 @@ public:
///
bool neverIndent() const { return true; }
///
bool forcePlainLayout(idx_type = 0) const { return true; }
///
bool allowParagraphCustomization(idx_type = 0) const { return false; }
///
virtual void validate(LaTeXFeatures &) const;
///
void latex(otexstream &, OutputParams const &) const;
///
int plaintext(odocstream &, OutputParams const &) const;
///
int docbook(odocstream &, OutputParams const &) const;
///
docstring xhtml(XHTMLStream &, OutputParams const &) const;
///
void edit(Cursor & cur, bool front,
EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///

View File

@ -37,6 +37,15 @@ using namespace std;
namespace lyx {
namespace {
string cmd2type(string const & cmd)
{
if (cmd == "lstlistoflistings")
return "listing";
return cmd;
}
}
InsetTOC::InsetTOC(Buffer * buf, InsetCommandParams const & p)
: InsetCommand(buf, p)
@ -53,10 +62,18 @@ ParamInfo const & InsetTOC::findInfo(string const & /* cmdName */)
}
bool InsetTOC::isCompatibleCommand(string const & cmd)
{
return cmd == defaultCommand() || cmd == "lstlistoflistings";
}
docstring InsetTOC::screenLabel() const
{
if (getCmdName() == "tableofcontents")
return buffer().B_("Table of Contents");
if (getCmdName() == "lstlistoflistings")
return buffer().B_("List of Listings");
return _("Unknown TOC type");
}
@ -76,10 +93,27 @@ void InsetTOC::doDispatch(Cursor & cur, FuncRequest & cmd) {
}
docstring InsetTOC::layoutName() const
{
if (getCmdName() == "lstlistoflistings")
return from_ascii("ListOfListings");
return docstring();
}
void InsetTOC::validate(LaTeXFeatures & features) const
{
InsetCommand::validate(features);
features.useInsetLayout(getLayout());
if (getCmdName() == "lstlistoflistings")
features.require("listings");
}
int InsetTOC::plaintext(odocstream & os, OutputParams const &) const
{
os << screenLabel() << "\n\n";
buffer().tocBackend().writePlaintextTocList(getCmdName(), os);
buffer().tocBackend().writePlaintextTocList(cmd2type(getCmdName()), os);
return PLAINTEXT_NEWLINE;
}
@ -94,6 +128,9 @@ int InsetTOC::docbook(odocstream & os, OutputParams const &) const
docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
{
if (getCmdName() != "tableofcontents")
return docstring();
Layout const & lay = buffer().params().documentClass().htmlTOCLayout();
string const & tocclass = lay.defaultCSSClass();
string const tocattr = "class='tochead " + tocclass + "'";
@ -104,15 +141,14 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
odocstringstream ods;
XHTMLStream xs(ods);
Toc const & toc = buffer().tocBackend().toc("tableofcontents");
Toc const & toc = buffer().tocBackend().toc(cmd2type(getCmdName()));
if (toc.empty())
return docstring();
xs << html::StartTag("div", "class='toc'");
// Title of TOC
static string toctitle = N_("Table of Contents");
docstring title = buffer().B_(toctitle);
docstring title = screenLabel();
xs << html::StartTag("div", tocattr)
<< title
<< html::EndTag("div");

Some files were not shown because too many files have changed in this diff Show More