I was wondering if someone could help me with the following
questions:
(1). Ispell doesn't seem to recognize \eqref as a latex command.
When I run Ispell on a tex document containing \eqref, Ispell
seems not to understand what \eqref is and complains everytime
\eqref is encountered during the same run. This is a nuisance
if \eqref occurs fairly frequently. Is there a way to get
ispell to recognize \eqref?
(2). For a report that I am preparing, I would like to setup the text
in the following fashion: Two columns with the left column containinng
only the section headings and the right column containing the
text. The text in the right column should start on the same line
that the section heading in the left column starts on. For
example:
Section The corresponding text
Title
---------------------------------------------------------------
Target 1 Text goes here text goes here text goes here text
goes here text goes here text goes here text goes
Target 2 Text goes here text goes here text goes here text
goes here text goes here text goes here text goes
Any help is greatly appreciated.
Thanks
-- Harish
_________________________________________________ Harish Cherukuri____
|Assistant Professor Mech. Engg. & Engg. Sci. UNC-Charlotte |
|Voice: 704-547-3917 Fax: 704-547-2352 email: hche...@uncc.edu |
| 9201 University City Blvd, Charlotte, NC 28223-0001 |
Can't you just accept it once and then ispell will ignore it for the
rest of this run? But I admit it would be nicer to add \eqref to the
macros known to ispell.
> (2). For a report that I am preparing, I would like to setup the text
> in the following fashion: Two columns with the left column containinng
> only the section headings and the right column containing the
> text. The text in the right column should start on the same line
> that the section heading in the left column starts on. For
> example:
I am not sure that I got the idea, but here is a solution
using a list environment:
% counter to enumerate the targets
\newcounter{target}
% the optional argument can be used to change the \labelwidth
\newenvironment{target}[1][99]{%
% the counter is used to enumerate the items by default
\list{Target~\arabic{target}}{%
% use the counter
\usecounter{target}%
% set the \labelwidth to the widest label
\settowidth{\labelwidth}{Target~#1}%
% increase space between label and text
\labelsep1.5em
% adapt \leftmargin accordingly
\leftmargin\labelwidth
\advance\leftmargin\labelsep
% format the label
% if you want to change this, also change the \settowidth above
\def\makelabel##1{##1\hfil}}}%
% just close the list at the end
{\endlist}
Use the environment like this:
\begin{target}[9]
\item Text ...
\item ...
...
\end{target}
--
Bernd Schandl
Department of Mathematical Sciences
Clemson University
Clemson, SC 29634-1907
SomeText Text goes here text goes here text goes here text
goes here text goes here text goes here text goes
Text goes here text goes here text goes here text
goes ...........
MoreText Text goes here text goes here text goes here text
goes here text goes here text goes here text goes
here ...............
and so on.
Tabular environment does what I want except if I have
a list of items in the second column. Here's an example:
\begin{tabular}{p{1.0in}p{4.5in}}
{\bf Concept} & {\bf Student Training Materials}. Additional manuals,
friendlier access, and self-paced training materials for students
using analysis and design software currently available ......... \\
Strategic Goals & \begin{itemize}
\item Analysis Development \item Support of Diverse of Learning
Population \end{itemize}
\end{tabular}
The first row is perfect but the second row where I have a list
of items is off vertically.
I apologize for being not very clear in my previous posting.
Thanks for the help.
Ok, here is a new version:
\newenvironment{target}[1][\hspace{1in}]{%
\list{}{%
\settowidth{\labelwidth}{#1}%
\labelsep1.5em
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\def\makelabel##1{##1\hfil}}}%
{\endlist}
Your example works fine:
\begin{target}
\item[\textbf{Concept}]
\textbf{Student Training Materials}. Additional manuals,
friendlier access, and self-paced training materials for students
using analysis and design software currently available .........
\item[Strategic Goals]
\begin{itemize}
\item Analysis Development
\item Support of Diverse of Learning Population
\end{itemize}
% make LaTeX references to equation numbers use parentheses
% \ref{eqq} types (2).
% Was: \def\@eqnnum{{\normalfont \normalcolor (\theequation)}}
\makeatletter
\def\@eqnnum{{\normalfont \normalcolor \theequation}}
\renewcommand{\theequation}{(\arabic{equation})}
\makeatother
Regards,
Ron Smith
This replacement only works for regular LaTeX. Amsmath uses different
internal sommands to implement equation numbers, so if you want to
get \ref to work like \eqref for equations, the following should
work, in place of the \def\@eqnnum line...
% Was: \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
\def\tagform@#1{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
You might try the package parallel.sty, from CTAN. It can do something like
that.
James
[snip]
> (2). For a report that I am preparing, I would like to setup the text
> in the following fashion: Two columns with the left column containinng
> only the section headings and the right column containing the
> text. The text in the right column should start on the same line
> that the section heading in the left column starts on. For
> example:
>
> Section The corresponding text
> Title
> ---------------------------------------------------------------
>
> Target 1 Text goes here text goes here text goes here text
> goes here text goes here text goes here text goes
>
> Target 2 Text goes here text goes here text goes here text
> goes here text goes here text goes here text goes
Hmm... I reckon the best idea is to use a package like geometry or my
rmpage package (from CTAN) to modify the page layout to give a very
large left margin, and then use something like the titlesec package
(also from CTAN) to change the formatting of the sectional headings to
be the way you want - put the sectional heading on the same line as the
first line of the text - putting the heading in something like
\makebox[0pt][r]{} should help.
Rowland.
--
Remove the animal for my email address: reb...@astrid.dog.u-net.com
Sorry - the spam got to me. PGP pub key A680B89D
UK biker? Join MAG and help keep bureaucracy at bay
http://dredd.meng.ucl.ac.uk/www/mag/mag.html
After looking through the man-pages of the ispell command, it appears
that when ispell is in the TeX mode, it skips anything following a \
until it reaches a whitespace or a set of TeX delimiters. So for the
command \eqref{eq:stuff}, the \eqref is ignored but "eq:ref" is
spell-checked an causes errors. Apparently, the commands defined by L.
Lamport have been coded into ispell such that they and their following
arguments are ignored. (That's why \cite and \label don't cause
similar problems) So, if you are just running ispell from a command
line, it is not apparent to me how to get ispell to ignore the
argument of the \eqref command.
However, there is a potential for getting the desired effect without
forcing the \ref command to work like \eref, as I suggested in my
original posting. Here's more proof that using Emacs/XEmacs to edit
your LaTeX files has advantages. For the interests of others, I'll
continue with the assumption that you are using Emacs, and know a
little about setting variables and such.
You should be able to spell-check your document directly from the
Emacs buffer. There is a minor mode called "ispell.el" that helps
interface the Emacs buffer to the invoked ispell process. There are
newer versions of ispell.el available that let you add to the list of
commands that are to be ignored during the spell-checking process.
Once you have opened an Emacs buffer, check for the existence of a
variable "ispell-tex-skip-alists" by using the following:
M-x describe-variable
which generates a prompt, where you enter: ispell-tex-skip-alists
If this variable exists, you are in luck, as you can easily modify it
in your .emacs file to ignore the \eqref command during the
spell-checking process. If you don't have this variable, then you are
using an older version of ispell.el that doesn't support this nice
feature. Unless you can upgrade to a newer version of ispell.el, the
idea presented in this posting doesn't help, and you might want to
resort to Donald Arseneau's code (not my posting of his code!) for
getting the \ref command to behave like \eqref.
Regards,
Ron Smith
<snip>
> However, there is a potential for getting the desired effect without
> forcing the \ref command to work like \eref, as I suggested in my
> original posting. Here's more proof that using Emacs/XEmacs to edit
> your LaTeX files has advantages. For the interests of others, I'll
> continue with the assumption that you are using Emacs, and know a
> little about setting variables and such.
>
<snip>
I recently switched from vi to nedit for editing LaTeX files. I have been
meaning to learn Emacs but never really found the time. May be that comments
such as the above will give me enough motivation to learn Emacs.
What I usually do when I need to run spellchecker on my files is to invoke
ispell via xtem (X11 tex menu).
Anyway, thanks to everyone for very helpful suggestions.
--Harish
_________________________________________________ Harish Cherukuri____
|Assistant Professor Mech. Engg. & Engg. Sci. UNC-Charlotte |
|Voice: 704-547-3917 Fax: 704-547-2352 email: hche...@uncc.edu |
| 9201 University City Blvd, Charlotte, NC 28223-0001 |
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own