GeneralUndefined control sequence

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
bill
Posts: 8
Joined: Sat May 10, 2008 10:33 am

Undefined control sequence

Post by bill »

Hi all,
I use w2l to convert some word file to latex, it create this page style

Code: Select all

% Pages styles
\makeatletter
\newcommand\ps@Standard{
  \renewcommand\@oddhead{}
  \renewcommand\@evenhead{}
  \renewcommand\@oddfoot{\textstylePageNumber{\thepage{}}}
  \renewcommand\@evenfoot{\@oddfoot}
  \renewcommand\thepage{\arabic{page}}
}
However it fail to compile with the following error when more than one page.

Code: Select all

  Undefined control sequence. {\thepage {}} \textbf{Price: \ HKD 5,000} }
I just begin to learn latex so that I don't understand what it mean or how to fix it. Please advise.

regards,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Undefined control sequence

Post by localghost »

bill wrote:[...] I use w2l to convert some word file to latex, it create this page style [...]
This is not a good idea, because these converters often yield bad and questionable code (as you experienced in this case).
bill wrote:[...] I just begin to learn latex so that I don't understand what it mean or how to fix it. Please advise. [...]
The above mentioned code seems to produce a specific kind of page layout regarding headers and footers. If you could provide an excerpt from the Word document you want to reproduce, we will find a better alternative to that which you additionally would understand. You can upload this as attachment to your next post.


Best regards
Thorsten¹
bill
Posts: 8
Joined: Sat May 10, 2008 10:33 am

Re: Undefined control sequence

Post by bill »

please refer the 2 attachments for references.

regards,
Attachments
qtsample.tex
generated from
w2l -latex qtsample.odt
(4.09 KiB) Downloaded 406 times
qtsample.odt.zip
please rename it to
qtsample.odt
(20.76 KiB) Downloaded 254 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Undefined control sequence

Post by Stefan Kottwitz »

Hi Bill,

welcome to the LaTeX Community board!
Undefined control sequence means that you used a command (here: \textstylePageNumber) that is not defined. Often it's just the result of a typing error or one forgot to use the corresponding package. It's a commonly occurring error. In that case you have to correct the command name or \usepackage{corresponding package name}.

In your case I don't know where \textstylePageNumber may be defined, it's not used by my TeX distribution and an internet search engine did not find this command. If I remove that command, your code is working.

By the way if you don't understand an error or if you cannot locate the error then look into the logfile for it, there may be more information than your editor output shows to you.

Stefan
LaTeX.org admin
Post Reply