This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Titlesec ex200

  1. Mô tả: Ví dụ về gói titlesec theo yêu cầu của vdhvuHeader and Footer
  2. Tác giả: Kỳ Anh
  3. Giấy phép: Public domain
  4. Kết quả: main.pdf
 1 \documentclass[twoside]{report}
 2 
 3 \usepackage{titlesec,oldstyle,calc}
 4 
 5 \titleformat{\chapter}[display]
 6   {\normalfont\Large\filleft\sffamily}
 7   {{\usefont{T1}{put}{m}{n}\fontsize{22mm}{25mm}\fontseries{b}\selectfont\thechapter}}
 8   {-1ex}
 9   {\Huge}
10 
11 \newlength\corollativi
12 
13 \newpagestyle{main}%
14   [\small]%
15   {%
16   \headrule
17   \sethead[\chaptertitle][][]{}{}{\chaptername\space\thechapter}
18   \setfoot{}{%
19     \setlength\corollativi{\linewidth - \widthof{[\thepage]}}
20     \setlength\corollativi{\corollativi/2}
21     \rule{\corollativi}{.5pt}
22     \raisebox{-.2\baselineskip}{[\thepage]}
23     \rule{\corollativi}{.5pt}
24     }{}
25   }
26 
27 \pagestyle{main}
28 
29 \def\loremipsum{%
30   \noindent Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
31   tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
32   quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
33   Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
34   fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
35   unt in culpa qui officia deserunt mollit anim id est laborum.\par\bigskip}
36 
37 \def\test{
38   \chapter{Lorem ipsum}
39   \loremipsum
40   \section{Lorem ipsum}
41   \loremipsum  \loremipsum  \loremipsum  \loremipsum
42   \loremipsum  \loremipsum  \loremipsum  \loremipsum
43   \loremipsum  \loremipsum  \loremipsum  \loremipsum
44   \loremipsum  \loremipsum  \loremipsum  \loremipsum
45   \loremipsum  \loremipsum  \loremipsum  \loremipsum
46   \loremipsum  \loremipsum
47   \section{Lorem ipsum}
48   \loremipsum  \loremipsum  \loremipsum  \loremipsum
49   \loremipsum  \loremipsum  \loremipsum  \loremipsum
50   \loremipsum  \loremipsum  \loremipsum  \loremipsum
51   \loremipsum  \loremipsum  \loremipsum  \loremipsum
52   \loremipsum  \loremipsum  \loremipsum  \loremipsum
53   \loremipsum  \loremipsum}
54 
55 \begin{document}
56   \test\test\test\test\test\test
57 \end{document}

main.pdf - kết quả biên dịch (76.6 kB) , 13-09-2009 10:14