여러 열과 여러 행 테이블의 줄 바꿈

여러 열과 여러 행 테이블의 줄 바꿈

이 테이블을 만들어 보았으나 여전히 페이지 너비보다 길어졌습니다. 또한 페이지 길이보다 깁니다. 이 테이블을 작동시키는 방법을 아는 사람이 있나요? 또한 LaTeX와 이 포럼을 사용한 것은 이번이 처음입니다. 따라서 아래 코드가 올바르지 않은 경우 죄송합니다.

\begin{center}
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{2}{|c|}{Risk Parameter} & \multicolumn{1}{c|}{Classification} \\ \hline
\multirow{4}{*}{\parbox{5cm}{Consequence (C) Number of fatalities This can be calculated by determining the numbers of people present when the area exposed to the hazard is occupied and multiplying by the vulnerability to the identified hazard. The vulnerability is determined by  the nature of the hazard being protected against. The following factors can be used: V = 0,01 Small release of flammable or  toxic material V = 0,1 Large release of flammable or toxic material V = 0,5 As above but also a high probability of catching fire or  highly toxic material V = 1 Rupture or explosion} & C_{A} & Minor Injury \\
 & C_{B} & Range 0.01 to 0.1 \\
 & C_{C} & Range 0.1 to 1 \\
 & C_{D} & Range \textgreater1,0 \\ \cline{1-1}
\multirow{2}{*}{\parbox{5cm}{Occupancy (F) This is calculated by determining the proportional length of time the area exposed to the hazard is occupied during a normal working period. NOTE 1 If the time in the hazardous area is different depending on the shift being operated then the maximum should be selected.NOTE 2 It is only appropriate to use FA where it can be shown that the demand rate is random and not related to when occupancy could be higher than normal. The latter is usually the case with demands which occur at equipment start-up or during the investigation of abnormalities.} & F_{A} & Rare to more frequent exposure in the hazardous zone. Occupancy less than 0.1 \\
 & F_{B} & Frequent to permanent exposure in the hazardous zone \\ \cline{1-1}
\multirow{2}{5cm}{Probability of avoiding the hazardous event (P) if the protection system fails to operate.} & P_{A} & P_{A} should only be selected if all the following are true: - facilities are provided to alert the operator that the SIS has failed; - independent facilities are provided to shut down such that the hazard can be avoided or which enable all persons to escape to a safe area; - the time between the operator being alerted and a hazardous event occurring exceeds 1 hour or is definitely sufficient for the necessary actions. \\
 & P_{B} & Adopted if all the conditions are not satisfied \\ \cline{1-1}
\multirow{4}{*}{\parbox{5cm}{Demand rate (W) The number of times per year that the hazardous event would occur in absence of SIF under consideration. To determine the demand rate it is necessary to consider all sources of failure that can lead to one hazardous event. In determining the demand rate, limited credit can be allowed for control system performance and intervention. The performance which can be claimed if the control system is not to be designed and maintained according to IEC 61511, is limited to below the  performance ranges associated with SIL1.} & W_{1} & Demand rate less than 0.1 D per year \\
 & W_{2} & Demand rate between 0.1 D and D per year \\
 & W_{3} & Demand rate between D and 10 D per year \\
 &  & For demand rates higher than 10 D per year higher integrity shall be needed \\ \cline{1-1}
\end{tabular}
\end{center}

편집: 이제 코드를 조금 변경했는데 보기에는 좋아졌지만 \usepackage{multirow}처음에 컴파일할 때 여전히 오류가 발생합니다.

\documentclass{article}
\usepackage[utf8]{inputenc}
%\usepackage{multirow}
\usepackage{longtable}

\begin{document}

\begin{center}
\begin{longtable}[l]{|l|l|p{5cm}|}
\hline
\multicolumn{2}{|c|}{Risk Parameter} & \multicolumn{1}{c|}{Classification} \\ \hline
\multirow{4}{*}{\parbox{5cm}{Consequence (C) Number of fatalities This can be calculated by determining the numbers of people present when the area exposed to the hazard is occupied and multiplying by the vulnerability to the identified hazard. The vulnerability is determined by  the nature of the hazard being protected against. The following factors can be used: V = 0,01 Small release of flammable or  toxic material V = 0,1 Large release of flammable or toxic material V = 0,5 As above but also a high probability of catching fire or  highly toxic material V = 1 Rupture or explosion} & C_{A} & Minor Injury \\
 & C_{B} & Range 0.01 to 0.1 \\
 & C_{C} & Range 0.1 to 1 \\
 & C_{D} & Range \textgreater1,0 \\ \cline{1-1}
\multirow{2}{*}{\parbox{5cm}{Occupancy (F) This is calculated by determining the proportional length of time the area exposed to the hazard is occupied during a normal working period. NOTE 1 If the time in the hazardous area is different depending on the shift being operated then the maximum should be selected.NOTE 2 It is only appropriate to use FA where it can be shown that the demand rate is random and not related to when occupancy could be higher than normal. The latter is usually the case with demands which occur at equipment start-up or during the investigation of abnormalities.} & F_{A} & Rare to more frequent exposure in the hazardous zone. Occupancy less than 0.1 \\
 & F_{B} & Frequent to permanent exposure in the hazardous zone \\ \cline{1-1}
\multirow{2}{*}{\parbox{5cm}{Probability of avoiding the hazardous event (P) if the protection system fails to operate.} & $P_{A}$ & $P_{A}$ should only be selected if all the following are true: - facilities are provided to alert the operator that the SIS has failed; - independent facilities are provided to shut down such that the hazard can be avoided or which enable all persons to escape to a safe area; - the time between the operator being alerted and a hazardous event occurring exceeds 1 hour or is definitely sufficient for the necessary actions. \\
 &  $P_{B}$ & Adopted if all the conditions are not satisfied \\ \cline{1-1}
\multirow{4}{*}{\parbox{5cm}{Demand rate (W) The number of times per year that the hazardous event would occur in absence of SIF under consideration. To determine the demand rate it is necessary to consider all sources of failure that can lead to one hazardous event. In determining the demand rate, limited credit can be allowed for control system performance and intervention. The performance which can be claimed if the control system is not to be designed and maintained according to IEC 61511, is limited to below the  performance ranges associated with SIL1.} & W_{1} & Demand rate less than 0.1 D per year \\
 & W_{2} & Demand rate between 0.1 D and D per year \\
 & W_{3} & Demand rate between D and 10 D per year \\
 &  & For demand rates higher than 10 D per year higher integrity shall be needed \\ \cline{1-1}
\end{longtable}
\end{center}
\end{document}

답변1

여기에 해결책이 있습니다. 모든 수직선을 제거하고 , 및 패키지를 사용했습니다 booktabs( makecell후자 는 및 ltablex의 기능을 결합하고 일부 내부 셀 환경을 도입했으며 테이블 레이아웃에 몇 가지 다른 수정 사항을 도입했습니다.longtabletabularxitemize

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage[inline]{enumitem}
\usepackage{ragged2e}
\usepackage{booktabs}
\usepackage{array, multirow, makecell, hhline}
\usepackage{ltablex}
\renewcommand\cellalign{lt}\renewcommand\theadfont{\normalfont}
\setcellgapes{4pt}
\makegapedcells
\begin{document}

\begin{tabularx}{\linewidth}{>{\RaggedRight}p{0.5 \linewidth}l>{\RaggedRight\arraybackslash}X}
\hline
\multicolumn{2}{c}{Risk Parameter} & \thead{Classification} \\
\toprule
\multirow{1}{\linewidth}{{Consequence (C) Number of fatalities This can be calculated by determining the numbers of people present when the area exposed to the hazard is occupied and multiplying by the vulnerability to the identified hazard. The vulnerability is determined by the nature of the hazard being protected against. \\
The following factors can be used: %\\
\begin{itemize}[noitemsep,topsep=4pt, wide = 0pt, leftmargin =2.1em]
\item[$ \mathrm{V = 0,01:} $]Small release of flammable or toxic material
\item[$ \mathrm{V = 0,1:} $]Large release of flammable or toxic material
\item[$ \mathrm{V = 0,5:} $]As above but also a high probability of catching fire or highly toxic material
\item[$ \mathrm{V = 1:} $]Rupture or explosion
\end{itemize}}}%
& $ C_{A} $ & Minor Injury \\
 & $ C_{B} $ & Range 0.01 to 0.1 \\
 & $ C_{C} $ & Range 0.1 to 1 \\
 & $ C_{D} $ & Range $ > 1,0 $
\\[9.5\baselineskip]
\cmidrule{1-1}
\multirow{2}{\linewidth}{{Occupancy (F) This is calculated by determining the proportional length of time the area exposed to the hazard is occupied during a normal working period. \\[1ex]
\small\textsc{Note 1:} If the time in the hazardous area is different depending on the shift being operated then the maximum should be selected.}} & $ F_{A} $ & Rare to more frequent exposure in the hazardous zone. Occupancy less than 0.1 \\
 & $ F_{B} $ & Frequent to permanent exposure in the hazardous zone \\
 & & \\[-1ex]
\small\textsc{Note 2:} It is only appropriate to use FA where it can be shown that the demand rate is random and not related to when occupancy could be higher than normal. The latter is usually the case with demands which occur at equipment start-up or during the investigation of abnormalities. & & \\ %
\cmidrule{1-1}
\multirow{2}{\linewidth}{Probability of avoiding the hazardous event (P) if the protection system fails to operate.} & $ P_{A} $ & $ P_{A} $ should only be selected if all the following are true:%
 \begin{itemize*}[label = --, itemjoin = \linebreak, before = \linebreak]%[ noitemsep]
 \item facilities are provided to alert the operator that the SIS has failed;
 \item independent facilities are provided to shut down such that the hazard can be avoided or which enable all persons to escape to a safe area;
 \item the time between the operator being alerted and a hazardous event occurring exceeds 1 hour or is definitely sufficient for the necessary actions.
 \end{itemize*} \\
 & $ P_{B} $ & Adopted if all the conditions are not satisfied \\
\cmidrule{1-1}
\multirow{4}{\linewidth}{{Demand rate (W) The number of times per year that the hazardous event would occur in absence of SIF under consideration. To determine the demand rate it is necessary to consider all sources of failure that can lead to one hazardous event. In determining the demand rate, limited credit can be allowed for control system performance and intervention. The performance which can be claimed if the control system is not to be designed and maintained according to IEC 61511, is limited to below the performance ranges associated with SIL1.}} & $ W_{1} $ & Demand rate less than 0.1 D per year \\
 & $ W_{2} $ & Demand rate between 0.1 D and D per year \\
 & $ W_{3} $ & Demand rate between D and 10 D per year \\
 & & For demand rates higher than 10 D per year higher integrity shall be needed \\[2\baselineskip]
 \bottomrule
\end{tabularx}

\end{document} 

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

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

관련 정보