Emacs: updated LaTeX snippets.

dwb: hopefully better default settings.
Emacs: ediff background colors.
master
Ambrevar 2013-01-08 23:57:55 +01:00
parent 2e2aaffa0b
commit f2feab5775
7 changed files with 161 additions and 98 deletions

View File

@ -10,7 +10,7 @@ editable=false
background-tabs=false
enable-webgl=true
minimum-logical-font-size=5
enable-page-cache=false
enable-page-cache=true
cache-model=webbrowser
sans-serif-font-family=sans-serif
prompt-color=#00ff00
@ -21,7 +21,7 @@ hint-fg-color=#000000
sync-files=all
default-height=600
scrollbars=false
hint-bg-color=#ffffff
hint-bg-color=#7fff7f
show-single-tab=true
enable-developer-extras=false
complete-bookmarks=true
@ -41,7 +41,7 @@ adblocker-filterlist=/home/peter/.config/dwb/adblock_lists
proxy=false
user-agent=
full-content-zoom=true
editor=urxvt -e vim dwb_uri
editor=urxvt -e emacsclient -a "" -c dwb_uri
enable-accelerated-compositing=false
enable-private-browsing=false
enable-favicon=true
@ -61,7 +61,7 @@ ssl-use-system-ca-file=true
cookies-store-policy=session
bars-padding=0
active-completion-fg-color=#53868b
hint-font=bold 10px monospace
hint-font=bold 11px monospace
progress-bar-full-color=#ffffff
tabbed-browsing=true
hint-highlight-links=false
@ -73,7 +73,7 @@ tab-normal-fg-color-1=#cccccc
default-monospace-font-size=10
save-session=true
tabbar-visible=2
auto-insert-mode=true
auto-insert-mode=false
tab-normal-bg-color-2=#707070
tab-normal-bg-color-1=#505050
serif-font-family=serif
@ -86,13 +86,13 @@ enable-html5-database=true
hint-autofollow=true
enable-dom-paste=false
javascript-can-open-windows-automatically=false
hint-border=1px solid #000000
hint-border=1px solid #ffffff
widget-packing=dtws
ssl-trusted-color=#00ff00
enable-java-applet=true
navigation-history-max=500
hint-style=letter
enable-site-specific-quirks=false
enable-site-specific-quirks=true
auto-resize-window=false
zoom-step=0.10
default-font-family=sans-serif
@ -136,7 +136,7 @@ tab-key-cycles-through-elements=true
enforce-96-dpi=false
ssl-strict=true
scroll-step=0.00
close-last-tab-policy=ignore
close-last-tab-policy=clear
foreground-color=#ffffff
message-delay=2
scheme-handler=

3
.emacs
View File

@ -10,3 +10,6 @@
(load "~/.emacs.d/modes.el" nil t)
(load "~/.emacs.d/functions.el" nil t)
(load "~/.emacs.d/plugins.el" nil t)
;; End of file

View File

