0%

🎓
😏 Writing neat $\LaTeX$ is fun and enjoyable.
🚀

# Useful Commands

Some commands that are not easy to search for.

## \phantom{}

Use \phantom{} (/'fæntəm/) to generate a empty space with desired horizontal length. Google results of “latex phantom”.

For example:

generates (Notice the alignment at the beginning of the second line)

\begin{aligned} A &= B + C + D\\ &\phantom{=} + E \end{aligned}

## \raisebox{}{}

The baseline of an image is at the bottom. You could use \raisebox to shift it up. Use half of \height, which stands for the height of the box to be raised.

# Problems and Solutions

Only keep a record of those ot easy to search for a solution.

## Half-solved

### Case-01

“Fragile” problem with \caption and \newcommand with an optional argument.

It turns out that this is incorrect, at least not fully correct. This problem roots in the template of AAS.cls for the American Astronautical Society (AAS) conference. Using \newline rather than \\ in the caption solves the problem perfectly.

# Workflows

When Then
Prepare a single equation. codecogs is best.
Write one paragraph including both inline and display equations. vscode + markdown plugin is better, then copy-paste to texstudio.
Revise context and equations. texsutio inline preview is more convenient.