Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
inkmathematics
Posts: 3 Joined: Sat Aug 06, 2016 11:06 am
Post
by inkmathematics » Sat Aug 06, 2016 11:42 am
Here is my code segment.How can I program to make there no text below the number 1?I want the question environment be vertical alignment with "这".Anyone can help me ? Thank you.
Code: Select all
\documentclass{article}
\usepackage{ctex}
\usepackage{exsheets}
\usepackage[showframe]{geometry}
\begin{document}
\SetupExSheets{headings=runin-nr}
\begin{question}
这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种正确解答方法呢?
\end{question}
\end{document}
Last edited by
cgnieder on Sat Aug 06, 2016 12:25 pm, edited 1 time in total.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
Johannes_B
Site Moderator
Posts: 4182 Joined: Thu Nov 01, 2012 4:08 pm
Post
by Johannes_B » Sat Aug 06, 2016 11:59 am
Hi and welcome, i bet the issue also arises without cjk-stuff. It would be easier for the helpers to read and test, as no special fonts are needed. Can you check and update?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Sat Aug 06, 2016 12:45 pm
Something like this?
Code: Select all
\documentclass{article}
\usepackage{exsheets}
\usepackage{scrextend}% provides the {addmargin} environment
\SetupExSheets{
headings = margin-nr ,
question/pre-hook = \addmargin[2em]{0pt} ,
question/post-hook = \endaddmargin ,
question/no-skip-below
}
\usepackage[showframe]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{question}
\lipsum[2]
\end{question}
\begin{question}
\lipsum[3]
\end{question}
\lipsum[4]
\end{document}
exsheets.png (88.5 KiB) Viewed 5483 times
The
{addmargin}
environment takes a mandatory argument for left
and right margin and an optional argument for setting a different left margin than on the right. The example above sets the additional margin to zero but adds a left margin of 2em and puts the question number in the margin.
Regards
inkmathematics
Posts: 3 Joined: Sat Aug 06, 2016 11:06 am
Post
by inkmathematics » Sun Aug 07, 2016 4:37 am
@cgnieder ,Thanks for your reply,Thoug your solution works well with English words ,it does not work well with Chinese words.Can you help me ?
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Sun Aug 07, 2016 11:11 am
inkmathematics wrote: @cgnieder ,Thanks for your reply,Thoug your solution works well with English words ,it does not work well with Chinese words.
What do you mean with “it does not work well”?
Code: Select all
\documentclass{article}
\usepackage{ctex}
\usepackage{exsheets}
\usepackage{scrextend}
\SetupExSheets{
headings = margin-nr ,
question/pre-hook = \addmargin[2em]{0pt} ,
question/post-hook = \endaddmargin ,
question/no-skip-below
}
\usepackage[showframe]{geometry}
\begin{document}
这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出
来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种正确
解答方法呢?
\begin{question}
这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答
出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种
正确解答方法呢?
\end{question}
\begin{question}
这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答
出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种
正确解答方法呢?
\end{question}
这个问题你能正确解答出来么?你能提供几种正确解答方法呢?这个问题你能正确解答出
来么?你能提供几种正确解答方法呢?这个问题你能正确解答出来么?你能提供几种正确
解答方法呢?
\end{document}
exsheets.png (62.8 KiB) Viewed 5354 times
inkmathematics
Posts: 3 Joined: Sat Aug 06, 2016 11:06 am
Post
by inkmathematics » Thu Aug 11, 2016 11:53 am
@cgnieder Thank you very much.You solution has solved my question.