Những ghi chép tản mạn để đọc lại khi bổng nhiên quên mất mọi thứ
Xả nén file hunglan.zip ta có ba thư mục: doc,fonts,tex. Copy ba thư mục này vào /usr/local/texlive/2009/texmf-dist/ sau đó chạy sudo texthash.
$ sudo apt-get install build-essential libpoppler-qt4-dev libhunspell-dev libdbus-1-dev texlive
$ svn checkout http://texworks.googlecode.com/svn/trunk/ texworks-read-only
$ cd texworks-read-only
$ qmake-qt4
$ make
$ ./texworks
Tôi cố gắng dùng Font chữ Cyberbit để hiển thị văn bản bằng LaTeX với hai thứ tiếng: Hoa và Việt. Trong Windows có một chương trình, gọi là ttffortex. Tuy nhiên việc sử dụng vẫn không đơn giản. Nhất là trong Ubuntu, việc này cũng khó thực hiện.
Do đó tôi sử dụng thử XeTeX và mọi việc kết thúc tốt đẹp.
Đầu tiên cài font chữ Cyberbit vào Ubuntu. Xem các hướng dẫn cài new font vào Ubuntu
Mở Open Office duyệt font thấy tên Bitstream Cyberbit
Sọan một file latex
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{color}
\usepackage{graphicx}
\makeatother
\begin{document}
\setmainfont{Bitstream Cyberbit}
大板常指着夏鸥说:“你养的这婊子怎么年年看上去都像 处女啊?”
đại bản thường chỉ trứ hạ âu thuyết:“ nhĩ dưỡng đích giá biểu tử
chẩm yêu niên niên khán thượng khứ đô tượng xử nữ a ?”
\end{document}
Gõ một câu chữ hán và một câu chữ việt vào , ví dụ như trên, save thành file xl.tex
Trở ra command line gõ xelatex xl.tex
XONG!
Bạn cần gói titlesec.sty và tất nhiên gói tikz.sty. Có thể tìm kiếm dễ dàng hai file sty này trên các trang CTAN.
\documentclass[svgnames,12pt]{book}%{report}
\usepackage[utf8]{vietnam}
\usepackage{palatino}
\usepackage{tikz}
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{ \thechapter.\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay] \node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=LightSkyBlue] (0,0) rectangle
(\paperwidth,3cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=MidnightBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt}
\usepackage[top=2.54cm,bottom=3cm,left=2.54cm,right=2.54cm]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{url}
\usepackage{pdfpages}
\parindent=0pt
\begin{document}
Nội dung như bình thường
\end{document}
This note is based on a post at william.famille-blum.org/software/latexttf/index.html.
The procedure is quite simple. Check my previous post and see how to define your new $texmf and $localtexmf when you install MiKTeX 2.7.
Visit the above site and grab the batch file ttffortex.cmd;
Save this file in a folder, say D:\TTF, where you keep your font files like cyberbit.ttf.
Suppose you want to install this font into your $localtexmf=C:\LaTeX\User\. Create a blank ttfonts.map in $localtexmf\ttf2tfm\base.
Now run the following command at D:\TTF (run–cmd–d:–cd D:\TTF)
ttffortex cyberbit.ttf C:\LaTeX\User
and you are ready to use this new font.
Since I am about to use some Chinese text, you’d better load CJK and CJK-fonts packages. Now you can try this test file.
\documentclass[12pt]{article}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{UTF8}{cyberbit} \CJKtilde
简体中文~Cyberbit~字体。昔人已乘黄鹤去,此地空余黄鹤楼。黄鹤一去不复返,白云千载空悠悠。晴川历历汉阳树,芳草萋萋鹦鹉洲。日暮乡关何处是?烟波江上使人愁。
\end{CJK*}
\end{document}
Note that you’d better not use Williams’ test files. They don’t load CJK nicely and require two more files, ttfucs.sty and utf8ttf.def to work.
Your Linux distribution might already have a CJK (Chinese, Japanese, Korean) package ready for you, so you might be saved the hassle of manually installing everything. Do check before going forward!
There is the possibility of using the ucs package in order to write short snippets of CJK text, but that option is seriously limited as it does not handle, among other things, newlines. We will instead install the complete CJK-LATEX package and make it work for both LATEX and PDFLATEX. A lot of this material has been inspired by Pai H. Chou's page about how to setup PDFLATEX.
Download the CJK package. Copy its unpacked files to an appropriate subfolder of $TEXMF, just like you did with the ucs package before (see the section called “The ucs Package”). The files will be unpacked in a CJK/X_Y.Z folder, it is not important that you take them out, though it will probably be tidier for you to maintain.
Now you have to download a font that supports all the CJK characters you need. You can choose any *.ttf file that covers them, but in this walkthrough we will use Cyberbit. Unzip the file and rename Cyberbit.ttf to cyberbit.ttf, since uppercase might confuse your system.
Place cyberbit.ttf in a folder together with Unicode.sfd, and generate the *.tfm*.enc files with the command $ ttf2tfm cyberbit.ttf -w cyberbit@Unicode@. For some reasons, sometimes this does not produce the hundreds of files it should. Should that be your case, you can download both *.tfm and *.enc files. and
Place the *.tfm files in an appropriate folder, say $TEXMF/fonts/tfm/bitstream/cyberbit/; the *.enc files may be installed in $TEXMF/pdftex/enc/cyberbit/.
Now we need a map file to connect the *.enc files to the font. Download cyberbit.map$TEXMF/pdftex/config/. and install it in
Download another file, c70cyberbit.fd, and place it in an appropriate folder. You may choose, for example, $TEXMF/tex/misc/.
The last file we have to generate is a PostScript Type 1 font, necessary to read DVI files generated with LATEX. Run the command $ ttf2pfb cyberbit.ttf -o cyberbit.pfb, and copy the resulting cyberbit.pfb in a folder like $TEXMF/fonts/type1/cyberbit/.
Let's now place cyberbit.ttf among the fonts where LATEX can find it. You could place it in a folder named $TEXMF/fonts/truetype/.
Check the configuration file you find at $TEXMF/web2c/texmf.cnf, and make sure that the line mentioning TTFONTS is uncommented and points to the folder where you saved cyberbit.ttf.
To make it possible for PDFLATEX to use your CJK fonts, it is necessary that you add a line in configuration file $TEXMF/pdftex/config/pdftex.cfg. Add map +cyberbit.map in the file to complete the configuration for PDFLATEX.
To configure LATEX so that you can produce DVI files with CJK characters, you have to add a line in file ttfonts.map. The file might be in a folder named $TEXMF/ttf2pk/, but you will probably have to look for it. Add the line cyberbit@Unicode@ cyberbit.ttf into it.
Now, you only have to run texhash and the system should be ready.
What tool do I open a ".bin" with? Ubuntu linux does Not natively recognize your install file
then what? then what? then what? then what? then what? then what? then what? then what? ...
Answers:
From the menu bar, choose Applications - Accessories -Terminal
This will open a command line terminal.
Type each command as follows, pressing the Enter key after the line.
cd Path_Where_Google_Earth_bin_file_is_saved
sudo sh Google_Earth_bin_file
NOTE: sudo will ask for your password, Enter it and press Enter
This will install Google Earth or give any any error messages in the terminal
After the install has finished you can close the terminal.
Now you know how to use a terminal, you are on the way to becoming a Linux Power User
Cài đặt và vận hành:
Cài xcas bằng cách add dòng sau đây vào sources.list, sau đó sudo apt-get update và sudo apt-get install xcas
deb http://www-fourier.ujf-grenoble.fr/~parisse/debian/ stable main
giac (vào System - Admin - Synaptic) search giac và cài giac
download tablor.zip về xả nén vào một thư mục, download ba file sau đây chép (đè) lên file cũ
http://fit.hcmup.edu.vn/~nthaison/tex/tablor/tableauVariation.mp
download file test.tex http://fit.hcmup.edu.vn/~nthaison/tex/tablor/test.tex
Dùng texmaker, sửa lại lệnh latex là latex --shell-escape -interaction=nonstopmode %.tex
Chạy Quick Build (latex -dvi2ps -pstopdf), xem file test.pdf nếu giống file này là xong
Trước hết, bạn phải có các file sau đây:
file pdf mẫu đơn, ví dụ file 456.pdf (download từ Website của ĐSQ Úc tại VN)
file geometry.sty để set kích thước trang giấy phù hợp với mẫu đơn
ghostview và ghostscript. Ghost view sẽ xem file pdf và biết tọa độ của từng ký tự trên mẫu đơn
MiKTeX bản full, Winedt để chạy LaTeX trên Windows (để thực thi công việc này trên Linux chúng tôi chưa rhực hiện)
Sọan một file tex ví dụ, uc_nts.tex như sau
\documentclass{minimal}
\usepackage[viscii]{vietnam}
\usepackage[pdftex]{graphicx}
\usepackage[
a4paper,
left=0cm,
right=0cm,
top=0cm,
bottom=0cm,
nohead,
nofoot
]{geometry}
\pagestyle{empty}
\def\nullrule{\hrule height 0pt\relax}
\newdimen\dimenA
\newdimen\dimenB
\newdimen\lineheight
\newdimen\lineheight
\lineheight=10bp
\def\fontA{%
\fontfamily{ucr}%
\fontseries{b}%
\fontshape{n}%
\fontsize{12pt}{12pt}%
\selectfont
}
\def\fontB{%
\fontfamily{ucr}%
\fontseries{b}%
\fontshape{n}%
\fontsize{8pt}{8pt}%
\selectfont
}
\long\def\puttext#1#2#3{%
\vbox to 0pt{
\nullrule
\dimenA=\paperheight
\advance\dimenA by -\lineheight
\advance\dimenA by -#2bp\relax
\vskip\dimenA\documentclass{minimal}
\usepackage[viscii]{vietnam}
\usepackage[pdftex]{graphicx}
\usepackage[
a4paper,
left=0cm,
right=0cm,
top=0cm,
bottom=0cm,
nohead,
nofoot
]{geometry}
\pagestyle{empty}
\def\nullrule{\hrule height 0pt\relax}
\newdimen\dimenA
\newdimen\dimenB
\newdimen\lineheight
\newdimen\lineheight
\lineheight=10bp
\def\fontA{%
\fontfamily{ucr}%
\fontseries{b}%
\fontshape{n}%
\fontsize{12pt}{12pt}%
\selectfont
}
\def\fontB{%
\fontfamily{ucr}%
\fontseries{b}%
\fontshape{n}%
\fontsize{8pt}{8pt}%
\selectfont
}
\long\def\puttext#1#2#3{%
\vbox to 0pt{
\nullrule
\dimenA=\paperheight
\advance\dimenA by -\lineheight
\advance\dimenA by -#2bp\relax
\vskip\dimenA
\nullrule
\hbox to 0pt{%
\hskip#1bp\relax
\fontA
\vrule width 0pt height \lineheight #3%
\hss}%
\vss
}
\nullrule
}
\long\def\puttextb#1#2#3{%
\vbox to 0pt{
\nullrule
\dimenA=\paperheight
\advance\dimenA by -\lineheight
\advance\dimenA by -#2bp\relax
\vskip\dimenA
\nullrule
\hbox to 0pt{%
\hskip#1bp\relax
\fontB
\vrule width 0pt height \lineheight #3%
\hss}%
\vss
}
\nullrule
}
\def\putpage#1{
\vbox to 0pt{
\nullrule
\hbox{\includegraphics[page=#1]{456.pdf}}%
\vss
}
\nullrule
}
\def\putpar#1#2#3{%
\puttext{#1}{#2}{\vbox{%
\hsize=.85\textwidth
\raggedright
\fontA
\baselineskip=16bp
#3
\par
}}}
\begin{document}
\newpage
\putpage{1}
\newpage
\putpage{2}
\newpage
\putpage{3}
\newpage
\putpage{4}
\newpage
\putpage{5}
\puttext{87}{688}{03}
\puttext{113}{688}{09}
\puttext{136}{688}{2009}
\puttext{201}{688}{03}
\puttext{227}{688}{12}
\puttext{250}{688}{2009}
\puttext{62}{646}{x}
\puttext{101}{517}{NGUYEN THAI }
\puttext{101}{496}{SON }
\puttext{88}{386}{NGUYN THÁI S´N}
\puttext{118}{350}{x}
\puttext{120}{312}{08}
\puttext{148}{312}{04}
\puttext{172}{312}{1959}
\puttext{158}{188}{GIA LAI}
\puttext{158}{168}{VIETNAM}
\puttext{118}{124}{x}
\puttext{426}{295}{021872218}
\puttext{428}{277}{VIETNAM}
\puttext{398}{232}{VIETNAM}
\puttext{401}{188}{LECTURER}
\puttext{407}{544}{B1690417}
\puttext{407}{524}{VIETNAM}
\puttext{398}{497}{12}
\puttext{420}{497}{11}
\puttext{446}{497}{2007}
\puttext{398}{472}{12}
\puttext{420}{472}{11}
\puttext{446}{472}{2017}
\puttext{395}{452}{Immigration Department}
\puttext{395}{435}{Cøc Quän lý Xu¤t Nh§p}
\puttext{395}{419}{Cänh}
\newpage
\putpage{6}
\puttext{150}{788}{x}
\puttext{47}{754}{HCMC University of Education}
\puttext{52}{721}{280 An Duong Vuong street, }
\puttext{52}{705}{District 5, Hochiminh City}
\puttext{52}{689}{VIETNAM}
\puttext{145}{668}{848}
\puttext{186}{668}{8352020}
\puttext{164}{648}{DEAN}
\puttext{138}{615}{27}
\puttext{236}{615}{09}
\puttext{47}{536}{100/55 Thich Quang Duc street}
\puttext{47}{519}{Phu Nhuan ward, Hochiminh City}
\puttext{86}{504}{VIETNAM}
\puttext{47}{448}{32 41$^{\texttt{st}}$street, Tan Qui Dong Area}
\puttext{47}{434}{Tan Phong ward, Dist 7, HCM City}
\puttext{86}{416}{VIETNAM}
\puttext{152}{368}{848}
\puttext{196}{368}{6651867}
\puttext{152}{349}{\ 84}
\puttext{196}{349}{903971067}
\puttext{152}{368}{848}
\puttext{62}{274}{x}
\puttext{160}{248}{848}
\puttext{194}{248}{38398946}
\puttext{117}{228}{nthaison@hcmup.edu.vn}
\puttext{346}{609}{x}
\puttext{346}{369}{x}
\puttext{332}{349}{My daughter (NGUYEN THI ANH DAO)}
\puttext{332}{332}{is studying in University of }
\puttext{332}{316}{Nottingham, Malaysia Campus}
\puttext{345}{249}{x}
\puttext{345}{112}{x}
\puttext{336}{777}{Ms LORRAINE GOODWIN}
\puttext{336}{746}{Department of Human Resources}
\puttext{446}{725}{02}
\puttext{482}{725}{6201 2827}
\puttext{336}{689}{University of Canberra}
\puttext{336}{673}{Canberra, Australia}
\puttext{336}{658}{}
\newpage
\putpage{7}
\puttext{62}{736}{x}
\puttext{62}{573}{x}
\puttext{74}{389}{x}
\puttext{62}{269}{x}
\puttext{62}{118}{x}
\puttext{514}{744}{x}
\puttext{514}{717}{x}
\puttext{514}{680}{x}
\puttext{514}{653}{x}
\puttext{514}{630}{x}
\puttext{514}{602}{x}
\puttext{514}{576}{x}
\puttext{514}{536}{x}
\puttext{514}{500}{x}
\puttext{514}{461}{x}
\puttext{514}{412}{x}
\puttext{514}{348}{x}
\newpage
\putpage{8}
\puttext{62}{728}{x}
\puttext{117}{591}{Huynh Thi Bich}
\puttext{117}{573}{Ha}
\puttext{115}{544}{14}
\puttext{141}{544}{02}
\puttext{165}{544}{1959}
\puttext{274}{544}{x}
\puttext{117}{527}{wife}
\puttext{117}{506}{Ha Noi}
\puttext{117}{485}{Vietnam}
\puttext{117}{428}{Vietnam}
\puttext{117}{212}{021872217}
\putpage{9}
\puttext{346}{773}{x}
\puttext{393}{274}{x}
\newpage
\putpage{10}
\puttext{103}{324}{30}
\puttext{129}{324}{06}
\puttext{152}{324}{2009}
\puttext{382}{649}{x}
\end{document}
Dùng pdflatex để dịch, view file pdf bằng gv để biết tọa độ của chỗ trống cần điền
Tài liệu hướng dẫn xeukleides này trên Linux
Sau khi đã vẽ được một hình trong xeukleides, ví dụ:
Các macro câu lệnh vẽ tam giác và đường tròn :
-----------------------------------------------------------------------
frame(-2,-6,6,5)
% Khai bao tam giac ABC
A B C triangle
AB=segment(A, B); BC=segment(B, C); CA=segment(C, A)
ab=line(AB);bc=line(BC);ca=line(CA)
% Chan uong cao
A_cdc=intersection(line(BC),altitude(A, B, C))
B_cdc=intersection(line(CA),altitude(B, C, A))
C_cdc=intersection(line(AB),altitude(C, A, B))
% Truc tam tam giac ABC
ABC_tructam=orthocenter(A, B, C)
% duong cao ke tu A, B, C
A_dc=segment(A,A_cdc)
B_dc=segment(B,B_cdc)
C_dc=segment(C,C_cdc)
% Trung diem cac canh cua tam giac
AB_td=midpoint(AB)
BC_td=midpoint(BC)
CA_td=midpoint(CA)
% Cac trung tuyen
A_tt=segment(A,BC_td)
B_tt=segment(B,CA_td)
C_tt=segment(C,AB_td)
% Trong tam
ABC_trongtam=barycenter(A ,B, C)
% Cac duong phan giac trong
A_dpgt=bisector(line(AB),line(CA))
B_dpgt=bisector(line(BC),line(AB))
C_dpgt=bisector(line(BC),line(CA))
% Chan cac duong phan giac
A_cpgt=intersection(A_dpgt,line(BC))
B_cpgt=intersection(B_dpgt,line(CA))
C_cpgt=intersection(C_dpgt,line(AB))
% Cac duong phan giac trong
A_pgt=segment(A,A_cpgt)
B_pgt=segment(B,B_cpgt)
C_pgt=segment(C,C_cpgt)
% Cac duong phan giac ngoai
A_dpgn=perpendicular(A_dpgt,A)
B_dpgn=perpendicular(B_dpgt,B)
C_dpgn=perpendicular(C_dpgt,C)
% Chan cac duong phan giac ngoai
A_cpgn=intersection(A_dpgn,line(BC))
B_cpgn=intersection(B_dpgn,line(CA))
C_cpgn=intersection(C_dpgn,line(AB))
% Cac duong phan giac ngoai
A_pgn=segment(A,A_cpgn)
B_pgn=segment(B,B_cpgn)
C_pgn=segment(C,C_cpgn)
% Cac duong trung truc
BC_tt=bisector(BC)
AB_tt=bisector(AB)
CA_tt=bisector(CA)
% Tam va ban kinh cac duong tron bang tiep
C_tbt=intersection(C_dpgt,B_dpgn); C_bkbt=distance(C_tbt,line(AB))
A_tbt=intersection(A_dpgt,B_dpgn); A_bkbt=distance(A_tbt,line(BC))
B_tbt=intersection(B_dpgt,A_dpgn); B_bkbt=distance(B_tbt,line(CA))
C_dtbt=circle(C_tbt,C_bkbt)
A_dtbt=circle(A_tbt,A_bkbt)
B_dtbt=circle(B_tbt,B_bkbt)
% Duong tron ngoai tiep, noi tiep va
%duong tron Euler qua 9 diem va tam cua chung
ABC_ngoaitiep=circle(A,B,C)
----------------------------------------------------------------------------------
draw(A, B, C); draw(A);draw("$A$",A,180:)
draw(B);draw("$B$",B,0:)
draw(C);draw("$C$",C,90:)
c=circle(A, B, C); draw(c)
draw(A_dc);draw(B_dc);mark(B,B_cdc,A,right,.5);
mark(B,A_cdc,A,right,.5)
H=ABC_tructam; draw(H); draw("$H$",H,90:)
M=AB_td;draw(M);draw("$M$",M,30:)
D=rotation(H,M);draw(D);draw("$D$",D,270:)
draw(segment(A,D));draw(segment(B,D))
draw(segment(H,D),dotted)
bạn hãy save thành một file ví dụ bt1.euk
Trở ra màn hình DOS/Console ra lệnh
eukleides bt1.euk >bt1.tex
chương trình sẽ chạy ra một file tex. Input file này vào file tex muốn hiển thị hình
\documentclass[12pt,a4paper]{article} \usepackage{pstricks} \begin{document} \input{bt1}
\end{document}
\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{vietnam}
\usepackage{times}
\usepackage{url}
\usepackage[top=2cm,left=3cm,right=2cm,bottom=2cm]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\pdfmapfile{+hunglan.map}
\begin{document}
{\font\thuphap=HLThuphap3BKupgrade8v at 30pt \thuphap
Nhân\\
Nghĩa \\
Lễ\\
Trí \\
Tín\\
}
\end{document}
Gói Tablor dùng để vẽ bảng biến thiên của một hàm số. Chương trình tablor.sty sử dụng chương trình xcas để tính toán, sau đó dùng tableauvariation.mp để thể hiện bảng biến thiên.
Tham khảo tại http://viettug.org/boards/2/topics/show/45
Trước hết download chương trình xcas: xcas.rar
Xả nén thành một thư mục xcas, hãy copy thư mục này vào đĩa C:
Sau đó download chương trình tablor, xtablor.zip
xả nén chép vào một thư mục nào đó, ví dụ: C:\Program Files\xtablor
Tạo một file có tên là abc.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Environment]
"Path"="C:\\\xcas;%path%"
[HKEY_CLASSES_ROOT\*\shell\CmdHere\command]
@="cmd.exe"
chạy file này để đặt đường dẫn vào regitry.
Giả sử file file.tex chứa nội dung có bảng biến thiên đặt trong thư mục xtablor. Dịch file này như sau
pdflatex -shell-escape -interaction=nonstopmode file.tex
Tạo một macro hai tham số: Tham số thứ nhất là chiều rộng của khung, tham số thứ hai là nội dung văn bản cần đóng khung.
\newcommand{\khung}[2]{\begin{tabular}{|c|}\hline \parbox{#1}{#2}\\ \hline \end{tabular} }
Đây là các link giúp tăng tốc
Link thứ ba khá "hấp dẫn". Ý tưởng chính là dùng bộ nhớ (RAM) để làm ổ cứng. Đối với Linux thì ta có thể dành một phần bộ nhớ để đưa những thư mục quan trong như
/usr/lib : nơi lưu các thư viện chung mà tất cả ứng dụng sử dụng
/usr/bin : nơi lưu các ứng dụng
/bin hay /sbin : nơi lưu các ứng dụng hệ thống
Nếu ta chép các thư mục này vào bộ nhớ (sau khi khởi động) một cách tự động thì mình hoàn toàn có thể tận dụng tốc độ truy xuất cực nhanh của RAM so với đĩa cứng (Khoảng 1GB/s so với 133Mb/s) để hoạt động.
Nếu không áp dụng cho toàn bộ hệ thống thì có thể áp dụng cho những ứng dụng hay dùng (Firefox, Lynx, ...) để tăng tốc các ứng dụng này.
Nguyễn TânKhoa
Software1: Trước hết chúng tôi sẽ trình bày việc cài đặt Acrobat Reader 8.1.2 trong Ubuntu 7.10 Amd64. (Với Ubuntu 7.10 32 bit không có vấn đề gì)
Acrobat Reader quá quen thuộc trong MS Windows. Do đó khi chuyển qua Linux, chúng tôi vẫn muốn dùng lại, vì một số file PDF được dịch từ LaTeX chỉ vận hành tốt với Acrobat Reader. Tuy nhiên cho đến bây giờ, các chương trình cài đặt Acrobat Reader chỉ hỗ trợ Ubuntu 32 bit.
Do đó chúng tôi viết bài này để hướng dẫn cài đặt Acrobat Reader 8.1.2 trong Ubuntu Amd64.
1. Download AdobeReader_enu-8.1.2-1.i386.deb
2. Cài đặt Acrobat Reader i386 (32 bit)
sudo dpkg -i --force-architecture AdobeReader_enu-8.1.2-1.i386.deb
3. Cài đặt ia32-libs
sudo apt-get install ia32-libs
Xong xuôi đâu đấy, bạn bấm ALT F2 (Run command) và gõ acroread thì các bạn sẽ kích hoạt được Acrobat reader 8.1.2 trong Ubuntu 7.10 Amd64
Tuy nhiên khi khởi động nó thông báo một số lỗi gì đó. No problem.
Software2: cài đặt driver cho card màn hình rời NVIDIA của máy tính Lenovo ThinkPad T61
Khi bạn nâng cấp hệ thống, như nâng RAM chẳng hạn, Ubuntu sẽ không nhận diện được card màn hình NVIDIA, lúc đó nó sẽ hiển thị màn hình 640 x 480. Để set lại màn hình là 1400 x 1050, các bạn sẽ phải download file NVIDIA-Linux-x86_169.12.11-pkg2.run từ trang Web của NVIDA và sau đó lần lượt theo các bước sau đây:
Gỡ bỏ driver do Ubuntu cung cấp, bằng cách dùng lệnh sudo apt-get remove --purge nvidia-glx
chmod 777 NVIDIA-Linux-x86_169.12.11-pkg2.run
Bấm CTRL ALT F1 trở ra màn hình console và tắt giao diện đồ họa bằng lệnh sudo invoke-rc.d gdm stop
Cài đặt driver do nhà cung cấp viết, bằng cách chuyển đến thư mục chứa file run nói trên và gõ lệnh sudo ./NVIDIA-Linux-x86_169.12.11-pkg2.run
Chương trình sẽ tự động cài đặt, các bạn phải trả lời Yes, No tùy câu hỏi
Trở lại màn hình đồ họa sudo invoke-rc.d gdm start
Vậy là xong. Màn hinh bây giờ chắc chắn là 1400 x 1050
Khi đã download được file Maple11Linux32Installer.bin các bạn sẽ copy file bin vào thư mục nào đó, ví dụ /maple11
cd /maple11
./Maple11Linux32Installer.bin (lưu ý, bạn phải chọn Allow executing file as program)
File licence.dat các bạn phải hỏi xin đâu đó hoặc mua.
Chương trình sẽ tự động cài đặt toàn bộ Maple 11 lên thư mục ~/maple11
Trước khi kết thúc các bạn được nhắc activate chương trình, các bạn phải chọn NO
Sau đó, dùng quyền root, copy file license.dat đè lên file license.dat của chương trình cài đặt trong thư mục license
Nếu máy của bạn là amd64 các bạn còn phải tiếp tục như sau:
vào ~/maple11 gõ hai lệnh sau đây
sudo ln -s bin.IBM_INTEL_LINUX bin.X86_64_LINUX
sudo ln -s jre.IBM_INTEL_LINUX jre.X86_64_LINUX
Cuối cùng cd ~/maple11/bin để gõ lệnh ./xmaple
Thế là xong. Chúc bạn sử dụng được Maple 11 trong Ubuntu.
Có một vấn đề rất quan trọng để bàn , đó là làm thế nào để cài đặt unikey trong Ubuntu và đặc biệt là gõ được tiếng Việt trong Openoffice.
Sau đây là kinh nghiệm của chúng tôi.
Trước hết ta cài các thư việc cốt yếu cho trình biên dịch hoạt động
$ sudo apt-get install build-essential
$ sudo apt-get install xorg-dev
Sau đó ta download x-unikey 1.0.4 về
./configure
make
sudo make install
Khi được hỏi về việc thiết lập file cấu hình cho x-unikey, các bạn trả lời Yes
Log out và Login
Muốn gõ được tiếng Việt trong Openoffice, các bạn mở file ~/.unikey/options và đổi
CommitMethod = Forward
Lưu lại file này. Thế là Xong.
Tuy có vẻ đơn giản vậy, nhưng tôi đã mất rất nhiều thời gian mới thực hiện được.
Tài liệu Tham khảo
Posted on January 17, 2008 by NgaMy_SuMuoi
http://ngamysumuoi.wordpress.com/2007/12/
Internet Explorer 7 và Windows Media Player 11 được tạo ra dành cho các máy sử dụng Windows XP Pack 2 có bản quyền chính thức :D. Vietnam ta đã vào WTO cho nên lời khuyên của nhà sản xuất (đương nhiên là ngài Gates muốn thế) và của Tớ là hãy mua bản chính thức của Microsoft nhé
Tớ đang type bài này này bằng IE 7 đấy. Tại sao nên cài IE 7 ? 1 là quá đẹp (đến chữ trong YM còn rõ hơn đẹp hơn) và 2 là quá tiện!
Tuy nhiên, (cái tuy nhiên này là có nhiều người mong chờ lắm đây ) để đáp ứng nhu cầu của các bạn, tức 9 mươi mấy phần trăm User máy tính tại Vietnam, hơn nữa IE 7 cũng như WMP 11 có những tiện ích rất rất tuyệt vời, nên tớ quyết định giới thiệu tới các bạn cách chỉa tên IE 7 và WMP 11 này free, mà không phải dùng bản Windows chính thức (bỏ qua phần valid):
Yêu cầu:
Bạn bắt buộc phải cài đặt SP 2 cho bản XP nhà mình để sử dụng được IE 7 và WMP 11 các bạn nhé. Việc đầu tiên bạn phải làm là tải các tập tin Setup của IE 7 và WMP 11, cùng với các file sau. Nói theo đúng kiểu Edunet là: “Bạn có thể download các file ngay lập tức tại link sau” (nhấn chuột phải và click Save Target As...) ^^:
1, Internet Explorer 7 (cung cấp bởi Microsoft) Download
2, Windows Media Player 11 (cung cấp bởi Microsoft) Download
3, 2 file kèm để crack valid (gọi là Patch files): Y/c ko dùng phần mềm hỗ trợ download như IDM hay Flash get dùng trực tiếp IE để tránh lỗi.
a) Normaliz.rar ( 20 KB) Download
b) Iecustom.rar ( 69 KB) Download
1, Giải nén Normaliz.rar để lấy normaliz.dll và copy file này thả vào thư mục C:\Windows (ổ đĩa cài đặt Windows XP SP 2 gốc)
2, Vào đường dẫn C:\Program Files\ Tại đây bạn tạo 1 thư mục mới, tên gì cũng được, ví dụ chuẩn là “Internet Explorer 7″. Copy file setup của Internet Explorer 7 (IE7-WindowsXP-x86-enu.exe) vào thư mục này. Dùng Winrar hoặc Winzip, Extract file đó vào đây (click chuột phải và nhấn Extract here). Lưu ý là Extract (giải nén) nhé, ko được chạy trực tiếp.
3, Bạn giải nén tiếp file Iecustom.rar để lấy file iecustom.dll, copy file này đè lên file trong thư mục C:\Program Files\Internet Explorer 7\update ( máy sẽ hỏi bạn có ghi đè hay không, Hic tất nhiên là chọn Yes rùi )
4, Trong thư mục Update bạn chạy file update.exe
Máy sẽ yêu cầu khởi động lại máy, Khởi động xong, lúc này bạn đã có thể toàn quyền sử dụng IE 7. Nhưng bạn hãy khoan vội kích hoạt IE 7 vì lúc này chức năng Tab của nó chưa hoạt động, Muốn có nó bạn quay lại thư mục Update chạy tiếp file xmllitesetup.exe, chạy xong khởi động lại máy.
Bây giờ bạn có thể sử dụng đầy đủ các chức năng của IE 7 For free, Forever Enjoy!
Cái này dễ hơn, không cần lằng nhằng lắm…,
1, Bạn tạo thư mục cài đặt riêng cho WMP 11, ví dụ là “C:\Program Files\Windows Media Player 11“, sau đó extract file setup của Windows Media Player 11 (wmp11-windowsxp-x86-enu.exe) vào đây.
2, Bạn chạy file wmfdist11.exe để cài đặt, sau khi cài xong bạn đừng chọn restart máy vội, chạy tiếp file wmp11.exe, sau khi chạy xong bạn cho máy restart lại. Như vậy là bạn có thể xài WMP 11 free và forever được rồi.
Cài xong IE 7 bạn có thể thắc mắc thanh Menubar ở đâu (cái thanh có File - Edit - View - Favorite… ý) thì hãy nhấn phím Alt nhé, và để cho thanh đó luôn hiện ra hãy chọn View / Toolbar / Menu Bar. Good luck!
Filed under: Kinh Nghiệm
Download ntfs-3g-1.2506.tgz về cài đặt từ source
Muốn cài flash player trong trình duyệt trên máy amd64, bạn ra lệnh:
sudo apt-get install flashplugin-nonfree nspluginwrapper
Thế thôi!
PS. Đã có flash player amd64
Posted by Carthik in ubuntu.
Even if you use OpenOffice, you might still want all the Microsoft TrueType fonts so that documents created using Word or PowerPoint look as they were supposed to when you open them with OpenOffice. Also, with the Microsoft Fonts installed we browsing will be better since the pages will look as the designer originally intended them to. Most webpages are designed with Microsoft fonts in mind. The stylesheet specify these fonts. On Linux, when these specified fonts are not available on your computer, they are replaced with generic equivalents. With these fonts installed, you will see the page as it was designed. To install the fonts, all you need to do in Ubuntu is to install the msttcorefonts package. Instructions for installation are given below.
The Truetype Microsoft fonts provided by the package include:
Andale Mono
Arial Black
Arial (Bold, Italic, Bold Italic)
Comic Sans MS (Bold)
Courier New (Bold, Italic, Bold Italic)
Georgia (Bold, Italic, Bold Italic)
Impact
Times New Roman (Bold, Italic, Bold Italic)
Trebuchet (Bold, Italic, Bold Italic)
Verdana (Bold, Italic, Bold Italic)
Webdings
Installing Microsoft Truetype fonts on Ubuntu
You can install the MS core fonts by installing the msttcorefonts package. To do this, enable the “Universe” component of the repositories. This is done by default in Feisty. After you do that, use the following command from the command line:
$sudo apt-get install msttcorefonts
This will give you the core fonts, but if there are other TrueType fonts that you want installed, it is as easy as copying the font files to the ~/.fonts/ directory.
After installing new fonts, you will have to log out and log in again to be able to see and use the new fonts. If you want to avoid this, you can regenerate the fonts cache by issuing the following command:
$sudo fc-cache -fv
By following these steps, you will be able to share a printer from your Ubuntu computer so that Windows XP and Windows 2000 computers can print to it.
NOTE: This was tested with the beta version of Gutsy.
1) Make sure your printer is installed.
2) Open the Printing window (System -> Administration -> Printing).
3) Click Server Settings in the list of printers.
4) To the right, under Basic Server Settings, check the box that reads, "Share published printers connected to this system".
5) In the list of printers, click the printer you want to share.
6) Click in the Policies tab and make sure all three check boxes (Enabled, Accepting jobs, and Shared) are checked.
7) Click the Apply button in the lower-right corner of the window.
On the Windows machine:
1) Now add the printer to the Windows computer by using the Windows "Add Printer" Wizard. Select to connect a network printer and then select the option to connect a printer on the Internet or on a home or small office network. Type in the following for the printer URL:
http://<hostname>:631/printers/<printername>
Replace "<hostname>" with the hostname of the Ubuntu computer sharing the printer. It's also possible to replace "<hostname>" with the IP address of the computer sharing the printer.
Replace "<printername>" with the name (exactly as displayed including displayed casing) that was shown in the Printers window you opened earlier on the Ubuntu machine. If you're unsure about the exact printer name, you can use your webbrowser to open
http://<hostname>:631/printers/
That should show your printer in a webpage. Click on your printer link, and you should see the exact URL in your browser's address bar. You can use that URL in the Windows setup mentionned above.
2) Windows will ask you to select a driver for the printer. If you have the Windows print drivers, you should use them. Click the "Have Disk" button and select the .inf file that describes your print drivers.
If you do not have the drivers for the printer or cannot load the .inf file, you should select the "MS Publisher Color Printer" driver from the "Generic" manufacturer. This driver should be found on all Windows 2000 and XP installations by default and it gives all the printing functionality one should need.
NOTE: This document has been tested with Ubuntu versions 5.10, 6.06, 6.10, and 7.04.
1) Install the printer on the Ubuntu computer by using the printer wizard (System -> Administration -> Printers then double-click on "Add new printer" icon when the "Printers" window opens).
2) Press <Alt>+<F2>.
3) Modify /etc/cups/cupsd.conf with your favourite editor, for example
gksudo gedit /etc/cups/cupsd.conf
or
gksudo gedit -w /etc/cups/cupsd.conf
NOTE: For Kubuntu users, you use kdesu instead of gksudo. An appropriate text editor would be kate instead of gedit.
4) Scroll down until you see the "Listen" configurations. There should be two and they are
Listen localhost:631
Listen /var/run/cups/cups.sock
Below those lines add another "Listen" configuration corresponding to the IP address of the computer sharing out the printer. For example, if the IP address is 192.168.1.2, add this line.
Listen 192.168.1.2:631
5) Save the file. Now restart the printing system with this command:
sudo /etc/init.d/cupsys restart
6) Now add the printer to the Windows computer by using the Windows "Add Printer" Wizard. Select to connect a network printer and then select the option to connect a printer on the Internet or on a home or small office network. Type in the following for the printer URL:
http://<hostname>:631/printers/<printername>
Replace "<hostname>" with the hostname of the Ubuntu computer sharing the printer. Replace "<printername>" with your printer's name. It's also possible to replace "<hostname>" with the IP address of the computer sharing the printer.
NOTE: If using a hostname doesn't work, you could add this entry to C:\WINDOWS\system32\drivers\etc\hosts. This should only be required for Ubuntu versions prior to Feisty.
192.168.0.100 printer-server
Replace "192.168.0.100" with the IP address of the computer sharing the printer, then you can use a hostname instead.
http://printer-server:631/printers/Deskjet-940C
For a driver, you should select the "MS Publisher Color Printer" driver from the "Generic" manufacturer. This driver should be found on all Windows 2000 and XP installations by default and it gives all the printing functionality one can need.
It's also possible to use a driver from the manufacturer of the printer. This is harder to setup as most driver installation software from the manufacturer require that the printer be detected first on the Windows machine before the driver can be installed.
NetworkPrintingFromWinXP (last edited 2008-06-27 10:15:03 by localhost)
sudo apt-get install ia32-libs lib32asound2 libasound2-plugins;
wget -c -O skype-install.deb http://www.skype.com/go/getskype-linux-ubuntu;
sudo dpkg -i --force-all skype-install.deb
Có một vấn đề rất quan trọng để bàn , đó là làm thế nào để cài đặt unikey trong Ubuntu và đặc biệt là gõ được tiếng Việt trong Openoffice.
Sau đây là kinh nghiệm của chúng tôi.
Trước hết ta cài các thư việc cốt yếu cho trình biên dịch hoạt động
$ sudo apt-get install build-essential
$ sudo apt-get install xorg-dev
Sau đó ta download x-unikey 1.0.4 về
./configure
make
sudo make install
Khi được hỏi về việc thiết lập file cấu hình cho x-unikey, các bạn trả lời Yes
Log out và Login
Muốn gõ được tiếng Việt trong Openoffice, các bạn mở file ~/.unikey/options và đổi
CommitMethod = Forward
Lưu lại file này. Thế là Xong.
Tuy có vẻ đơn giản vậy, nhưng tôi đã mất rất nhiều thời gian mới thực hiện được.
Tài liệu Tham khảo
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java-6-sun
sau đó download netbeans về (netbeans-6.1-ml-cpp-linux.sh) chay file script để
cài đặt netbeans 6.1
Đã cài được xeuklides trong Ubuntu amd64 như sau:
1. Gỡ bỏ libglib1.2ldbl để tránh xung đột
2. Cài đặt từ gói file libglib1.2_1.2.10-17build1_amd64.deb
3. Sau đó cài tiếp libgtk1.2_1.2.10-18_amd64.deb
4. Cài chương trình xeukleides_1.0.1-1ubuntu1_amd64.deb
Có một vấn đề có vẻ rất đơn giản nhưng lại khó thực hiện, ngay cả khi bạn sử dụng thành thạo các công cụ đồ họa của Windows, đó là vẽ một bảng biến thiên của hàm số.
Ở đây chúng tôi giới thiệu cách sử dụng metapost. Trước hết các bạn cài đặt MiKTeX khá đầy đủ, ít nhất là phải có file supp-pdf.tex
để dịch file TeX của bạn. Sau đó bạn phải download từ đây file tableauVariation.mp
được viết bởi Frédéric Mazoit .
(This software is copyright (c) 2005 by Frédéric Mazoit.)
Soạn một file metapost ex.mp như sau:
input tableauVariation;
beginTableau(1)
newLigneVariables(btex $x$ etex);
val(btex $-\infty$ etex);
val("2");
val("5");
val("8");
val(btex $+\infty$ etex);
newLigneSignes(btex $y'$ etex);
plus;
valBarre("0");
moins;
nonDefBarre;
moins;
valBarre("0");
plus;
newLigneVariations(btex $y$ etex);
valPos("0",0);
valPos("6",2/3);
limGauche(btex $-\infty$ etex, 0);
nonDefBarre;
limDroite(btex $+\infty$ etex,1);
valPos("0",0);
valPos(btex $+\infty$ etex,1);
endTableau;
end
Có ba newline, newline thứ nhất viết biến x và các giá trị của x. Newline thứ hai viết y', ghi dấu của đạo hàm: plus (+), moins (-), valBarre("0"): vẽ một đoạn thẳng chẻ dọc giá tri 0, nonDefBarre vẽ ký hiệu không xác định. Newline thứ ba viết y và ghi các giá trị tương ứng của hàm số. Các lệnh trong ex.mp được giải thích như sau:
+ val("2"); ghi số 2 vào vị trí thích hợp
+ valPos("0",0); ghi số 0 vào vị trí thích hợp và tại vị trí đó ứng với chiều cao là 0
+ valPos("6",2/3); ghi số 6 vào vị trí thích hợp và tại vị trí đó ứng với chiều cao là 2/3
+ limGauche(btex $-\infty$ etex, 0); ghi dấu trừ vô cực vào giới hạn bên trái tại vị trí thích hợp và tại vị trí đó ứng với chiều cao là 0
+ limDroite(btex $+\infty$ etex,1); ghi dấu cộng vô cực vào giới hạn bên phải tại vị trí thích hợp và tại vị trí đó ứng với chiều cao là 1
Các dấu mũi tên sẽ được thực hiện tự động, theo nguyên tắc "ngọn cao hơn gốc thì mũi tên tăng" và ngược lại. BBT sẽ tự động viết các giá trị vào vị trí thích hợp bằng cách chia đều chiều dài của dòng cho số các cột thành các vị trí.
Dịch file ex.mp bằng lệng metapost ex sinh ra một file có tên là ex.1
Soạn một file TeX ví dụ là mp2pdf.tex với nội dung như sau:
\documentclass[12pt]{article}
\usepackage[viscii]{vietnam}
\input{supp-pdf}
\begin{document}
Ta lập bảng biến thiên của hàm số như sau:
\begin{figure}[hb]
\centering
\parbox{10cm}{\convertMPtoPDF{ex.1}{1}{1}}
\end{figure}
\end{document}
dịch file này bẳng pdflatex là coi như xong.
Dựa vào hướng dẫn này, mời các bạn viết bảng biến thiên của 5 hàm số ở lớp 12.
Xem thử Bảng biến thiên
của ví dụ trên:
tar -cvf backup.tbz home root var usr etc bin sbin opt lib boot -j
bzcat backup.tbz |tar -x
By Marius Nestor, Linux Editor
18th of November 2008, 06:58 GMT
I guess you've heard the good news, that Adobe released yesterday (November 17th, 2008) the first
64bit version of its Flash Player for Linux-based operating systems.
Until yesterday, 64-bit Linux users had to install the 32-bit version of the Flash Player, which was forced to work with the help of the NSPlugin wrapper package. Moreover, the "grey box" issue in Firefox 64-bit for the Ubuntu 8.10 AMD64 (Intrepid Ibex) operating system is a known and unresolved problem, as is also the fact that users had to reload the web pages to see the flash content, or even to restart Firefox. The following guide is here to teach you how to replace the 32-bit version of the flash player with the 64-bit one, on Ubuntu 8.10 AMD64. It will work with other 64-bit Linux distributions.
OK, so let us get down to business, and replace that ugly 32-bit flash player installation from your Ubuntu 8.10 AMD64 edition with the just released 64-bit version.
What do I need to get started? You will need to download the 64-bit Adobe Flash Player from Softpedia. Save the file on your desktop.
WARNING: Close any opened window of the Firefox browser before you continue! Open this page in Opera, Epiphany or any other browser.
STEP 1 - Remove the 32-bit flash player
You must remove the existing installation of the 32-bit flash player before installing the 64-bit one. Go to System -> Administration -> Synaptic Package Manager...
When Synaptic is ready, just type "nsplugin" (without quotes) in the search box. It will immediately find the package. Click on the green box in front of the "nspluginwrapper" package, and select the "Mark for Complete Removal" option...
You will also be notified about the removal of the "flashplugin-nonfree" package. Click on the "Mark" button...
Now, click on the "Apply" button; a confirmation window will appear, click "Apply," and wait for the packages to be removed from your system. Close Synaptic when it finishes the removal of the 32-bit flash player packages.
STEP 2 - Install the 64-bit flash player
Extract the archive of the 64-bit flash player and you will end up with a "libflashplayer.so" file...
Now, open your Home folder, go to View -> Show Hidden Files to view the hidden files...
Enter the .mozilla folder and create a new directory called "plugins" (without quotes). Drag and drop the "libflashplayer.so" file from the desktop to the "plugins" folder...
STEP 3 - Verify the installation of the 64-bit flash player
You can safely open the Firefox web browser, and go to YouTube or any other website with flash content. Try to watch a movie. Eureka! It works!
Sau khi khởi động LyX, vào menu Tools/Preferences, mục Looks and Feels, chọn Screen fonts như sau: Roman: Time News Roman , San Serif: Arial , Typewriter: Courrier New
Chọn menu File/New, gõ vài chữ tiếng Việt, dùng mã Unicode
Vào LyX menu Document/Settings, mục LaTeX Preamble, thêm dòng
\usepackage[utf8]{vietnam}
Chọn menu Tools/Preferences/Language settings/Languages, uncheck "Use babel"
Chọn menu Document/Settings/Language, uncheck "Use language's default encoding"
Chọn menu Document/Settings/Language, Encoding, Other, Unicode(utf8)
Vào menu chọn View/PDF (pdflatex), sau một lúc sẽ thấy kết quả
Nguyễn Thái Sơn, Đại học Sư Phạm TP HCM