0

Before asking this question I have already seen this link that explains how to create a table in more than one page using longtable command.

My question Is there any way to have the same functionality using tabular and table command? If the answer is yes, how? otherwise how can I change the following to longtable that works properly as expected?


\begin{table}[h!]
    \centering
    \begin{tabular}{|c|c|c|}
        \cline{1-3}
        \textbf{شماره} & \textbf{مورد کاربرد} & \textbf{تعامل با اشیاء} \\ \cline{1-3}
    ۱ & افزودن مدیر احراز هویت & مدیر سامانه \\
    ۲ & افزودن مدیر سامانه & مدیر سامانه \\ 
    ۳ & ثبت‌نام کردن صاحب بار & صاحب بار \\
    ۴ & وارد شدن مدیر سامانه & مدیر سامانه \\
    ۵ & وارد شدن صاحب بار & صاحب بار \\
    ۶ & وارد شدن راننده & راننده \\
    ۷ & وارد شدن مدیر احراز هویت & مدیر احراز هویت \\
    ۸ & ورود راننده در برنامه موبایل & راننده \\
    ۹ & ثبت‌نام کردن راننده & راننده \\
    ۱۰ & خروج از سامانه & کاربر سایت \\
    ۱۱ & مشاهده اطلاعات بار & راننده، سفارش، خودرو حمل بار \\
    ۱۲ & چاپ کردن بارنامه & راننده، سفارش \\
    ۱۳ & اعلام کردن حادثه & راننده \\
    ۱۴ & تایید کردن اطلاعات راننده و تخصیص شناسه‌کاربری و رمز عبور & مدیر احراز هویت، راننده \\ 
    ۱۵ & مدیریت اطلاعات خودرو حمل بار & کاتالوگ خودرو حمل بار،‌ مدیر سامانه \\
    ۱۶ & تخصیص خودرو حمل بار به بار & مدیر سامانه، خودرو حمل بار، سفارش \\
    ۱۷ & ویرایش کردن اطلاعات راننده & مدیر سامانه، راننده \\
    ۱۸ & تعیین وضعیت راننده & مدیر سامانه، صاحب بار، راننده \\
    ۱۹ & اختصاص بار به راننده & راننده، مدیر سامانه، سفارش \\
    ۲۰ & مشاهده کردن اطلاعات راننده & مدیر سامانه، راننده \\
    ۲۱ & مشاهده کردن رتبه رانندگان & مدیر سامانه راننده \\
    ۲۲ & مشاهده موقعیت جغرافیایی بار & مدیر سامانه، سفارش، زمان \\
    ۲۳ & مشاهده کردن اطلاعات بار & مدیر سامانه، سفارش \\
    ۲۴ & ثبت خودرو حمل بار جدید & مدیر سامانه، کاتالوگ خودرو حمل بار \\
    ۲۵ & مشاهده وضعیت خودرو حمل بار & مدیر سامانه، خودرو حمل بار \\
    ۲۶ & مشاهده اطلاعات خودرو حمل بار & مدیر سامانه، خودرو حمل بار \\
    ۲۷ & اختصاص دادن کد به سفارش & مدیر سامانه، سفارش، صاحب بار \\
    ۲۸ & ثبت کردن سفارش & مدیر سامانه، سفارش، صاحب بار \\
    ۲۹ & حذف کردن سفارش & مدیر سامانه، سفارش، صاحب بار \\
    ۳۰ & ویرایش کردن سفارش & مدیر سامانه، سفارش،‌ صاحب بار \\
    ۳۱ & مشاهده کردن اطلاعات سفارش & مدیر سامانه، سفارش، صاحب بار \\
    ۳۲ & مشاهده کردن اطلاعات بار & مدیر سامانه، سفارش، صاحب بار \\
    ۳۳ & مشاهده موقعیت جغرافیایی بار & صاحب بار، زمان \\
    ۳۴ & تایید تحویل بار & صاحب بار، راننده، سفارش \\
    ۳۵ & ثبت کردن امتیاز & راننده، صاحب بار، سفارش \\
    ۳۶ & به‌روزرسانی موقعیت جغرافیایی بار & زمان \\
    \end{tabular}
\end{table}

PS 1: I have also tried to replace longtable with tabular, but nothing has changed.

PS 2: The project files can be viewed in this link and the table is on page 64 in thesis.pdf.

enter image description here

1 Answers1

1

You did not provide (in the question) an example but as mentioned in the first comment you can simply change

\begin{table}[h!]
    \centering
    \begin{tabular}

to

\begin{longtable}

Here I show a table using the form that is in the question but using latin script, and then the same content using longtable extended to go over the page.

\documentclass{article}

\usepackage{longtable}

\begin{document}

\begin{table}[h!] \centering \begin{tabular}{|c|c|c|} \cline{1-3} \textbf{aaa} & \textbf{bbb} &\textbf{ccc}\ \cline{1-3} 111&222&333\ one&two&three\ \hline \end{tabular} \end{table}

\begin{longtable}{|c|c|c|} \cline{1-3} \textbf{aaa} & \textbf{bbb} & \textbf{ccc}\ \cline{1-3} % \endhead % add this if you want the head repeating on each page. 111&222&333\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ one&two&three\ \hline \end{longtable}

\end{document}

enter image description here

David Carlisle
  • 757,742