GeneralInfix commands

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yrogirg
Posts: 2
Joined: Mon Nov 02, 2009 4:38 pm

Infix commands

Post by yrogirg »

Hi! How do I define infix commands, e.g. \over?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Infix commands

Post by localghost »

Please explain what you are aiming at. The command \over already exists as a plain TeX command and produces fractions in math mode.


Best regards and welcome to the board
Thorsten¹
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Infix commands

Post by josephwright »

I think the OP means commands that work:

Code: Select all

<arg1> \macro <arg2>
to which the answer is "you can't", really. For example, \over isn't exactly infix. Try something like:

Code: Select all

{Some text {arg} \over {second} arg}
as see that it applies to everything in the outer group.
Joseph Wright
yrogirg
Posts: 2
Joined: Mon Nov 02, 2009 4:38 pm

Infix commands

Post by yrogirg »

josephwright wrote:I think the OP means commands that work:

Code: Select all

<arg1> \macro <arg2>
to which the answer is "you can't", really. For example, \over isn't exactly infix. Try something like:

Code: Select all

{Some text {arg} \over {second} arg}
as see that it applies to everything in the outer group.
Thank you, that's what I need to know.
Post Reply