I need to point to a label on a page, but as my text is layed out in two columns, I'd also like to include the column (1 or 2). Is there a way to find out which column a label is in?

\section{First chapter}
Some text explaining some things.
... see page \pageref{explanation} for ...


I'd like to use something like:

see page \pageref{explanation}, column \columnref{explanation} for ...


ps. the document class is provided by someone else and it defines the two-column format.


1 Answer 1


This is an attempt.

The class icgg.cls loads hyperref. We create a new command \collabel which is executed each time a \label command is issued.

If, for example, you issue \label{foo} a new label called col:foo is created at the same point of the document. if you want to know the column to which \label{foo} refers to, you have to use the command \columnref{col:foo}.

Here's an example (replace \documentclass[twocolumn]{article} \usepackage{hyperref} with \documentclass{icgg} in your document):

\usepackage{lipsum} %only for the example

        {\if@firstcolumn 1\else 2\fi}%


\section{First section}\label{sec:first}

\section{Second section}\label{sec:second}

Section \ref{sec:first} starts at page \pageref{sec:first} in column \columnref{col:sec:first}, 
while section \ref{sec:second} starts at page \pageref{sec:second} in column \columnref{col:sec:second}



enter image description here

Zoom on the relevant part:

enter image description here

Note that the command \if@firstcolumn sometimes fails to detect the right column, so you may have some wrong references.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .