Turgut Durduran's Site -- about Cyprus, Photography, Linux, LaTeX, Human Rights, Politics ...

Frontpage | Hamamboculeri | Research| Flickr Page

Tue, 19 Sep 2006

Redefining "\ref" in latex to be more friendly

I just decided not to be lazy and finally got this done. the following will produce "Section 1" when you say "\Sref{sct:mysection}". There is "fancyref" on CTAN that does better job but I doubt I will ever stick to its rules.

%stolen from lhelp implementation on CTAN (if need be use that package)

\makeatletter   

\newcommand{\cref}[1]{\textbf{chapter~\ref{#1}}}
    \newcommand{\Cref}[1]{\textbf{Chapter~\ref{#1}}}
    \newcommand{\sref}[1]{\textbf{section~\ref{#1}}}
    \newcommand{\Sref}[1]{\textbf{Section~\ref{#1}}}
      \newcommand{\aref}[1]{\textbf{appendix~\ref{#1}}}
      \newcommand{\Aref}[1]{\textbf{Appendix~\ref{#1}}}
      \newcommand{\fref}[1]{\textbf{figure~\ref{#1}}}
      \newcommand{\Fref}[1]{\textbf{Figure~\ref{#1}}}
      \newcommand{\tref}[1]{\textbf{table~\ref{#1}}}
      \newcommand{\Tref}[1]{\textbf{Table~\ref{#1}}}
      \newcommand{\pgref}[1]{\textbf{page~\pageref{#1}}}
      \newcommand{\Pgref}[1]{\textbf{Page~\pageref{#1}}}
      \newcommand{\phref}[1]{\textbf{photo~\ref{#1}}}
      \newcommand{\Phref}[1]{\textbf{Photo~\ref{#1}}}
\makeatother

See more ...

[/LaTeX] permanent link: individual ||permanent link: story || permanent link: category


TeXMed: PubMed to BiBTeX convertor

I had forgotten about this little utility. It is  a very useful one when converting a chunk of references to bibtex from an online database. There are various other ways of doing that (e.g. Bibus, bibutils etc) but I particularly find this one reliable. It is available for download at: http://www.sbg.bio.ic.ac.uk/~mueller/TeXMed/ and a quick google search will reveal a bunch of sites running it that you can use/try. 

See more ...

[/LaTeX] permanent link: individual ||permanent link: story || permanent link: category