如何将此表转换为“长表”

如何将此表转换为“长表”

我有一张表格,但一张纸放不下。如何让 LaTeX 将其打印到多页上。目前,它正在被截断。

\begin{table}[h]                    
\caption{Agencies and retailers included in the study.}                 
\label{data_list}                   
\begin{tabular}{lll}                    
\textbf{MWD Member Agency}  &   \textbf{Retailer}    &  \textbf{Years Available}     \\
\hline\hline
    &   &   \\
Anaheim &   Anaheim &       \\
    &       &       \\
Beverly Hills   &   Beverly Hills   &       \\
    &       &       \\
Burbank &   Burbank &       \\
    &       &       \\
Calleguas MWD   &   Cal Water - Westlake    &       \\
    &   Camarillo   &       \\
    &   Camrosa WD  &       \\
    &   Oxnard  &       \\
    &   Simi Valley &       \\
    &   Thoudand Oaks   &       \\
    &       &       \\
Central Basin MWD   &   Cal Water - East Los Angeles    &       \\
    &   Cerritos    &       \\
    &   Downey  &       \\
    &   Lakewood    &       \\
    &   Orchards Dale WD    &       \\
    &   Paramount   &       \\
    &   Pico Riviera    &       \\
    &   Pico Rivera &       \\
    &   Pico WD &       \\
    &   Suburban - Whittier/La Mirada   &       \\
    &   Vernon  &       \\
    &       &       \\
Compton &   Compton &       \\
    &       &       \\
Eastern MWD &   Eastern MWD &       \\
    &   Rancho California WD    &       \\
    &       &       \\
Foothill MWD    &   La Canada ID    &       \\
    &       &       \\
Fullerton   &   Fullerton   &       \\
    &       &       \\
Glendale    &   Glendale    &       \\
    &       &       \\
IEUA    &   Ontario &       \\
    &   Upland  &       \\
    &       &       \\
Las Virgenes MWD    &   Las Virgenes MWD    &       \\
    &       &       \\
Long Beach  &   Long Beach  &       \\
    &       &       \\
Los Angeles &   Los Angeles &       \\
    &       &       \\
MWDOC   &   Buena Park  &       \\
    &   Fountain Valley &       \\
    &   Garden Grove    &       \\
    &   Huntington Beach    &       \\
    &   Mesa Consolidated WD    &       \\
    &   Westminster &       \\
    &   Yorba Linda WD  &       \\
    &       &       \\
Pasadena    &   Pasadena    &       \\
    &       &       \\
San Diego CWA   &   Carlsbad MWD    &       \\
    &   City San Diego  &       \\
    &   Escondido   &       \\
    &   Fallbrook PUD   &       \\
    &   Helix   &       \\
    &   Oceanside   &       \\
    &   Olivenhain MWD  &       \\
    &   Otay, Padre Dam MWD Eastern &       \\
    &   Poway   &       \\
    &   Rainbow MWD &       \\
    &   Ramona MWD  &       \\
    &   Rincon del Diablo MWD   &       \\
    &   San Diefuito WD &       \\
    &   Santa Fe ID &       \\
    &   Sweetwater Authority    &       \\
    &   Vallecitos WD   &       \\
    &   Valley Center MWD   &       \\
    &   Vista ID    &       \\
    &       &       \\
San Fernando    &   San Fernando    &       \\
    &       &       \\
Santa Ana   &   Santa Ana   &       \\
    &       &       \\
Santa Monica    &   Santa Monica    &       \\
    &       &       \\
Three Valleys MWD   &   Covina  &       \\
    &   Pomona  &       \\
    &   Walnut Valley WD    &       \\
    &       &       \\
Torrance    &   Torrance    &       \\
    &       &       \\
Upper San Gabriel Valley MWD    &   Alhambra    &       \\
    &   Arcadia &       \\
    &   Azusa   &       \\
    &   Monrovia    &       \\
    &       &       \\
West Basin MWD  &   Cal Water - Hermosa Redango &       \\
    &   El Segundo  &       \\
    &       &       \\
Western MWD &   Corona, Elsinore Valley MWD &       \\
    &   Jurupa CSD  &       \\
    &   Norco   &       \\
    &   Western MWD &       
\end{tabular}                   
\end{table}

答案1

% arara: pdflatex

\documentclass{article}
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{array}
\usepackage{longtable}
\usepackage{ragged2e}
\usepackage{calc}

