New answers tagged

0

I have defined a new command \newcommand{\tenmix}[3]{{#1}^{#2}_{#3}} where #1 is the tensor name, #2 the contravariant indices and #3 the covariant indices. But I can't choose the order among the covariant and contravariant index, however it is not necessary to type the signs of superscript and subscript ^ and _. For example, the Riemann tensor: ...


2

Just because it is there, here's a version which uses coffins to arrange and typeset the boxes. The syntax is identical to that specified in the question except that \cwrapper can take an optional argument specifying the horizontal distance between the larger box and the superscript and subscripts. Since this is optional, the OP's syntax can be used ...


3

Here's a version respecting the clumsy syntax you want. \documentclass{article} \makeatletter \newcommand{\cwrapper}[1]{% \leavevmode\check@mathfonts \begingroup\ignorespaces #1% \clement@wrap \endgroup } \newcommand{\crepeat}[1]{% \def\clement@repeat{#1}\ignorespaces } \newcommand{\csup}[1]{\def\clement@sup{#1}\ignorespaces} ...


3

The original syntax of the OP can be preserved with this formulation: \documentclass{article} \usepackage{amsmath} \newcommand*{\csub}[1]{_\textnormal{~#1}} \newcommand*{\csup}[1]{^\textnormal{~#1}} \newcommand*{\cnotation}[1]{#1} \newcommand*{\crepeat}[1]{\fbox{#1}} \newcommand*{\cwrapper}[1]{\ensuremath{#1}} \begin{document} \cwrapper{\crepeat{% AAA ...


4

(simplified the answer to show both candidate solution methods in one go) Here are two candidate solutions. The first positions the sub- and superscript terms relative to the right-hand edge of the immediately preceding box, while the second ignores the height of the immediately preceding box. The main changes, relative to your code, are (a) making ...


4

Here's a version that uses a few additional \raisebox and \scalebox instructions to place the letters "b" and "c". \documentclass{article} \usepackage{graphicx} \usepackage{amsmath} \newcommand{\ca}[1]{\operatornamewithlimits{\mathpalette\cb{#1}}} \newcommand{\cb}[2]{{% \vphantom{\triangle}% \ooalign{$#1\triangle$\cr\hidewidth\cc{$#1#2$}\hidewidth\cr ...


6

A stackengine approach, with scalerel for handling the change in math style size. REVISED ANSWER This can present nicely in all math styles and corrects the issue with my alternate solutions that the drop of a subscript is not uniform but depends on the letter height. For this application, that is not a helpful feature. \documentclass{article} ...


1

I contacted the maintainer of the natbib package. For completeness, I'm posting the response that I was given. This is an issue that cannot be easily solved. The whole \citet with superscripted numerals was a complicated programming problem, since it is radically different from regular numerical citations. The problem was to add the authors to the ...


7

Working from Akiiino's answer I came up with this, which also works in display mode \documentclass[a4paper]{article} \usepackage{amsmath} \newcommand{\dotriangle}[1]{% \raisebox{-.7ex}{$\vcenter{#1\kern.2ex\hbox{$\triangle$}\kern.2ex}$}% } \newcommand{\tripow}[3]{% Syntax: \tripow{#1}{#2}{#3} gives you #1 ^ {#2} = #3 \mathop{% We want it to an ...


11

You should use \mathring{...}, rather than \overset{\circ}{...}. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \mathring{D^{3}} \qquad \mathring{D}^{3} \] \end{document} The amsmath package is not really necessary for this, but it's recommended for any math document.


4

After some tinkering with the variants, I've come up with this: \newcommand{\PowerTriangle}[3]{ \mathop{\vphantom{\triangle}}_{#1}\hspace{-0.17em}{\stackrel{#2}{\triangle}}_{#3}} The subscripts are a bit lower than in the original post and it looks better in my opinion.


3

I've attempted to create a command which will typeset the "Triangle of Power" in a nice way. My best effort so far is the following: \newcommand{\tripow}[3]{ _{#1}{\stackrel{#2}{\triangle}}_{#3}} $\tripow{x}{y}{z}$ The only issue is that the right subscript appears a little low. But it does allow nesting fairly well.



Top 50 recent answers are included