[gtksourceview/wip/latex] latex.lang: usepackage context
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/latex] latex.lang: usepackage context
- Date: Thu, 28 Nov 2013 14:18:01 +0000 (UTC)
commit 718f8226be0bc3f77e3f96e3310a7ccb52e416cf
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Nov 28 15:15:04 2013 +0100
latex.lang: usepackage context
Style for the package name.
data/language-specs/latex.lang | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index 2459ff8..7e18dd5 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -40,6 +40,9 @@
<style id="command" _name="Command" map-to="def:keyword"/>
<style id="verbatim" _name="Verbatim" map-to="def:comment"/>
<style id="special-char" _name="Special Character" map-to="def:special-char"/>
+
+ <!-- names, e.g., name of package, name of environment, name of class -->
+ <style id="name" _name="Name" map-to="def:identifier"/>
</styles>
<definitions>
@@ -338,6 +341,14 @@
</include>
</context>
+ <context id="usepackage">
+ <match>(\\usepackage)(\[.*\])?\{([0-9a-zA-Z,\s]+)\}</match>
+ <include>
+ <context sub-pattern="1" style-ref="include"/>
+ <context sub-pattern="3" style-ref="name"/>
+ </include>
+ </context>
+
<context id="include" style-ref="include" class="no-spell-check">
<prefix>\\</prefix>
@@ -359,6 +370,7 @@
<context ref="lstinline-square-brackets"/>
<context ref="lstinline"/>
<context ref="verbatim-inline"/>
+ <context ref="usepackage"/>
<context ref="include"/>
<context ref="common-commands"/>
<context ref="special-char"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]