Верхняя и нижняя границы страницы

Верхняя и нижняя границы страницы

Я хотел бы добавить несколько рамок в свой документ, похожих на приложенное изображение - одна вверху страницы, а другая вокруг номера страницы. Могу ли я получить некоторые рекомендации, пожалуйста?

Я прикрепляю код, содержащий функции, похожие на те, с которыми я работаю. Я бы хотел, чтобы границы оставались в том же положении на каждой странице.

    \documentclass[a4paper,11pt]{article}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage}
\usepackage{graphicx}
\renewcommand{\theadfont}{\normalsize\bfseries}

\begin{document}
\section{Test}
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.

To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.
Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme.

\section{Test}
\begin{figure}[h]
\centering
\includegraphics[width=1\textwidth]{Example_figure}
\caption{Test}
\end{figure}

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.

\begin{landscape}% Landscape page
\begin{table}[ht]
\caption{Table test - contents of table exceeds page width}
\centering
  \small
\begin{tabularx}{\linewidth}{@{}l*{3}{>{\arraybackslash}X}}
\toprule\midrule[0.5pt]
 & \thead{Column 1} & \thead{Column 2} & \thead{Column 3} \\
\midrule
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\bottomrule
 \end{tabularx}%
    \hspace*{-12mm}%
\label{table:comparison of techniques}
\end{table}
\end{landscape}

\end{document}

Примеры границ

Заранее спасибо!

решение1

Вот простой способ с titleps, который идет в комплекте titlesec, но может использоваться и отдельно:

\documentclass[a4paper, twoside, 11pt]{article}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage}
\usepackage{graphicx}
\usepackage{xcolor}
\renewcommand{\theadfont}{\normalsize\bfseries}
\usepackage{titleps}

\newpagestyle{mystyle}{%
\widenhead[\marginparwidth][0pt]{0pt}{\marginparwidth}
\headrule
\sethead[~\color{blue}\thesection\enspace\sectiontitle][][]{}{}{\color{blue}\thesection\enspace\sectiontitle~}
\setfoot[{\makebox[\marginparwidth][r]{\thepage~}\smash{\rule[-20ex]{0.6pt}{22ex}}}][][]{}{}{\smash{\rule[-20ex]{0.6pt}{22ex}}\makebox[\marginparwidth][l]{~\thepage}
}
}%
\pagestyle{mystyle}

\begin{document}

\section{A First Test}
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.

To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.
Themes and styles also help keep your document coordinated. When you click Design and choose a new Theme, the pictures, charts, and SmartArt graphics change to match your new theme. When you apply styles, your headings change to match the new theme.

\section{Another Test}

\begin{figure}[h]
\centering
\includegraphics[width=1\textwidth]{Example-image}
\caption{Test}
\end{figure}

Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.

\begin{landscape}% Landscape page
\begin{table}[ht]
\caption{Table test - contents of table exceeds page width}
\centering
  \small
\begin{tabularx}{\linewidth}{@{}l*{3}{>{\arraybackslash}X}}
\toprule\midrule[0.5pt]
 & \thead{Column 1} & \thead{Column 2} & \thead{Column 3} \\
\midrule
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\addlinespace
Item 1 & item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1, item 1,item 1, item 1, item 1, item 1, item 1, item 1 & item 1, item 1, item 1, item 1 \\
\bottomrule
 \end{tabularx}%
    \hspace*{-12mm}%
\label{table:comparison of techniques}
\end{table}
\end{landscape}

\end{document} 

введите описание изображения здесь

решение2

Вместо того чтобы изобретать велосипед, вы можете просто воспользоваться шаблоном, который был использован для создания изображения, показанного вами в вашем вопросе.

Шаблон можно найти по адресуhttps://bedienhaptik.de/latex-template/

Для получения дополнительной информации см. такжеДемонстрация прекрасной типографики, выполненной в TeX и друзьях

Связанный контент