Linked Questions

4
votes
0answers
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} ...
1
vote
1answer
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 ...
0
votes
1answer
59 views

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

I created new commands for Galois groups and Automorphism groups like so, \newcommand{\Gal}[1]{\text{Gal}(#1)} \newcommand{\Aut}[1]{\text{Aut}(#1)} I wanted to the text of Gal and Aut to be ...
292
votes
5answers
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 ...
76
votes
2answers
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: \...
50
votes
4answers
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 ...
38
votes
2answers
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 ...
32
votes
3answers
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 \...
6
votes
3answers
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} \...
8
votes
1answer
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} ...
1
vote
1answer
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)$ ? ...
1
vote
2answers
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.
1
vote
1answer
57 views

How to avoid using curly braces when placing a \DeclareMathOperator command in subscript or superscript, while preserving spacing?

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 \...
2
votes
0answers
129 views

Macros for image, coimage, and cokernel [duplicate]

I work in LyX. There's a default macro for the kernel: \ker which has nice spacing if I put something after it, compared to \text{ker}. I'd like to have macros with the same nice spacing for the image,...