Created
January 28, 2012 08:57
-
-
Save satomacoto/1693585 to your computer and use it in GitHub Desktop.
/Applications/UpTeX.app/teTeX/bin/Xtexshop-l landscape
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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