Update LaTeX syntax style (close #1279)

This commit is contained in:
1024jp 2022-06-04 15:18:08 +09:00
parent 7fe8c373ae
commit 2b84c66cf8
9 changed files with 50 additions and 84 deletions

View File

@ -9,6 +9,7 @@ Change Log
- Make font size of the find result table changable by Command-Plus (+) sign or Command-Minus sign (+) while focusing on the result table.
- Improve the algorithm parsing comments and quoted text.
- Rewrite LaTeX syntax style to improve highlighting.
- Update the following syntax styles to fix syntax highlighting: DTD, INI, JSON, LaTeX, Markdown, PHP, Perl, reStructuredText, Ruby, Shell Script, Textile, XML, and YAML.
- Update SQL syntax style to support inline comment highlighting with `#`.
- [trivial] Change the color names in the Stylesheet Keyword color palette in the color code panel to lower case.

View File

@ -5,11 +5,10 @@ extensions:
- keyString: "cls"
metadata:
distributionURL: "https://coteditor.com"
author: "Yuhei Kuratomi"
author: "1024jp"
license: "Same as CotEditor"
lastModified: "2022-06-01"
description: "Maintained by CotEditor Project."
version: "2.0.4"
lastModified: "2022-06-05"
version: "3.0.0"
outlineMenu:
- beginString: "[\\\\¥]chapter\\*?\\{(.*)\\}"
description: "chapter"
@ -27,47 +26,26 @@ outlineMenu:
- beginString: "[\\\\¥]subsubsection\\*?\\{(.*)\\}"
description: "subsubsection"
keyString: " $1"
comments: []
numbers:
- beginString: "[\\\\¥]frac\\{[^}]+\\}\\{[^}]"
endString: "\\}"
keywords:
- beginString: "(?<=\\w)_(?=\\{)"
regularExpression: true
- beginString: "(?<!\\\\)\\^"
regularExpression: true
- beginString: "(?<!\\\\)&"
regularExpression: true
- beginString: "\\\\\\\\"
regularExpression: true
commands:
- beginString: "[\\\\¥]caption\\{.+\\}"
- beginString: "[\\\\¥][a-zA-Z0-9]+\\*?"
regularExpression: true
- beginString: "[\\\\¥]centering"
regularExpression: true
- beginString: "[\\\\¥]cite\\{([^}])+\\}"
regularExpression: true
- beginString: "[\\\\¥]file\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]hfill"
regularExpression: true
- beginString: "[\\\\¥]includegraphics(\\[.+\\])?\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]label\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]LARGE"
regularExpression: true
- beginString: "[\\\\¥]Large"
regularExpression: true
- beginString: "[\\\\¥]large"
regularExpression: true
- beginString: "[\\\\¥]maketitle"
regularExpression: true
- beginString: "[\\\\¥]normalsize"
regularExpression: true
- beginString: "[\\\\¥]ref\\{([^}])+\\}"
regularExpression: true
- beginString: "[\\\\¥]renewcommand.*$"
regularExpression: true
- beginString: "[\\\\¥]sf"
regularExpression: true
- beginString: "[\\\\¥]text(tt|bf)\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]tt"
regularExpression: true
- beginString: "^\\s*[\\\\¥]item"
types:
- beginString: "{"
endString: "}"
attributes:
- beginString: "["
endString: "]"
variables:
- beginString: "(?<!\\\\)##?[0-9]"
regularExpression: true
values:
- beginString: "[\\\\¥](La)?TeXe?"
@ -76,37 +54,38 @@ values:
regularExpression: true
- beginString: "\\("
endString: "\\)"
keywords:
- beginString: "[\\\\¥]author\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]begin\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]chapter\\*?\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]date\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]documentclass(\\[.+\\])?\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]end\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]pagestyle\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]part\\{.+\\}"
regularExpression: true
- beginString: "[\\\\¥]section\\*?\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]subsection\\*?\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]subsubsection\\*?\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]title\\{.*\\}"
regularExpression: true
- beginString: "[\\\\¥]usepackage(\\[.+\\])?\\{.+\\}"
regularExpression: true
- beginString: "\\["
endString: "\\]"
numbers: []
strings: []
characters:
- beginString: "(?<!\\\\)\\\\[&%$#_{}~^]"
regularExpression: true
description: "escaped characters"
- beginString: "---?"
regularExpression: true
description: "en/em dash"
- beginString: "~"
regularExpression: true
description: "non-breaking space"
- beginString: "''"
regularExpression: true
description: "opening double quotation mark (“)"
- beginString: "``"
regularExpression: true
description: "closing double quotation mark (”)"
- beginString: "!'"
regularExpression: true
description: "inverted exclamation mark (¡)"
- beginString: "\\?'"
regularExpression: true
description: "inverted question mark (¿)"
- beginString: "(?<!\\\\)\\\\[!,:>; ]"
regularExpression: true
description: "spaces"
comments: []
commentDelimiters:
inlineDelimiter: "%"
characters: []
completions:
- keyString: "begin"
- keyString: "chapter"

View File

@ -182,8 +182,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>Syntax Style definitions by:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -184,8 +184,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>Syntax Style definitions by:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -183,8 +183,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>シンタックススタイル定義の提供:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -182,8 +182,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<li>Definições de Estilo da Sintaxe:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -182,8 +182,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>Sözdizim biçemi tanımları:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Yakut<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -182,8 +182,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>语法风格文件:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>

View File

@ -182,8 +182,6 @@ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRES
<li>文法風格檔案:<ul>
<li>PHP<br/>
kaz &lt;<a href="https://github.com/kaz6120">https://github.com/kaz6120</a>&gt;</li>
<li>LaTeX<br/>
Yuhei Kuratomi &lt;<a>http://www.tomapd.net</a>&gt;</li>
<li>Ruby<br/>
Y. Tokutomi &lt;<a href="https://heartbeat.tommy1969.com">https://heartbeat.tommy1969.com</a>&gt;</li>
<li>Haskell<br/>