
掲示板のない企業のリストを作成しようとすると、以下のような出力が得られます。
実際、私が望んでいるのはコロン間の正しい間隔です。まさに以下の例のとおりです。
誰か助けてくれませんか?よろしくお願いします。
使用されたコード:
\begin{description}
\item[TCS:] Jeddah,Kochi,Bangalore
\item[InfoSys:] Jeddah,Kochi,Bangalore
\item[Wipro:] Jeddah,Kochi,Bangalore
\end{description}
答え1
シンプルな環境を使用できますtabular
:
\documentclass{article}
\usepackage{array}
\begin{document}
\noindent
\begin{tabular}{@{}l >{:\quad} l}
TCS & Jeddah,Kochi,Bangalore \\
InfoSys & Jeddah,Kochi,Bangalore \\
Wipro & Jeddah,Kochi,Bangalore \\
\end{tabular}
\end{document}
コロンの左右の空白の量を微調整するには、次のようなヘッダーを使用します。
\begin{tabular}{@{}l >{\hspace{8pt}:\hspace{10pt}} l}
好みに合わせ8pt
て10pt
調整できます。(明示的には述べていませんが何「正しい」スペース値は...)
答え2
KOMA-Script のlabeling
リストは、このために使用できます。これは、すべての KOMA-Script クラス (またはなど) で使用できscrartcl
、パッケージscrbook
をロードすることで他のクラスでも使用できますscrextend
。
構文は次のとおりです。
\begin{labeling}[<separator>]{<widest label>}
完全な例:
\documentclass{article}
\usepackage{scrextend}
\begin{document}
\ttfamily
\begin{labeling}[\quad:\quad]{InfoSys}
\item[TCS] Jeddah,Kochi,Bangalore
\item[InfoSys] Jeddah,Kochi,Bangalore
\item[Wipro] Jeddah,Kochi,Bangalore
\end{labeling}
\end{document}