정렬된 \설명

정렬된 \설명

암호

\documentclass[a4paper,twoside,12pt]{book}
\usepackage[utf8]{inputenc}

\begin{document}
\noindent Let us define:
\begin{description}
  \item[$C_{DEP}$] (\euro) depreciation of the machine.
  \item[$C_{EN}$] (\euro) energy cost.
  \item[$CE$] (\euro /year) energy cost per year.
  \item[$CMAT_{(W \geq W_L)}$] (\euro\textcentoldstyle) cost of raw material regarding the ``conforming'' packages.
  \item[$CMAT_{(W < W_L)}$] (\euro\textcentoldstyle) cost of raw material regarding the ``non conforming'' packages.
  \item[$CS$] (\euro\textcentoldstyle) cost of sorting.
  \item[$CP$] (\euro\textcentoldstyle) cost of the packaging material.
  \item[$c_{pack}$] (\euro /kg) cost of the packaging material per kilogram.
  \item[$c_u$] (\euro\textcentoldstyle/g) cost of the raw material per gram.
  \item[$\delta$] dummy variable to consider both rework and scrap packages.
  \item[$DEP$] (\euro /year) depreciation of the machine per year.
  \item[$E(W|W \geq W_L)$] (g/package) expected weight value of the ``conforming'' packages.
  \item[$E(W|W < W_L)$] (g/package) expected weight value of the ``non conforming'' packages.
  \item[$LAB$] (\euro /h) labor cost per hour.
  \item[$n_B$] number of ``conforming'' packages.
  \item[$P$] number of packages produced in a specific time interval.
  \item[$Q_{pack}$] (kg/package) quantity of the packaging material per package.
  \item[$t$] (hours/package) production time.
  \item[$W$] (g/package) quantity of product delivered in each package, it can be modeled as a random variable with an unknown distribution.
  \item[$W_L$]              (g/package) legal weight of the package. The tolerable negative error in the contents of a prepackage is fixed in accordance with the table below:

\begin{table}[htbp]
    \captionsetup{font=small} % Set the caption font size
\begin{center}
\begin{tabular}{cc | cc}

\toprule
\multicolumn{2}{c}{$W_T$ in \si{\gram} or \si{\ml}} & \multicolumn{2}{|c}{Tolerable negative error}\\
\midrule
from    &   to              &   as \% of $W_T$  &     \si{\gram} or \si{\ml}\\
\midrule
5       &   50              &   9               &   -       \\
50      &   100             &   -               &   4.5     \\
100     &   200             &   4.5             &   -       \\
200     &   300             &   -               &   9       \\
300     &   500             &   3               &   -       \\
500     &   1000            &   -               &   15      \\
1000    &   \num{10000}     &   1.5             &   -       \\
\bottomrule

\end{tabular}
\vspace{5pt} % a little space to shift the caption down
\caption{tolerable negative error}
\label{tab:legislation}
\end{center}
\end{table}
  \item[$W_T$] (g) Target weight value of a package.
  \item[$TI$] (s) time used to take care of the ``non conforming'' packages.
\item[$WH$] (hours/year) working hours of the machine per year.

\end{description}
\end{document}

산출

산출

질문

기호, 측정 단위 및 설명을 정렬하는 쉬운 방법이 있습니까? 테이블을 사용하여 정렬하는 것을 피하고 싶습니다. 나는 다음과 같은 것을 원합니다:

SYMBOL    (Units)    Long long long long long long long long long long long long long
SYMBOL_2  (Units)    Long long long long long long long long long long long long long
                     Long long long long long long long long long long long long long

답변1

이 가능한 솔루션은 다음에 소개된 기술을 활용합니다.설명이 정렬된 설명 목록abox두 번째 열 정렬이 설정되도록 기호에 대해 왼쪽 정렬로 3cm 길이의 상자 라는 매크로를 정의합니다 .

여기에 이미지 설명을 입력하세요

암호

