- Miscellaneous tools
sh/
: Shell script toolsr/
: R tools
-
Update the master branch
git fetch upstream git merge upstream/master
-
For the first time, you need to registor the address of the github repository
git remote add upstream github_repository_address
-
-
Commit all current works and push to the upstream
git add -A git commit -a git push origin master
-
If you are working at the branch other than the master branch
git pull origin master git checkout master git merge current_working_branch_name
-
-
Pull request
git add -A git commit -a git push origin harakonan
-
harakonan is the name of my working branch
-
Pull request on the github page after the push
-
For the first time, you need to create a working branch
git checkout -b harakonan
-
-
LATEX documents
-
The LATEX2ε Sources
texdoc source2e
-
Standard Document Classes for LATEX
texdoc classes
-
-
Font size in LATEX
preamble 10pt 11pt 12pt \tiny 5pt 6pt 6pt \scriptsize 7pt 8pt 8pt \footnotesize 8pt 9pt 10pt \small 9pt 10pt 11pt \normalsize 10pt 11pt 12pt \large 12pt 12pt 14pt \Large 14pt 14pt 17pt \LARGE 17pt 17pt 20pt \huge 20pt 20pt 25pt \Huge 25pt 25pt 25pt -
bibtex
- Issues
- moderncv package
- update bbl file after the update of
publications.bib
- activate the line with
\nocite
- compile
- comment out the line with
\nocite
after creating bbl file - compile
- activate the line with
- update bbl file after the update of
- moderncv package
- Issues
-
tex file in Japanese
-
jsarticle
-
uplatex (recommended)
-
Only use utf-8
-
Preamble
\documentclass[12pt,a4paper,dvipdfmx,uplatex]{jsarticle}
-
Compilation
uplatex.sh (-b) file-name_w/o_extension
- options
- -b biber
- options
-
-
platex
-
SJIS can be used
-
Preamble
\documentclass[12pt,a4paper,dvipdfmx]{jsarticle}
-
Compilation
platex.sh (-b) file-name_w/o_extension
- options
- -b biber
- options
-
-
-
beamer
-
uplatex (recommended)
-
Only use utf-8
-
Preamble
\documentclass[dvipdfmx,14pt]{beamer} \usepackage{bxdpx-beamer} \usepackage{pxjahyper} \renewcommand{\kanjifamilydefault}{\gtdefault}
-
Compilation
uplatex.sh (-b) file-name_w/o_extension
- options
- -b biber
- options
-
-
platex
-
SJIS can be used
-
Preamble
\documentclass[dvipdfmx,14pt]{beamer} \usepackage{bxdpx-beamer} \usepackage{pxjahyper} \usepackage{minijs} \renewcommand{\kanjifamilydefault}{\gtdefault}
-
Compilation
platex.sh (-b) file-name_w/o_extension
- options
- -b biber
- options
-
-
-
-
latexdiff-vc
-
Compare previous commit with current file
git commit file_name.bbl latexdiff-vc -e utf8 --git --flatten --force -d diff -r HEAD file_name.tex
-
-
md -> tex
-
Convert md to tex
md-tex.sh file-name_w/o_extension
-
Convert md to pdf using latex
md-latex.sh (-l) file-name_w/o_extension
- options
- -l landscape
- options
-
Convert md to pdf using uplatex
md-uplatex.sh (-l) file-name_w/o_extension
- options
- -l landscape
- options
-
-
R -> Rnw
-
Write R file with Rnw commands like chunks and chapter titles
-
Add
#
before\
,<<
, and@
to execute as an R file -
Paste contents of R file between
\maketitle{}
and\end{document}
in the Rnw file -
Remove
#
before\
,<<
, and@
-
Next code will do this and open Rnw file with RStudio
r-rnw.sh file-name_w/o_extension
-
-
Compile Rnw file in RStudio
-
-
Commands
-
Start
mysql.server start
-
Log in to MySQL as the root user
mysql -u root -p
-
Log in to MySQL as a user named harakonan
mysql -u harakonan -p
-
Work with database named dbname
use dbname;
-
Stop
mysql.server stop
-
-
Notes
- Location of the data file of the database dbname
/usr/local/var/mysql/dbname
- Location of the data file of the database dbname
-
Permit execution of an sh file
chmod 755 file-name