\begin{document}                                   
\begin{longtable}{>{\RaggedRight}p{.38\textwidth-2\tabcolsep}>{\RaggedRight}p{.35\textwidth-2\tabcolsep}>{\RaggedRight\arraybackslash}p{.27\textwidth-2\tabcolsep}}    
        \caption[Agencies and retailers]{Agencies and retailers included in the study}\label{data_list}\\\toprule                  
        \textbf{MWD Member Agency} & \textbf{Retailer} & \textbf{Years Available}\\\midrule
        \endfirsthead
        \caption{continued}\\\toprule                  
        \textbf{MWD Member Agency} & \textbf{Retailer} & \textbf{Years Available}\\\midrule
        \endhead
        \bottomrule
        \endfoot
        \bottomrule
        \endlastfoot    
        Anaheim &   Anaheim & \\\addlinespace
        Beverly Hills   &   Beverly Hills   & \\\addlinespace
        Burbank &   Burbank & \\\addlinespace
        Calleguas MWD   &   Cal Water - Westlake    &       \\
        &   Camarillo   &       \\
        &   Camrosa WD  &       \\
        &   Oxnard  &       \\
        &   Simi Valley &       \\
        &   Thoudand Oaks   & \\\addlinespace
        Central Basin MWD   &   Cal Water - East~Los~Angeles & \\
        &   Cerritos    &       \\
        &   Downey  &       \\
        &   Lakewood    &       \\
        &   Orchards Dale WD    &       \\
        &   Paramount   &       \\
        &   Pico Riviera    &       \\
        &   Pico Rivera &       \\
        &   Pico WD &       \\
        &   Suburban - Whittier/\allowbreak{}La~Mirada & \\
        &   Vernon  & \\\addlinespace
        Compton &   Compton & \\\addlinespace
        Eastern MWD &   Eastern MWD &       \\
        &   Rancho California WD    & \\\addlinespace
        Foothill MWD    &   La Canada ID    & \\\addlinespace
        Fullerton   &   Fullerton   & \\\addlinespace
        Glendale    &   Glendale    & \\\addlinespace
        IEUA    &   Ontario &       \\
        &   Upland  & \\\addlinespace
        Las Virgenes MWD    &   Las Virgenes MWD    & \\\addlinespace
        Long Beach  &   Long Beach  & \\\addlinespace
        Los Angeles &   Los Angeles & \\\addlinespace
        MWDOC   &   Buena Park  &       \\
        &   Fountain Valley &       \\
        &   Garden Grove    &       \\
        &   Huntington Beach    &       \\
        &   Mesa Consolidated WD    &       \\
        &   Westminster &       \\
        &   Yorba Linda WD  & \\\addlinespace
        Pasadena    &   Pasadena    & \\\addlinespace
        San Diego CWA   &   Carlsbad MWD    &       \\
        &   City San Diego  &       \\
        &   Escondido   &       \\
        &   Fallbrook PUD   &       \\
        &   Helix   &       \\
        &   Oceanside   &       \\
        &   Olivenhain MWD  &       \\
        &   Otay, Padre Dam MWD Eastern &       \\
        &   Poway   &       \\
        &   Rainbow MWD &       \\
        &   Ramona MWD  &       \\
        &   Rincon del Diablo MWD   &       \\
        &   San Diefuito WD &       \\
        &   Santa Fe ID &       \\
        &   Sweetwater Authority    &       \\
        &   Vallecitos WD   &       \\
        &   Valley Center MWD   &       \\
        &   Vista ID    & \\\addlinespace
        San Fernando    &   San Fernando    & \\\addlinespace
        Santa Ana   &   Santa Ana   & \\\addlinespace
        Santa Monica    &   Santa Monica    & \\\addlinespace
        Three Valleys MWD   &   Covina  &       \\
        &   Pomona  &       \\
        &   Walnut Valley WD    & \\\addlinespace
        Torrance    &   Torrance    & \\\addlinespace
        Upper San Gabriel Valley MWD    &   Alhambra    &       \\
        &   Arcadia &       \\
        &   Azusa   &       \\
        &   Monrovia    & \\\addlinespace
        West Basin MWD  &   Cal Water - Hermosa Redango &       \\
        &   El Segundo  & \\\addlinespace
        Western MWD &   Corona, Elsinore Valley MWD &       \\
        &   Jurupa CSD  &       \\
        &   Norco   &       \\
        &   Western MWD &  \\ 
\end{longtable}                   
\end{document}

在此处输入图片描述

相关内容