@ -365,3 +365,14 @@ has errors and/or warnings."
;; Set GDB to display many windows by default.
(setq gdb-many-windows t)
;;==============================================================================
;; Ediff
;;==============================================================================
;; TODO: does not seem to work.
;; (add-hook
;; 'ediff-mode-hook
;; (lambda ()
;; (setq ediff-merge-split-window-function 'split-window-horizontally)
;; ))

View File

@ -8,31 +8,55 @@
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage{gensymb}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{needspace}
\usepackage[svgnames]{xcolor}
\usepackage{xspace}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{textcomp}
\DeclareUnicodeCharacter{00AB}{\og{}}
\DeclareUnicodeCharacter{00B0}{\degree{}}
\DeclareUnicodeCharacter{00B0}{\textdegree{}}
\DeclareUnicodeCharacter{00BB}{\fg{}}
\DeclareUnicodeCharacter{20AC}{\euro{}}
\DeclareUnicodeCharacter{20AC}{\EUR{}}
\DeclareUnicodeCharacter{2264}{\leqslant}
\DeclareUnicodeCharacter{2265}{\geqslant}
%%=============================================================================
%% Properties
\title{${1:Title}}
\author{${2:\textsc{P.~Neidhardt}}}
%%=============================================================================
%% Various packages with configuration.
%% Aliases
\usepackage{xspace}
\let\latexbak\LaTeX
\renewcommand{\LaTeX}{\textrm{\latexbak}\xspace}
\let\texbak\TeX
\renewcommand{\TeX}{\textrm{\texbak}\xspace}
\def\unix{\textsc{Unix}\xspace}
%%=============================================================================
%% Formatting
% \usepackage{amsmath,amssymb,amsfonts}
% \usepackage{calc}
% \usepackage{parskip}
% \setlength{\parindent}{15pt}
% \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\renewcommand{\arraystretch}{1.4}
% \renewcommand{\familydefault}{\sfdefault}
\usepackage{needspace}
%%==============================================================================
%% Misc.
% \usepackage{calc}
%%=============================================================================
%% Listings
% \usepackage{listings}
@ -56,7 +80,12 @@
% \lstset{escapechar=@,style=customc}
%%==============================================================================
%% Graphics
%% Load TikZ after xcolor.
% \usepackage[svgnames]{xcolor}
% \usepackage{graphicx}
% \usepackage{tikz}
% \newcommand{\fancybox}[1]{
@ -64,12 +93,19 @@
% \node[draw,rounded corners]{#1};
% \end{tikzpicture}
% }
%% Load last.
\usepackage[]{hyperref}
%%=============================================================================
%% Babel
%% Load last before 'hyperref'.
\usepackage[frenchb]{babel}
%% Href.
%%==============================================================================
%% Hyperref
%% Load last.
\usepackage[]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=DarkRed,
@ -77,24 +113,6 @@
urlcolor=blue,
}
%%=============================================================================
%% Options
\newcommand{\comment}[1]{}
% \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\renewcommand{\arraystretch}{1.4}
% \renewcommand{\familydefault}{\sfdefault}
%% Aliases
\let\latexbak\LaTeX
\renewcommand{\LaTeX}{\textrm{\latexbak}\xspace}
\let\texbak\TeX
\renewcommand{\TeX}{\textrm{\texbak}\xspace}
\def\unix{\textsc{Unix}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -5,24 +5,22 @@
# name: \documentclass{beamer} ...
# --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[svgnames]{beamer}
%% \documentclass[xcolor=latex,svgnames,table]{beamer}
\documentclass[svgnames]{beamer} % xcolor=latex,table
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{geometry}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{needspace}
\usepackage[svgnames]{xcolor}
\usepackage{xspace}
\usepackage{marvosym}
\usepackage{textcomp}
\DeclareUnicodeCharacter{00AB}{\og{}}
\DeclareUnicodeCharacter{00B0}{\degree{}}
\DeclareUnicodeCharacter{00B0}{\textdegree{}}
\DeclareUnicodeCharacter{00BB}{\fg{}}
\DeclareUnicodeCharacter{20AC}{\euro{}}
\DeclareUnicodeCharacter{20AC}{\EUR{}}
\DeclareUnicodeCharacter{2264}{\leqslant}
\DeclareUnicodeCharacter{2265}{\geqslant}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%=============================================================================
%% Properties
\title{${1:Title}}
\subtitle{${2:Subtitle}}
@ -31,7 +29,7 @@
%%==============================================================================
%% Aliases
%%==============================================================================
\usepackage{xspace}
\let\latexbak\LaTeX
@ -42,32 +40,9 @@
\def\unix{\textsc{Unix}}
%%==============================================================================
%% Source code
%%==============================================================================
\usepackage{listings}
\lstdefinestyle{customc}{
% numbers=left,
belowcaptionskip=1\baselineskip,
breaklines=true,
frame=L,
xleftmargin=\parindent,
% framexleftmargin=\parindent,
language=C,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{green!40!black},
commentstyle=\itshape\color{purple!40!black},
identifierstyle=\color{blue},
stringstyle=\color{orange},
numberstyle=\ttfamily
}
\lstset{escapechar=@,style=customc}
%%==============================================================================
%% Beamer config
%%==============================================================================
%% Remove navigation bar.
\beamertemplatenavigationsymbolsempty
@ -117,8 +92,47 @@
\let\insertframesubtitle\insertsubsectionhead}{}
%%==============================================================================
%% Locale
%% Graphics
%% Load TikZ after xcolor.
% \usepackage[svgnames]{xcolor}
% \usepackage{graphicx}
% \usepackage{tikz}
% \newcommand{\fancybox}[1]{
% \begin{tikzpicture}
% \node[draw,rounded corners]{#1};
% \end{tikzpicture}
% }
%%=============================================================================
%% Listings
% \usepackage{listings}
%% Source code.
% \lstdefinestyle{customc}{
% % numbers=left,
% belowcaptionskip=1\baselineskip,
% breaklines=true,
% frame=L,
% xleftmargin=\parindent,
% % framexleftmargin=\parindent,
% language=C,
% showstringspaces=false,
% basicstyle=\footnotesize\ttfamily,
% keywordstyle=\bfseries\color{green!40!black},
% commentstyle=\itshape\color{purple!40!black},
% identifierstyle=\color{blue},
% stringstyle=\color{orange},
% numberstyle=\ttfamily
% }
% \lstset{escapechar=@,style=customc}
%%==============================================================================
%% Babel
\usepackage[frenchb]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -141,15 +155,14 @@
\section{Frame}
\subsection{Classic frame}
\frame[]
{
\begin{frame}
\begin{alertblock}{Alert block}
Boom!
\end{alertblock}
}
\end{frame}
\subsection{With source code}
\frame[shrink,containsverbatim]{
\begin{frame}[shrink,fragile]
\begin{lstlisting}[caption=Hello world!]
int main(int argc, char** argv)
@ -159,7 +172,7 @@ int main(int argc, char** argv)
}
\end{lstlisting}
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

View File

@ -9,19 +9,17 @@
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage{gensymb}
\usepackage{marvosym}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{needspace}
\usepackage[svgnames]{xcolor}
\usepackage{xspace}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{textcomp}
\DeclareUnicodeCharacter{00AB}{\og{}}
\DeclareUnicodeCharacter{00B0}{\degree{}}
\DeclareUnicodeCharacter{00B0}{\textdegree{}}
\DeclareUnicodeCharacter{00BB}{\fg{}}
\DeclareUnicodeCharacter{20AC}{\euro{}}
\DeclareUnicodeCharacter{20AC}{\EUR{}}
\DeclareUnicodeCharacter{2264}{\leqslant}
\DeclareUnicodeCharacter{2265}{\geqslant}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%==============================================================================
@ -79,11 +77,13 @@
%% General options
%%==============================================================================
\usepackage{eukdate}
% \usepackage{lipsum}
\usepackage{ifthen}
\usepackage[svgname]{xcolor}
\usepackage{eukdate}
\usepackage{graphicx}
\usepackage{ifthen}
\usepackage{needspace}
\usepackage{xspace}
%% print if not empty
\def\pine#1{\def\test{#1}\ifx\test\empty\relax\else #1\fi}

View File

@ -2,6 +2,9 @@
;; THEME
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; To find the variable associated to a currently used color, place the cursor
;; on it and call 'customize-face'.
(set-face-foreground 'font-lock-builtin-face "color-75" )
(set-face-bold-p 'font-lock-builtin-face t )
(set-face-foreground 'font-lock-comment-delimiter-face "color-242" )
@ -23,10 +26,25 @@
(set-face-underline-p 'link t)
(set-face-foreground 'minibuffer-prompt "brightcyan" )
(set-face-background 'region "color-17")
(set-face-foreground 'region "white")
(set-face-foreground 'error "red")
(set-face-bold-p 'error t)
(set-face-background 'shadow "color-234" ) ;; For line numbers.
;; Ediff
(add-hook
'ediff-mode-hook
(lambda ()
;; '(ediff-current-diff-A ((t (:background "color-22" :foreground "brightwhite"))))
;; '(ediff-current-diff-B ((t (:background "Yellow" :foreground "black"))))
;; '(ediff-odd-diff-A ((t (:background "Grey" :foreground "black")))))
(set-face-background 'ediff-current-diff-A "color-22")
(set-face-foreground 'ediff-current-diff-A "brightwhite")
(set-face-background 'ediff-current-diff-B "Yellow")
(set-face-foreground 'ediff-current-diff-B "black")
(set-face-background 'ediff-odd-diff-A "Grey")
(set-face-foreground 'ediff-odd-diff-A "black")
))
;; FIXME: fix C functions color.
(font-lock-add-keywords
@ -36,7 +54,7 @@
("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)
))
;; Make emacs and mutt colors fit.
;; Make Emacs and Mutt colors fit.
(font-lock-add-keywords
'mail-mode
'(
@ -77,7 +95,7 @@
)))
'( text-mode
sh-mode emacs-lisp-mode lua-mode
c-mode
c-mode python-mode
latex-mode html-mode texinfo-mode))
;; C-mode printf highlight.