ubuntu 12.04でtexlive2012いれた

2012からはutf8が使えると聞いて。

sudo apt-add-repository ppa:texlive-backports/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install texlive-lang-cjk
sudo apt-get install texlive-latex-recommended
sudo apt-get install texlive-fonts-recommended
let tex_flavor = 'latex'
set grepprg=grep\ -nH\ $*
set shellslash
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_CompileRule_dvi = 'platex -kanji=utf8 -synctex=1 -interaction=nonstopmode $*'
let g:Tex_CompileRule_pdf = 'dvipdfmx -p a4 $*.dvi'
let g:Tex_FormatDependency_pdf = 'dvi,pdf'

vim-latexでrefとかの補完が文字化けするのが悲しすぎた
utf8で書けばおk

evinceで明朝がゴシックになる

~/.fonts.conf

<?xml version="1.0"?>
<fontconfig>
  <match target="pattern">
    <test name="family" compare="contains">
      <string>Ryumin</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>IPAMincho</string>
    </edit>
  </match>
  <match target="pattern">
    <test name="family" compare="contains">
      <string>GothicBBB</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>IPAGothic</string>
    </edit>
  </match>
</fontconfig>

tumblr用の拡張機能作った

なんかデスクトップ通知来るの見てるといいよねって感じで
tumblrブログ指定してランダムにポストされた画像を表示するだけの拡張機能作った

TumblrPhotoNotify
Chrome Web Store
https://chrome.google.com/webstore/detail/tumblr-photo-notify/khcaacafabdlmeipkgjfdlbknpbfcekf/
Github
https://github.com/macchima23/tumblr_photo_notify

概要の英語乙ってるよねとか
説明ないよねとか
gitのログが英語と日本語混じってるよとか
ソース汚すぎとか
気にしない

一番頑張ったのはguard周りの設定という

  1. haml+coffee+scssの自動コンパイル
  2. livereload
  3. mdもhtmlにしてlivereloadできるように

guard-livereload

環境 Ubuntu, chrome

Chrome拡張機能 livereload を入れる
https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei

拡張機能のアイコンをクリックする
(UbuntuだとOptionsが選べない)

オプションは選べないわリロードされないわで詰んでたら
アイコンクリックしろって書いてあったのにだいぶ後に気づいたっていう・・・

XeTeX 用テンプレート

\documentclass[12pt,a4paper]{article}

\setlength{\topmargin}{20mm}
\addtolength{\topmargin}{-1in}
\setlength{\oddsidemargin}{20mm}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{15mm}
\addtolength{\evensidemargin}{-1in}
\setlength{\textwidth}{170mm}
\setlength{\textheight}{254mm}
\setlength{\headsep}{0mm}
\setlength{\headheight}{0mm}
\setlength{\topskip}{0mm}

\usepackage{xltxtra}
\setmainfont{IPAPMincho}
\setsansfont{IPAPGothic}
\setmonofont{IPAGothic}
\XeTeXlinebreaklocale "ja"

\usepackage{xeCJK} %日本語の改行を綺麗にするため
\usepackage{hyperref}
\usepackage{listings}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{float}

\title{title}
\author{author}
\date{\today}

\begin{document}
\maketitle

\end{document}