KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
You will receive a legacy which will place you above want.
FrontPage › hoze/webtex
ÅØÀÌ ¼³Ä¡µÈ À¥¿¡¼­ PDF ¸¸µé±â

¸ñÂ÷

1 webtex.html
2 webtex.php

1 webtex.html

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Topfeild WebTeX</title>
<style type=text/css>
<!--
BODY,TD {font-size:12px;font-family:±¼¸²Ã¼;color:#111111;line-height:15pt}
A:LINK, A:VISITED, A:ACTIVE {text-decoration:none; color:#555555}
A:hover {text-decoration:underline; color:#555555}
INPUT {text-align:left; border:1x solid #555555;background-Color:;font-size:12px;font-family:±¼¸²Ã¼;color:}

-->
</style>
</head>

<body>
<form name=inputtex method=post action=webtex.php>
	ÆÄÀÏ À̸§<input type=text name=filename size=20 value=test>(.tex) <input type=submit value=¿Ï·á><br>
	<textarea name=tex wrap=virtual rows=40 cols=120>
\documentclass[a4paper,article]{memoir}
\usepackage{dhucs}

\begin{document}
	
% ¿©±â¿¡ ³»¿ëÀ» ¾²¼¼¿ä.
	
\end{document}
	</textarea>
</form>
</body>
</html>

2 webtex.php

<?
$tex= str_replace("\\\\", "\\", $tex);
$tex= str_replace("\"", "''", $tex);
$tex= str_replace("\'", "'", $tex);

if($filename=='') $filename="test";
if(file_exists("$filename.tex"))unlink("$filename.tex");
$fp = fopen("$filename.tex", "w+");
fwrite($fp, $tex, 65535);
fclose($fp);

if(file_exists("$filename.pru"))unlink("$filename.pru");
if(file_exists("$filename.log"))unlink("$filename.log");
if(file_exists("$filename.dvi"))unlink("$filename.dvi");
if(file_exists("$filename.pdf"))unlink("$filename.pdf");
if(file_exists("$filename.aux"))unlink("$filename.aux");
echo("1");
if(file_exists("$filename.tex"))exec("latex $filename");
echo("2");
if(file_exists("$filename.dvi"))exec("dvipdfmx $filename");
echo("3");
echo("
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8'>
<title>Topfield WebTeX</title>
<style type=text/css>
<!--
BODY,TD {font-size:12px;font-family:±¼¸²Ã¼;color:#111111;line-height:15pt}
A:LINK, A:VISITED, A:ACTIVE {text-decoration:none; color:#555555}
A:hover {text-decoration:underline; color:#555555}
INPUT {text-align:left; border:1x solid #555555;background-Color:;font-size:12px;font-family:±¼¸²Ã¼;color:}

-->
</style>
</head>

<body>
");
if(file_exists("$filename.pdf")){
	echo("<a href=$filename.tex>$filename.tex</a>
	<a href=$filename.pdf>$filename.pdf</a>");
}else{
	echo("<a href=$filename.log>$filename.log</a>");
}
echo("
<form name=inputtex method=post action=webtex.php>
	ÆÄÀÏ À̸§<input type=text name=filename size=20 value=$filename>(.tex) <input type=submit value=¿Ï·á><br>
	<textarea name=tex wrap=virtual rows=40 cols=120>
$tex
</textarea>
</form>
</body>
</html>
");
?>

^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-02-10 10:32:22
Processing time 0.0584 sec