> If I define my own abbreviations as follows (no ending space), > > \newcommand{\knn}{$k$NN} > > I found that the space after the \knn will be eaten
> If I define my own abbreviations as follows (no ending space), > > \newcommand{\knn}{$k$NN} > > I found that the space after the \knn will be eaten
Either call the command like \knn{} to avoid the eating of the space or use the `xspace' package and the command with the same:
\newcommand{knn}{$k$NN\xspace}
\xspace will determine if a space is needed, and if so insert one.
Magnus
xspace comes as an ready-made package with latex. It's at:
/usr/share/texmf/tex/latex/tools/xspace.sty
documented on: 2000.11.30
Newsgroups: comp.text.tex > the package unwrapped right. but where is the .dvi document that > explain the package? I though every package have one. Besides, I > looked into the textmerg.dtx, and seems the docu is there. How can I > get it?
Normally, one runs the .dtx file through LaTeX, just like a .tex file. However, textmerg is an exception, which is why the .ins file outputs the following message:
Scott
> I just pushed a paper through pdflatex, and discovered that my > fancyhdr headings went away on all pages. Here's the preamble stuff: > > ,---- > | > | \documentclass[12pt]{article} > | \usepackage{fullpage} > | \usepackage{setspace}\onehalfspacing > | \usepackage{fancyhdr}\pagestyle{fancy} %* this line... > | > | \lhead{Stable Many-Job Systems}\chead{}\rhead{\thepage} > | > | \bibliographystyle{alpha} > | > | \title{Note on Stable Many-Job Systems} > | \author{Charles R Martin} > | \setlength{\parindent}{0pt} > | \setlength{\parskip}{9pt} > | \begin{document} > | \maketitle\thispagestyle{empty} > | > | \end{document} > `---- > > Looks fine through regular latex, and the un-fancy version deleting > the "%*"'ed line looked fine as well.
Perhaps you need to expressly state a paper format somewhere (a4paper as an option of article might be the first good place, and dvips -ta4 another). I had a similar problem once, and this helped.
> My heading goes away also, and for plain ps files too. will try that > -ta4 later...
> A quick question, Is there a way to specify the paper size in my tex > source file instead of specifying it every time when using the > dvips to do the conversion?
you can modify the config.ps file in $TEXMF/dvips/config/ dir to make it the default for dvips. the papersize defined first is the default.
alternatively, if you don't want to modify the config.ps file or you don't have permission to do so, you can put
\specialwidth,height
in you .tex file, probably after \documentclass. replace width and height with the actually paper width and height.
Xiaotian
documented on: 2001.03.07
Newsgroups: comp.text.tex
> > If I wanted the first letter in a paragraph to be bigger than the rest of > > the text and have it span several rows, how would I do it??
> These are usually called versals or drop caps in English. There are > some packages on CTAN for this...
I've used both dropping and lettrine. Both work fine, but lettrine seems more versatile, and allows better 'fine tuning' of the versal (e.g. moving Q and J up a little, or T or V slightly to the left). Adjustments like that are particularly important if you want capitals that span more than 2 lines or so.
Paul Stanley
Newsgroups: comp.text.tex
> [...] is it possible for latex to produce "what's new" signs for the > documents? I mean, those grey lines that goes vertically along the > paragraphs that recently has changed?
Look at the changebar package. Also note that there is an accompanying shell script that works with diff or revision control systems to make it even easier.
Jeffrey Goldberg
Newsgroups: comp.text.tex Date: 2001-05-22 01:55:22 PST
This isn't really (much) of a LaTeX Question, but I wouldn't know where else to post this either, so here it goes: Does something like the changebar-package (and in particular the chbar.sh script) exist which works with finer granularity? The existing script depends on diff, which works linebased. This means that a change of only one letter in the first line of the source of a paragraph _might_ change all subsequent linebreaks, thereby marking the entire paragraph as changed. It would prefer it if only that one letter would be marked (*). As far as I can see, this would however require new versions of (at least) diff and ed (or patch) --- and a new version of rcs might be a good idea too. Does such a beast exist? In addition, I would also like to be able to mark deleted text(*), and ideally even to be able and see who made which changes (for a paper with multiple authors).
Any ideas?
Sven
(*) changebars obviously would not cut it as markers for single letters, nor for deleted text. The latter could be inserted with a line going thru the text, marking it as deleted, while the former could be represented by underlining, or maybe using colour (although this would be invisible in xdvi, so maybe that's not a good idea). Different authors could be marked by different line-styles, or different colours.
> Apparently, you want a program which produces word-based diff's > Since SuSE Linux 6.4 (maybe also earlier) there is a program called "wdiff"
Great!
wdiff -w \\diffdel\{ -x\} -y \\diffinc\{ -z\} oldfile newfile
does pretty much all I need, now I only need to come up with usefull definitions for \diffdel{} and \diffinc{}. That was _really_ easy!
Sven
> i'm using the doc class slides, and am unable to change the size of the left > margin (and the font size as well, but thats not an issue just now).
The problem is landscape. Since you are turning your text, changing \oddsidemargin means your text goes down. Try changing \leftskip inside the landscape environment. (But I'm not sure if it is the best way, perhaps the documentation of lscape can help you).
And I have no problem in changing the font size
\documentclass[titlepage]{slides} \usepackage{graphicx} \usepackage{lscape} \linespread{1.2} \begin{document} \begin{landscape} \advance\leftskip-1cm\relax text text
\LARGE text text \end{landscape} \end{document}
works fine for me.
Ulrike Fischer
Newsgroups: comp.text.tex
> Using the slides environment under Latex2e, I would like to include my > name in the foot of the page (i.e. next to the page number), or > alternatively in the head.
The user's manual (run 'texdoc sem-user') gives the following example:
\newpagestyle{mypagestyle}% {\sl Big U \hfil \thedate \hfil \thepage}% {\hfil File \jobname.tex; printed \today\hfil} \pagestyle{mypagestyle}
/Mats