\documentclass[a4paper,twoside,12pt]{book}
\usepackage[margin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{eurosym,booktabs}
%\usepackage{amsmath,amssymb,latexsym}
\usepackage{textcomp,siunitx,caption}
\usepackage{calc} 
\usepackage{enumitem}

\def\abox#1{\leavevmode\hbox to 3cm{#1\ \hfill}}

\begin{document}

\noindent Let us define:
\begin{description}[leftmargin=6.2cm,labelwidth=\widthof{$E(W|W < W_L)$}]
\item[$C_{DEP}$]  \abox{(\euro)} depreciation of the machine.
\item[$C_{EN}$]   \abox{(\euro)}  energy cost.
\item[$CE$]       \abox{(\euro/year)} energy cost per year.
\item[$CMAT_{(W \geq W_L)}$] \abox{(\euro\textcentoldstyle)} cost of raw material regarding the ``conforming'' packages.
\item[$CMAT_{(W < W_L)}$]    \abox{(\euro\textcentoldstyle)} cost of raw material regarding the ``non conforming'' packages.
\item[$CS$]       \abox{(\euro\textcentoldstyle)} cost of sorting.
\item[$CP$]       \abox{(\euro\textcentoldstyle)} cost of the packaging material.
\item[$c_{pack}$] \abox{(\euro /kg)} cost of the packaging material per kilogram.
\item[$c_u$]      \abox{(\euro\textcentoldstyle/g)} cost of the raw material per gram.
\item[$\delta$]   \abox{} dummy variable to consider both rework and scrap packages.
\item[$DEP$]      \abox{(\euro /year)} depreciation of the machine per year.
\item[$E(W|W \geq W_L)$]\abox{(g/package)} expected weight value of the ``conforming'' packages.
\item[$E(W|W < W_L)$]   \abox{(g/package)} expected weight value of the ``non conforming'' packages.
\item[$LAB$]      \abox{(\euro /h)} labor cost per hour.
\item[$n_B$]      \abox{} number of ``conforming'' packages.
\item[$P$]        \abox{} number of packages produced in a specific time interval.
\item[$Q_{pack}$] \abox{(kg/package)} quantity of the packaging material per package.
\item[$t$]        \abox{(hours/package)} production time.
\item[$W$]        \abox{(g/package)} quantity of product delivered in each package, it can be modeled as a random variable with an unknown distribution.
\item[$W_L$]      \abox{(g/package)} legal weight of the package. The tolerable negative error in the contents of a prepackage is fixed in accordance with the table below:

\begin{table}[htbp]
\captionsetup{font=small} % Set the caption font size
\begin{center}
\begin{tabular}{cc | cc}

\toprule
\multicolumn{2}{c}{$W_T$ in \si{\gram} or \si{\ml}} & \multicolumn{2}{|c}{Tolerable negative error}\\
\midrule
from    &   to              &   as \% of $W_T$  &     \si{\gram} or \si{\ml}\\
\midrule
5       &   50              &   9               &   -       \\
50      &   100             &   -               &   4.5     \\
100     &   200             &   4.5             &   -       \\
200     &   300             &   -               &   9       \\
300     &   500             &   3               &   -       \\
500     &   1000            &   -               &   15      \\
1000    &   \num{10000}     &   1.5             &   -       \\
\bottomrule

\end{tabular}
\vspace{5pt} % a little space to shift the caption down
\caption{tolerable negative error}
\label{tab:legislation}
\end{center}
\end{table}
\item[$W_T$] \abox{(g)} Target weight value of a package.
\item[$TI$]  \abox{(s)} time used to take care of the ``non conforming'' packages.
\item[$WH$]  \abox{(hours/year)} working hours of the machine per year.
\end{description}
\end{document}

답변2

필요에 따라 \onelen및 값을 수정 하고 다음 예와 같이 대신 사용하십시오.\twolen\myitem\item

\documentclass[a4paper,twoside,12pt]{book}
\usepackage[margin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{eurosym}
\usepackage{textcomp}
\usepackage{siunitx}
\usepackage{caption,booktabs}
\usepackage{enumitem} 

\newlength\onelen
\newlength\twolen

\setlength\onelen{6.35cm}
\setlength\twolen{3cm}

\newcommand{\myitem}[2]{%
  \item[#1] \makebox[\twolen][l]{#2}%
  }

\begin{document}
\noindent Let us define:
\begin{description}[leftmargin=\onelen,labelwidth=3cm]
  \myitem{$C_{DEP}$}{(\euro)} depreciation of the machine.
  \myitem{$C_{EN}$}{(\euro)} energy cost.
  \myitem{$CE$}{(\euro /year)} energy cost per year.
  \myitem{$CMAT_{(W \geq W_L)}$}{(\euro\textcentoldstyle)} cost of raw material regarding the ``conforming'' packages.
  \myitem{$CMAT_{(W < W_L)}$}{(\euro\textcentoldstyle)} cost of raw material regarding the ``non conforming'' packages.
  \myitem{$CS$}{(\euro\textcentoldstyle)} cost of sorting.
  \myitem{$CP$}{(\euro\textcentoldstyle)} cost of the packaging material.
  \myitem{$c_{pack}$}{(\euro /kg)} cost of the packaging material per kilogram.
  \myitem{$c_u$}{(\euro\textcentoldstyle/g)} cost of the raw material per gram.
  \myitem{$\delta$}{} dummy variable to consider both rework and scrap packages.
  \myitem{$DEP$}{(\euro /year)} depreciation of the machine per year.
  \myitem{$E{(W|W \geq W_L)}$}{(g/package)} expected weight value of the ``conforming'' packages.
  \myitem{$E(W|W < W_L)$}{{(g/package)}} expected weight value of the ``non conforming'' packages.
  \myitem{$LAB$}{(\euro /h)} labor cost per hour.
  \myitem{$n_B$}{} number of ``conforming'' packages.
  \myitem{$P$}{} number of packages produced in a specific time interval.
  \myitem{$Q_{pack}$}{(kg/package)} quantity of the packaging material per package.
  \myitem{$t$}{(hours/package)} production time.
  \myitem{$W$}{(g/package)} quantity of product delivered in each package, it can be modeled as a random variable with an unknown distribution.
  \myitem{$W_L$}{(g/package)} legal weight of the package. The tolerable negative error in the contents of a prepackage is fixed in accordance with the table below:

\begin{table}[htbp]
    \captionsetup{font=small} % Set the caption font size
\begin{center}
\begin{tabular}{cc | cc}

\toprule
\multicolumn{2}{c}{$W_T$ in \si{\gram} or \si{\ml}} & \multicolumn{2}{|c}{Tolerable negative error}\\
\midrule
from    &   to              &   as \% of $W_T$  &     \si{\gram} or \si{\ml}\\
\midrule
5       &   50              &   9               &   -       \\
50      &   100             &   -               &   4.5     \\
100     &   200             &   4.5             &   -       \\
200     &   300             &   -               &   9       \\
300     &   500             &   3               &   -       \\
500     &   1000            &   -               &   15      \\
1000    &   \num{10000}     &   1.5             &   -       \\
\bottomrule

\end{tabular}
\vspace{5pt} % a little space to shift the caption down
\caption{tolerable negative error}
\label{tab:legislation}
\end{center}
\end{table}
  \myitem{$W_T$}{(g)} Target weight value of a package.
  \myitem{$TI$}{(s)} time used to take care of the ``non conforming'' packages.
  \myitem{$WH$}{(hours/year)} working hours of the machine per year.

\end{description}
\end{document} 

여기에 이미지 설명을 입력하세요

답변3

그냥 사용하고 싶다면description목록을 사용하고 다음과 같이 수행데이비드가 제안했다, 항목 설명에 모든 것을 채우면 \rlap및 를 사용하여 저렴한 정렬을 얻을 수 있습니다 \phantom. (두 명령에 대한 인수는 \phantom각각 "기호" 및 "단위" 필드에서 가장 긴 항목이어야 합니다.)

\documentclass{article}
\usepackage[official]{eurosym}
\usepackage[utf8]{inputenc}


\newcommand\itemd[2]{\item[\rlap{#1}\phantom{$CMAT_{(W<W_L)}$} \rlap{(#2)}\phantom{\euro{}
/ package}]}

\begin{document}
\noindent Let us define:
\begin{description}
  \itemd{$C_{DEP}$}{\euro{}} depreciation of the machine.
  \itemd{$C_{EN}$}{\euro{}} energy cost.
  \itemd{$CE$}{\euro{} /year} energy cost per year.
  \itemd{$CMAT_{(W \geq W_L)}$}{\euro{}} cost of raw
material regarding the ``conforming'' packages.
  \itemd{$CMAT_{(W < W_L)}$}{\euro{}} cost of raw
material regarding the ``non conforming'' packages.
  \itemd{$CS$}{\euro{}} cost of sorting.
  \itemd{$c_{pack}$}{\euro{} /kg} cost of the packaging material per
kilogram.
  \itemd{$c_u$}{\euro{}/g} cost of the raw material per
gram.
  \itemd{$\delta$}{none} dummy variable to consider both rework and scrap
packages.
  \itemd{$DEP$}{\euro{} /year} depreciation of the machine per year.
  \itemd{$E(W|W \geq W_L)$}{g/package} expected weight value of the
``conforming'' packages.
\end{description}
\end{document}

(저는 이 출력을 그다지 좋아하지 않기 때문에 CW를 게시합니다. 길이가 다른 기호와 단위가 많으면 정렬된 출력이 어색해 보일 것입니다.)

여기에 이미지 설명을 입력하세요

답변4

가능한 페이지 나누기 와 함께 werl을 tablex지원하는 a를 사용하십시오 .longtabletabularx

\documentclass[a4paper,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{textcomp,eurosym}
\usepackage{ltablex}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{caption}
\captionsetup{font=small} % Set the caption font size

\begin{document}
\noindent Let us define:

\noindent
\begin{tabularx}{\linewidth}{@{}r X@{}}
$C_{DEP}$ (\euro) & depreciation of the machine.\\
$C_{EN}$  (\euro) & energy cost.\\
$CE$      (\euro /year) & energy cost per year.\\
$CMAT_{(W \geq W_L)}$ (\euro\textcentoldstyle) & cost of raw material regarding the ``conforming'' packages.\\
$CMAT_{(W < W_L)}$ (\euro\textcentoldstyle) & cost of raw material regarding the ``non conforming'' packages.\\
$CS$ (\euro\textcentoldstyle) & cost of sorting.\\
$CP$ (\euro\textcentoldstyle) & cost of the packaging material.\\
$c_{pack}$ (\euro /kg) & cost of the packaging material per kilogram.\\
$c_u$ (\euro\textcentoldstyle/g) & cost of the raw material per gram.\\
$\delta$ & dummy variable to consider both rework and scrap packages.\\
$DEP$ (\euro /year) & depreciation of the machine per year.\\
$E(W|W \geq W_L)$ (g/package) & expected weight value of the ``conforming'' packages.\\
$E(W|W < W_L)$ (g/package) & expected weight value of the ``non conforming'' packages.\\
$LAB$ (\euro /h) & labor cost per hour.\\
$n_B$ & number of ``conforming'' packages.\\
$P$ & number of packages produced in a specific time interval.\\
$Q_{pack}$ (kg/package) & quantity of the packaging material per package.\\
$t$ (hours/package) & production time.\\
$W$ (g/package) & quantity of product delivered in each package, it can be modeled as a random variable with an unknown distribution.\\
$W_L$ (g/package) & legal weight of the package. The tolerable negative error in the contents of a prepackage is fixed in accordance with the table below: 
\end{tabularx}

\addtocounter{table}{-1}
\begin{longtable}{cc | cc}\toprule
\multicolumn{2}{c}{$W_T$ in \si{\gram} or \si{\ml}} & \multicolumn{2}{|c}{Tolerable negative error}\\
\midrule
from    &   to              &   as \% of $W_T$  &     \si{\gram} or \si{\ml}\\
\midrule
5       &   50              &   9               &   -       \\
50      &   100             &   -               &   4.5     \\
100     &   200             &   4.5             &   -       \\
200     &   300             &   -               &   9       \\
300     &   500             &   3               &   -       \\
500     &   1000            &   -               &   15      \\
1000    &   \num{10000}     &   1.5             &   -       \\\bottomrule
\caption{tolerable negative error}\label{tab:legislation} \\
\end{longtable}

\begin{tabularx}{\linewidth}{@{}r l X@{}}
$W_T$ (g) & Target weight value of a package.\\
$TI$ (s) & time used to take care of the ``non conforming'' packages.\\
$WH$ (hours/year) & working hours of the machine per year.\\
\end{tabularx}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보