W
W
wyfinger2015-06-08 16:19:00
TeX
wyfinger, 2015-06-08 16:19:00

How to make a table in Latex?

I want to make such a sign:
802a2f76220c42faa7350fc40d84b38b.png
So far I did this:

\begin{table}[h]
        \centering
        \small
        \begin{tabular}{|>{\centering\arraybackslash}p{0.3\textwidth}|>{\centering}p{0.08\textwidth}|>{\centering\arraybackslash}m{0.08\textwidth}|>{\centering\arraybackslash}m{0.08\textwidth}|>{\centering\arraybackslash}m{0.08\textwidth}|>{\centering\arraybackslash}m{0.08\textwidth}|>{\centering\arraybackslash}m{0.08\textwidth}|}
                \hline
                \multirow{3}{*}{Место установки АПВ} & \multicolumn{4}{c|}{Трехфазное АПВ} & \multicolumn{2}{>{\centering}p{0.2\textwidth}|}{\multirow{2}{*}{ \parbox[c]{0.2\textwidth}{Однофазное АПВ однократного действия}}} \\
                \cline{2-5}
                & \multicolumn{2}{>{\centering}p{0.2\textwidth}|}{Однократного действия} & \multicolumn{2}{>{\centering}p{0.2\textwidth}|}{Многократного действия} & \multicolumn{2}{c|}{} \\
                \cline{2-7}
                & успешно & неуспешно & успешно & неуспешно & успешно & неуспешно \\
                \hline
                Воздушные линии 2--10~\textit{кв} & 53.5 & 46.5 & 56.2 & 43.8 & --- & --- \\
                То же 20--35~\textit{кв} & 69.5 & 30.5 & 78.1 & 21.9 & --- & --- \\
                110--154~\textit{кв} & 75.0 & 25.0 & 80.5 & 19.5 & 73.2 & 26.8 \\              
                220--330~\textit{кв} & 76.5 & 23.5 & 77.2 & 22.8 & 80.7 & 19.3 \\
                400-500~\textit{кв} & 67.0 & 33.0 & --- & --- & 59.5 & 40.5 \\
                Смешанные линии & 56.2 & 43.8 & 68.3 & 31.7 & --- & --- \\
                Кабельные линии всех напряжений & 45.3 & 54.7 & 43.0 & 57.0 & --- & --- \\                           
                Шины & 64.8 & 25.2 & --- & --- & --- & --- \\                
                Трансформаторы & 60.0 & 40.0 & --- & --- & --- & --- \\
                \hline
                Средние по всем АПВ данного исполнения & 58,2 & 41,8 & 69,2 & 30,8 & 73,0 & 27,0 \\
                \hline
        \end{tabular}
        \normalsize
        \caption{Показатели работы автоматического повторного включения по всем энергосистемам Союза за 1962--1966~гг. (в процентах)}
        \label{tabl:effekivnost-apv}
\end{table}

Here is the result:
9d250d9f913a47d3b56ff056bbe5f9d8.png
Why is it that when the text "Single action" in a cell wraps to the next line, the text in the combined (\multirow) cell with the text "AR installation location" is not aligned properly in the middle?
Another problem is that the text in the last header cell (with the text "Single-Acting Single-Phase Reclosure") does not wrap automatically, so I tried wrapping this text in \parbox, but the result is not very pretty.
It seems like a simple table that can be typed in Word in 2 minutes, I'm not experienced in tex / latex, but I've been scratching my head for several days. Tell.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2015-06-08
@AVKor

Why, when the text "Single action" in a cell wraps to the next line, the text in the combined (\multirow) cell with the text "AR installation location" is not aligned properly in the middle?

And it shouldn't. To configure, you can use the nccboxes package.
It's because of \parbox. Or use the same nccboxes or add \centering there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question