Associate "run:" link types with "Other"

This commit is contained in:
Juergen Spitzmueller 2022-12-26 13:19:52 +01:00
parent 7b5c410fbe
commit 0c56f60535
9 changed files with 1820 additions and 1466 deletions

View File

@ -34946,6 +34946,7 @@ As you see,
LatexCommand href
name "Formula-numbering.lyx"
target "run:Formula-numbering.lyx"
type "other"
literal "false"
\end_inset

View File

@ -34556,6 +34556,7 @@ Wie man sieht,
LatexCommand href
name "Formelnummerierung.lyx"
target "run:Formelnummerierung.lyx"
type "other"
literal "false"
\end_inset

View File

@ -31676,6 +31676,7 @@ run:
LatexCommand href
name "Firefox für Linux starten"
target "run:/usr/bin/firefox"
type "other"
literal "false"
\end_inset

View File

@ -32178,6 +32178,7 @@ Como ves,
LatexCommand href
name "Formula-numbering.lyx"
target "run:Formula-numbering.lyx"
type "other"
literal "false"
\end_inset

File diff suppressed because it is too large Load Diff

View File

@ -32011,6 +32011,7 @@ E=\textrm{アラビア数字}
LatexCommand href
name "Formula-numbering.lyx"
target "run:Formula-numbering.lyx"
type "other"
literal "false"
\end_inset

View File

