اذهب إلى المحتوى
  • 0

كيف أضيف عمود إلى جدول على LaTeX؟

محمد بوسكوري

السؤال

أريد إضافة عمود لجدول موجود على وثيقة LaTeX؟

الجدول الحالي:

1G7rZ.thumb.png.23ae0b9df4a449d804d01785

كيف أريده أن يصبح:

JkDvN.thumb.png.b4b9400e637d5c79529aa211

هذا هو كود الوثيقة:

\documentclass[11pt]{article}
\usepackage{techdoc}
\title{Lorem Ipsum is simply dummy text}
\subtitle{Lorem Ipsum is simply dummy text}
\department{R\&D}
\filepath{//path/to/file}

\begin{document}
\maketitle
\clearpage
\end{document}

وtechdoc.sty :

\newcommand{\@department}{}
\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
\newcommand{\@filepath}{}
\newcommand{\filepath}[1]{\renewcommand{\@filepath}{#1}}
\newcommand{\@version}{}


% Tables
\definecolor{arrayrule}{rgb}{0.5, 0.5, 0.5}
\setlength{\arrayrulewidth}{0.5pt}
\arrayrulecolor{arrayrule}
\newenvironment{nicetable}{\begin{table}[h!t]\renewcommand{\arraystretch}{1.4}\addtolength{\tabcolsep}{3pt}\addtolength{\belowcaptionskip}{4pt}}{\end{table}}
\renewcommand{\arraystretch}{1.4}

% Title page
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\renewcommand{\maketitle}{%
    \newgeometry{headheight=0pt, headsep=0pt, hmargin=2.5cm, vmargin=2cm}
    \begin{titlepage}
    \begin{tabularx}{\columnwidth}{|>{\centering\arraybackslash}p{3cm}|>{\centering\arraybackslash}m{\columnwidth-6cm-4\tabcolsep-3\arrayrulewidth}|>{\centering\arraybackslash}p{3cm}|}
        \hline
        \multirow{2}{*}{\includegraphics[width=2.7cm, height=2.0cm]{icon_caution}} & {\bf \@confidentialitynotice } & {\includegraphics[width=2.7cm, height=2.7cm]{icon_goal}} \\[0.3cm] \cline{2-2}
        & \multirow{2}{*}{\bf  \@title}\\[.6cm] \cline{1-1}
        \@department & \\ \hline
    \end{tabularx}


    \vfill

    \begin{center}

    {\Huge \bf \@title}

    \rule{\columnwidth}{2pt}
    \vspace{0.1cm}

    {\LARGE \@subtitle}
    \end{center}

    \vspace{3cm}
    \vfill

    \end{titlepage}
    \setcounter{page}{2} % titlepage messes with my page counter!
    \restoregeometry
}

كيف ذلك؟

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

  • 0

بإمكانك الاستعانة بهذا الكود، والذي يتيح لك إضافة خانة في الجانب الأيمن للجدول وبالتالي إضافة صورة -أيقونة- بداخله:

- الكود:

\documentclass{article}
    \usepackage[margin=25mm,showframe]{geometry}
    \usepackage{graphicx}
    \usepackage{multirow,tabularx}

\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
    \begin{document}

{    \renewcommand{\arraystretch}{1.5}
\noindent%
\begin{tabularx}{\textwidth}{|P{3cm}|>{\centering\arraybackslash\bfseries}X|P{3cm}|}
    \hline
\multirow{3}*[2pt]{%
    \includegraphics[width=2.7cm,height=2cm]{example-image-a}}\smallskip~
    &   \rule[-3mm]{0pt}{9mm}
        Internal and Confidential Document\@confidentialitynotice 
        &   \multirow{2}*[2pt]{%
            \includegraphics[width=2.7cm,height=2cm]{example-image-b}}  
                        \\  \cline{2-2}
    &                                       
        &               \\
    &   Lorem Ipsum is simply dummy text%\@title     
        &               \\  \cline{1-1}
R\&D        &       &   \\  \hline
\end{tabularx}
}
    \end{document}

لنحصل على الصورة التالية كنتيجة:

32KFd.thumb.png.92fd9ea6112a07f317d5ab5b

* ملاحظة: استعملت الصورتين AوB لإعطاء المثال فقط.

رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...