通常,我们写练习题都是没有答案的,所以,我们想提前写好题目和答案,需要答案时再打印出来。是比较好的解决方案。 

 1,这里推荐一个比较好的类https://code.google.com/p/exercisesheet/下载地址:https://code.google.com/p/exercisesheet/downloads/list其代码:git clone https://code.google.com/p/exercisesheet/

2,exsheet 做得也是很不错的, 下载地址如下:https://bitbucket.org/cgnieder/exsheets/wiki/Home 参考:http://tex.stackexchange.com/questions/70599/problem-solution-environment

3,使用 answers 包来实现:

选自:http://tex.stackexchange.com/questions/301/how-can-i-produce-exercises-in-one-part-of-a-latex-document-with-selected-answer

代码如下:

\documentclass[12pt,openany,twoside]{book} 
\usepackage{fouriernc}
\usepackage[thmmarks,standard,thref]{ntheorem}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{answers}

\theoremseparator{.}
\theorembodyfont{\upshape}
\newtheorem{pro}{Problem}[chapter]

\Newassociation{loigiai}{Answer}{loigiaichung}

\begin{document}
\chapter{Firist }
\thispagestyle{empty}
\Opensolutionfile{loigiaichung}[pro]
\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\Closesolutionfile{loigiaichung}
\section{This is solution}
\input{pro}

\chapter{Firist }
\thispagestyle{empty}
\Opensolutionfile{loigiaichung}[pro]
\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\begin{pro}
This is a problem
\begin{loigiai}
This is a solution
\end{loigiai}
\end{pro}

\Closesolutionfile{loigiaichung}
\section{This is solution}
\input{pro}

\end{document}

另外还有exercise 包等。大家可以更多收集相关资料,根据自己的实际情况选择使用。

点赞(2)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部