发布时间:2010-01-31 19:38:47
文章类别:小技巧
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100h3df.html

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

解决方案:


%分一行.
\newcommand{\onech}[4]{
\makebox[92pt][l]{(A) #1} \hfill
\makebox[92pt][l]{(B) #2} \hfill
\makebox[92pt][l]{(C) #3} \hfill
\makebox[92pt][l]{(D) #4}\\}
%分两行.
\newcommand{\twoch}[4]{
\indent\makebox[110pt][l]{\qquad(A) #1} \hfill\makebox[220pt][l]{(B) #2}\\
\indent\makebox[110pt][l]{\qquad(C) #3} \hfill\makebox[220pt][l]{(D) #4}\\}
%分四行.
\newcommand{\fourch}[4]{
\indent\makebox[262pt][l]{\qquad(A) #1}\\
\indent\makebox[262pt][l]{\qquad(B) #2}\\
\indent\makebox[262pt][l]{\qquad(C) #3}\\
\indent\makebox[262pt][l]{\qquad(D) #4}\\}
演示:
LaTeX技巧心得263:选择题选项对齐格式的自定义
代码:
\documentclass{article}
%分一行.
\newcommand{\onech}[4]{
\makebox[92pt][l]{(A) #1} \hfill
\makebox[92pt][l]{(B) #2} \hfill
\makebox[92pt][l]{(C) #3} \hfill
\makebox[92pt][l]{(D) #4}\\}
%分两行.
\newcommand{\twoch}[4]{
\indent\makebox[110pt][l]{\qquad(A) #1} \hfill\makebox[220pt][l]{(B) #2}\\
\indent\makebox[110pt][l]{\qquad(C) #3} \hfill\makebox[220pt][l]{(D) #4}\\}
%分四行.
\newcommand{\fourch}[4]{
\indent\makebox[262pt][l]{\qquad(A) #1}\\
\indent\makebox[262pt][l]{\qquad(B) #2}\\
\indent\makebox[262pt][l]{\qquad(C) #3}\\
\indent\makebox[262pt][l]{\qquad(D) #4}\\}

\begin{document}
Which of the following numbers is the solution of the
equation $x 3=7$:

\onech{1}{2}{3}{4}

\twoch{1}{2}{3}{4}

\fourch{1}{2}{3}{4}
\end{document}


点赞(2)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部