2014-11-01から1ヶ月間の記事一覧

lessでシンタックスハイライトする

http://blog.elliptium.net/2011/11/less-homebrew source-highlightを使う $ brew install source-highlight $ export LESS='-R' $ export LESSOPEN='| /usr/local/bin/src-hilite-lesspipe.sh %s'

MacにCOBOLをインストール

http://qiita.com/yhinoz/items/125ff9809f74f5890a33 brew install open-cobol

Railsでメンテナンスモード

http://babiy3104.hateblo.jp/entry/2013/09/03/225559turnout gemsを使う.

VIMのスペルチェックで単語を登録する

http://y12o.blogspot.jp/2009/04/vim.html zg 正しい単語として登録 zw 間違った単語として登録 zug, zuw 登録した単語を取り消す

日本語版のfiglet

http://caca.zoy.org/wiki/toilet

vimで特定の語を含む行をハイライトする

http://lardcave.net/text/Highlighting%20arbitrary%20lines%20in%20Vim.html WIPを含む行をハイライト :highlight wip ctermbg=Yellow ctermfg=Red :match wip /WIP/

ターミナルから回線速度を測定するコマンド

speedtest-cliを使う http://sheeplogh.hatenablog.com/entry/2013/12/03/124241 sudo pip install speedtest-clirunnable root@runnable:/var/www# speedtest-cli Retrieving speedtest.net configuration... Retrieving speedtest.net server list... Test…

cabalの環境が壊れた時

dynamicライブラリの-lHSmtlがない.みたいに言われたら, -lHS◯◯〇〇の◯◯〇〇の部分をcabalでリインストールする. cabal install text --reinstall --force-reinstalls cabal install mtl --reinstall --force-reinstalls cabal install parsec --reinstal…

homebrewでghcとcabalをインストール

homebrew-caskでpandocを入れて色々やってたら 昔Haskell-platformで入れたcabalの環境を破壊したようなので homebrew-caskで入れなおした http://slowquery.hatenablog.com/entry/2014/07/27/115220 brew cask install ghcbrew cask install cabal色々環境…

pandocをMacにインストール

http://qiita.com/hereticreader/items/7639a46f8337bafd8dcd homebrew-caskを使う $ brew cask install pandoc

BibTeXのカテゴリ

http://exlight.net/tutorial/bibtex-category.htmlこの人の見たら,国際会議ワークショップは@conferenceで良さそう. https://sites.google.com/site/jacqueskleinwebpage/publications/bibtex-for-workshop-papers

TeXであるページだけ横向きにする

大きい表を丸1ページ全面に貼りたいときなど. landscape環境を使う \usepackage{lscape} %\usepackage{pdflscape}自動的にLandscapeのページのみ回転してくれる \begin{landscape} ... \end{landscape}

longtableを1ページに収める

\setlength{\textwidth}{600pf}を \input{some_table}の前に実行した実際のコード \begingroup % \setlength{\evensidemargin}{-25pt} % \setlength{\oddsidemargin}{-25pt} \setlength{\textwidth}{600pt} \begin{landscape} \scriptsize \input{table/tex/…

TeXのページマージン

Tex

https://www.sharelatex.com/learn/Page_size_and_margins

TeXで変数の値をダンプする

Tex

http://www.latex-community.org/forum/viewtopic.php?f=44&t=9999 \theコマンドを使う\the\mylength

yesodのチュートリアル

http://pbrisbin.com/posts/developing_web_applications_with_yesod/

pandocのmarkdown->latexのテーブル変換で改行を反映する

Tex

http://johnmacfarlane.net/pandoc/demo/example9/options.html hard_line_breaksオプションを入れる $ pandoc -f markdown+hard_line_breaks input.md -o output.tex

multibbl使用中にCaptionで\citeするとき

Caption中でciteするときは全体を{}で囲ってから\protectする. \caption{Figure from John Doe\protect{\cite{biblio_label}{my_cite_label}} \label{fig:john}}

findコマンドのORオプション

-oオプションを使う. $ find -name "*.aux" -o -name "*.log"

複数のbibliograpyを作る方法の整理

Tex

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multbib 4つの方法がある. 1. multibbl 今はこれを使っている \usepackage{multibbl} \newbibliography{bk} \bibliographystyle{bk}{alpha} \newbibliography{art} \bibliographystyle{art}{plain} ... \c…

gitで巨大ファイルのコミットを削除する

http://qiita.com/tarr1124/items/11e890733a692bc9d123 http://qiita.com/Spring_MT/items/f60c391b5dbf569a1d12 過去をさかのぼって消されるので 使うのが若干怖いけどfilter-branchを使う git filter-branch --tree-filter 'rm -rf /path/to/spurious/ass…

bibTeXで日本語名をイニシャルにされる場合

著者名がauthor={武者小路 実篤}のとき, 武 実篤になる.{} でくくればいいとのこと. https://twitter.com/masui/status/264610463092969472 以下のようにする. author={{武者小路 実篤}} 複数いるときは author={{武者小路 実篤} and {幸田 露伴} and {…

解像度を保ってPNGからPDFに変換する

http://kujirahand.com/blog/index.php?Mac%20OS%20X%E3%81%A7%E7%94%BB%E5%83%8F%E5%A4%89%E6%8F%9B sipsコマンドを使う $ sips -s format pdf test.pgn --out test.pdf解像度はたぶん保たれる http://d.hatena.ne.jp/toolkit/20060726/p1

KeynoteのファイルをPDFにExportするAppleScript

set DIR to "/path/to/keynote/" set fin to (DIR & "Untitled.key") as POSIX file set fout to (DIR & "Untitiled.pdf") as POSIX file tell application "Keynote" activate open fin export document 1 to fout as PDF with properties {compression fac…

TeXの日本語をゴシックから明朝体にする

参考文献でゴシックにされてダサくなったので. http://zrbabbler.sp.land.to/pxchfon.html pxchfonパッケージを使う. プリアンブルに以下を記述 %Never use Japanese Gothinc Fonts %redirecting gothinc to mincho \usepackage[noalphabet]{pxchfon} \set…

TeXにヒラギノを埋め込む

http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/embed_hiragino.html 以下で埋め込み状況を確認. $ kanji-config-updmap statusヒラギノ埋め込み $ kanji-config-updmap hiragino

TeXでPDFファイルの読込み

Tex

基本的には \usepackage[dvipdfmx]{graphicx} ... \includegraphics{hoge.pdf} $ platex -shell-escape main.texの2つでいけるはず. 1. ドライバ(dvipdfmx)の指定がないと バウンディングボックスが見つからないというエラーが出る. 2. -shell-escapeをつ…

pbibtexを使う

日本語を使うとき http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q13115757598 $ pbibtex foo -kanji=utf8

TeXでコンソールにメッセージを出す

console.log的なもの http://stackoverflow.com/questions/2719286/is-there-a-latex-command-that-will-log-to-the-output-error-console \typeout{HOOOOOOOORAAAAAAAAAYYYYYYYYY!!!!!!}

texでneosnippet

以下をよく使うので .vim/bundle/neosnippet-snippets/neosnippets/tex.snip にsnippetを登録した snippet fig \begin{figure} \centering \includegraphics[width=${1:100}mm]{${2}.pdf} \caption{${3}} \label{fig:${4}} \end{figure}