mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Merge branch 'master' of git.lyx.org:lyx
This commit is contained in:
commit
a53847964d
@ -72,8 +72,10 @@
|
||||
|
||||
|
||||
!!Changes with respect to external programs and libraries in 2.3:
|
||||
|
||||
* Inkscape SVG with separate LaTeX + PDF output is experimentally supported.
|
||||
|
||||
* Add some editor/viewer applications to (re)configure checks.
|
||||
|
||||
!!Known issues in version 2.3.0
|
||||
|
||||
|
@ -686,6 +686,7 @@ def checkFormatEntries(dtl_tools):
|
||||
\Format eps3 eps "EPS (cropped)" "" "%%" "" "document" ""
|
||||
\Format ps ps Postscript t "%%" "" "document,vector,menu=export" "application/postscript"'''])
|
||||
# for xdg-open issues look here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg151818.html
|
||||
# maybe use "bestApplication()" from https://github.com/jleclanche/python-mime
|
||||
# the MIME type is set for pdf6, because that one needs to be autodetectable by libmime
|
||||
checkViewer('a PDF previewer',
|
||||
['pdfview', 'kpdf', 'okular', 'qpdfview --unique',
|
||||
|
@ -70,7 +70,10 @@
|
||||
# If True, LyX cares for characters/macros that do not exist in
|
||||
# some font encodings ("<", ">", "|" and straight quote).
|
||||
# It is not required for standard encodings like T2A. See bug #5091.
|
||||
# * "FontEncoding none" tells LyX that fontenc should not be loaded with this
|
||||
# * FontEncoding is the required font encoding for correct hyphenation with
|
||||
# 8-bit TeX (http://www.hyphenation.org ).
|
||||
# If not given, all standard text encodings as well as OT1 work.
|
||||
# "FontEncoding none" tells LyX that fontenc should not be loaded with this
|
||||
# language.
|
||||
# * AsBabelOptions advices LyX to pass the languages locally to babel, not
|
||||
# globally to the class. Some languages (basically those not directly
|
||||
@ -120,6 +123,7 @@ Language afrikaans
|
||||
BabelName afrikaans
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode af_ZA
|
||||
End
|
||||
|
||||
@ -129,6 +133,7 @@ Language albanian
|
||||
PolyglossiaName albanian
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-2
|
||||
# FontEncoding ?? (no hyphenation support?)
|
||||
LangCode sq_AL
|
||||
End
|
||||
|
||||
@ -186,7 +191,7 @@ Language arabic_arabi
|
||||
PolyglossiaName arabic
|
||||
QuoteStyle french
|
||||
Encoding cp1256
|
||||
FontEncoding "LFE,LAE"
|
||||
FontEncoding LAE
|
||||
RTL true
|
||||
AsBabelOptions true
|
||||
LangCode ar_SA
|
||||
@ -210,6 +215,7 @@ Language asturian
|
||||
LangCode ast_ES
|
||||
End
|
||||
|
||||
|
||||
Language australian
|
||||
GuiName "English (Australia)"
|
||||
BabelName australian
|
||||
@ -229,6 +235,7 @@ Language austrian
|
||||
PolyglossiaOpts "variant=austrian,spelling=old,babelshorthands=true"
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de_AT
|
||||
End
|
||||
|
||||
@ -241,6 +248,7 @@ Language naustrian
|
||||
PolyglossiaOpts "variant=austrian,spelling=new,babelshorthands=true"
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de_AT
|
||||
End
|
||||
|
||||
@ -270,6 +278,7 @@ Language basque
|
||||
PolyglossiaName basque
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode eu_ES
|
||||
PostBabelPreamble
|
||||
\addto\extrasbasque{\bbl@deactivate{~}}
|
||||
@ -282,6 +291,7 @@ Language belarusian
|
||||
BabelName belarusian
|
||||
QuoteStyle french
|
||||
Encoding cp1251
|
||||
FontEncoding T2A
|
||||
LangCode be_BY
|
||||
AsBabelOptions true
|
||||
End
|
||||
@ -292,6 +302,7 @@ Language bosnian
|
||||
BabelName bosnian
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode bs_BA
|
||||
End
|
||||
|
||||
@ -302,6 +313,7 @@ Language brazilian
|
||||
PolyglossiaName brazil
|
||||
QuoteStyle english
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode pt_BR
|
||||
End
|
||||
|
||||
@ -355,6 +367,7 @@ Language canadien
|
||||
# PolyglossiaOpts "variant=canadien"
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode fr_CA
|
||||
End
|
||||
|
||||
@ -366,6 +379,7 @@ Language catalan
|
||||
PolyglossiaOpts "babelshorthands=true"
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode ca_ES
|
||||
End
|
||||
|
||||
@ -403,6 +417,7 @@ Language croatian
|
||||
PolyglossiaName croatian
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode hr_HR
|
||||
End
|
||||
|
||||
@ -413,6 +428,7 @@ Language czech
|
||||
PolyglossiaName czech
|
||||
QuoteStyle german
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode cs_CZ
|
||||
End
|
||||
|
||||
@ -423,6 +439,7 @@ Language danish
|
||||
PolyglossiaName danish
|
||||
QuoteStyle danish
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode da_DK
|
||||
End
|
||||
|
||||
@ -442,6 +459,7 @@ Language dutch
|
||||
PolyglossiaOpts "babelshorthands=true"
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode nl_NL
|
||||
End
|
||||
|
||||
@ -464,6 +482,7 @@ Language esperanto
|
||||
PolyglossiaName esperanto
|
||||
QuoteStyle english
|
||||
Encoding iso8859-3
|
||||
FontEncoding IL3
|
||||
LangCode eo_EO
|
||||
End
|
||||
|
||||
@ -473,6 +492,7 @@ Language estonian
|
||||
PolyglossiaName estonian
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode et_EE
|
||||
PostBabelPreamble
|
||||
\addto\extrasestonian{\bbl@deactivate{~}}
|
||||
@ -486,7 +506,7 @@ Language farsi
|
||||
BabelName farsi
|
||||
PolyglossiaName farsi
|
||||
Encoding utf8
|
||||
FontEncoding "LFE,LAE"
|
||||
FontEncoding LFE
|
||||
RTL true
|
||||
LangCode fa_IR
|
||||
QuoteStyle english
|
||||
@ -503,6 +523,7 @@ Language finnish
|
||||
PolyglossiaName finnish
|
||||
QuoteStyle swedish
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode fi_FI
|
||||
End
|
||||
|
||||
@ -514,6 +535,7 @@ Language french
|
||||
PolyglossiaName french
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode fr_FR
|
||||
PostBabelPreamble
|
||||
\addto\extrasfrench{%
|
||||
@ -530,6 +552,7 @@ Language friulan
|
||||
PolyglossiaName friulan
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode fur_IT
|
||||
End
|
||||
|
||||
@ -540,6 +563,7 @@ Language galician
|
||||
PolyglossiaName galician
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode gl_ES
|
||||
PostBabelPreamble
|
||||
\addto\shorthandsgalician{\galiciandeactivate{~}}
|
||||
@ -563,6 +587,7 @@ Language german
|
||||
PolyglossiaOpts "variant=german,spelling=old,babelshorthands=true"
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de
|
||||
LangVariety alt
|
||||
End
|
||||
@ -575,6 +600,7 @@ Language ngerman
|
||||
PolyglossiaOpts "variant=german,spelling=new,babelshorthands=true"
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de_DE
|
||||
End
|
||||
|
||||
@ -589,6 +615,7 @@ Language german-ch
|
||||
PolyglossiaOpts "variant=swiss,spelling=new,babelshorthands=true"
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de_CH
|
||||
End
|
||||
|
||||
@ -602,6 +629,7 @@ Language german-ch-old
|
||||
PolyglossiaOpts "variant=swiss,spelling=old,babelshorthands=true"
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode de_CH
|
||||
End
|
||||
|
||||
@ -671,6 +699,7 @@ Language icelandic
|
||||
PolyglossiaName icelandic
|
||||
QuoteStyle german
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode is_IS
|
||||
End
|
||||
|
||||
@ -692,6 +721,7 @@ Language irish
|
||||
PolyglossiaName irish
|
||||
QuoteStyle english
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode ga_IE
|
||||
End
|
||||
|
||||
@ -743,9 +773,10 @@ End
|
||||
# not yet supported by polyglossia
|
||||
# not supported by babel
|
||||
Language kazakh
|
||||
GuiName "Kazakh"
|
||||
Encoding ascii
|
||||
LangCode kk_KZ
|
||||
GuiName "Kazakh"
|
||||
Encoding ascii
|
||||
FontEncoding T2A
|
||||
LangCode kk_KZ
|
||||
PostBabelPreamble
|
||||
\input{t2aenc.def}
|
||||
\AtBeginDocument{\fontencoding{T2A}\selectfont}
|
||||
@ -773,6 +804,7 @@ Language kurmanji
|
||||
GuiName "Kurmanji"
|
||||
BabelName kurmanji
|
||||
Encoding utf8
|
||||
FontEncoding T1
|
||||
LangCode kmr
|
||||
AsBabelOptions true
|
||||
End
|
||||
@ -792,6 +824,7 @@ Language latin
|
||||
BabelName latin
|
||||
PolyglossiaName latin
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode la_LA
|
||||
End
|
||||
|
||||
@ -803,7 +836,7 @@ Language latvian
|
||||
PolyglossiaName latvian
|
||||
QuoteStyle german
|
||||
Encoding iso8859-4
|
||||
# FontEncoding L7x # (required for hyphenation but not set by babel)
|
||||
FontEncoding L7x # (required for hyphenation but not set by babel)
|
||||
LangCode lv_LV
|
||||
AsBabelOptions true
|
||||
End
|
||||
@ -827,6 +860,7 @@ Language lowersorbian
|
||||
PolyglossiaName lsorbian
|
||||
QuoteStyle german
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode dsb_DE
|
||||
End
|
||||
|
||||
@ -837,6 +871,7 @@ Language magyar
|
||||
PolyglossiaName magyar
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode hu_HU
|
||||
End
|
||||
|
||||
@ -887,6 +922,7 @@ Language norsk
|
||||
PolyglossiaName norsk
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode nb_NO
|
||||
End
|
||||
|
||||
@ -897,6 +933,7 @@ Language nynorsk
|
||||
PolyglossiaName nynorsk
|
||||
QuoteStyle swiss
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode nn_NO
|
||||
End
|
||||
|
||||
@ -939,7 +976,7 @@ Language polish
|
||||
PolyglossiaName polish
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-2
|
||||
# FontEncoding QX # (required for hyphenation but not set by babel)
|
||||
FontEncoding QX # (required for hyphenation but not set by babel)
|
||||
LangCode pl_PL
|
||||
End
|
||||
|
||||
@ -950,6 +987,7 @@ Language portuguese
|
||||
PolyglossiaName portuges
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode pt_PT
|
||||
End
|
||||
|
||||
@ -960,6 +998,7 @@ Language romanian
|
||||
PolyglossiaName romanian
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-16
|
||||
FontEncoding T1
|
||||
LangCode ro_RO
|
||||
End
|
||||
|
||||
@ -989,6 +1028,7 @@ Language samin
|
||||
BabelName samin
|
||||
PolyglossiaName samin
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode se_NO
|
||||
End
|
||||
|
||||
@ -1033,6 +1073,7 @@ Language serbian-latin
|
||||
PolyglossiaOpts "script=Latin"
|
||||
QuoteStyle polish
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode sr_RS-Latin
|
||||
End
|
||||
|
||||
@ -1043,6 +1084,7 @@ Language slovak
|
||||
PolyglossiaName slovak
|
||||
QuoteStyle german
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode sk_SK
|
||||
End
|
||||
|
||||
@ -1052,6 +1094,7 @@ Language slovene
|
||||
PolyglossiaName slovenian
|
||||
QuoteStyle german
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode sl_SI
|
||||
End
|
||||
|
||||
@ -1062,6 +1105,7 @@ Language spanish
|
||||
PolyglossiaName spanish
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode es_ES
|
||||
PostBabelPreamble
|
||||
\addto\shorthandsspanish{\spanishdeactivate{~<>}}
|
||||
@ -1075,6 +1119,7 @@ Language spanish-mexico
|
||||
PolyglossiaName spanish
|
||||
QuoteStyle french
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode es_MX
|
||||
PostBabelPreamble
|
||||
\addto\shorthandsspanish{\spanishdeactivate{~<>.}}
|
||||
@ -1088,6 +1133,7 @@ Language swedish
|
||||
PolyglossiaName swedish
|
||||
QuoteStyle swedish
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode sv_SE
|
||||
End
|
||||
|
||||
@ -1122,7 +1168,7 @@ Language thai
|
||||
PolyglossiaName thai
|
||||
QuoteStyle english
|
||||
Encoding tis620-0
|
||||
# FontEncoding LTH
|
||||
FontEncoding LTH
|
||||
LangCode th_TH
|
||||
PostBabelPreamble
|
||||
\usepackage{thswitch}
|
||||
@ -1144,6 +1190,7 @@ Language turkish
|
||||
PolyglossiaName turkish
|
||||
QuoteStyle english
|
||||
Encoding iso8859-9
|
||||
FontEncoding T1
|
||||
LangCode tr_TR
|
||||
PostBabelPreamble
|
||||
\usepackage{xkeyval}
|
||||
@ -1158,6 +1205,7 @@ Language turkmen
|
||||
PolyglossiaName turkmen
|
||||
QuoteStyle swiss
|
||||
Encoding utf8
|
||||
FontEncoding T1
|
||||
LangCode tk_TM
|
||||
AsBabelOptions true
|
||||
End
|
||||
@ -1179,6 +1227,7 @@ Language uppersorbian
|
||||
PolyglossiaName usorbian
|
||||
QuoteStyle german
|
||||
Encoding iso8859-2
|
||||
FontEncoding T1
|
||||
LangCode hsb_DE
|
||||
End
|
||||
|
||||
@ -1200,6 +1249,7 @@ Language vietnamese
|
||||
PolyglossiaName vietnamese
|
||||
QuoteStyle english
|
||||
Encoding utf8
|
||||
FontEncoding T5
|
||||
LangCode vi_VN
|
||||
AsBabelOptions true
|
||||
Requires vietnamese
|
||||
@ -1211,5 +1261,6 @@ Language welsh
|
||||
PolyglossiaName welsh
|
||||
QuoteStyle british
|
||||
Encoding iso8859-15
|
||||
FontEncoding T1
|
||||
LangCode cy_GB
|
||||
End
|
||||
|
@ -77,7 +77,7 @@ Style Section*
|
||||
Font
|
||||
Series Medium
|
||||
Shape Smallcaps
|
||||
Size Large
|
||||
Size Normal
|
||||
EndFont
|
||||
End
|
||||
|
||||
|
116
po/sk.po
116
po/sk.po
@ -8,8 +8,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: LyX-2.3\n"
|
||||
"Report-Msgid-Bugs-To: lyx-devel@lists.lyx.org\n"
|
||||
"POT-Creation-Date: 2017-01-13 11:00+0100\n"
|
||||
"PO-Revision-Date: 2017-01-13 11:51+0000\n"
|
||||
"POT-Creation-Date: 2017-01-14 19:13+0100\n"
|
||||
"PO-Revision-Date: 2017-01-14 18:22+0000\n"
|
||||
"Last-Translator: Kornel Benko <kornel@lyx.org>\n"
|
||||
"Language-Team: Slovak <kornel@lyx.org>\n"
|
||||
"Language: sk\n"
|
||||
@ -83,17 +83,18 @@ msgid "Citation Style"
|
||||
msgstr "Štýl citovania"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:55
|
||||
msgid "Sty&le engine:"
|
||||
msgstr "Obsluha Štý&lu:"
|
||||
msgid "Sty&le format:"
|
||||
msgstr "Štý&l formátu:"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:65
|
||||
msgid ""
|
||||
"A selection of different style engines (such as natbib) that respectively "
|
||||
"provide support for specific citytion and bibliography styles. Expand to get "
|
||||
"more information."
|
||||
"A selection of different style format approaches (such as natbib) that "
|
||||
"respectively provide support for specific citation and bibliography styles. "
|
||||
"Expand to get more information."
|
||||
msgstr ""
|
||||
"Výber inej obsluhy (ako napr. natbib) ktorá poskytuje podporu špecifických "
|
||||
"bibliografických štýlov. Rozviňte keď chcete viac informácií."
|
||||
"Výber iných formátových metód (ako napr. natbib) ktoré poskytujú podporu "
|
||||
"špecifických citácií a bibliografických štýlov. Rozviňte keď chcete viac "
|
||||
"informácií."
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:75
|
||||
msgid "&Variant:"
|
||||
@ -103,16 +104,17 @@ msgstr "&Variácia:"
|
||||
msgid "Provides available cite style variants."
|
||||
msgstr "Poskytuje dostupné varianty štýlov citovania."
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:118
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:118 src/frontends/qt4/GuiPrefs.cpp:825
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:958
|
||||
msgid "Opt&ions:"
|
||||
msgstr "M&ožnosti:"
|
||||
msgstr "Možno&sti:"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:134
|
||||
msgid "Here you can enter further options of the biblatex package"
|
||||
msgstr "Tu môžte vložiť ďalšie voľby balíka biblatex"
|
||||
msgid "Here you can enter further options of the bibliography package"
|
||||
msgstr "Tu môžte vložiť ďalšie voľby balíka pre bibliografické záznamy"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:154
|
||||
msgid "&Biblatex citation style:"
|
||||
msgid "Biblatex &citation style:"
|
||||
msgstr "Štýl &biblatex-citácie:"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:164
|
||||
@ -167,10 +169,10 @@ msgstr ""
|
||||
msgid "Bibliography Generation"
|
||||
msgstr "Generácia Bibliografie"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:167 src/frontends/qt4/ui/IndicesUi.ui:33
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:85
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:363 src/frontends/qt4/ui/IndicesUi.ui:33
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:209
|
||||
msgid "&Processor:"
|
||||
msgstr "&Generátor:"
|
||||
msgstr "&Procesor:"
|
||||
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:177 src/frontends/qt4/ui/IndicesUi.ui:43
|
||||
msgid "Select a processor"
|
||||
@ -373,9 +375,9 @@ msgstr "Prid&ať…"
|
||||
msgid "Remove the selected database"
|
||||
msgstr "Odstrániť vybranú databázu"
|
||||
|
||||
#: src/frontends/qt4/ui/BibtexUi.ui:282 src/frontends/qt4/ui/CitationUi.ui:156
|
||||
#: src/frontends/qt4/ui/BibtexUi.ui:61 src/frontends/qt4/ui/CitationUi.ui:156
|
||||
msgid "&Delete"
|
||||
msgstr "Zm&azať"
|
||||
msgstr "&Zmazať"
|
||||
|
||||
#: src/frontends/qt4/ui/BoxUi.ui:23
|
||||
msgid "Type and Size"
|
||||
@ -613,7 +615,7 @@ msgstr "Ukázať ne-definované vetvy použité v tomto dokumente."
|
||||
|
||||
#: src/frontends/qt4/ui/BranchesUi.ui:64
|
||||
msgid "&Undefined Branches"
|
||||
msgstr "&Nedefinované vetvy"
|
||||
msgstr "N&edefinované vetvy"
|
||||
|
||||
#: src/frontends/qt4/ui/BranchesUi.ui:84
|
||||
msgid "A&vailable Branches:"
|
||||
@ -3305,7 +3307,7 @@ msgstr "&Konvertor:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:91
|
||||
msgid "E&xtra flag:"
|
||||
msgstr "Prí&davný indikátor:"
|
||||
msgstr "Prída&vný indikátor:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:121
|
||||
msgid "&From format:"
|
||||
@ -3313,7 +3315,7 @@ msgstr "&Z formátu:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:153
|
||||
msgid "&To format:"
|
||||
msgstr "D&o formátu:"
|
||||
msgstr "&Do formátu:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:194
|
||||
#: src/frontends/qt4/ui/PrefShortcutsUi.ui:54
|
||||
@ -3356,9 +3358,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Keď aktívne, používanie konvertorov s 'needauth' voľbou je neprístupné."
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:340
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:322
|
||||
msgid "Use need&auth option"
|
||||
msgstr "Použi needau&th voľbu"
|
||||
msgstr "Použi needa&uth voľbu"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefConvertersUi.ui:343
|
||||
msgid ""
|
||||
@ -3620,7 +3622,7 @@ msgstr ""
|
||||
|
||||
#: src/frontends/qt4/ui/PrefFileformatsUi.ui:83
|
||||
msgid "Sho&w in export menu"
|
||||
msgstr "Zobraziť v menu &export"
|
||||
msgstr "Zobraziť v menu e&xport"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefFileformatsUi.ui:90
|
||||
msgid "Vector &graphics format"
|
||||
@ -3628,7 +3630,7 @@ msgstr "&Vektorový formát obrázku"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefFileformatsUi.ui:97
|
||||
msgid "S&hort name:"
|
||||
msgstr "K&rátke meno:"
|
||||
msgstr "&Krátke meno:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefFileformatsUi.ui:110
|
||||
msgid "E&xtensions:"
|
||||
@ -3900,6 +3902,10 @@ msgid "Optional paper size flag (-paper) for some DVI viewers"
|
||||
msgstr ""
|
||||
"Voliteľný indikátor veľkosti papiera (-paper) pre niektoré DVI prehliadače"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:107
|
||||
msgid "P&rocessor:"
|
||||
msgstr "Pro&cesor:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:108
|
||||
msgid "BibTeX command and options"
|
||||
msgstr "Príkaz a voľby pre BibTeX"
|
||||
@ -3909,18 +3915,20 @@ msgstr "Príkaz a voľby pre BibTeX"
|
||||
msgid "Processor for &Japanese:"
|
||||
msgstr "Generátor pre &Japončinu:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:150
|
||||
msgid "Options:"
|
||||
msgstr "Možnosti:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:138
|
||||
msgid "Specific BibTeX command and options for pLaTeX (Japanese)"
|
||||
msgstr "BibTeX príkaz a voľby pre pLaTeX (Japonsky)"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:173
|
||||
msgid "Pr&ocessor:"
|
||||
msgstr "&Generátor:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:199 src/frontends/qt4/GuiPrefs.cpp:824
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:919
|
||||
#: src/frontends/qt4/ui/BiblioUi.ui:397
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:120
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:222 src/frontends/qt4/GuiPrefs.cpp:850
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:985
|
||||
msgid "Op&tions:"
|
||||
msgstr "&Možnosti:"
|
||||
msgstr "Možnos&ti:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:209
|
||||
msgid "Index command and options (makeindex, xindy)"
|
||||
@ -3938,14 +3946,14 @@ msgstr "P&ríkaz nomenklatúry:"
|
||||
msgid "Command and options for nomencl (usually makeindex)"
|
||||
msgstr "Príkaz a voľby pre nomenklatúru (bežne makeindex)"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:265
|
||||
msgid "Chec&kTeX command:"
|
||||
msgstr "Príkaz Chec&kTeX:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:275
|
||||
msgid "CheckTeX start options and flags"
|
||||
msgstr "Začiatočné voľby a indikátory pre CheckTeX"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:299
|
||||
msgid "&CheckTeX command:"
|
||||
msgstr "Príkaz Chec&kTeX:"
|
||||
|
||||
#: src/frontends/qt4/ui/PrefLatexUi.ui:285
|
||||
msgid ""
|
||||
"Select whether LyX should output Windows or Cygwin style paths to LaTeX "
|
||||
@ -29058,6 +29066,10 @@ msgstr "Klávesnica/Myš"
|
||||
msgid "Input Completion"
|
||||
msgstr "Doplňovanie"
|
||||
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:784 src/frontends/qt4/GuiPrefs.cpp:934
|
||||
msgid "C&ommand:"
|
||||
msgstr "Príkaz:"
|
||||
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:783 src/frontends/qt4/GuiPrefs.cpp:808
|
||||
#: src/frontends/qt4/GuiPrefs.cpp:896 src/frontends/qt4/GuiPrefs.cpp:923
|
||||
msgid "Co&mmand:"
|
||||
@ -30653,10 +30665,6 @@ msgstr ""
|
||||
msgid "Biblatex"
|
||||
msgstr "Biblatex"
|
||||
|
||||
#: src/insets/InsetBibtex.cpp:152
|
||||
msgid "BibTex"
|
||||
msgstr "BibTeX"
|
||||
|
||||
#: src/insets/InsetBibtex.cpp:153
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -32244,6 +32252,15 @@ msgstr ""
|
||||
msgid "Unknown user"
|
||||
msgstr "Neznámy používateľ"
|
||||
|
||||
#~ msgid "Sty&le engine:"
|
||||
#~ msgstr "Obsluha Štý&lu:"
|
||||
|
||||
#~ msgid "BibTex"
|
||||
#~ msgstr "BibTeX"
|
||||
|
||||
#~ msgid "Pr&ocessor:"
|
||||
#~ msgstr "&Generátor:"
|
||||
|
||||
#~ msgid "Use BibTeX's default numerical styles"
|
||||
#~ msgstr "Použiť štandardné BibTeX numerické štýly"
|
||||
|
||||
@ -36286,3 +36303,20 @@ msgstr "Neznámy používateľ"
|
||||
#~ msgstr ""
|
||||
#~ "Vložka BibTeX-u zahrňuje %1$s databázy.\n"
|
||||
#~ "Keď budete pokračovať, budú všetky otvorené."
|
||||
|
||||
#~ msgid "Here you can enter further options of the biblatex package"
|
||||
#~ msgstr "Tu môžte vložiť ďalšie voľby balíka biblatex"
|
||||
|
||||
#~ msgid "Chec&kTeX command:"
|
||||
#~ msgstr "Príkaz Chec&kTeX:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "A selection of different style engines (such as natbib) that respectively "
|
||||
#~ "provide support for specific citytion and bibliography styles. Expand to get "
|
||||
#~ "more information."
|
||||
#~ msgstr ""
|
||||
#~ "Výber inej obsluhy (ako napr. natbib) ktorá poskytuje podporu špecifických "
|
||||
#~ "bibliografických štýlov. Rozviňte keď chcete viac informácií."
|
||||
|
||||
#~ msgid "&Biblatex citation style:"
|
||||
#~ msgstr "Štýl &biblatex-citácie:"
|
||||
|
110
src/Changes.cpp
110
src/Changes.cpp
@ -145,8 +145,6 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
<< ", author: " << change.author
|
||||
<< ", time: " << long(change.changetime)
|
||||
<< ") in range (" << start << ", " << end << ")");
|
||||
if (!isChanged())
|
||||
is_update_required_ = true;
|
||||
}
|
||||
|
||||
Range const newRange(start, end);
|
||||
@ -215,16 +213,13 @@ void Changes::erase(pos_type const pos)
|
||||
{
|
||||
LYXERR(Debug::CHANGES, "Erasing change at position " << pos);
|
||||
|
||||
ChangeTable::iterator it = table_.begin();
|
||||
ChangeTable::iterator end = table_.end();
|
||||
|
||||
for (; it != end; ++it) {
|
||||
for (ChangeRange & cr : table_) {
|
||||
// range (pos,pos+x) becomes (pos,pos+x-1)
|
||||
if (it->range.start > pos)
|
||||
--(it->range.start);
|
||||
if (cr.range.start > pos)
|
||||
--(cr.range.start);
|
||||
// range (pos-x,pos) stays (pos-x,pos)
|
||||
if (it->range.end > pos)
|
||||
--(it->range.end);
|
||||
if (cr.range.end > pos)
|
||||
--(cr.range.end);
|
||||
}
|
||||
|
||||
merge();
|
||||
@ -238,17 +233,14 @@ void Changes::insert(Change const & change, lyx::pos_type pos)
|
||||
<< " at position " << pos);
|
||||
}
|
||||
|
||||
ChangeTable::iterator it = table_.begin();
|
||||
ChangeTable::iterator end = table_.end();
|
||||
|
||||
for (; it != end; ++it) {
|
||||
for (ChangeRange & cr : table_) {
|
||||
// range (pos,pos+x) becomes (pos+1,pos+x+1)
|
||||
if (it->range.start >= pos)
|
||||
++(it->range.start);
|
||||
if (cr.range.start >= pos)
|
||||
++(cr.range.start);
|
||||
|
||||
// range (pos-x,pos) stays as it is
|
||||
if (it->range.end > pos)
|
||||
++(it->range.end);
|
||||
if (cr.range.end > pos)
|
||||
++(cr.range.end);
|
||||
}
|
||||
|
||||
set(change, pos, pos + 1); // set will call merge
|
||||
@ -258,70 +250,52 @@ void Changes::insert(Change const & change, lyx::pos_type pos)
|
||||
Change const & Changes::lookup(pos_type const pos) const
|
||||
{
|
||||
static Change const noChange = Change(Change::UNCHANGED);
|
||||
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator const end = table_.end();
|
||||
|
||||
for (; it != end; ++it) {
|
||||
if (it->range.contains(pos))
|
||||
return it->change;
|
||||
}
|
||||
|
||||
for (ChangeRange const & cr : table_)
|
||||
if (cr.range.contains(pos))
|
||||
return cr.change;
|
||||
return noChange;
|
||||
}
|
||||
|
||||
|
||||
bool Changes::isDeleted(pos_type start, pos_type end) const
|
||||
{
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator const itend = table_.end();
|
||||
|
||||
for (; it != itend; ++it) {
|
||||
if (it->range.contains(Range(start, end))) {
|
||||
for (ChangeRange const & cr : table_)
|
||||
if (cr.range.contains(Range(start, end))) {
|
||||
LYXERR(Debug::CHANGES, "range ("
|
||||
<< start << ", " << end << ") fully contains ("
|
||||
<< it->range.start << ", " << it->range.end
|
||||
<< ") of type " << it->change.type);
|
||||
return it->change.type == Change::DELETED;
|
||||
<< cr.range.start << ", " << cr.range.end
|
||||
<< ") of type " << cr.change.type);
|
||||
return cr.change.type == Change::DELETED;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Changes::isChanged(pos_type const start, pos_type const end) const
|
||||
{
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator const itend = table_.end();
|
||||
|
||||
for (; it != itend; ++it) {
|
||||
if (it->range.intersects(Range(start, end))) {
|
||||
for (ChangeRange const & cr : table_)
|
||||
if (cr.range.intersects(Range(start, end))) {
|
||||
LYXERR(Debug::CHANGES, "found intersection of range ("
|
||||
<< start << ", " << end << ") with ("
|
||||
<< it->range.start << ", " << it->range.end
|
||||
<< ") of type " << it->change.type);
|
||||
<< cr.range.start << ", " << cr.range.end
|
||||
<< ") of type " << cr.change.type);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Changes::isChanged() const
|
||||
{
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator const itend = table_.end();
|
||||
for (; it != itend; ++it) {
|
||||
if (it->change.changed())
|
||||
for (ChangeRange const & cr : table_)
|
||||
if (cr.change.changed())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Changes::merge()
|
||||
{
|
||||
bool merged = false;
|
||||
ChangeTable::iterator it = table_.begin();
|
||||
|
||||
while (it != table_.end()) {
|
||||
@ -334,7 +308,6 @@ void Changes::merge()
|
||||
<< it->range.start);
|
||||
|
||||
table_.erase(it);
|
||||
merged = true;
|
||||
// start again
|
||||
it = table_.begin();
|
||||
continue;
|
||||
@ -353,7 +326,6 @@ void Changes::merge()
|
||||
(it + 1)->change.changetime = max(it->change.changetime,
|
||||
(it + 1)->change.changetime);
|
||||
table_.erase(it);
|
||||
merged = true;
|
||||
// start again
|
||||
it = table_.begin();
|
||||
continue;
|
||||
@ -361,8 +333,6 @@ void Changes::merge()
|
||||
|
||||
++it;
|
||||
}
|
||||
if (merged && !isChanged())
|
||||
is_update_required_ = true;
|
||||
}
|
||||
|
||||
|
||||
@ -498,29 +468,25 @@ void Changes::lyxMarkChange(ostream & os, BufferParams const & bparams, int & co
|
||||
|
||||
void Changes::checkAuthors(AuthorList const & authorList)
|
||||
{
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator endit = table_.end();
|
||||
for ( ; it != endit ; ++it)
|
||||
if (it->change.type != Change::UNCHANGED)
|
||||
authorList.get(it->change.author).setUsed(true);
|
||||
for (ChangeRange const & cr : table_)
|
||||
if (cr.change.type != Change::UNCHANGED)
|
||||
authorList.get(cr.change.author).setUsed(true);
|
||||
}
|
||||
|
||||
|
||||
void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer,
|
||||
bool output_active) const
|
||||
bool output_active, TocBackend & backend) const
|
||||
{
|
||||
if (table_.empty())
|
||||
return;
|
||||
|
||||
shared_ptr<Toc> change_list = buffer.tocBackend().toc("change");
|
||||
shared_ptr<Toc> change_list = backend.toc("change");
|
||||
AuthorList const & author_list = buffer.params().authors();
|
||||
DocIterator dit = cdit;
|
||||
|
||||
ChangeTable::const_iterator it = table_.begin();
|
||||
ChangeTable::const_iterator const itend = table_.end();
|
||||
for (; it != itend; ++it) {
|
||||
for (ChangeRange const & cr : table_) {
|
||||
docstring str;
|
||||
switch (it->change.type) {
|
||||
switch (cr.change.type) {
|
||||
case Change::UNCHANGED:
|
||||
continue;
|
||||
case Change::DELETED:
|
||||
@ -532,13 +498,13 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer,
|
||||
str.push_back(0x270d);
|
||||
break;
|
||||
}
|
||||
dit.pos() = it->range.start;
|
||||
dit.pos() = cr.range.start;
|
||||
Paragraph const & par = dit.paragraph();
|
||||
str += " " + par.asString(it->range.start, min(par.size(), it->range.end));
|
||||
if (it->range.end > par.size())
|
||||
str += " " + par.asString(cr.range.start, min(par.size(), cr.range.end));
|
||||
if (cr.range.end > par.size())
|
||||
// ¶ U+00B6 PILCROW SIGN
|
||||
str.push_back(0xb6);
|
||||
docstring const & author = author_list.get(it->change.author).name();
|
||||
docstring const & author = author_list.get(cr.change.author).name();
|
||||
Toc::iterator it = TocBackend::findItem(*change_list, 0, author);
|
||||
if (it == change_list->end()) {
|
||||
change_list->push_back(TocItem(dit, 0, author, true));
|
||||
@ -556,9 +522,9 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer,
|
||||
|
||||
void Changes::updateBuffer(Buffer const & buf)
|
||||
{
|
||||
is_update_required_ = false;
|
||||
if (!buf.areChangesPresent() && isChanged())
|
||||
buf.setChangesPresent(true);
|
||||
bool const changed = isChanged();
|
||||
buf.setChangesPresent(buf.areChangesPresent() || changed);
|
||||
previously_changed_ = changed;
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,10 +29,11 @@ namespace lyx {
|
||||
class AuthorList;
|
||||
class Buffer;
|
||||
class DocIterator;
|
||||
class FontInfo;
|
||||
class OutputParams;
|
||||
class otexstream;
|
||||
class PainterInfo;
|
||||
class FontInfo;
|
||||
class TocBackend;
|
||||
|
||||
|
||||
class Change {
|
||||
@ -94,7 +95,7 @@ class BufferParams;
|
||||
|
||||
class Changes {
|
||||
public:
|
||||
Changes() : is_update_required_(false) {}
|
||||
Changes() : previously_changed_(false) {}
|
||||
|
||||
/// set the pos to the given change
|
||||
void set(Change const & change, pos_type pos);
|
||||
@ -137,12 +138,12 @@ public:
|
||||
|
||||
///
|
||||
void addToToc(DocIterator const & cdit, Buffer const & buffer,
|
||||
bool output_active) const;
|
||||
bool output_active, TocBackend & backend) const;
|
||||
|
||||
///
|
||||
void updateBuffer(Buffer const & buf);
|
||||
///
|
||||
bool isUpdateRequired() const { return is_update_required_; }
|
||||
bool isUpdateRequired() const { return previously_changed_ != isChanged(); }
|
||||
|
||||
private:
|
||||
class Range {
|
||||
@ -187,9 +188,9 @@ private:
|
||||
/// table of changes, every row a change and range descriptor
|
||||
ChangeTable table_;
|
||||
|
||||
/// signals that the buffer's flag tracked_changes_present_ needs to be
|
||||
/// recalculated
|
||||
bool is_update_required_;
|
||||
/// cache previous value of isChanged to be able to tell whether the
|
||||
/// buffer's flag tracked_changes_present_ needs to be recomputed
|
||||
bool previously_changed_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -562,10 +562,10 @@ Paragraph::Private::Private(Private const & p, Paragraph * owner,
|
||||
}
|
||||
|
||||
|
||||
void Paragraph::addChangesToToc(DocIterator const & cdit,
|
||||
Buffer const & buf, bool output_active) const
|
||||
void Paragraph::addChangesToToc(DocIterator const & cdit, Buffer const & buf,
|
||||
bool output_active, TocBackend & backend) const
|
||||
{
|
||||
d->changes_.addToToc(cdit, buf, output_active);
|
||||
d->changes_.addToToc(cdit, buf, output_active, backend);
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,6 +47,7 @@ class MetricsInfo;
|
||||
class OutputParams;
|
||||
class PainterInfo;
|
||||
class ParagraphParameters;
|
||||
class TocBackend;
|
||||
class WordLangTuple;
|
||||
class XHTMLStream;
|
||||
class otexstream;
|
||||
@ -150,7 +151,7 @@ public:
|
||||
|
||||
///
|
||||
void addChangesToToc(DocIterator const & cdit, Buffer const & buf,
|
||||
bool output_active) const;
|
||||
bool output_active, TocBackend & backend) const;
|
||||
/// set the buffer flag if there are changes in the paragraph
|
||||
void addChangesToBuffer(Buffer const & buf) const;
|
||||
///
|
||||
|
@ -1416,18 +1416,6 @@ bool TextClass::readOutlinerName(Lexer & lexrc)
|
||||
}
|
||||
|
||||
|
||||
docstring TextClass::outlinerName(std::string const & type) const
|
||||
{
|
||||
std::map<std::string,docstring>::const_iterator const it
|
||||
= outliner_names_.find(type);
|
||||
if (it == outliner_names_.end()) {
|
||||
LYXERR0("Missing OutlinerName for " << type << "!");
|
||||
return translateIfPossible(from_utf8(type));
|
||||
} else
|
||||
return translateIfPossible(it->second);
|
||||
}
|
||||
|
||||
|
||||
string const & TextClass::prerequisites(string const & sep) const
|
||||
{
|
||||
if (contains(prerequisites_, ',')) {
|
||||
|
@ -205,8 +205,10 @@ public:
|
||||
OutputType outputType() const { return outputType_; }
|
||||
/// Can be latex, docbook ... (the name of a format)
|
||||
std::string outputFormat() const { return outputFormat_; }
|
||||
///
|
||||
docstring outlinerName(std::string const & type) const;
|
||||
/// Return the non-localised names for the toc types.
|
||||
std::map<std::string, docstring> const &
|
||||
outlinerNames() const { return outliner_names_; }
|
||||
|
||||
protected:
|
||||
/// Protect construction
|
||||
TextClass();
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "Buffer.h"
|
||||
#include "BufferParams.h"
|
||||
#include "IndicesList.h"
|
||||
#include "InsetList.h"
|
||||
#include "Paragraph.h"
|
||||
#include "TextClass.h"
|
||||
@ -213,9 +214,10 @@ void TocBackend::update(bool output_active, UpdateType utype)
|
||||
it->second->clear();
|
||||
tocs_.clear();
|
||||
builders_.clear();
|
||||
resetOutlinerNames();
|
||||
if (!buffer_->isInternal()) {
|
||||
DocIterator dit;
|
||||
buffer_->inset().addToToc(dit, output_active, utype);
|
||||
buffer_->inset().addToToc(dit, output_active, utype, *this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,8 +251,56 @@ void TocBackend::writePlaintextTocList(string const & type,
|
||||
|
||||
docstring TocBackend::outlinerName(string const & type) const
|
||||
{
|
||||
return translateIfPossible(
|
||||
buffer_->params().documentClass().outlinerName(type));
|
||||
map<string, docstring>::const_iterator const it
|
||||
= outliner_names_.find(type);
|
||||
if (it != outliner_names_.end())
|
||||
return it->second;
|
||||
|
||||
// Legacy treatment of index:... type
|
||||
if (support::prefixIs(type, "index:")) {
|
||||
string const itype = support::split(type, ':');
|
||||
IndicesList const & indiceslist = buffer_->params().indiceslist();
|
||||
Index const * index = indiceslist.findShortcut(from_utf8(itype));
|
||||
docstring indextype = _("unknown type!");
|
||||
if (index)
|
||||
indextype = index->index();
|
||||
return support::bformat(_("Index Entries (%1$s)"), indextype);
|
||||
}
|
||||
|
||||
LYXERR0("Missing OutlinerName for " << type << "!");
|
||||
return from_utf8(type);
|
||||
}
|
||||
|
||||
|
||||
void TocBackend::resetOutlinerNames()
|
||||
{
|
||||
outliner_names_.clear();
|
||||
// names from this document class
|
||||
for (pair<string, docstring> const & name
|
||||
: buffer_->params().documentClass().outlinerNames())
|
||||
addName(name.first, translateIfPossible(name.second));
|
||||
// Hardcoded types
|
||||
addName("tableofcontents", _("Table of Contents"));
|
||||
addName("change", _("Changes"));
|
||||
addName("senseless", _("Senseless"));
|
||||
addName("citation", _("Citations"));
|
||||
addName("label", _("Labels and References"));
|
||||
// Customizable, but the corresponding insets have no layout definition
|
||||
addName("child", _("Child Documents"));
|
||||
addName("graphics", _("Graphics"));
|
||||
addName("equation", _("Equations"));
|
||||
addName("external", _("External Material"));
|
||||
addName("math-macro", _("Math Macros"));
|
||||
addName("nomencl", _("Nomenclature Entries"));
|
||||
}
|
||||
|
||||
|
||||
void TocBackend::addName(string const & type, docstring const & name)
|
||||
{
|
||||
if (name.empty())
|
||||
return;
|
||||
// only inserts if the key does not exist
|
||||
outliner_names_.insert({type, name});
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,17 +133,23 @@ public:
|
||||
///
|
||||
void writePlaintextTocList(std::string const & type,
|
||||
odocstringstream & os, size_t max_length) const;
|
||||
///
|
||||
/// Localised name for type
|
||||
docstring outlinerName(std::string const & type) const;
|
||||
/// Add a new (localised) name if yet unknown
|
||||
void addName(std::string const & type, docstring const & name);
|
||||
/// Whether a toc type is less important and appears in the "Other lists"
|
||||
/// submenu
|
||||
static bool isOther(std::string const & type);
|
||||
|
||||
private:
|
||||
///
|
||||
void resetOutlinerNames();
|
||||
///
|
||||
TocList tocs_;
|
||||
///
|
||||
std::map<std::string, unique_ptr<TocBuilder>> builders_;
|
||||
/// Stores localised outliner names from this buffer and its children
|
||||
std::map<std::string, docstring> outliner_names_;
|
||||
///
|
||||
Buffer const * buffer_;
|
||||
}; // TocBackend
|
||||
|
@ -1311,19 +1311,20 @@ void MenuDefinition::expandToc(Buffer const * buf)
|
||||
}
|
||||
|
||||
MenuDefinition other_lists;
|
||||
TocList const & toc_list = buf->tocBackend().tocs();
|
||||
TocList::const_iterator cit = toc_list.begin();
|
||||
TocList::const_iterator end = toc_list.end();
|
||||
for (; cit != end; ++cit) {
|
||||
// In the navigation menu, only add tocs from this document
|
||||
TocBackend const & backend = buf->tocBackend();
|
||||
TocList const & toc_list = backend.tocs();
|
||||
for (pair<string, shared_ptr<Toc>> const & toc : toc_list) {
|
||||
// Handle table of contents later
|
||||
if (cit->first == "tableofcontents" || cit->second->empty())
|
||||
if (toc.first == "tableofcontents" || toc.second->empty())
|
||||
continue;
|
||||
MenuDefinition submenu;
|
||||
submenu.expandTocSubmenu(cit->first, *cit->second);
|
||||
MenuItem item(MenuItem::Submenu, guiName(cit->first, buf->params()));
|
||||
submenu.expandTocSubmenu(toc.first, *toc.second);
|
||||
docstring const toc_name = backend.outlinerName(toc.first);
|
||||
MenuItem item(MenuItem::Submenu, toqstr(toc_name));
|
||||
item.setSubmenu(submenu);
|
||||
// deserves to be in the main menu?
|
||||
if (!TocBackend::isOther(cit->first))
|
||||
if (!TocBackend::isOther(toc.first))
|
||||
add(item);
|
||||
else
|
||||
other_lists.add(item);
|
||||
@ -1335,8 +1336,8 @@ void MenuDefinition::expandToc(Buffer const * buf)
|
||||
}
|
||||
// Handle normal TOC
|
||||
add(MenuItem(MenuItem::Separator));
|
||||
cit = toc_list.find("tableofcontents");
|
||||
if (cit == end)
|
||||
TocList::const_iterator cit = toc_list.find("tableofcontents");
|
||||
if (cit == toc_list.end())
|
||||
LYXERR(Debug::GUI, "No table of contents.");
|
||||
else {
|
||||
if (!cit->second->empty())
|
||||
@ -1703,7 +1704,7 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
{
|
||||
if (!bv)
|
||||
return;
|
||||
|
||||
|
||||
if (!bv->cursor().inTexted())
|
||||
return;
|
||||
|
||||
@ -1719,7 +1720,7 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
|
||||
map<string, docstring> styles = quoteparams.getTypes();
|
||||
string const qtype = qinset->getType();
|
||||
|
||||
|
||||
map<string, docstring>::const_iterator qq = styles.begin();
|
||||
map<string, docstring>::const_iterator end = styles.end();
|
||||
|
||||
@ -1768,7 +1769,7 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
docstring const style = from_ascii(qq->first);
|
||||
bool langdef = (style[0] == langqs);
|
||||
bool globaldef = (style[0] == globalqsc);
|
||||
|
||||
|
||||
if (prefixIs(style, qtype[0])) {
|
||||
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, subcmd + style);
|
||||
docstring const desc = quoteparams.getShortGuiLabel(style);
|
||||
@ -1786,7 +1787,6 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
|
||||
add(MenuItem(MenuItem::Separator));
|
||||
|
||||
bool have_section = false;
|
||||
bool display_static = false;
|
||||
// ... then potentially items to reset to the defaults and to dynamic style ...
|
||||
if (!main_dynamic_qs && globalqsc != 'x') {
|
||||
@ -1794,7 +1794,6 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
docstring const desc = bformat(_("Use dynamic quotes (%1$s)|d"),
|
||||
quoteparams.getGuiLabel(globalqs));
|
||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||
have_section = true;
|
||||
display_static = true;
|
||||
}
|
||||
if (!main_global_qs && langdefqs != globalqs) {
|
||||
@ -1803,7 +1802,6 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
docstring const desc = bformat(_("Reset to document default (%1$s, %2$s)|o"),
|
||||
quoteparams.getGuiLabel(globalqs), variant);
|
||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||
have_section = true;
|
||||
}
|
||||
if (!main_langdef_qs) {
|
||||
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, subcmd + globalqsc + wildcards);
|
||||
@ -1813,11 +1811,9 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
: bformat(_("Reset to language default (%1$s)|l"),
|
||||
quoteparams.getGuiLabel(langdefqs));
|
||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||
have_section = true;
|
||||
}
|
||||
|
||||
if (have_section)
|
||||
add(MenuItem(MenuItem::Separator));
|
||||
add(MenuItem(MenuItem::Separator));
|
||||
|
||||
// ... and a subitem with the rest
|
||||
MenuItem item(MenuItem::Submenu, qt_("Change Style|y"));
|
||||
|
@ -351,20 +351,19 @@ void TocModels::reset(BufferView const * bv)
|
||||
names_->blockSignals(true);
|
||||
names_->beginResetModel();
|
||||
names_->insertColumns(0, 1);
|
||||
TocList const & tocs = bv->buffer().masterBuffer()->tocBackend().tocs();
|
||||
TocList::const_iterator it = tocs.begin();
|
||||
TocList::const_iterator toc_end = tocs.end();
|
||||
for (; it != toc_end; ++it) {
|
||||
QString const type = toqstr(it->first);
|
||||
// In the outliner, add Tocs from the master document
|
||||
TocBackend const & backend = bv->buffer().masterBuffer()->tocBackend();
|
||||
for (pair<string, shared_ptr<Toc>> const & toc : backend.tocs()) {
|
||||
QString const type = toqstr(toc.first);
|
||||
|
||||
// First, fill in the toc models.
|
||||
iterator mod_it = models_.find(type);
|
||||
if (mod_it == models_.end())
|
||||
mod_it = models_.insert(type, new TocModel(this));
|
||||
mod_it.value()->reset(it->second);
|
||||
mod_it.value()->reset(toc.second);
|
||||
|
||||
// Fill in the names_ model.
|
||||
QString const gui_name = guiName(it->first, bv->buffer().params());
|
||||
QString const gui_name = toqstr(backend.outlinerName(toc.first));
|
||||
int const current_row = names_->rowCount();
|
||||
names_->insertRows(current_row, 1);
|
||||
QModelIndex const index = names_->index(current_row, 0);
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "BufferParams.h"
|
||||
#include "FloatList.h"
|
||||
#include "IndicesList.h"
|
||||
#include "Language.h"
|
||||
#include "Length.h"
|
||||
#include "TextClass.h"
|
||||
@ -596,47 +595,6 @@ QStringList fileFilters(QString const & desc)
|
||||
}
|
||||
|
||||
|
||||
QString guiName(string const & type, BufferParams const & bp)
|
||||
{
|
||||
// Hardcoded types
|
||||
if (type == "tableofcontents")
|
||||
return qt_("Table of Contents");
|
||||
if (type == "change")
|
||||
return qt_("Changes");
|
||||
if (type == "senseless")
|
||||
return qt_("Senseless");
|
||||
if (type == "citation")
|
||||
return qt_("Citations");
|
||||
if (type == "label")
|
||||
return qt_("Labels and References");
|
||||
// Customizable, but the corresponding insets have no layout definition
|
||||
if (type == "child")
|
||||
return qt_("Child Documents");
|
||||
if (type == "graphics")
|
||||
return qt_("Graphics");
|
||||
if (type == "equation")
|
||||
return qt_("Equations");
|
||||
if (type == "external")
|
||||
return qt_("External material");
|
||||
if (type == "math-macro")
|
||||
return qt_("Math macros");
|
||||
if (type == "nomencl")
|
||||
return qt_("Nomenclature Entries");
|
||||
|
||||
if (prefixIs(type, "index:")) {
|
||||
string const itype = split(type, ':');
|
||||
IndicesList const & indiceslist = bp.indiceslist();
|
||||
Index const * index = indiceslist.findShortcut(from_utf8(itype));
|
||||
docstring indextype = _("unknown type!");
|
||||
if (index)
|
||||
indextype = index->index();
|
||||
return toqstr(bformat(_("Index Entries (%1$s)"), indextype));
|
||||
}
|
||||
|
||||
return toqstr(bp.documentClass().outlinerName(type));
|
||||
}
|
||||
|
||||
|
||||
QString formatToolTip(QString text, int em)
|
||||
{
|
||||
// 1. QTooltip activates word wrapping only if mightBeRichText()
|
||||
|
@ -191,10 +191,6 @@ QString getExtension(QString const & name);
|
||||
QString makeAbsPath(QString const & relpath, QString const & base);
|
||||
QString changeExtension(QString const & oldname, QString const & ext);
|
||||
|
||||
/// \return the display string associated with given type and buffer
|
||||
/// parameter.
|
||||
QString guiName(std::string const & type, BufferParams const & bp);
|
||||
|
||||
/// Format \param text for display as a ToolTip, breaking at lines of \param
|
||||
/// width ems. Note: this function is expensive. Better call it in a delayed
|
||||
/// manner, i.e. not to fill in a model (see for instance the function
|
||||
|
@ -57,6 +57,7 @@ class PainterInfo;
|
||||
class ParConstIterator;
|
||||
class ParIterator;
|
||||
class Text;
|
||||
class TocBackend;
|
||||
class TocList;
|
||||
class XHTMLStream;
|
||||
class otexstream;
|
||||
@ -512,9 +513,12 @@ public:
|
||||
///
|
||||
/// \param utype : is the toc being generated for use by the output
|
||||
/// routines?
|
||||
///
|
||||
/// \param tocbackend : where to add the toc information.
|
||||
virtual void addToToc(DocIterator const & /* di */,
|
||||
bool /* output_active */,
|
||||
UpdateType /* utype*/) const {}
|
||||
UpdateType /* utype*/,
|
||||
TocBackend & /* tocbackend */) const {}
|
||||
/// Collect BibTeX information
|
||||
virtual void collectBibKeys(InsetIterator const &) const {}
|
||||
/// Update the counters of this inset and of its contents.
|
||||
|
@ -317,17 +317,16 @@ void InsetArgument::latexArgument(otexstream & os,
|
||||
}
|
||||
|
||||
|
||||
|
||||
void InsetArgument::addToToc(DocIterator const & dit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
if (!caption_of_toc_.empty()) {
|
||||
docstring str;
|
||||
text().forOutliner(str, TOC_ENTRY_LENGTH);
|
||||
buffer().tocBackend().builder(caption_of_toc_).argumentItem(str);
|
||||
backend.builder(caption_of_toc_).argumentItem(str);
|
||||
}
|
||||
// Proceed with the rest of the inset.
|
||||
InsetText::addToToc(dit, output_active, utype);
|
||||
InsetText::addToToc(dit, output_active, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
//@}
|
||||
///
|
||||
void addToToc(DocIterator const & dit, bool output_active,
|
||||
UpdateType utype) const; //override
|
||||
UpdateType utype, TocBackend & backend) const; //override
|
||||
|
||||
private:
|
||||
///
|
||||
|
@ -94,7 +94,7 @@ void InsetCaption::setCustomLabel(docstring const & label)
|
||||
|
||||
|
||||
void InsetCaption::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
string const & type = floattype_.empty() ? "senseless" : floattype_;
|
||||
DocIterator pit = cpit;
|
||||
@ -109,9 +109,9 @@ void InsetCaption::addToToc(DocIterator const & cpit, bool output_active,
|
||||
str = full_label_;
|
||||
text().forOutliner(str, length);
|
||||
}
|
||||
buffer().tocBackend().builder(type).captionItem(pit, str, output_active);
|
||||
backend.builder(type).captionItem(pit, str, output_active);
|
||||
// Proceed with the rest of the inset.
|
||||
InsetText::addToToc(cpit, output_active, utype);
|
||||
InsetText::addToToc(cpit, output_active, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,8 @@ private:
|
||||
///
|
||||
void setCustomLabel(docstring const & label);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active, UpdateType utype) const;
|
||||
void addToToc(DocIterator const & di, bool output_active, UpdateType utype,
|
||||
TocBackend & backend) const;
|
||||
///
|
||||
virtual bool forcePlainLayout(idx_type = 0) const { return true; }
|
||||
/// Captions don't accept alignment, spacing, etc.
|
||||
|
@ -97,7 +97,7 @@ docstring InsetCaptionable::getCaptionHTML(OutputParams const & runparams) const
|
||||
|
||||
|
||||
void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
DocIterator pit = cpit;
|
||||
pit.push_back(CursorSlice(const_cast<InsetCaptionable &>(*this)));
|
||||
@ -107,10 +107,10 @@ void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active,
|
||||
// non-empty.
|
||||
if (utype != OutputUpdate)
|
||||
text().forOutliner(str, TOC_ENTRY_LENGTH);
|
||||
TocBuilder & b = buffer().tocBackend().builder(caption_type_);
|
||||
TocBuilder & b = backend.builder(caption_type_);
|
||||
b.pushItem(pit, str, output_active);
|
||||
// Proceed with the rest of the inset.
|
||||
InsetCollapsable::addToToc(cpit, output_active, utype);
|
||||
InsetCollapsable::addToToc(cpit, output_active, utype, backend);
|
||||
b.pop();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual bool hasSubCaptions(ParIterator const &) const { return false; }
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
/// Update the counters of this inset and of its contents
|
||||
void updateBuffer(ParIterator const &, UpdateType);
|
||||
///
|
||||
|
@ -420,7 +420,7 @@ void InsetCitation::updateBuffer(ParIterator const &, UpdateType)
|
||||
|
||||
|
||||
void InsetCitation::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
// NOTE
|
||||
// BiblioInfo::collectCitedEntries() uses the TOC to collect the citations
|
||||
@ -428,7 +428,7 @@ void InsetCitation::addToToc(DocIterator const & cpit, bool output_active,
|
||||
// by both XHTML and plaintext output. So, if we change what goes into the TOC,
|
||||
// then we will also need to change that routine.
|
||||
docstring const tocitem = getParam("key");
|
||||
TocBuilder & b = buffer().tocBackend().builder("citation");
|
||||
TocBuilder & b = backend.builder("citation");
|
||||
b.pushItem(cpit, tocitem, output_active);
|
||||
b.pop();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
void updateBuffer(ParIterator const & it, UpdateType);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
std::string contextMenuName() const;
|
||||
//@}
|
||||
|
@ -662,19 +662,19 @@ bool InsetCollapsable::canPaintChange(BufferView const & bv) const
|
||||
|
||||
|
||||
void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
bool doing_output = output_active && producesOutput();
|
||||
InsetLayout const & layout = getLayout();
|
||||
if (layout.addToToc()) {
|
||||
TocBuilder & b = buffer().tocBackend().builder(layout.tocType());
|
||||
TocBuilder & b = backend.builder(layout.tocType());
|
||||
// Cursor inside the inset
|
||||
DocIterator pit = cpit;
|
||||
pit.push_back(CursorSlice(const_cast<InsetCollapsable &>(*this)));
|
||||
docstring const label = getLabel();
|
||||
b.pushItem(pit, label + (label.empty() ? "" : ": "), output_active);
|
||||
// Proceed with the rest of the inset.
|
||||
InsetText::addToToc(cpit, doing_output, utype);
|
||||
InsetText::addToToc(cpit, doing_output, utype, backend);
|
||||
if (layout.isTocCaption()) {
|
||||
docstring str;
|
||||
text().forOutliner(str, TOC_ENTRY_LENGTH);
|
||||
@ -682,7 +682,7 @@ void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active,
|
||||
}
|
||||
b.pop();
|
||||
} else
|
||||
InsetText::addToToc(cpit, doing_output, utype);
|
||||
InsetText::addToToc(cpit, doing_output, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
std::string contextMenuName() const;
|
||||
///
|
||||
void addToToc(DocIterator const & dit, bool output_active,
|
||||
UpdateType utype) const; //override
|
||||
UpdateType utype, TocBackend & backend) const; //override
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -504,10 +504,10 @@ bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
|
||||
void InsetExternal::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
docstring str = screenLabel(params_, buffer());
|
||||
TocBuilder & b = buffer().tocBackend().builder("external");
|
||||
TocBuilder & b = backend.builder("external");
|
||||
b.pushItem(cpit, str, output_active);
|
||||
b.pop();
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
bool clickable(BufferView const &, int, int) const { return true; }
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
private:
|
||||
///
|
||||
InsetExternal(InsetExternal const &);
|
||||
|
@ -1036,11 +1036,11 @@ void InsetGraphics::editGraphics(InsetGraphicsParams const & p) const
|
||||
|
||||
|
||||
void InsetGraphics::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
//FIXME UNICODE
|
||||
docstring const str = from_utf8(params_.filename.onlyFileName());
|
||||
TocBuilder & b = buffer().tocBackend().builder("graphics");
|
||||
TocBuilder & b = backend.builder("graphics");
|
||||
b.pushItem(cpit, str, output_active);
|
||||
b.pop();
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ private:
|
||||
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
std::string contextMenuName() const;
|
||||
/// Force inset into LTR environment if surroundings are RTL
|
||||
|
@ -1141,12 +1141,12 @@ void InsetInclude::addPreview(DocIterator const & /*inset_pos*/,
|
||||
|
||||
|
||||
void InsetInclude::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
if (isListings(params())) {
|
||||
if (label_)
|
||||
label_->addToToc(cpit, output_active, utype);
|
||||
TocBuilder & b = buffer().tocBackend().builder("listing");
|
||||
label_->addToToc(cpit, output_active, utype, backend);
|
||||
TocBuilder & b = backend.builder("listing");
|
||||
b.pushItem(cpit, screenLabel(), output_active);
|
||||
InsetListingsParams p(to_utf8(params()["lstparams"]));
|
||||
b.argumentItem(from_utf8(p.getParamValue("caption")));
|
||||
@ -1154,7 +1154,7 @@ void InsetInclude::addToToc(DocIterator const & cpit, bool output_active,
|
||||
} else {
|
||||
Buffer const * const childbuffer = getChildBuffer();
|
||||
|
||||
TocBuilder & b = buffer().tocBackend().builder("child");
|
||||
TocBuilder & b = backend.builder("child");
|
||||
docstring str = childbuffer ? childbuffer->fileName().displayName()
|
||||
: from_ascii("?");
|
||||
b.pushItem(cpit, str, output_active);
|
||||
@ -1164,13 +1164,13 @@ void InsetInclude::addToToc(DocIterator const & cpit, bool output_active,
|
||||
return;
|
||||
|
||||
// Include Tocs from children
|
||||
childbuffer->tocBackend().update(output_active, utype);
|
||||
for(auto const & pair : childbuffer->tocBackend().tocs()) {
|
||||
string const & type = pair.first;
|
||||
shared_ptr<Toc> child_toc = pair.second;
|
||||
shared_ptr<Toc> toc = buffer().tocBackend().toc(type);
|
||||
toc->insert(toc->end(), child_toc->begin(), child_toc->end());
|
||||
}
|
||||
childbuffer->inset().addToToc(cpit, output_active, utype, backend);
|
||||
//Copy missing outliner names (though the user has been warned against
|
||||
//having different document class and module selection between master
|
||||
//and child).
|
||||
for (pair<string, docstring> const & name
|
||||
: childbuffer->params().documentClass().outlinerNames())
|
||||
backend.addName(name.first, translateIfPossible(name.second));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
void addPreview(DocIterator const &, graphics::PreviewLoader &) const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
void updateBuffer(ParIterator const &, UpdateType);
|
||||
///
|
||||
|
@ -351,7 +351,7 @@ void InsetIndex::string2params(string const & in, InsetIndexParams & params)
|
||||
|
||||
|
||||
void InsetIndex::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
DocIterator pit = cpit;
|
||||
pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
|
||||
@ -361,10 +361,10 @@ void InsetIndex::addToToc(DocIterator const & cpit, bool output_active,
|
||||
type += ":" + to_utf8(params_.index);
|
||||
// this is unlikely to be terribly long
|
||||
text().forOutliner(str, INT_MAX);
|
||||
TocBuilder & b = buffer().tocBackend().builder(type);
|
||||
TocBuilder & b = backend.builder(type);
|
||||
b.pushItem(pit, str, output_active);
|
||||
// Proceed with the rest of the inset.
|
||||
InsetCollapsable::addToToc(cpit, output_active, utype);
|
||||
InsetCollapsable::addToToc(cpit, output_active, utype, backend);
|
||||
b.pop();
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ private:
|
||||
bool neverIndent() const { return true; }
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
docstring toolTip(BufferView const & bv, int x, int y) const;
|
||||
///
|
||||
|
@ -170,10 +170,10 @@ void InsetLabel::updateBuffer(ParIterator const & par, UpdateType utype)
|
||||
|
||||
|
||||
void InsetLabel::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
docstring const & label = getParam("name");
|
||||
shared_ptr<Toc> toc = buffer().tocBackend().toc("label");
|
||||
shared_ptr<Toc> toc = backend.toc("label");
|
||||
if (buffer().insetLabel(label) != this) {
|
||||
toc->push_back(TocItem(cpit, 0, screen_label_, output_active));
|
||||
} else {
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
void updateBuffer(ParIterator const & it, UpdateType);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
/// Is the content of this inset part of the immediate (visible) text sequence?
|
||||
bool isPartOfTextSequence() const { return false; }
|
||||
//@}
|
||||
|
@ -138,10 +138,10 @@ void InsetNomencl::validate(LaTeXFeatures & features) const
|
||||
|
||||
|
||||
void InsetNomencl::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
docstring const str = getParam("symbol");
|
||||
TocBuilder & b = buffer().tocBackend().builder("nomencl");
|
||||
TocBuilder & b = backend.builder("nomencl");
|
||||
b.pushItem(cpit, str, output_active);
|
||||
b.pop();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
InsetCode lyxCode() const { return NOMENCL_CODE; }
|
||||
///
|
||||
|
@ -356,7 +356,7 @@ void InsetRef::updateBuffer(ParIterator const & it, UpdateType)
|
||||
|
||||
|
||||
void InsetRef::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
docstring const & label = getParam("reference");
|
||||
if (buffer().insetLabel(label))
|
||||
@ -365,7 +365,7 @@ void InsetRef::addToToc(DocIterator const & cpit, bool output_active,
|
||||
|
||||
// It seems that this reference does not point to any valid label.
|
||||
screen_label_ = _("BROKEN: ") + screen_label_;
|
||||
shared_ptr<Toc> toc = buffer().tocBackend().toc("label");
|
||||
shared_ptr<Toc> toc = backend.toc("label");
|
||||
toc->push_back(TocItem(cpit, 0, screen_label_, output_active));
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
void updateBuffer(ParIterator const & it, UpdateType);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
bool forceLTR() const { return true; }
|
||||
//@}
|
||||
|
@ -3510,9 +3510,9 @@ docstring InsetTableCell::asString(bool intoInsets)
|
||||
|
||||
|
||||
void InsetTableCell::addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
InsetText::iterateForToc(di, output_active, utype);
|
||||
InsetText::iterateForToc(di, output_active, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
@ -3981,13 +3981,13 @@ void InsetTabular::updateBuffer(ParIterator const & it, UpdateType utype)
|
||||
|
||||
|
||||
void InsetTabular::addToToc(DocIterator const & cpit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
DocIterator dit = cpit;
|
||||
dit.forwardPos();
|
||||
size_t const end = dit.nargs();
|
||||
for ( ; dit.idx() < end; dit.top().forwardIdx())
|
||||
cell(dit.idx())->addToToc(dit, output_active, utype);
|
||||
cell(dit.idx())->addToToc(dit, output_active, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
private:
|
||||
/// unimplemented
|
||||
InsetTableCell();
|
||||
@ -959,7 +959,7 @@ public:
|
||||
void updateBuffer(ParIterator const &, UpdateType);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
|
||||
///
|
||||
bool completionSupported(Cursor const &) const;
|
||||
|
@ -830,20 +830,20 @@ void InsetText::forOutliner(docstring & os, size_t const maxlen,
|
||||
|
||||
|
||||
void InsetText::addToToc(DocIterator const & cdit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
DocIterator dit = cdit;
|
||||
dit.push_back(CursorSlice(const_cast<InsetText &>(*this)));
|
||||
iterateForToc(dit, output_active, utype);
|
||||
iterateForToc(dit, output_active, utype, backend);
|
||||
}
|
||||
|
||||
|
||||
void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
DocIterator dit = cdit;
|
||||
// This also ensures that any document has a table of contents
|
||||
shared_ptr<Toc> toc = buffer().tocBackend().toc("tableofcontents");
|
||||
shared_ptr<Toc> toc = backend.toc("tableofcontents");
|
||||
|
||||
BufferParams const & bufparams = buffer_->params();
|
||||
int const min_toclevel = bufparams.documentClass().min_toclevel();
|
||||
@ -870,7 +870,8 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
|
||||
// Custom AddToToc in paragraph layouts (i.e. theorems)
|
||||
if (par.layout().addToToc() && text().isFirstInSequence(pit)) {
|
||||
pit_type end = openAddToTocForParagraph(pit, dit, output_active);
|
||||
pit_type end =
|
||||
openAddToTocForParagraph(pit, dit, output_active, backend);
|
||||
addtotoc_stack.push({pit, end});
|
||||
}
|
||||
|
||||
@ -882,7 +883,7 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
Inset & inset = *it->inset;
|
||||
dit.pos() = it->pos;
|
||||
//lyxerr << (void*)&inset << " code: " << inset.lyxCode() << std::endl;
|
||||
inset.addToToc(dit, doing_output, utype);
|
||||
inset.addToToc(dit, doing_output, utype, backend);
|
||||
if (inset.lyxCode() == ARG_CODE)
|
||||
arginset = inset.asInsetText();
|
||||
}
|
||||
@ -891,7 +892,7 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
while (!addtotoc_stack.empty() && addtotoc_stack.top().second == pit) {
|
||||
// execute the closing function
|
||||
closeAddToTocForParagraph(addtotoc_stack.top().first,
|
||||
addtotoc_stack.top().second);
|
||||
addtotoc_stack.top().second, backend);
|
||||
addtotoc_stack.pop();
|
||||
}
|
||||
|
||||
@ -915,27 +916,29 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
}
|
||||
|
||||
// And now the list of changes.
|
||||
par.addChangesToToc(dit, buffer(), doing_output);
|
||||
par.addChangesToToc(dit, buffer(), doing_output, backend);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pit_type InsetText::openAddToTocForParagraph(pit_type pit,
|
||||
DocIterator const & dit,
|
||||
bool output_active) const
|
||||
bool output_active,
|
||||
TocBackend & backend) const
|
||||
{
|
||||
Paragraph const & par = paragraphs()[pit];
|
||||
TocBuilder & b = buffer().tocBackend().builder(par.layout().tocType());
|
||||
TocBuilder & b = backend.builder(par.layout().tocType());
|
||||
docstring const label = par.labelString();
|
||||
b.pushItem(dit, label + (label.empty() ? "" : " "), output_active);
|
||||
return text().lastInSequence(pit);
|
||||
}
|
||||
|
||||
|
||||
void InsetText::closeAddToTocForParagraph(pit_type start, pit_type end) const
|
||||
void InsetText::closeAddToTocForParagraph(pit_type start, pit_type end,
|
||||
TocBackend & backend) const
|
||||
{
|
||||
Paragraph const & par = paragraphs()[start];
|
||||
TocBuilder & b = buffer().tocBackend().builder(par.layout().tocType());
|
||||
TocBuilder & b = backend.builder(par.layout().tocType());
|
||||
if (par.layout().isTocCaption()) {
|
||||
docstring str;
|
||||
text().forOutliner(str, TOC_ENTRY_LENGTH, start, end);
|
||||
|
@ -25,6 +25,7 @@ class Dimension;
|
||||
class ParagraphList;
|
||||
class InsetCaption;
|
||||
class InsetTabular;
|
||||
class TocBuilder;
|
||||
|
||||
/**
|
||||
A text inset is like a TeX box to write full text
|
||||
@ -176,7 +177,7 @@ public:
|
||||
void forOutliner(docstring &, size_t const, bool const) const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
Inset * clone() const { return new InsetText(*this); }
|
||||
///
|
||||
@ -221,15 +222,17 @@ public:
|
||||
protected:
|
||||
///
|
||||
void iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
private:
|
||||
/// Open the toc item for paragraph pit. Returns the paragraph index where
|
||||
/// it should end.
|
||||
pit_type openAddToTocForParagraph(pit_type pit,
|
||||
DocIterator const & dit,
|
||||
bool output_active) const;
|
||||
bool output_active,
|
||||
TocBackend & backend) const;
|
||||
/// Close a toc item opened in start and closed in end
|
||||
void closeAddToTocForParagraph(pit_type start, pit_type end) const;
|
||||
void closeAddToTocForParagraph(pit_type start, pit_type end,
|
||||
TocBackend & backend) const;
|
||||
///
|
||||
bool drawFrame_;
|
||||
///
|
||||
|
@ -335,7 +335,7 @@ void InsetMathHull::updateBuffer(ParIterator const & it, UpdateType utype)
|
||||
|
||||
|
||||
void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
|
||||
UpdateType utype) const
|
||||
UpdateType utype, TocBackend & backend) const
|
||||
{
|
||||
if (!buffer_) {
|
||||
//FIXME: buffer_ should be set at creation for this inset! Problem is
|
||||
@ -344,7 +344,7 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
|
||||
return;
|
||||
}
|
||||
|
||||
TocBuilder & b = buffer().tocBackend().builder("equation");
|
||||
TocBuilder & b = backend.builder("equation");
|
||||
// compute first and last item
|
||||
row_type first = nrows();
|
||||
for (row_type row = 0; row != nrows(); ++row)
|
||||
@ -368,7 +368,7 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
|
||||
if (!numbered(row))
|
||||
continue;
|
||||
if (label_[row])
|
||||
label_[row]->addToToc(pit, output_active, utype);
|
||||
label_[row]->addToToc(pit, output_active, utype, backend);
|
||||
docstring label = nicelabel(row);
|
||||
if (first == last)
|
||||
// this is the only equation
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
void updateBuffer(ParIterator const &, UpdateType);
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
///
|
||||
InsetMathHull & operator=(InsetMathHull const &);
|
||||
///
|
||||
|
@ -367,6 +367,7 @@ Inset * InsetNameWrapper::clone() const
|
||||
|
||||
void InsetNameWrapper::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
Changer dummy = mi.base.changeFontSet("textit");
|
||||
InsetMathWrapper::metrics(mi, dim);
|
||||
dim.wid += mathed_string_width(mi.base.font, from_ascii("\\"));
|
||||
}
|
||||
@ -374,19 +375,17 @@ void InsetNameWrapper::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void InsetNameWrapper::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
// create fonts
|
||||
PainterInfo namepi = pi;
|
||||
if (parent_.validMacro())
|
||||
namepi.base.font.setColor(Color_latex);
|
||||
else
|
||||
namepi.base.font.setColor(Color_error);
|
||||
ColorCode const color = parent_.validMacro() ? Color_latex : Color_error;
|
||||
|
||||
Changer dummy = pi.base.changeFontSet("textit");
|
||||
Changer dummy2 = pi.base.font.changeColor(color);
|
||||
|
||||
// draw backslash
|
||||
pi.pain.text(x, y, from_ascii("\\"), namepi.base.font);
|
||||
x += mathed_string_width(namepi.base.font, from_ascii("\\"));
|
||||
pi.pain.text(x, y, from_ascii("\\"), pi.base.font);
|
||||
x += mathed_string_width(pi.base.font, from_ascii("\\"));
|
||||
|
||||
// draw name
|
||||
InsetMathWrapper::draw(namepi, x, y);
|
||||
InsetMathWrapper::draw(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
@ -1384,15 +1383,16 @@ string MathMacroTemplate::contextMenuName() const
|
||||
return "context-math-macro-definition";
|
||||
}
|
||||
|
||||
|
||||
void MathMacroTemplate::addToToc(DocIterator const & pit, bool output_active,
|
||||
UpdateType) const
|
||||
UpdateType, TocBackend & backend) const
|
||||
{
|
||||
docstring str;
|
||||
if (!validMacro())
|
||||
str = bformat(_("Invalid macro! \\%1$s"), name());
|
||||
else
|
||||
str = "\\" + name();
|
||||
TocBuilder & b = buffer().tocBackend().builder("math-macro");
|
||||
TocBuilder & b = backend.builder("math-macro");
|
||||
b.pushItem(pit, str, output_active);
|
||||
b.pop();
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
std::string contextMenuName() const;
|
||||
///
|
||||
void addToToc(DocIterator const & di, bool output_active,
|
||||
UpdateType utype) const;
|
||||
UpdateType utype, TocBackend & backend) const;
|
||||
protected:
|
||||
///
|
||||
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user