水平方向に間隔を空けたリスト項目

水平方向に間隔を空けたリスト項目

掲示板のない企業のリストを作成しようとすると、以下のような出力が得られます。

ここに画像の説明を入力してください

実際、私が望んでいるのはコロン間の正しい間隔です。まさに以下の例のとおりです。 ここに画像の説明を入力してください

誰か助けてくれませんか?よろしくお願いします。

使用されたコード:

\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}

好みに合わせ8pt10pt調整できます。(明示的には述べていませんが「正しい」スペース値は...)

答え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}

ここに画像の説明を入力してください

関連情報