![行距问题和多项选择选项编辑](https://linux22.com/image/439334/%E8%A1%8C%E8%B7%9D%E9%97%AE%E9%A2%98%E5%92%8C%E5%A4%9A%E9%A1%B9%E9%80%89%E6%8B%A9%E9%80%89%E9%A1%B9%E7%BC%96%E8%BE%91.png)
为什么红色垂直对齐不规则?我想用大写粗体字母显示选项,并且我想水平对齐选项。请帮帮我
\documentclass[a4paper]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
\usepackage{tasks}
\usepackage{multicol}
\usepackage{lastpage}
\usepackage{pgfplots,relsize}
\usetikzlibrary{shapes.symbols}
\usepackage{ragged2e}
\usepgfplotslibrary{fillbetween}
\usepackage{fancyhdr}
\usepackage{amsmath}
\makeatletter
\newcommand\myfrac[2]{\frac{\;\;#1\;\;}{\;\;#2\;\;}}
\makeatother
\usetikzlibrary{calc}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\newcounter{numex}
\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{1.2cm}
\newcommand\Startex{%
\stepcounter{numex}
\begin{flushleft}
\textbf{\thenumex)}
\end{flushleft}}
\vspace{1.65cm}
\newcommand{\thickfrac}[2]{\genfrac{}{}{0.9pt}{0}{#1}{#2}}
\newcommand\bigfrac[3][2.0pt]{%
{\thickfrac{\hspace{#1}#2\hspace{#1}}{\hspace{#1}#3\hspace{#1}}}}
\let\oldfrac\frac
\let\frac\bigfrac
%
\usepackage{MnSymbol}
\begin{document}
\begin{multicols*}{2}
%-
\vspace*{0.2cm}
\Startex
\begin{justify}
Here is the question text Here is the question text text
\end{justify}
\hspace{0.5cm}$\myfrac{15^x+ 35^y}{25^y+21^z}$
\begin{justify}
Here is the question text
\end{justify}
\begin{justify}
\textbf{Here is the question text}
\end{justify}
\begin{tasks}(2)
\task first answer
\task second answer
\task third answer
\task fourth answer
\end{tasks}
\end{multicols*}
\end{document}
\end{document}
答案1
我认为这符合你的要求。
我改变了 的定义\Startex
。您必须使用\Startex{<text of the question>}
。问题的所有文本都将左对齐。
还添加了任务的配置,以获取大写、粗体和左边距。
% !TeX TS-program = pdflatex
\documentclass[a4paper]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
\usepackage{tasks}
\usepackage{multicol}
\usepackage{lastpage}
\usepackage{pgfplots,relsize}
\usetikzlibrary{shapes.symbols}
\usepackage{ragged2e}
\usepgfplotslibrary{fillbetween}
\usepackage{fancyhdr}
\usepackage{amsmath}
\makeatletter
\newcommand\myfrac[2]{\frac{\;\;#1\;\;}{\;\;#2\;\;}}
\makeatother
\usetikzlibrary{calc}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\newcounter{numex}
\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{1.2cm}
%%******************
\newcommand{\Startex}[1]{% changed <<<<<<<<<<<<<<<<<<<<<
\noindent
\parbox[t]{\columnwidth}{%
\stepcounter{numex}
\setlength{\parskip}{0pt}
\textbf{\thenumex)}\vspace*{0.2cm}
#1}
}
\newlength{\taskindent}
\settowidth{\taskindent}{\textbf{m)}}
\settasks{% added <<<<<<<<<<
item-indent=\taskindent, % align with margin <<<<<<<<<<<
label-format = \bfseries\MakeUppercase, % format labels <<<<<<<<<<
after-skip = 3ex, % space after the list
}
%%******************
\newcommand{\thickfrac}[2]{\genfrac{}{}{0.9pt}{0}{#1}{#2}}
\newcommand\bigfrac[3][2.0pt]{%
{\thickfrac{\hspace{#1}#2\hspace{#1}}{\hspace{#1}#3\hspace{#1}}}}
\let\oldfrac\frac
\let\frac\bigfrac
%
\usepackage{MnSymbol}
\usepackage{showframe} % only to show the margin <<<<<<<<<<
\begin{document}
\begin{multicols*}{2}
\Startex{%
Here is the question text Here is the question text text
\bigskip
\hspace{0.5cm}$\myfrac{15^x+ 35^y}{25^y+21^z}$
\bigskip
Here is the question text
\textbf{Here is the question text}
}
\begin{tasks}(2)
\task first answer
\task second answer
\task third answer
\task fourth answer
\end{tasks}
\Startex{% new question <<<<<
Here is a new question text Here is a new question text text
\bigskip
\hspace{0.5cm}$\myfrac{15^x+ 35^y}{25^y+21^z}$
\bigskip
Here is the question text
\textbf{Here is the question text}
}
\begin{tasks}(2)
\task first answer
\task second answer
\task third answer
\task fourth answer
\end{tasks}
\end{multicols*}
\end{document}