@ -781,8 +781,8 @@ intertext
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Text-in-multiline"
nolink "false"
\end_inset
@ -2285,8 +2285,8 @@ unitfrac[целое-число]{числитель}{знаменатель}
объясняется в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Self-defined-Fractions"
nolink "false"
\end_inset
@ -2297,8 +2297,8 @@ reference "subsec:Self-defined-Fractions"
Формирование многострочных дробей объясняется в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Multiline-Fractions"
nolink "false"
\end_inset
@ -3316,16 +3316,16 @@ parallel
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Mathematical-Symbols"
nolink "false"
\end_inset
и
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Relations"
nolink "false"
\end_inset
@ -3413,8 +3413,8 @@ status collapsed
Верстка изотопов и химических символов описана в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Chemical-Symbols-and"
nolink "false"
\end_inset
@ -3824,8 +3824,8 @@ int
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Big-Operators"
nolink "false"
\end_inset
@ -3839,8 +3839,8 @@ reference "subsec:Big-Operators"
Пример использования приводится в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Multiline-Brackets"
nolink "false"
\end_inset
@ -4143,8 +4143,8 @@ rule[вертикальное-смещение]{длина}{толщина}
перечисленные в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "tab:Available-units"
nolink "false"
\end_inset
@ -4768,8 +4768,8 @@ hfill
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Variable-Space"
nolink "false"
\end_inset
@ -5142,8 +5142,8 @@ Alt+M
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Automatic-Bracket-Size"
nolink "false"
\end_inset
@ -5522,8 +5522,8 @@ arraycolsep
описанный в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Column-Separation"
nolink "false"
\end_inset
@ -7058,8 +7058,8 @@ middle
описанный в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Physical-Vectors"
nolink "false"
\end_inset
@ -7721,8 +7721,8 @@ _5
как описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Multiline-Formulas"
nolink "false"
\end_inset
@ -7745,8 +7745,8 @@ status collapsed
Пробельные команды описаны в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Predefined-Space"
nolink "false"
\end_inset
@ -7783,8 +7783,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Binary-Operators"
nolink "false"
\end_inset
@ -7824,8 +7824,8 @@ hphantom
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Placeholders"
nolink "false"
\end_inset
@ -7968,8 +7968,8 @@ pt,
Подробнее о разделении строк в формулах объясняется в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Line-Separation"
nolink "false"
\end_inset
@ -8760,8 +8760,8 @@ dasharrow
векторные стрелки приведенные в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Accents"
nolink "false"
\end_inset
@ -9946,16 +9946,16 @@ nwarrow
описанными в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Manual-Bracket-Size"
nolink "false"
\end_inset
и
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Automatic-Bracket-Size"
nolink "false"
\end_inset
@ -10019,8 +10019,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Accents-in-Text"
nolink "false"
\end_inset
@ -10056,8 +10056,8 @@ texorpdfstring используется для предотвращения по
texorpdfstring в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Formulas-in-Section"
nolink "false"
\end_inset
@ -11331,8 +11331,8 @@ LatexCommand ref
reference "subsec:Decoration-for-Operators"
plural "false"
caps "false"
nolink "false"
noprefix "false"
nolink "false"
\end_inset
@ -11871,8 +11871,8 @@ hspace{1em}
которые объясняются в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Variable-Space"
nolink "false"
\end_inset
@ -12341,8 +12341,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Line-Separation"
nolink "false"
\end_inset
@ -12378,8 +12378,8 @@ More about
texorpdfstring is in section
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Formulas-in-Section"
nolink "false"
\end_inset
@ -12676,8 +12676,8 @@ hfill
(стили формул объясняются в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -12711,8 +12711,8 @@ hrulefill
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Ellipses"
nolink "false"
\end_inset
@ -14358,8 +14358,8 @@ arg "dialog-show character"
Формула
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:red"
nolink "false"
\end_inset
@ -14370,8 +14370,8 @@ reference "eq:red"
Формула
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:redgreen"
nolink "false"
\end_inset
@ -15179,8 +15179,8 @@ tag
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:User-defined-Numbering"
nolink "false"
\end_inset
@ -15288,8 +15288,8 @@ hfill
стили формул в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -16116,8 +16116,8 @@ int
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Operator-Limits"
nolink "false"
\end_inset
@ -16154,8 +16154,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Styles"
nolink "false"
\end_inset
@ -16784,8 +16784,8 @@ subarray
Как в формуле
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:substack"
nolink "false"
\end_inset
@ -16861,8 +16861,8 @@ pt.
Применительно к формуле
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:substack"
nolink "false"
\end_inset
@ -17034,8 +17034,8 @@ adjustlimits
описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Self-defined-Operators"
nolink "false"
\end_inset
@ -18478,8 +18478,8 @@ DeclareMathOperator{новая-команда}{отображение}
как описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Operator-Limits"
nolink "false"
\end_inset
@ -18516,8 +18516,8 @@ Lozenge
состоящий из символа ромба из
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Miscellaneous-Symbols"
nolink "false"
\end_inset
@ -19531,8 +19531,8 @@ status collapsed
как описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Colored-Boxes"
nolink "false"
\end_inset
@ -21095,8 +21095,8 @@ omega
объясняется в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Upright-small-Greek"
nolink "false"
\end_inset
@ -21772,8 +21772,8 @@ More about
texorpdfstring is in section
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Formulas-in-Section"
nolink "false"
\end_inset
@ -23466,8 +23466,8 @@ diagdown
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Sizes"
nolink "false"
\end_inset
@ -26082,8 +26082,8 @@ DeclareMathOperator
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Self-defined-Operators"
nolink "false"
\end_inset
@ -26568,8 +26568,8 @@ x=B
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Operator-Limits"
nolink "false"
\end_inset
@ -28012,8 +28012,8 @@ v
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Accents-for-one"
nolink "false"
\end_inset
@ -28188,8 +28188,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Sizes"
nolink "false"
\end_inset
@ -28214,8 +28214,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Boxes-without-Frame"
nolink "false"
\end_inset
@ -28415,8 +28415,8 @@ flalign
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Flalign-Environment"
nolink "false"
\end_inset
@ -28468,8 +28468,8 @@ align
которое описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Standard-align-Environment"
nolink "false"
\end_inset
@ -28487,8 +28487,8 @@ eqnarray
описанное в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Eqnarray-Environment"
nolink "false"
\end_inset
@ -29089,8 +29089,8 @@ hspace
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Variable-Space"
nolink "false"
\end_inset
@ -29238,16 +29238,16 @@ literal "false"
описанными в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Multline-Environment"
nolink "false"
\end_inset
и
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Multiline-Formula-Parts"
nolink "false"
\end_inset
@ -29478,8 +29478,8 @@ left.
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Automatic-Bracket-Size"
nolink "false"
\end_inset
@ -29724,8 +29724,8 @@ hfill
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Variable-Space"
nolink "false"
\end_inset
@ -29751,8 +29751,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -29801,8 +29801,8 @@ alignat
как описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Space"
nolink "false"
\end_inset
@ -29908,8 +29908,8 @@ flalign
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:VolInt"
nolink "false"
\end_inset
@ -30058,8 +30058,8 @@ gather
Пример формулы
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:lefteqn"
nolink "false"
\end_inset
@ -30105,8 +30105,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -30408,8 +30408,8 @@ aligned
формула
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:shortlong"
nolink "false"
\end_inset
@ -30838,8 +30838,8 @@ arg "math-number-line-toggle"
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -30961,16 +30961,16 @@ status open
Формулы
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:tag"
nolink "false"
\end_inset
и
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:c"
nolink "false"
\end_inset
@ -30978,16 +30978,16 @@ reference "eq:c"
В (
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "eq:Lat"
nolink "false"
\end_inset
) большие латинские буквы используются для нумерации в отличие от (
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "eq:Rom"
nolink "false"
\end_inset
@ -31016,8 +31016,8 @@ tag
описана в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:User-defined-Numbering"
nolink "false"
\end_inset
@ -31032,8 +31032,8 @@ reference "subsec:User-defined-Numbering"
похожий на
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Paragraph-Boxes"
nolink "false"
\end_inset
@ -31148,8 +31148,8 @@ C=A+B\label{eq:c}
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:b"
nolink "false"
\end_inset
@ -31157,8 +31157,8 @@ reference "eq:b"
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:c"
nolink "false"
\end_inset
@ -31177,8 +31177,8 @@ LatexCommand eqref
reference "eq:Here-is-an"
plural "false"
caps "false"
nolink "false"
noprefix "false"
nolink "false"
\end_inset
@ -31204,8 +31204,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -31277,8 +31277,8 @@ roman{equation}
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Numbering-with-Roman"
nolink "false"
\end_inset
@ -31451,8 +31451,8 @@ newcommand
которая описана в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:The-Command-newcommand"
nolink "false"
\end_inset
@ -31803,6 +31803,7 @@ E=\textrm{Arabic}
LatexCommand href
name "Formula-numbering.lyx"
target "run:Formula-numbering.lyx"
type "other"
literal "false"
\end_inset
@ -32682,8 +32683,8 @@ status collapsed
в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Styles"
nolink "false"
\end_inset
@ -33164,8 +33165,8 @@ ce
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:chem-reaction"
nolink "false"
\end_inset
@ -33209,8 +33210,8 @@ Na2SO4
как описано в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Multiline-Formulas"
nolink "false"
\end_inset
@ -33225,16 +33226,16 @@ ce
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:TEOS-reaction-1"
nolink "false"
\end_inset
и
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:TEOS-reaction-2"
nolink "false"
\end_inset
@ -33699,8 +33700,8 @@ xymatrix
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Matrices"
nolink "false"
\end_inset
@ -33770,8 +33771,8 @@ Diagram
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Matrices"
nolink "false"
\end_inset
@ -34136,8 +34137,8 @@ framebox
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Boxes-with-Frame"
nolink "false"
\end_inset
@ -34896,8 +34897,8 @@ newcommand
Пример из
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:The-Command-newcommand"
nolink "false"
\end_inset
@ -35934,8 +35935,8 @@ middle
которая описана в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Automatic-Bracket-Size"
nolink "false"
\end_inset
@ -36254,8 +36255,8 @@ tbinom
из
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Fractions"
nolink "false"
\end_inset
@ -37042,8 +37043,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Bold-Formulas"
nolink "false"
\end_inset
@ -37199,8 +37200,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -37358,8 +37359,8 @@ status collapsed
как в
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:within"
nolink "false"
\end_inset
@ -37385,8 +37386,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Matrices"
nolink "false"
\end_inset
@ -37414,8 +37415,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Sizes"
nolink "false"
\end_inset
@ -37441,8 +37442,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "sec:Formula-Styles"
nolink "false"
\end_inset
@ -37478,8 +37479,8 @@ hfill
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Variable-Space"
nolink "false"
\end_inset
@ -37502,8 +37503,8 @@ reference "subsec:Variable-Space"
описанный в
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Flalign-Environment"
nolink "false"
\end_inset
@ -37512,8 +37513,8 @@ reference "subsec:Flalign-Environment"
Формула
\begin_inset CommandInset ref
LatexCommand eqref
nolink "false"
reference "eq:within"
nolink "false"
\end_inset
@ -37821,8 +37822,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Binary-Operators"
nolink "false"
\end_inset
@ -38094,8 +38095,8 @@ status collapsed
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Font-Styles"
nolink "false"
\end_inset
@ -38120,8 +38121,8 @@ reference "subsec:Font-Styles"
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Predefined-Space"
nolink "false"
\end_inset
@ -38265,8 +38266,8 @@ times
\begin_inset CommandInset ref
LatexCommand ref
nolink "false"
reference "subsec:Predefined-Functions"
nolink "false"
\end_inset

View File

@ -4641,7 +4641,37 @@ def revert_familydefault(document):
add_to_preamble(document, ["\\renewcommand{\\familydefault}{\\" + dfamily + "}"])
def convert_hyper_other(document):
" Classify \"run:\" links as other "
i = 0
while True:
i = find_token(document.body, "\\begin_inset CommandInset href", i)
if i == -1:
break
j = find_end_of_inset(document.body, i)
if j == -1:
document.warning("Cannot find end of inset at line " << str(i))
i += 1
continue
k = find_token(document.body, "type \"", i, j)
if k != -1:
# not a "Web" type. Continue.
i = j
continue
t = find_token(document.body, "target", i, j)
if t == -1:
document.warning("Malformed hyperlink inset at line " + str(i))
i = j
continue
if document.body[t][8:12] == "run:":
document.body.insert(t, "type \"other\"")
i += 1
def revert_hyper_other(document):
" Revert other link type to ERT and \"run:\" to Web "
i = 0
while True:
i = find_token(document.body, "\\begin_inset CommandInset href", i)
@ -4665,9 +4695,12 @@ def revert_hyper_other(document):
continue
name = document.body[n][6:-1]
target = document.body[t][8:-1]
cmd = "\href{" + target + "}{" + name + "}"
ecmd = put_cmd_in_ert(cmd)
document.body[i:j+1] = ecmd
if target[:4] == "run:":
del document.body[k]
else:
cmd = "\href{" + target + "}{" + name + "}"
ecmd = put_cmd_in_ert(cmd)
document.body[i:j+1] = ecmd
i += 1
@ -4746,7 +4779,7 @@ convert = [
[611, []],
[612, [convert_starred_refs]],
[613, []],
[614, []]
[614, [convert_hyper_other]]
]
revert = [[613, [revert_hyper_other]],

View File

@ -184,9 +184,8 @@ void InsetHyperlink::latex(otexstream & os,
url.replace(pos, 1, from_ascii("\\") + chars_url[k]);
// add "http://" when the type is web (type = empty)
// and no "://" or "run:" is given
// and no "://" is given
if (url.find(from_ascii("://")) == string::npos
&& url.find(from_ascii("run:")) == string::npos
&& utype.empty())
url = from_ascii("http://") + url;