
おはよう。
太字のテキストを左側の左余白の隣に配置したいのですが、結果は次の図のようになります。
手伝ってくれてありがとう。
\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}