格式化列表中的垂直间距和日期的位置

格式化列表中的垂直间距和日期的位置

这是一个后续问题。

当我更改文档的字体时,日期的位置会向左或向右移动几毫米 - 如何修改代码以避免这种情况发生 - 我想\dimexpr计算文本宽度或线宽但不知道如何 - 日期需要与标题保持对齐

其次,我需要减少 (a) 至 (h) 段落的垂直间距

虽然我查阅了枚举文档并尝试了第 2 页的命令 • 垂直间距: – topsep – partopsep – parsep – itemsep 但这些对垂直间距没有影响,请指教


    \documentclass[11pt]{report}
        \usepackage[
          height=8in,      % height of the text block
          width=6.2in,       % width of the text block
          top=78pt,        % distance of the text block from the top of the page
          headheight=60pt, % height for the header block
          headsep=12pt,    % distance from the header block to the text block
          heightrounded,   % ensure an integer number of lines
         % showframe,       % show the main blocks
          showcrop=true,
          verbose,         % show the values of the parameters in the log file
        ]{geometry}
        \usepackage[utf8]{inputenc}
        \usepackage{url}
        \usepackage{graphicx}
        \usepackage{multirow}
        \usepackage{datetime}
        \usepackage{tgschola}%------------font YES
        \usepackage{fancyhdr}
        \usepackage{enumitem}
        \usepackage{calc}
        \setlength{\headheight}{82pt}
        \pagestyle{fancy}
        \fancyhf{}
        \renewcommand{\headrulewidth}{0.1pt}
        \renewcommand{\footrulewidth}{0.1pt}
        \fancyhead[L]{\begin{tabular}{lll@{\hspace{1cm}}l@{\hspace{1.6cm}}l}%
                            & &                                 & \multirow{1}{*}{\includegraphics[scale=.3]{example-image-a} } &  Governement of India \\
                    Web     &:& \url=www.dgqadefence.gov.in=                    & & Ministry of Defence(DGQA)\\
                    E-mail  &:& \[email protected]=                        & & Controllerate of Quality Assurance\\
                    Phone   &:& 044-26841773                                    & & (Armoured Vehicle Electronics)\\
                    Fax     &:& 044-26841881                                    & &  HVF Campus, Avadi\\
                            & &                                                 & & Chennai -- 600 054
                    \end{tabular}}
        \fancyfoot[L]{%
                    \footnotesize 
                         Typeset in \textrm{\LaTeX}}
        %------shortcut for adgqal address
        \newcommand{\adgqaladd}{To,\\
        The ADGQA(L)\\
        HQ DQA(L)/ DGQA(L-2)\\
        "G" Block, P.O. Nirman Bhavan\\
        New Delhi -- 110 011\\} 
        %------shortcut for adgqal address
        \newcommand{\peteradd}{To,\\
        Shri Peter J, PScO\\
        Dy Controller\\
        CQA(AVL)\\
        Avadi, Chennai -- 600 054\\} 
        %-----------------EME trg
        \newcommand{\emetrgadd}{To,\\
        Dte Gen of EME (Trg)\\MGO’s Branch, `B' Block\\IHQ Of MOD(Army)\\DHQ PO, New Delhi --110 105\\
        }
        %---------shortcut for signature block
        \newcommand{\signature}{\begin{tabbing}\\
        xxxxxxxxxxx\=:\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx \kill\\
        \>\>\> (JS Bibra)\\
        \>\>\> Colonel \\
            \end{tabbing}}
        %----------shortcut for subject heading--replace 1 with the \subject{xxxx}
        \newcommand{\subject}[1]{\centerline{\underline{\MakeUppercase{\textbf{#1}}}}}
        %------------------------------------------------------------------------
        %----------shortcut for file number
        \newcommand{\filenumber}[2]{xxxxxxxxxxxx\=:\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx \kill\\
        File No: #1\>\>\> #2 \datemy\today\\
        }


        %-----------shortcut for copy to-------
        \newcommand{\copyto}{\underline{\textbf{Copy to:}}\\*[2pt]}
        %---------------------------------------------------------
        \newsavebox{\mybox}
        \newlength{\restofline}
        %----------------------------
        \newcommand{\cc}{%
        \copyto
        \savebox\mybox{\hbox{\underline {PA to Controller, CQA(AVL)} --\hskip 1pt}}
        \noindent\usebox{\mybox}
        \setlength{\restofline}{\dimexpr\textwidth-\wd\mybox-10pt\relax}
        \begin{minipage} [t]{\restofline}
            for information of Controller please.
        \end{minipage}\\[1em]}
        %---------------------------------datetime-----------
        \newdateformat{datemy}{%
            \monthname[\THEMONTH] \THEYEAR}
        %---------------------------------------------------------
        \begin{document}
        \begin{tabbing}
            \filenumber{20211/JC/SA}{06}\\                                  
            \peteradd\\                                 
            \subject{ISO:9001:2015}
        \end{tabbing}
                \begin{enumerate}[wide, labelwidth=2em, labelindent=0pt]
        \item The following tasks in connection with ISO certification are assigned to Shri Peter~J, Dy Controller/ QM Coordinator.\\
                \begin{enumerate}[leftmargin=\leftmargin+2em]
        \item Printing and Binding of Quality Manual(QM), through a DTP to be identified by the QM Coord--- one copy in color will be prepared\\
        \item After printing and binding of Quality Manual signature of MR and Controller be obtained on pages of the manual where designated\\
        \item After approval of the printed copy of QM, obtain required number of additional copies of QM for distribution as per Distribution List enclosed in the QM \\
        \item Plan for audit schedule be finalised in consultation with MR and Controller\\
        \item Internal Audit be organised as per approved schedule\\
        \item Non conformities be rectified and verified by concerned sections\\
        \item BIS to be approached for Certification Audit and obtain quotation-- no accommodation/food will be provided by the estt, the quotation should be self-contained\\
        \item Organise  audit by BIS rep for successful certification\\ 
                        \end{enumerate}
                        \newpage
        \item A copy of the QM is handed over on CD for the printing and binding work. Please get the tasks completed on priority for successful certification.\\
                \end{enumerate}
    \signature
    \cc
    \newpage


    \end{document}

答案1

这是一个解决方案。我更改了环境中的某些密钥enumerate,删除了所有\\后续项目(这是不好的做法),并用itemsep=..密钥替换了它们。

我还重新定义了该\filenumber命令,以简单的为基础\makebox[\linewidth]{...},将两个参数用 分隔开\hfill

最后,我重新设计了标题,使其适合文本宽度。我认为冒号不应该对齐,所以我删除了一列。

   \documentclass[11pt]{report}
        \usepackage[
          height=8in, % height of the text block
          width=6.2in, % width of the text block
          top=78pt, % distance of the text block from the top of the page
          headheight=60pt, % height for the header block
          headsep=12pt, % distance from the header block to the text block
          heightrounded, % ensure an integer number of lines
         % showframe, % show the main blocks
          showcrop=true,
          verbose, % show the values of the parameters in the log file
        ]{geometry}
        \usepackage[utf8]{inputenc}
        \usepackage{url}
        \usepackage{graphicx}
        \usepackage{multirow}
        \usepackage{datetime}
        \usepackage{tgschola}%------------font YES
        \usepackage{fancyhdr}
        \usepackage{enumitem}
        \usepackage{calc} 
        \setlength{\headheight}{82pt}
        \pagestyle{fancy}
        \fancyhf{}
        \renewcommand{\headrulewidth}{0.1pt}
        \renewcommand{\footrulewidth}{0.1pt}
        \fancyhead[L]{\begin{tabular}{@{}l@{\enspace}lll@{}}%
                              & & \multirow{6}{*}{\includegraphics[scale=.24]{example-image-a} } & Government of India \\
                    Web: & \url=www.dgqadefence.gov.in= & & Ministry of Defence (DGQA)\\
                    E-mail: & \[email protected]= & & Controllerate of Quality Assurance\\
                    Phone: & 044-26841773 & & (Armoured Vehicle Electronics)\\
                    Fax: & 044-26841881 & & HVF Campus, Avadi\\
                             & & & Chennai -- 600 054
                    \end{tabular}}
        \fancyfoot[L]{%
                    \footnotesize
                         Typeset in \textrm{\LaTeX}}
        %------shortcut for adgqal address
        \newcommand{\adgqaladd}{To,\\
        The ADGQA(L)\\
        HQ DQA(L)/ DGQA(L-2)\\
        "G" Block, P.O. Nirman Bhavan\\
        New Delhi -- 110 011\\}
        %------shortcut for adgqal address
        \newcommand{\peteradd}{To,\\
        Shri Peter J, PScO\\
        Dy Controller\\
        CQA(AVL)\\
        Avadi, Chennai -- 600 054\\}
        %-----------------EME trg
        \newcommand{\emetrgadd}{To,\\
        Dte Gen of EME (Trg)\\MGO’s Branch, `B' Block\\IHQ Of MOD(Army)\\DHQ PO, New Delhi --110 105\\
        }
        %---------shortcut for signature block
        \newcommand{\signature}{\begin{tabbing}\\
        xxxxxxxxxxx\=:\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx \kill\\
        \>\>\> (JS Bibra)\\
        \>\>\> Colonel \\
            \end{tabbing}}
        %----------shortcut for subject heading--replace 1 with the \subject{xxxx}
        \newcommand{\subject}[1]{\centerline{\underline{\MakeUppercase{\textbf{#1}}}}}
        %------------------------------------------------------------------------
        %----------shortcut for file number
% \newcommand{\filenumber}[2]{xxxxxxxxxxxx\=:\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx \kill\\
% File No: #1\>\>\> #2 \datemy\today\\
% }
        \newcommand{\filenumber}[2]{\par
        \makebox[\linewidth][s]{\mbox{File No: #1}\hfill\mbox{#2 \datemy\today}}\\
        }

    %-----------shortcut for copy to-------
    \newcommand{\copyto}{\underline{\textbf{Copy to:}}\\*[2pt]}
    %---------------------------------------------------------
    \newsavebox{\mybox}
    \newlength{\restofline}
    %----------------------------
    \newcommand{\cc}{%
    \copyto
    \savebox\mybox{\hbox{\underline {PA to Controller, CQA(AVL)} --\hskip 1pt}}
    \noindent\usebox{\mybox}
    \setlength{\restofline}{\dimexpr\textwidth-\wd\mybox-10pt\relax}
    \begin{minipage} [t]{\restofline}
        for information of Controller please.
    \end{minipage}\\[1em]}
    %---------------------------------datetime-----------
    \newdateformat{datemy}{%
        \monthname[\THEMONTH] \THEYEAR}
    %---------------------------------------------------------
    \begin{document}
    \begin{tabbing}
        \filenumber{20211/JC/SA}{06}\\
        \peteradd\\
        \subject{ISO:9001:2015}
    \end{tabbing}
            \begin{enumerate}[wide=0pt, labelwidth=2em]
    \item The following tasks in connection with ISO certification are assigned to Shri Peter~J, Dy Controller/ QM Coordinator.
            \begin{enumerate}[wide =\leftmargini, leftmargin=*, itemsep=1ex]
    \item Printing and Binding of Quality Manual(QM), through a DTP to be identified by the QM Coord--- one copy in color will be prepared 
    \item After printing and binding of Quality Manual signature of MR and Controller be obtained on pages of the manual where designated 
    \item After approval of the printed copy of QM, obtain required number of additional copies of QM for distribution as per Distribution List enclosed in the QM 
    \item Plan for audit schedule be finalised in consultation with MR and Controller 
    \item Internal Audit be organised as per approved schedule 
    \item Non conformities be rectified and verified by concerned sections 
    \item BIS to be approached for Certification Audit and obtain quotation-- no accommodation/food will be provided by the estt, the quotation should be self-contained 
    \item Organise audit by BIS rep for successful certification 
                    \end{enumerate}
                    \newpage
    \item A copy of the QM is handed over on CD for the printing and binding work. Please get the tasks completed on priority for successful certification.
            \end{enumerate}
\signature
\cc
\newpage

\end{document}

在此处输入图片描述

相关内容