Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use fancyhdr to create a custom footer in the left,I refer to this answer so I use

\makeatletter
% new style {footmark}
\fancypagestyle{footmark}{
  \ps@@fancy % use {fancy} style as a base of {footmark}
  \fancyfoot[L]{\footmark}
}
% sets value of \footmark and sets the correct style for this page only
\newcommand\markfoot[1]{\gdef\footmark{#1}\thispagestyle{footmark}}
\makeatother

And in the document, in a text that is on the page:

\markfoot{Mon texte.}

This should print Mon texte. left in the footer of the current page. But it display number of page too. how can I do to hide it.

Thanks in advance

share|improve this question
1  
Please, make a Minimal Working Example (from \documentclass to \end{document}). –  egreg Feb 1 at 23:04

1 Answer 1

up vote 3 down vote accepted

Assuming that you don't want page numbers in the footer, you have to add \fancyhf{} to clear all history :)

\documentclass{article}
\usepackage{fancyhdr}

\makeatletter
% new style {footmark}
\fancypagestyle{footmark}{
  \ps@@fancy % use {fancy} style as a base of {footmark}
  \fancyhf{}
  \fancyfoot[L]{\footmark}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0.4pt}
}
% sets value of \footmark and sets the correct style for this page only
\newcommand\markfoot[1]{\gdef\footmark{#1}\thispagestyle{footmark}}
\makeatother
\begin{document}
  Some text \markfoot{Mon texte.}
\end{document}

enter image description here

share|improve this answer
    
Why base it on the fancy pagestyle at all in this case? Why not just omit that line and the need for \makeatletter altogether? Would the result differ? Or would the code just be simpler? I'm not sure about this - does the fancy pagestyle set up anything beyond the commands set to mark the headers and footers and draw the foot and headrules? –  cfr Feb 1 at 23:19
    
@cfr I have no idea!. I was just addressing to the OP's problem :) May be without fancyhdr it can be done more simpler. –  Harish Kumar Feb 1 at 23:21
    
Thanks a lot thats what i need thanks @Harish_Kumar and all –  Zero-dev Feb 1 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.