7
votes
3answers
161 views

How to horizontally align rotated text in a table?

I am trying to horizontally align text that has been rotated in a table. I want the rotated "Lorem Ipsum" and the rotated "Lorem Ipsum & Lorem Ipsum" text to be horizontally centered in the cell. ...
7
votes
2answers
97 views

Check if in an align* environment

I want to use different styles of matrices if TeX is in an align* environment or in a normal math environment. I already found a solution for checking if it is in math mode (\ifmmode) but not ...
1
vote
1answer
725 views

some \newcommand instructions not working

I have created some new short command using \newcommand in the following example: \documentclass[12pt,twoside,a4paper]{book} \usepackage{enumerate,amsmath} \newcommand{\ba}{\begin{array}} ...
12
votes
2answers
182 views

Align*, & and \futurelet

can somebody explain futurelet within align-environments? Example: The command \A should give an "A" if the next char is a {, a "B" if it is & and "C" in any other case. ...
1
vote
1answer
84 views

Create commands each of the text aligned horizontally?

I am using exam document class as my guide in creating my own documentclass but i have encountered a problem.How will i create a command for each of the four texts in a line. here is a sample image: ...
7
votes
2answers
234 views

Passing an argument with the alignment operator (&) to a macro within another aligned environment

I am trying to write macros for quickly formatting matrices in math mode. Here is a simple, working example: \documentclass{article} \usepackage{amsmath} ...
2
votes
2answers
283 views

Patch newline (\\) in math environment using amsmath

I want to patch the newline command \\ in an align environment provided by amsmath. The patched version should execute some custom code and finally call the original definition, like in the following ...
4
votes
3answers
240 views

Why does a defined command appear differently in the align environment?

In the LaTeX document shown below, my definition \comp does not show correctly in the align environment. Why it is this the case? ========== Begin LaTeX scripts ============= ...
2
votes
2answers
267 views

Macro behaviour different inside tabular environment

I have a lot of problems lately with macros expanding (or not expanding) at unexpected times, so thought I was having a related problem here. But, in this case, things are working as I want outside of ...
3
votes
2answers
357 views

Macro to allow for alignment points within its argument

I would like to have a macro that allows for alignment points inside it. As a specific example, I would like to be able to say: \begin{align*} a &= b\\ \bracr{c &= d} \end{align*} ...