一个项目化问题

一个项目化问题

早上好。

我想让左侧的文本加粗,紧挨着左边距。但我的结果如下图所示。

感谢帮助。

\documentclass[10pt,a6paper]{book}
%46paper
\usepackage[utf8]{inputenc}
\usepackage[main=slovak,english]{babel}
\usepackage[cm]{fullpage}
%showframe
\usepackage[a6paper, top=15mm, left=10mm, right=10mm, bottom=10mm,foot=5mm,marginparsep=0mm]{geometry}
\usepackage{tipa}
\usepackage{tabularx,booktabs}
\usepackage[sfdefault,thin]{roboto}
\usepackage{ amssymb }

\begin{document}

\begin{itemize}
  \item[{\fontfamily{qag}\selectfont\textbf{abrupt}}]       \quad {\fontfamily{phv}\selectfont [\textipa{@\textprimstress br2pt}]}\\
    {náhly, neočakávaný $\blacklozenge$ strohý, úsečný}
  \item[{\fontfamily{qag}\selectfont\textbf{acidic}}]       \quad {\fontfamily{phv}\selectfont [\textipa{@\textprimstress sId.Ik}]}\\
{kyslý, kyselinový}
  \item[{\fontfamily{qag}\selectfont\textbf{adorable}}]     \quad {\fontfamily{phv}\selectfont [\textipa{@\textprimstress dO:[email protected]\super@l}]}\\  
    {rozkošný, nádherný}
  \item[{\fontfamily{qag}\selectfont\textbf{adventurous}}]  \quad {\fontfamily{phv}\selectfont [\textipa{@d\textprimstress ven.tS\super @r.@s}]}\\   
    {odvážny, smelý \textit{(ochotný riskovať ap.)} $\blacklozenge$ dobrodružný}
\end{itemize}  

\end{document}

在此处输入图片描述

答案1

正如您所注意到的,标签\item仅占据足够容纳项目符号的空间。如果标签太长,它将超出左边距,并最终超出页面。对于您来说,使用tabular或 会更方便,如下例所示tabularx。您的示例的简化版本可以是:

\documentclass{article}
\usepackage[a6paper, top=15mm, left=10mm, right=10mm, bottom=10mm,foot=5mm,marginparsep=0mm]{geometry}
\usepackage{tabularx}
\begin{document}
%%% Test of long item label
\begin{itemize}
\item[Test of long label] sdjkgf
\item  jsdgfjbc
\end{itemize}

Tabular:

\noindent
\begin{tabularx}{\linewidth}{rX}
  \textbf{abrupt}      & {\fontfamily{phv}\selectfont [text]}\\
  & náhly, neocakávaný strohý, úsečný \\
  \textbf{acidic}      & {\fontfamily{phv}\selectfont [text]}\\
  & kyslý, kyselinový \\
  \textbf{adorable}    & {\fontfamily{phv}\selectfont [text]}\\  
  & rozkošný, nádherný \\
  \textbf{adventurous} & {\fontfamily{phv}\selectfont [text]}\\   
  & odvážny, smelý \textit{(ochotný riskovať ap.)} dobrodružný 
\end{tabularx}

\end{document}

在此处输入图片描述

答案2

使用环境description

\documentclass[10pt,a6paper]{book}
%46paper
\usepackage[utf8]{inputenc}
\usepackage[main=slovak,english]{babel}
\usepackage[cm]{fullpage}
\usepackage{calc}
%showframe
\usepackage[a6paper, top=15mm, left=10mm, right=10mm, 
bottom=10mm,foot=5mm,marginparsep=0mm]{geometry}
\usepackage{tipa}
\usepackage{tabularx,booktabs}
%\usepackage[sfdefault,thin]{roboto}
\usepackage{ amssymb }
\newcommand\qag[1]{\fontfamily{qag}\selectfont 
\makebox[\widthof{adventurous}][r]{#1}}
\newcommand\phv[2][]{{\fontfamily{phv}\selectfont
     [\textipa{#1@\textprimstress#2}]}}

\begin{document}

\hrule

\begin{description}
\item[\qag{abrupt}]  \quad \phv{br2pt}\\
        náhly, neočakávaný $\blacklozenge$ strohý, úsečný
\item[\qag{acidic}]  \quad \phv{sId.Ik}\\
        kyslý, kyselinový
\item[\qag{adorable}]\quad \phv{dO:[email protected]\super@l}\\  
        rozkošný, nádherný
\item[\qag{adventurous}]\quad \phv[d]{ven.tS\super @r.@s}\\   
        odvážny, smelý \textit{(ochotný riskovať ap.)} $\blacklozenge$ dobrodružný
\end{description}  

\end{document}

在此处输入图片描述

相关内容