1

bottom positionning text

I have set the bottom margin to zero:

\usepackage[margin=1cm,marginparwidth=1.5cm,
top=0cm,bottom=0cm,left=0.1cm,right=0.1cm,showframe  ]{geometry}

and I want to put the same text at the bottom (left or right) of every page of my document whithout using either:

\cfoot{},  `\lfoot{ }`  nor `\rfoot{}` 

I have tried the comands \vfill\hfill (text), this work manually for the first page but for the others it doesn't work.

thank you for you help.

this is the complet code:

\documentclass[12pt]{report}  
\usepackage{lipsum}


\usepackage{graphicx} 
\usepackage{ulem}
\usepackage[margin=1cm,marginparwidth=1.5cm,
top=0cm,bottom=0cm,left=0.1cm,right=0.1cm,showframe  ]{geometry}  % ,showframe,showcrop includehead, ,includefoot
\geometry{includemp}
\usepackage[utf8]{inputenc} 
\usepackage[LAE,LFE]{fontenc} 
\usepackage[arabic,french,english]{babel}
\newcommand{\RL}{\textRL} %to write arabic text
\newcommand{\LR}{\textLR} %to write english text

\usepackage{enumerate}
\usepackage{rotating} 
\usepackage{amsmath,mathtools,amssymb,amsthm,amsfonts,amsgen,amsxtra,xspace,mathrsfs,tabularx}
\usepackage{fancybox,dsfont,pifont}

  %____________________________________

\usepackage{eso-pic,lastpage}
\AddToShipoutPictureBG{%
  \AtTextLowerLeft{%
 \fbox{
  %\raisebox{-\baselineskip}
  {%
  \RL{صفحة}  $\thepage$ \RL{من} $\pageref{LastPage}$}}}
    }
\pagestyle{empty}

\begin{document}
\selectlanguage{arabic}

\LR{\lipsum[1-50]}
اللغة العربية هي أكثر اللغات تحدثاً ضمن مجموعة اللغات السامية، وإحدى أكثر اللغات انتشاراً في العالم، يتحدثها أكثر من 422 مليون نسمة،[2]1 ويتوزع متحدثوها في الوطن العربي، بالإضافة إلى العديد من المناطق الأخرى المجاورة كالأحواز وتركيا وتشاد ومالي والسنغال وإرتيريا. اللغة العربية ذات أهمية قصوى لدى المسلمين، فهي لغة مقدسة (لغة القرآن)، ولا تتم الصلاة (وعبادات أخرى) في الإسلام إلا بإتقان بعض من كلماتها.[4][5] العربية هي أيضاً لغة شعائرية رئيسية لدى عدد من الكنائس المسيحية في الوطن العربي، كما كتبت بها الكثير من أهم الأعمال الدينية والفكرية اليهودية في العصور الوسطى. وأثّر انتشار الإسلام، وتأسيسه دولاً، في ارتفاع مكانة اللغة العربية، وأصبحت لغة السياسة والعلم والأدب لقرون طويلة في الأراضي التي حكمها المسلمون، وأثرت العربية تأثيراً مباشراً أو غير مباشر على كثير من اللغات الأخرى في العالم الإسلامي، كالتركية والفارسية والأمازيغية والكردية والأردوية والماليزية والإندونيسية والألبانية وبعض اللغات الإفريقية الأخرى مثل الهاوسا والسواحيلية، وبعض اللغات الأوروبية وخاصةً المتوسطية كالإسبانية والبرتغالية والمالطية والصقلية، كما أنها تُدرَّس بشكل رسمي أو غير رسمي في الدول الإسلامية والدول الإفريقية المحاذية للوطن العربي.

العربية لغة رسمية في كل دول الوطن العربي إضافة إلى كونها لغة رسمية في تشاد وإريتريا وإسرائيل. وهي إحدى اللغات الرسمية الست في منظمة الأمم المتحدة، ويُحتفل باليوم العالمي للغة العربية في 18 ديسمبر كذكرى اعتماد العربية بين لغات العمل في الأمم المتحدة.[6]

