File: latex.style

package info (click to toggle)
libt3highlight 0.5.0-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 792 kB
  • sloc: ansic: 2,798; sh: 878; xml: 172; makefile: 71
file content (104 lines) | stat: -rw-r--r-- 2,899 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright (C) 2012 G.P. Halkes
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

format = 1
expand-escapes = yes

%translate { search = " " ; replace = "\\ " }
%translate { search = "\t" ; replace = "\\ \\ \\ \\ " }
%translate { search = "\\" ; replace = "\\textbackslash{}" }
%translate { search = "~" ; replace = "\\textasciitilde{}" }
%translate { search = ">" ; replace = "\\textgreater{}" }
%translate { search = "<" ; replace = "\\textless{}" }
%translate { search = "{" ; replace = "\\{" }
%translate { search = "}" ; replace = "\\}" }
%translate { search = "$" ; replace = "\\textdollar{}" }
%translate { search = "^" ; replace = "\\textcircum{}" }
%translate { search = "&" ; replace = "\\&" }
%translate { search = "#" ; replace = "\\#" }
%translate { search = "%" ; replace = "\\%" }
%translate { search = "|" ; replace = "\\textbar{}" }
%translate { search = '"' ; replace = "\\textquotedblright{}" }
%translate { search = "'" ; replace = "\\textquoteright{}" }
%translate { search = "_" ; replace = "\\_" }
%translate { search = "\n" ; replace = "\\\\\\mbox{}\n" }

documents {
	standalone {
		description = "LaTeX document"
		header = "%% Generated by t3highlight from %{name}\n\\documentclass{article}\n" +
			"%% The input encoding should be set, but LaTeX is very picky about it's name. Thus we only include\n" +
			"%% it as an escaped line. Adjust the encoding name and uncomment for best results\n" +
			"%%\\usepackage[%{charset}]{inputenc}\n" +
			"\\usepackage{fancyvrb}\n\\usepackage{fullpage}\n" +
			"\\begin{document}\n{\\raggedright\\noindent\n"
		footer = "}\n\\end{document}\n"
	}
	raw {
		description = "LaTeX for embedding from %{name}"
		header = "%% Generated by t3highlight\n\\begin{Verbatim}[commandchars=\\\\\\{\\},fontfamily=\\familydefault]\n"
		footer = "\\end{Verbatim}\n"
	}
}

styles {
	normal {
		start = ""
		end = ""
	}
	keyword {
		start = '{\\bfseries{}'
		end = '}'
	}
	string {
		start = '{\\slshape{}'
		end = '}'
	}
	string-escape {
		start = ''
		end = ''
	}
	comment {
		start = '{\\itshape{}'
		end = '}'
	}
	number {
		start = ''
		end = ''
	}
	misc {
		start = '\\underline{'
		end = '}'
	}
	comment-keyword {
		start = ''
		end = ''
	}
	variable {
		start = ''
		end = ''
	}
	error {
		start = ''
		end = ''
	}

	addition {
		start = '{\\bfseries{}'
		end = '}'
	}
	deletion {
		start = '\\underline{'
		end = '}'
	}
}