## LaTeX forum ⇒ Text Formatting ⇒ vertical alignment about the question env of exsheets Topic is solved

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

### vertical alignment about the question env of exsheets

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.

\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.

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
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: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Something like this?

\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 2477 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
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

inkmathematics
Posts: 3
Joined: Sat Aug 06, 2016 11:06 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: 1988
Joined: Sat Apr 16, 2011 7:27 pm
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”?

\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 2348 times
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

inkmathematics
Posts: 3
Joined: Sat Aug 06, 2016 11:06 am
@cgnieder Thank you very much.You solution has solved my question.