
早安.
我希望在左側邊距旁邊有粗體文字。但我的結果是下圖。
感謝幫助。
\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}