wengan-li / ncku-thesis-template-latex

NCKU Thesis/Dissertation Template in Latex | 台灣國立成功大學碩博士用畢業論文LaTex模板
Other
94 stars 41 forks source link

Adding definition, theorem and lemma #20

Closed yusie1978 closed 7 years ago

yusie1978 commented 7 years ago

Hi, I was working my dissertation and I need some definition, theorem, and so on.

Then I added some codes to the ncku\configure.tex: \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary}

\newenvironment{proof}[1][Proof]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} \newenvironment{definition}[1][Definition]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} \newenvironment{example}[1][Example]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} \newenvironment{remark}[1][Remark]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\newcommand{\qed}{\nobreak \ifvmode \relax \else \ifdim\lastskip<1.5em \hskip-\lastskip \hskip1.5em plus0em minus0.5em \fi \nobreak \vrule height0.75em width0.5em depth0.25em\fi}

As follows: add_codes

Then, I type some text: type_codes

The result is as follow:

result_codes

My point to share about this, is to ask for your help to make it more formal or fixed some necessary codes above (first Figure) so that it become available for everyone!

Best regards,

Yusie

wengan-li commented 7 years ago

Thanks for providing the code. I have moved this into TODO List. I will take a look about this.

Also, although it's seem the command don't care the ordering, but I prefer this:

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[theorem]
\newtheorem{proposition}{Proposition}[theorem]
\newtheorem{corollary}{Corollary}[theorem]

Move all the counter to the right hand side which should improve the readability to suit for this format.

\newtheorem{ -EnvironmentName- }{ -ShowText- }[ -CounterName- ]
yusie1978 commented 7 years ago

Great!

Thanks... I hope it will become feature of the next version!!!

wengan-li commented 7 years ago

I have added your suggestion at v1.5.1.

Also there a little change about the file path after v1.5.x, so if you don't need it, don't upgrade the template.