Skip to content

Commit 260a084

Browse files
committed
add syntax txt, and basic latex tpl
1 parent c647f1c commit 260a084

File tree

3 files changed

+174
-1
lines changed

3 files changed

+174
-1
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
bundle/
22
autoload/
3-
syntax/
3+
syntax/clushconf.vim
4+
syntax/deb.vim
5+
syntax/groupsconf.vim
6+
syntax/notmuch-*
47
plugin/
58
ftdetect/
69
doc/

syntax/txt.vim

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
" Vim syntax file
2+
" Filename: txt.vim
3+
" Language: plain text :)
4+
" Maintainer: Aurelio Marinho Jargas
5+
" URL: http://aurelio.net/vim/txt.vim
6+
" Instalacao: Colocar no final do seu ~/.vimrc:
7+
" au BufNewFile,BufRead *.txt source ~/rota/para/txt.vim
8+
"
9+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
10+
syn clear
11+
syn case ignore
12+
13+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
14+
"MISC:
15+
syn keyword txtTodo TODO FIXME XXX contained
16+
syn match txtComment '^#.*$' contains=txtTodo
17+
syn match txtNumber '\<\d\+\([,.]\d\+\)\{,1}\>'
18+
syn match txtPercent '\<\d\+\([,.]\d\+\)\{,1}%'
19+
"syn match txtBlank '\s\+$'
20+
syn match txtBar '^\s*[_=-]\{20,}\s*$'
21+
syn match txtSpecial '[][(){}®]'
22+
syn match txtSpecial '\<\(US\|R\)\$'
23+
24+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
25+
"URL EMAIL:
26+
syn match txtEmail '\<[A-Za-z0-9_.-]\+@\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\{2,4}\>\(?[A-Za-z0-9%&=+.,@*_-]\+\)\='
27+
syn match txtUrl '\<\(\(https\=\|ftp\|news\|telnet\|gopher\|wais\)://\([A-Za-z0-9._-]\+\(:[^ @]*\)\=@\)\=\|\(www[23]\=\.\|ftp\.\)\)[A-Za-z0-9%._/~:,=$@-]\+\>/*\(?[A-Za-z0-9/%&=+.,@*_-]\+\)\=\(#[A-Za-z0-9%._-]\+\)\='
28+
syn match txtEmailMsg '^\s*\(From\|De\|To\|Para\|Date\|Data\|Assunto\|Subject\):.*'
29+
syn match txtEmailQuote '^\(>\($\| \)\)\+'
30+
31+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
32+
"LIST:
33+
syn match txtList '^ *[-+*.] [^ ]'me=e-1
34+
syn match txtList '^ *[0-9]\+) '
35+
syn match txtDefList '^ *[^:]\{6,\}:'hs=e contains=ALL
36+
37+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
38+
"FONT BEAUTIFIERS:
39+
syn match txtUnderline '_[^_[:blank:]].\{-}_'hs=s+1,he=e-1
40+
syn match txtBold '\*[^*[:blank:]].\{-}\*'hs=s+1,he=e-1
41+
syn match txtMonospace "`[^`]\+`"hs=s+1,he=e-1
42+
" max: two lines
43+
syn match txtParentesis "([^)]\+\(\n\)\=[^)]*)" contains=txtUrl,txtEmail
44+
syn match txtQuotes '"[^"]\+\(\n\)\=[^"]*"'hs=s+1,he=e-1
45+
" max: two words
46+
syn match txtQuotes "'\w\+ \?\w\+'"hs=s+1,he=e-1
47+
48+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
49+
" color definitions (specific)
50+
hi txtBar term=bold cterm=bold gui=bold
51+
hi txtBold term=bold cterm=bold gui=bold
52+
hi txtItalic term=italic cterm=italic gui=italic
53+
hi txtUnderline term=underline cterm=underline gui=underline
54+
"
55+
" color definitions (using Vim defaults)
56+
hi link txtComment Comment
57+
hi link txtQuotes String
58+
hi link txtBlank Error
59+
hi link txtNumber Number
60+
hi link txtPercent Number
61+
hi link txtTodo Todo
62+
hi link txtEmail PreProc
63+
hi link txtUrl PreProc
64+
hi link txtList Statement
65+
hi link txtDefList Statement
66+
hi link txtMonospace Special
67+
hi link txtSpecial Statement
68+
hi link txtParentesis Comment
69+
hi link txtEmailMsg Structure
70+
hi link txtEmailQuote Structure
71+
"
72+
let b:current_syntax = 'txt'
73+
" vim:tw=0:et

