14 questions linked to/from newcommand vs. DeclareMathOperator
231 views

### Is using DeclareMathOperator for functions the right thing to do? [duplicate]

I'm wondering if I use the \DeclareMathOperator for the wrong things. For example I have a cost function cost(x,y) which takes two arguments. I would declare it as \DeclareMathOperator*{\cost}{cost} ...
65 views

### Place one math expression over the other [duplicate]

The following formula appears in the Stanford ML Course: How do I express this format, in which minimize is in line with the J(...) expression, and directly above the Thetas? I tried looking for a ...
59 views

### How to make new commands for function operations that don't italicize [duplicate]

90k views

### What is the difference between \def and \newcommand?

Inspired by a question about \let and \def, I have some that essentially all boil down to asking What are the differences between \def and \newcommand? In particular, I wonder Is it possible to ...
114k views

### bm package versus \boldsymbol

I'm typing a bold vector small x with a tilde sign above it. Now when I want to write its derivative, I'm putting a dot on top of everything. This is giving me problems and I found one solution: \...
2k views

### How do you make your own symbol when Detexify fails?

My first visit to TeX.SX came when I was looking for a symbol for a twisted product: I knew about Detexify and the Comprehensive LaTeX Symbol List, but I could not find the symbol there. I tried the ...
49k views

### What is the Latex convention for sign function? [closed]

What is the correct type for sign(x)(signum function)? I'm using: \documentclass[journal,transmag]{IEEEtran} \usepackage{amsmath} \usepackage{amssymb} \newcommand{\sign}{\text{sign}} Is that ...
14k views

### \DeclareMathOperator won't take arguments

I'd like to define a family of math operators that have the same superscript, but different subscripts. My first attempt was: \DeclareMathOperator{\Upd}[1]{U^M_{#1}} But the log tells me that: l.3 \...
266 views

### DeclareMathOperator and widearcarrow with kpfonts

The title says it all, I am using the package kpfonts and I would like to declare a math operator that has a widearc on top. However, when I compile I don't get any arc. \documentclass{article} \...
637 views

### How can I align the terms of this equation nicely?

I have the following alignat segment: \begin{alignat*}{3} \text{max}_{\underline{\lambda}} \text{min}_{\underline{x}} \quad & \underline{c}^T \underline{x} + \underline{\lambda}^T(\underline{d} ...
2k views

### New DeclareMathOperator

In my MWE below, I wanted the create a shortcut for some operators. How can I get the \DeclareMathOperator command to show up like the conventional way of using the actual command $\mathbf{z}(k)$ ? ...
319 views

### Two lines in an equation of one line

What I want to do is to include two lines at the begging in an one-line equation, just like in the following picture. Does anyone have any idea in order to achieve it? Thanks a lot.
Let's say in my preamble I define \DeclareMathOperator\rad{rad} and have the text Let $f$ be a smooth function and $f^{\rad}$ its radial symmetrization. It is inconvenient to have to enclose the \...