practice_writing_boxes/practice.tex

108 lines
3.4 KiB
TeX
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% *snippet of thesis
\documentclass[12pt]{article} % \documentclass{} is the first command in any LaTeX code. It is used to define what kind of document you are creating such as an article or a book, and begins the document preamble
%\documentclass{beamer} changes page style/marging for beamer supports multimedia, wont work with article class
% lib for media
%\usepackage{multimedia}
\usepackage{amsmath} % \usepackage is a command that allows you to add functionality to your LaTeX code
% https://tex.stackexchange.com/questions/17611/how-does-one-type-chinese-in-latex
% sudo apt install texlive-full
% \usepackage{ctex} % 这里调用 ctex 包
\usepackage[UTF8]{ctex}% for Chinese, but not necessary for Pinyin
\usepackage{xeCJK}
\usepackage{xpinyin}
\usepackage{fontspec}
\usepackage{newunicodechar}
% \usepackage{indentfirst} % set indent
% lib to adjust spacing of list
\usepackage{enumitem}
% lib for the images
\usepackage{tikz}
\usetikzlibrary{shapes,calc,positioning,arrows,chains,automata,positioning}
% used for the for loops
\usetikzlibrary{automata,positioning}
% use a font that displays pinyin well, default(ubuntu light?) fails on ā ǎ
% -> sudo apt install fonts-cmu
\setmainfont{CMU Serif}
% more symbolic colors
% https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX
% option clash, already available through shapes package? \usepackage[dvipsnames]{xcolor}
% Custom colors example
\definecolor{GrayResourcer0}{HTML}{747474}
\definecolor{GrayDotline0}{HTML}{f3f3f3}
\definecolor{GreenDraw0}{HTML}{91ff85}
% change background to dark
% Use afterpage command to change background color on single pages
\usepackage{pagecolor}% With option pagecolor={somecolor or none}
% V this can be used without package above, that is only to get single pages changed, note pagecolor must be loaded first, or result is all white pages.
\definecolor{backgroud1}{HTML}{13191c}
\pagecolor{backgroud1}
\color{white}
\usepackage{afterpage}
\usepackage{makeidx}
\usepackage{hyperref}
\usepackage{amssymb} % for \longrightarrow
\usepackage[T1]{fontenc} % for \symbol{92}
\newpage
% The preamble ends with the command \begin{document}
\begin{document} % All begin commands must be paired with an end command somewhere
\newpagecolor{white}\afterpage{\restorepagecolor}
\section{Practice writing sheet}
\noindent
\newcommand{\drawSize}{0.5cm}
\newcommand{\gridSize}{0.5cm}
\newcommand{\ChineseCharBox}{\foreach \i in {1,..., 11} {
\begin{tikzpicture}
% Rectangle
\draw[GrayDotline0] (-\drawSize,-\drawSize) -- (\drawSize,-\drawSize) -- (\drawSize,\drawSize) -- (-\drawSize,\drawSize) -- cycle;
\draw[step=0.25,line width=0.05mm,dotted,GrayDotline0] (-\drawSize,-\drawSize) grid (\gridSize,\gridSize);
% Horizontal line |
\draw[-,GrayDotline0] (-\drawSize,0cm) -- (\drawSize,0cm);
% Vertical line -
\draw[-,GrayDotline0] (0,-\drawSize) -- (0,\drawSize);
% Diagornal line \
\draw[-,GrayDotline0] (\drawSize,-\drawSize) -- (-\drawSize,\drawSize);
% Diagornal line /
\draw[-,GrayDotline0] (-\drawSize,-\drawSize) -- (\drawSize,\drawSize);
\end{tikzpicture}
}}
\noindent\\
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\ChineseCharBox
\newpage
\end{document} % This is the end of the document