templates/latex.tex

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
\documentclass[a4paper, 12pt]{article}
2+
\usepackage[frenchb]{babel}
3+
\usepackage[utf8]{inputenc}
4+
\usepackage[T1]{fontenc}
5+
%% Pour les images
6+
\usepackage{graphicx}
7+
%% Pour les marges
8+
\usepackage{geometry}
9+
\geometry{hmargin=2.5cm, vmargin=2.5cm}
10+
%% Pour les liens (en couleur)
11+
\usepackage[colorlinks=true]{hyperref}
12+
%% Pour redefinir la numerotation
13+
%\def\thesection{\arabic\roman\Roman\alph\Alph{section}}
14+
%% Pour les bouts de code
15+
\usepackage{listings}
16+
\usepackage{color}
17+
\definecolor{gris}{rgb}{0.90,0.90,0.90}
18+
\definecolor{bleu}{rgb}{0.17,0.49,0.68}
19+
\definecolor{vert}{rgb}{0.17,0.68,0.22}
20+
\definecolor{rouge}{rgb}{0.81,0,0}
21+
\lstset{language=Perl, tabsize=4, backgroundcolor=\color{gris},
22+
showspaces=false, showstringspaces=false,
23+
breaklines=true,
24+
keywordstyle=\color{bleu},
25+
stringstyle=\ttfamily\color{vert},
26+
commentstyle=\color{rouge},
27+
identifierstyle=\color{blue},
28+
framexleftmargin=2mm, xleftmargin=2mm}
29+
%% Pour redéfinir les en-têtes
30+
\usepackage{fancyhdr}
31+
%% Pour la profondeur de la table des matières
32+
%\setcounter{tocdepth}{1}
33+
%% Pour ne pas faire les espaces avant les :
34+
\makeatletter
35+
\@ifpackageloaded{babel}%
36+
{\newcommand{\nospace}[1]{{\NoAutoSpaceBeforeFDP{}#1}}}% % !! double {{}} pour cantonner l'effet à l'argument #1 !!
37+
{\newcommand{\nospace}[1]{#1}}
38+
\makeatother
39+
40+
\begin{document}
41+
\begin{titlepage}
42+
\begin{center}
43+
\begin{minipage}{\linewidth}
44+
\vspace*{4cm}
45+
46+
\begin{center}
47+
\vspace{2.5cm}
48+
\vfill
49+
\begin{Huge}
50+
titre\\
51+
\end{Huge}
52+
\vfill
53+
%\includegraphics[width=7cm]{img/camel.png}
54+
\vfill
55+
\end{center}
56+
\end{minipage}
57+
58+
59+
\vfill
60+
\begin{minipage}{\linewidth}
61+
\begin{minipage}{0.64\linewidth}
62+
\begin{Large}
63+
~\linebreak
64+
~\linebreak
65+
~\linebreak
66+
Auteurs\\
67+
\end{Large}
68+
69+
\begin{large}
70+
\emph{LP ASRALL}\\
71+
\emph{Année universitaire 2009-2010}
72+
\end{large}
73+
\end{minipage}
74+
\begin{minipage}{0.35\linewidth}
75+
\begin{center}%
76+
\includegraphics[width=2.7cm]{iut.png}
77+
78+
\vspace{1mm}
79+
Université Nancy 2
80+
\vspace{1mm}\\
81+
IUT Nancy-Charlemagne
82+
\vspace{1mm}\\
83+
\end{center}
84+
\end{minipage}
85+
\end{minipage}
86+
87+
\end{center}
88+
\end{titlepage}
89+
90+
\tableofcontents
91+
\pagestyle{fancy}
92+
%\rhead{~}
93+
\chead{~}
94+
%\lhead{~}
95+
\newpage
96+
97+
\end{document}

0 commit comments

Comments
 (0)