Register to reply

Redefine command in latex

by Dragonfall
Tags: command, latex, redefine
Share this thread:
Dragonfall
#1
Feb5-13, 05:54 PM
Dragonfall's Avatar
P: 995
I want to redefine \mathbf to have a different font. I can't seem to make \newcommand work since it says "already defined". Help?
Phys.Org News Partner Science news on Phys.org
Suddenly, the sun is eerily quiet: Where did the sunspots go?
'Moral victories' might spare you from losing again
Mammoth and mastodon behavior was less roam, more stay at home
D H
#2
Feb5-13, 06:47 PM
Mentor
P: 15,055
It's \renewcommand.

Don't use it lightly. It's usually much better to define your own macros as opposed to overriding macros whose definitions have deep meaning.

This looks like an "XY" problem. Underneath the hood you are facing problem X, something about which you haven't told us a single word. You somehow see that approach Y is a solution to your underlying problem, so you ask how to do Y. It's usually much better is to ask us about X directly.

So, what's your real problem, and what is motivating you to want to change \mathbf?
Dragonfall
#3
Feb5-13, 11:15 PM
Dragonfall's Avatar
P: 995
I've used \mathbf throughout a very long work, and I want to change the font from what it is to textsf+textbf, which looks less... aggressive. I suppose I could just change every \mathbf instead redefining them.

jhae2.718
#4
Feb5-13, 11:52 PM
PF Gold
jhae2.718's Avatar
P: 1,153
Redefine command in latex

I'd make a custom LaTeX command to get the desired formatting and then use an editor command or sed or something to replace mathbf.
AlephZero
#5
Feb6-13, 07:37 AM
Engineering
Sci Advisor
HW Helper
Thanks
P: 6,919
What jhae said. But if you really want to do this, it would be better to do it the same way that LaTeX sets the default, i.e. override the command
\DeclareMathAlphabet      {\mathbf}{OT1}{cmr}{bx}{n}
with your preferred font definition.
Dragonfall
#6
Feb9-13, 02:41 AM
Dragonfall's Avatar
P: 995
Alright, thanks everyone.


Register to reply

Related Discussions
[LaTeX] What are the standard margins on a latex document? Math & Science Software 2
MATLAB save command and transpose command Math & Science Software 4
Latex Command Window now available! Forum Feedback & Announcements 37
Latex Command Window for vBulletin Forum Feedback & Announcements 25
Redefine Pi... General Math 13