--- disqus: yueswater --- # LaTeX 聖誕節套件 {%hackmd @themes/orangeheart %} <style> .likecoin-button { position: relative; width: 100%; max-width: 485px; max-height: 240px; margin: 0 auto; } .likecoin-button > div { padding-top: 49.48454%; } .likecoin-button > iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style> ###### tags: `LaTeX` 又双叒叕是我阿岳啦!接續上次的[萬聖節套件](https://hackmd.io/@yueswater/Halloween),這次沒有套件,而是用純手工的方式搞一個可愛的圖示! ![](https://i.imgur.com/XNThUOx.png) 程式碼如下: ```tex \documentclass[11pt]{article} \usepackage{graphicx} \usepackage{amsmath,amsthm,amssymb} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \renewcommand\qedsymbol{\raisebox{-4pt}{\includegraphics[height=10pt]{christmas-tree}}} %%% FONT SETTING %%% \PassOptionsToPackage{no-math}{fontspec} \usepackage{xeCJK} \setmainfont[Path=./fonts/, Numbers = OldStyle, ItalicFont={Times New Roman Italic.ttf}, BoldFont={Times New Roman Bold.ttf}, BoldItalicFont={Times New Roman Bold Italic.ttf}]{LinLibertine_R.otf} % Set the main font of the document \setCJKmainfont[Path=./fonts/]{cwTeXQMing-Medium.ttf} % set the main Chinese font in the document \setCJKfamilyfont{kai}[Path=./fonts/]{cwTeXQKai-Medium.ttf} \newcommand{\kai}[1]{{\CJKfamily{kai}#1}} \setCJKfamilyfont{yuan}[Path=./fonts/]{cwTeXQYuan-Medium.ttf} % yuan \newcommand{\yuan}[1]{{\CJKfamily{yuan}#1}} \setCJKfamilyfont{hei}[Path=./fonts/]{cwTeXQHei-Bold.ttf} \newcommand{\hei}[1]{{\CJKfamily{hei}#1}} %\newfontfamily\cb{Arial} % add some font family \usepackage{mathspec} % Includes amsmath. \setmathsfont(Digits)[Numbers=OldStyle]{LinLibertine_R.otf} \begin{document} \noindent \textbf{Merry Christmas Proof} \begin{proof} Given a function as follow: \[ y = \frac{\log_e\left(\frac{x}{m} -sa\right)}{r^2} \] By rearranging the equation, we can obtain: \begin{align*} yr^2 &= \log_e \left(\frac{x}{m} -sa\right)\\ e^{yr^2} &= \frac{x}{m} -sa\\ me^{yr^2} &= x - msa\\ me^{rry} &= x - mas \end{align*} \end{proof} \end{document} ``` 注意看到 `\renewcommand\qedsymbol{\raisebox{-4pt}{\includegraphics[height=10pt]{christmas-tree}}}`這行,即是將證明結束(Quod Erat Demonstrandum, QED)的符號替換成自己想要的圖片,應景一下當然要換成聖誕樹啦!希望大家會喜歡(*´Д`)つ))´∀`) <div class="likecoin-embed likecoin-button"> <div></div> <iframe scrolling="no" frameborder="0" src="https://button.like.co/in/embed/xiaolong70701/button?referrer=hackmd.io"></iframe> </div>