واللغة العربية من أغزر اللغات من حيث المادة اللغوية، فعلى سبيل المثال يحوي معجم لسان العرب لابن منظور من القرن الثالث عشر أكثر من 80 ألف مادة، بينما في اللغة الإنجليزية فإن قاموس صموئيل جونسون - وهو من أوائل من وضع قاموساً إنجليزياً من القرن الثامن عشر-[7] يحتوي على 42 ألف كلمة.[8]

تحتوي العربية على 28 حرفاً مكتوباً. ويرى بعض اللغويين أنه يجب إضافة حرف الهمزة إلى حروف العربية، ليصبح عدد الحروف 29. تُكتب العربية من اليمين إلى اليسار - ومثلها اللغة الفارسية والعبرية وعلى عكس الكثير من اللغات العالمية - ومن أعلى الصفحة إلى أسفلها.

\end{document}
6
  • Please help us to help you and complete your code to create a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – cfr
    Dec 24, 2014 at 23:39
  • 2
    Why do you want to do this? Because footers are designed to do exactly what you want to do. That is, your question appears to be: how can I do X without using any commands which are designed to do X?
    – cfr
    Dec 24, 2014 at 23:41
  • the full code was added to the question, thank you for your help.
    – hachemy
    Dec 25, 2014 at 0:20
  • OK. Good. Now, you need to explain why you don't want to use a footer. That is, what needs to be different? Why won't a footer work? If you don't explain that, your question can't really be answered since that's the obvious solution. [Of course, you can avoid the specific commands you said you don't want to use - you can just use their definitions and give them different names. But I'm assuming that you object to something more than their names. The question is: what exactly?]
    – cfr
    Dec 25, 2014 at 0:24
  • 1
    I still don't really get it, but you have 2 options in Werner's answer so maybe that doesn't matter. (If you want text-free footers, why are you also trying to add what is essentially a footer? Why not just configure the layout so that the footer is a bit higher, relative to the bottom margin? As far as I can tell, that would look just the same and therefore presumably have equal aesthetic value!)
    – cfr
    Dec 25, 2014 at 1:07

1 Answer 1

5

The following solutions are sufficient for pushing footer-like content to your page. However, without a visible location to put content (like when having a non-existent margin set using geometry), you'll have to overlay the content over existing text, or accept that there will be text overlaid on text. That said...

You can overlay content anywhere on the page using eso-pic, just as an example. Since the overlay is done around shipout time, page references using \thepage is accurate.

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage[
  margin=1cm,marginparwidth=1.5cm,
  showframe]{geometry}
\usepackage{eso-pic,lastpage}
\AddToShipoutPictureBG{%
  \AtTextLowerLeft{%
  \raisebox{-\baselineskip}{%
    \pageref{LastPage} / \thepage}}}
\pagestyle{empty}
\begin{document}

\lipsum[1-50]

\end{document}

Since \AtTextLowerLeft is just on the inside, left corner of the text block, \raisebox{-\baselineskip} drops it to just outside, below the text block.


Alternatively, using footers is equally fine since you can move content up into the visible page area:

\documentclass{article}
\usepackage{lipsum}
\usepackage[
  margin=1cm,marginparwidth=1.5cm,
  showframe]{geometry}
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\fancyfoot[L]{\raisebox{1.5\baselineskip}[0pt][0pt]{\pageref{LastPage} / \thepage}}
\begin{document}

\lipsum[1-50]

\end{document}

The Left footer is raised into place without influencing the footer height.

3
  • Thank you Werner for your help, the solution you give here work perfectly with english text, unfurtunately it doesn't with other language (Arabic especially).
    – hachemy
    Dec 25, 2014 at 1:37
  • @hachem: In your post image it shows you're using Arabic, but your minimal example doesn't include this. However, you don't say why this doesn't work... and/or why neither of the proposals work for you. Could you elaborate?
    – Werner
    Dec 25, 2014 at 5:36
  • Ok, Warner; I prefer the first proposal since it doesn't use the fancy package, and now it's working nicely with arabic language, but I have a little problem: I want the page number to be as in the picture: in the left side of the bottom of the page and inside the frame. I have changed the minimal code in the post.
    – hachemy
    Dec 25, 2014 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .