How to manually equalize columns in an IEEE paper if using BibTex? - latex

IEEE conference publications in two-column format require authors to manually equalize the lengths of the columns on the last page of the final submission. I have typically done this by inserting a \newpage where necessary -- which usually ends up being somewhere amidst my (manually entered) references.
However, I have recently begun using BibTeX to manage references, and have now run into a problem: my last page contains only a few (generated) references, and I can't figure out how to manually equalize the columns.
The last page is the tail end of what is generated by:
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,library}
Any ideas on how I can equalize the columns while continuing to use BibTeX?

I have submitted to both ACM and IEEE conferences and the easiest thing for me has been using:
\usepackage{flushend}
I've heard it doesn't always work well, but it's been great for me
http://www.ctan.org/pkg/flushend

I went back to RTFM again, and it turns out this is addressed right in "How to Use the IEEEtran LaTeX Class" by Michael Shell (maintainer). Section XIV notes that IEEEtran helpfully provides the \IEEEtriggeratref{} command for just this purpose. By default, it fires a \newline at the given BibTeX reference number. You can even change the command to fire with \IEEEtriggercmd{}.

It can also be done by using the balance package. You simply include the balance package in the preamble (\usepackage{balance}) and insert \balance some place on the last page of your document (for instance right in front of the references). However, I'm not sure if it's working if the last page (both columns) is completely full of references...

IEEE requires authors to equalize the lengths of the columns on the last page.
ACM makes us do this too. I just wind up inserting \vfill\break by hand either in the main text or somewhere in the .bbl file, wherever it makes the columns balance. By the time camera-ready copy goes to ACM, they want the .bbl file inlined by hand anyway, so tinkering by hand does not present an additional hardship.
The reference-number trick might be nice except I never use numbered references :-)
The multicols environment works only if you're luck and your last page comes out exactly as bibliography.
It would be extremely good (and not so difficult) if some enterprising hacker would build the "balance the two columns in the last page" functionality straight into LateX's \output routine. The flexibility is there in the underlying engine, and it would make a lot of people happy.

Not sure if multicol conflicts with bibtex at all, and I don't have time to check, sorry. But try this:
use the multicol package:
\usepackage{multicol} in your preamble, then:
\begin{multicols}{2}
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,library}
\end{multicols}
Multicol automatically balances columns. I would recomend using it through out your document, instead of using the .cls or .sty's twocolumn option.

Related

How to define a multipage environment not interrupted by tables and figures?

I have defined a new LaTeX environment for excursions in a book chapter I am writing. The environment is multipage and often includes inline images. Moreover, I am using the shaded environment to give the environment a background colour to make it stand out a bit.
However, the environment, as shown below, is split up by floating tables and images, which makes the flow of the environment visually more difficult to follow. For example, it is now difficult to see if that floating image or table is part (the missing background colour does not help). So, I like to extend my environment to disallow it to be interrupted by floating elements, but do not know how to get that done.
\newcounter{bioclipse}
\def\thebioclipse{\thechapter-\arabic{bioclipse}}
\newenvironment{bioclipse}[2][]{\begin{small}\begin{shaded}\refstepcounter{bioclipse} \par\medskip\noindent%
\textbf{Bioclipse Excursion~\thebioclipse #1: #2
\vspace{0.1cm} \hrule \vspace{0.1cm}}
\rmfamily}{\medskip \end{shaded}\end{small}}
Any solution to disallow interruption is fine, even if the background colour is done differently.
The algorithm for insertion is rather complex. Basically you want that any pending insertion must not be put into the page where the env bioclipse apply. As first fast solution you could flush all the insertion first, and then start the new chapter. If you want to put figures or whatever into the environment, and you want them to be "flushed" only after the last page where the env is at work... second fast solution is: put them after the environment directly!! So they won't "annoy" the page/s at all (of course, avoid using of footnotes).
The other solution (making it someway automatic) is a little bit tricky. Insertion places for "pending" materials are chosen while constructing the vertical list that is the page ("candidate"), in the output routine. This means you have to play with the output routine at worst; but maybe it is too much, unless you're planning your own TeX format, and maybe LaTeX gives easier choices...
Digging a bit in LaTeX codes, I see there's a conditional you can try to use, it is \#insert* i.e. \#insertfalse and \#inserttrue. If you're lucky they "drive" the possibility of putting insertions, so that at the beginning of your env you can say \#insertfalse and at the end \#inserttrue. Try, I am not saying it works.
As maybe you know to use # as letter catcode so that it can be part of a "command" name, you have to use \makeatletter and \makeatother when you finished (likely default class/style preamble does it for you).
You could also be iterested in having a look at placeins style (it could be already in your installation, otherwise, see here ) which apparently could solve (part of) your problem.

LaTex table numbering

How could I number the tables in my article chapter based ? So I want all the tables in the fifth section to be numbered like "Table 5.1", ..., "Table 5.n".
I tried
\usepackage{chngcntr}
\counterwithin{figure}{section}
\counterwithin{table}{section}
\counterwithin{equation}{section}
but I am having some problems (missing package I guess).
However, I need a simpler solution, without the need to use such packages.
The article class doesn't have chapters. Try the book or report classes - you'll find that the tables and figures are automatically numbered according to chapter.
Here is a solution without the use of any package (courtesy of "The Latex Companion", A1.4):
\makeatletter
\renewcommand{\thetable}{\thesection.\#arabic\c#table}
\#addtoreset{table}{section}
\makeatother
This resets the table counter whenever a new section is started, and formats it as sectionno.tableno instead of just tableno. You can change the figure and equation counters similarly.
If you are using the amsmath package (or an AMS class like amsart that loads it automatically), you can use
\numberwithin{table}{section}
This was created for equations, but works for any pair of counters though supposedly there might be tricky situations that it does not handle well.

Why does LaTeX "Table of Contents" leave gaps for missing items?

I have set tocdepth to a lower number, so that other subsections are not included in the list. But instead of just removing these items, LaTeX leaves a gap. How does it happen? How could it be prevented?
We need details, including the document class, the exact tocdepth number, and the set of section headings actually used in your document. Two hypotheses:
You have not run LaTeX enough times for the TOC to stablize—possible but unlikely.
You have set the tocdepth to 1, and the document class you are using deliberately puts extra space between level 1 headings (\sections)—slightly more likely.
The table of contents may include a stretchable space in between each of the entries. If the style allows it, put a \vfill after the \tableofcontents but before any \newpages, and see if that makes a difference.
Usually I recommend one of the titletoc or tocloft packages to format ToC entries.
I can heartily recommend the memoir document class, which I use for everything from poetry to business cards. I'm very, very happy with the investment I made to learn it, even though it wasn't negligible.
In particular, to tinker at your TOC entry formatting, search for \cftbeforeKskip in memman.pdf.
The final solution will probably look something like this:
\setlength{\cftbeforechapterskip}{0pt}
or
\setlength{\cftbeforesectionskip}{0pt}
etc... (depending on which level of entry you want to adjust)

How do I emit the text content of a reference in LaTeX?

I have a section:
\section{Introduction} \label{sec:introduction}
I'd like a link to the section where the link text is the name of the section. I can use hyperref:
The \hyperrf[sec:introduction]{Introduction} introduces the paper.
But that requires repeating the section title ("Introduction"). Is there a way to grab that? ref yields the section number, which isn't right. autoref yields "section " and then the section number, which isn't right, either.
There are a couple of packages that provide this for you. nameref is distributed as part of hyperref to do this:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=nameref
There is a more general package for cross-referencing basically anything, called zref:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=zref
It's by the same author as hyperref, Heiko Oberdiek; it's the one that I would choose. Here's an example:
\documentclass[oneside,12pt]{article}
\usepackage[user,titleref]{zref}
\begin{document}
\section{Introduction of sorts.}\zlabel{sec:intro}
Hello
\subsection{Structure}
We begin in `\ztitleref{sec:intro}'.
\end{document}
Note that it even removes the trailing period in the section title.
As far as I know, there's no standard way to do this. Simply put, the sectioning commands don't store the names of the sections anywhere they can be easily retrieved. Yes, they're inserted into the Table of Contents (and associated auxiliary file) and marks are set, but access to those is unreliable at best and usually impossible without additional context, which is almost always unavailable by the time you need to refer back to the section.
The code sample you posted looks like what I would write. There might be a package to automate this, but if one exists it's probably pretty hairy code since this is really not a particularly common use case. Actually, to go all grammar nazi on you the final text you're creating is incorrect; the word "introduction" should be lowercase inside the sentence, and this can't be achieved (in general) with backreferences to the actual section titles.
I'd just suck it up and write out references like this manually. There won't be enough of them to justify automation. Of course, if you're doing something more involved than your example suggests (many auto-generated sections or something) things might be different, but if that's the case it's really a different question entirely.
You could try using
\newsavebox
\savebox
\usebox
which won't save you any typeing but will give you a single authoritative source for each title
And you might search ctan.org, I suspect this has been done already.

Is there a way to prevent LaTeX from splitting long footnotes across multiple column/pages?

I am using LaTeX and in some cases have multiline footnotes.
When I use a two-column format and especially when the reference to a footnote is low in the column, LaTeX will often split the footnote in half: it starts in the original column, but then continues under another column (sometimes in another page), which is very distracting.
Is there a way to force LaTeX to never split footnotes and allocate enough space for them?
Use \interfootnotelinepenalty=10000 to totally disallow this. But be prepared for other layout artifacts... Setting the penalty lower than 10000 will give TeX some flexibility in deciding when the side effects are too bad to bear.
For a detailed discussion see the TeX FAQ item Why does LaTeX split footnotes across pages?
I've found that it's best to get the style sheet from where you're trying to publish, and just use their format (I'm assuming you're trying to publish somewhere, if you're using a double-column format). The editors can then handle wacky footnoting. If it's for a thesis, I don't know about your committee, but mine has told me that a single column, double-spaced is the way to go, which should avoid your problem in the first place.

Resources