Skip to content

Instantly share code, notes, and snippets.

@satomacoto
Created January 28, 2012 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satomacoto/1693585 to your computer and use it in GitHub Desktop.
Save satomacoto/1693585 to your computer and use it in GitHub Desktop.
/Applications/UpTeX.app/teTeX/bin/Xtexshop-l landscape
#!/bin/sh
TEX=$*
DVI=`/usr/bin/basename "$TEX" ".tex"`
THECODE=`nkf -g "$TEX"`
case $THECODE in
UTF-8) KANJI="-kanji=utf8" ;;
EUC-JP) KANJI="-kanji=euc" ;;
Shift_JIS) KANJI="-kanji=sjis" ;;
ISO-2022-JP) KANJI="-kanji=jis" ;;
esac
PLATEX="platex"
CLASS=`sed -n '/documentclass/p' $* | sed '/%.*documentclass/d' | sed -n '1p'`
case $CLASS in
*{u*) PLATEX="uplatex" ;;
esac
$PLATEX $KANJI $TEX
dvipdfmx -l $DVI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment