Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the acronym package and let it create a footnote with the explanation on the first use of my abbreviation.

However, at some parts I am using \textbf{\ac{ISO-TP}} which also makes the citation number bold. Is there a way to prevent this? Just switching \textbf and \ac doesn't work, of course.

Edit: Here is an example - I want "ISO-TP" bold and "ISO" normal, but both the "8" and the "9" normal. Not the "8" bold.

Example

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

From the acronym documentation:

There are three lower-level macros controlling the output. Any acronym printed by \acs is formatted by \acsfont. Similarly, unless the option footnote is specified, \acffont handles the output of \acf, where the included acronym goes through \acfsfont (and \acsfont).

\renewcommand*\acsfont{\textbf}

A complete example:

\documentclass{article}
\usepackage{showframe}
\usepackage[colorlinks,linkcolor=red!60!black]{hyperref}
\usepackage[printonlyused,withpage,footnote]{acronym}
\renewcommand\acsfont{\textbf}
\begin{document}

\section{Intro}
\ac{CDMA} \qquad\ac{CDMA}

\ac{test} \qquad\ac{test}

\section{Acronyms}
\begin{acronym}[Text with the largest label]
 \acro{CDMA}{Code Division Multiple Access}
 \acro{test}{Text Text Text Text Text Text Text Text Text Text Text Text 
             Text Text Text Text Text Text Text Text Text Text Text Text }
\end{acronym}
\end{document}

EDIT:

You can define a command in relation to \textbf which redefines acsfont local. In the following example I define \formatac

\documentclass{article}
\usepackage{showframe}
\usepackage[colorlinks,linkcolor=red!60!black]{hyperref}
\usepackage[printonlyused,withpage,footnote]{acronym}
\usepackage{xspace}
\newcommand{\formatac}[1]{%
\bgroup\renewcommand\acsfont{\textbf}%
\relax#1\relax\egroup\xspace}

\begin{document}

\section{Intro}
\formatac{\ac{CDMA}} \qquad\ac{CDMA}

\ac{test} \qquad\ac{test}

\section{Acronyms}
\begin{acronym}[Text with the largest label]
 \acro{CDMA}{Code Division Multiple Access}
 \acro{test}{Text Text Text Text Text Text Text Text Text Text Text Text 
             Text Text Text Text Text Text Text Text Text Text Text Text }
\end{acronym}
\end{document}

Output of the second MWE:

MWE output

share|improve this answer
    
Thank you... this is my first time I work with LaTex, so I don't know how to re-write stuff in packages myself. :) It seems to work in most cases, but in some it doesn't. I can't tell any difference, however. –  jellyfish Sep 7 '11 at 15:17
1  
@jellyfish: I added a complete example and everything works well. –  Marco Daniel Sep 7 '11 at 15:20
    
oooooh, I see. No, that's not what I wanted. Maybe I didn't make myself clear enough, sorry. I don't want ALL accronyms bold. I only want a few certain ones bold, which works fine if I just put a \textbf{} around. What I want is that the citation numbers stay normal and don't go bold with the acronym. –  jellyfish Sep 7 '11 at 19:49
1  
@jellyfish: I edited my post. –  Marco Daniel Sep 7 '11 at 20:03
    
Wow! Now this is fancy, thank you very much! Never thought there would actually be a way! :) –  jellyfish Sep 7 '11 at 20:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.