TeXを入れてみたけど、ことごとくエラーに遭遇したので解決法を覚え書きしとく。
以前、『LaTeX2e美文書作成入門』という本を買いました。
買っただけでそれ以来全然読んでさえいなかったのですが、今日宿題のレポートを書くのにTeXを使ってみようと思い、この本に付属のCDからTeX関連の色々なものを入れてみたわけです。
本に書いてある通りに設定していき、TeXShopのエディットエリアに
¥documentclass{jsarticle}
¥begin{document}
こんにちは, ¥TeX !
¥[ ¥int dx = x + C. ¥]
¥end{document}
とか打ってみて、「タイプセット」をクリック。
この時は綺麗な文章が簡単に出てくるんだろうと淡い期待を抱いていました。
でも、現実はそんなに甘くなかったんです。
以下、僕の淡い期待を見事に粉砕してくれた3つのエラー。
! LaTeX Error: File `jsarticle.cls' not found.
! LaTeX Error:This file needs format 'pLaTeX2e'
but this is 'LaTex2e'
** WARNING ** Could not locate a virtual/physical font for TFM "rml".
** WARNING ** >> This font is mapped to a physical font "HiraMinPro-W3".
** WARNING ** >> Please check if kpathsea library can find this font: HiraMinPro-W3
** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...
続きで解決法を載せときます。
2009/09/24
2009/09/10
『詳解OpenCV』が届いた!
2009/09/01
3D遊び
非常に簡単なプログラムです。
一応マウス位置のはデカくなるというインタラクション付きです。
ソースコードは以下。
一応マウス位置のはデカくなるというインタラクション付きです。
ソースコードは以下。
int l=50;
int num;
Qube[] qube;
void setup(){
size(800,500,OPENGL);
//smooth();
frameRate(30);
colorMode(HSB,100);
float x=l;
float y=l;
for(; x<width; x+=l){
for(; y<height; y+=l) ;
}
num = int(x*y);
qube = new Qube[num];
for(int i=0; i<num; i++){
qube[i] = new Qube(l,l,l);
}
}
void draw(){
background(99);
lights();
directionalLight(99,0,99,0,0,-1);
int count=0;
for(float x=l; x<width; x+=l){
for(float y=l; y<height; y+=l){
pushMatrix();
translate(x,y);
rotateX(frameCount*PI/60 + x);
rotateY(frameCount*PI/60 + y);
float h = map(x,0,width,0,100);
float s = map(y,0,height,0,100);
float b = 99;
fill(h,s,99,60);
noStroke();
qube[count].getDistance(x,y);
qube[count].changeSize();
qube[count].display();
count++;
popMatrix();
}
}
}
class Qube{
int XL;
int YL;
int ZL;
float xl;
float yl;
float zl;
float range = 200;
float distance=0;
boolean isOver = false;
Qube(){ }
Qube(int XL, int YL, int ZL){
this.XL = XL;
this.YL = YL;
this.ZL = ZL;
}
void display(){
box(xl,yl,zl);
}
void getDistance(float x,float y){
distance=sqrt(sq(mouseX-x)+sq(mouseY-y));
if(distance<range) isOver=true;
else isOver=false;
}
void changeSize(){
if(isOver){
float s=1;
xl=XL+(range-distance)*s;
yl=YL+(range-distance)*s;
zl=ZL+(range-distance)*s;
}else{
xl=XL;
yl=YL;
zl=ZL;
}
}
}
登録:
コメント (Atom)

