GeneralError with text: -stack

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
skandal
Posts: 4
Joined: Mon Jun 13, 2011 2:05 pm

Error with text: -stack

Post by skandal »

I want to write an instruction how to set up a program. I have made a list with itemize and I need to write down an command but Latex gives out an error every time:

Code: Select all

\begin{compactitem}
  \item doing something
  \item enter Command: sdcc -c –stack-auto and push okay.
  \item something else
\end{compactitem}
every time I get an error because of -stack. If I remove that - than there are no problems, but I need that for the instruction.

Does somebody have an idea? I tried alread with \verb+text+ and with begin{verbatime} ... end{verbatime} but both dosent work.
Last edited by Stefan Kottwitz on Mon Jun 13, 2011 2:19 pm, edited 1 time in total.

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

Error with text: -stack

Post by localghost »

No problem here.

Code: Select all

\documentclass{article}
\usepackage{paralist}

\begin{document}
  \begin{compactitem}
    \item doing something
    \item enter Command: sdcc -c –stack-auto and push okay.
    \item something else
  \end{compactitem}
\end{document}
Well then?


Thorsten
skandal
Posts: 4
Joined: Mon Jun 13, 2011 2:05 pm

Error with text: -stack

Post by skandal »

dokumentclass needs to be:

Code: Select all

\documentclass[a4paper, 12pt]{book}
.
Why did you use paralist?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Error with text: -stack

Post by localghost »

The document class is almost irrelevant here. My example also works with the »book« class.
skandal wrote:[…] Why did you use paralist?
Because it provides the »compactitem« environment? Otherwise it won't work.

You still haven't provided a counterexample that reproduces the error you mentioned earlier.
skandal
Posts: 4
Joined: Mon Jun 13, 2011 2:05 pm

Re: Error with text: -stack

Post by skandal »

Sorry yes of course I also included the paralist package for compactitem.
The problem is I need to write the following as a text: "sdcc -c –stack-auto". But it seems because of any of these words it cant compile it. I realized it doesn't matter if I write this in text inside a compactitem or just as a normal text. Every time my compiler (WinEdt) is saying:

! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding 'latin1'.
sdcc -c –
stack-auto
?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Error with text: -stack

Post by Stefan Kottwitz »

It seems like you copied the words resp. characters into your document, with a different encoding. Obviously LaTeX complains about the minus sign, which is not Latin-1 - perhaps it's an Unicode minus just like in this topic.

Just type and replace the sign by a normal character available using the keyboard.

Stefan
LaTeX.org admin
skandal
Posts: 4
Joined: Mon Jun 13, 2011 2:05 pm

Re: Error with text: -stack

Post by skandal »

Thanks 1000 times. That was the reason! Just replaced that by a "new" - and it worked. I am so happy you could help me.
Have a great evening.
Post Reply