E
E
equuskk2019-03-16 23:33:09
TeX
equuskk, 2019-03-16 23:33:09

How to make page numbering centered, taking into account the margins?

In Word, the numbering looks a bit shifted to the right due to the margins
5c8d5d1c644f5416859873.png
. And when layout through latex, the numbering is exactly in the center of the page
5c8d5d49bf530945410364.png
. How to make the same numbering, taking into account the margins in latex?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AVKor, 2019-03-17
@equuskk

\documentclass{article}
\usepackage[
  a4paper,
  top=1cm,
  bottom=1cm,
  left=1cm,
  right=1cm,
  nohead,
  nofoot,
  showframe,
]{geometry}
\begin{document}
~
\end{document}

5c8d66e9cedb8602581086.png
\documentclass{article}
\usepackage[
  a4paper,
  top=1cm,
  bottom=1cm,
  left=10cm,
  right=1cm,
  nohead,
  nofoot,
  showframe,
]{geometry}
\begin{document}
~
\end{document}

Is it called without taking into account the fields?

D
Dmitry Dart, 2016-11-25
@PankovAlxndr

// Выбираем всё что в списке
preg_match('/<li>(.*?)<\/li>/ism', $str, $res);

// удаляем все теги
$clear = preg_replace('/<(.*?)>/ism', '', $res[1]);

// Заменяем исходную строку на очищенную от тегов
$str = str_replace($res[1], $clear, $str);

In fact, instead of preg_match, if there are a lot of elements, you need to do preg_match_all and then remove the tags with a replacement in a loop

T
trevoga_su, 2016-11-25
@trevoga_su

traverse the DOM with DOM manipulation functions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question