Tag Info

Hot answers tagged

11

I would use alignat for multiple alignments. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{2} \textit{Angle}: &\ & -45^{\circ} &\le \theta \le +45^{\circ} \\ \textit{Bins}: &\ & -135^{\circ} &< \theta < -45^{\circ} \\ \textit{Slant}: &\ & +45^{\circ} ...


5

The \tempheight and \tempwidth went all wrong. With some fine tuning, we get this: \documentclass{report} \usepackage{mwe,subfig,calc} \newlength{\tempheight} \newlength{\tempwidth} \newcommand{\rowname}[1]% #1 = text {\rotatebox{90}{\makebox[\tempheight][c]{#1}}} \newcommand{\columnname}[1]% #1 = text {\makebox[\tempwidth][c]{#1}}% \begin{document} ...


4

Try: \begin{flalign*} \textit{Angle}: && -45^{\circ} &\le \theta \le +45^{\circ} \\ \textit{Bins}: && -135^{\circ} &< \theta < -45^{\circ} \\ \textit{Slant}: && +45^{\circ} &< \theta < +135^{\circ} \\ \textit{Tilt}: && -180^{\circ} &\le \theta \le -135^{\circ} \ or\ ...


4

You could use tabular or array instead of flalign*: \documentclass{article} \usepackage{array,amsmath} \begin{document} \begin{tabular}{r>{$}r<{$}*{4}{>{$}l<{$}}} \textit{Angle}: & -45^{\circ} & \le & \theta & \le & +45^{\circ} \\ \textit{Bins}: & -135^{\circ} & < & \theta & < & ...


3

I'm not sure why the flalign environment seems to have become very fashionable. Here are two solutions, based on the alignedat inner environment. Inside the equation* or flalign* environment (if you really want left alignment) I define a local abbreviation for the labels. If you have several of these constructions, move the command in the preamble, so ...


3

You can enclose it in a \parbox. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign*} \text{\parbox{3cm}{This is the first part of a longer text}} = \dfrac{\text{One rather long Thing}}{\text{Other Thing}} \\ \end{flalign*} \end{document}


3

How about using an array: \documentclass{article} \usepackage{amsmath,amsfonts} \begin{document} \[ \begin{array}{r*{7}{c}l} (\text{Im} H, [,]) & \rightarrow & \mathfrak{su}(2) & \rightarrow & \mathfrak{so}(3) & \rightarrow & \mathbb{R}^3 & \rightarrow & (\text{Im} H, \cdot) \\ i & \mapsto & ...


3

Here is an alternative view on the grouping, which might be of interest: \documentclass{article} \usepackage{mathtools,calc} \begin{document} \[ %\setlength{\jot}{.5\jot} Adjust to bring the equations closer vertically \begin{aligned} 1 + 1 + 1 &= 1 + \underbrace{1 + 1} \\ &= ...


3

As long as you are always grouping things on the right, you can make this work by making the right-hand side right-aligned (using an alignat environment), and then adding an appropriate amount of space on the right to get the alignment under the brace. This technique also works equally well for grouping on the left. \documentclass[a4paper]{article} ...


3

David is referring to the m-specifier in \newcolumntype{M}{>{\centering\arraybackslash}m{\dimexpr.096\linewidth-2\tabcolsep}} How about a layout like this: \documentclass[a4paper,10pt]{article} \usepackage{tabularx,booktabs,geometry} \geometry{textwidth=15cm} \begin{document} \noindent \footnotesize ...


3

I wouldn't use the m column type for this table. In its place, I would use a centered form of the X column provide (provided by the tabularx package), in part to let LaTeX handle the chores of determining column widths. Separately, I'd use the line-drawing macros of the booktabs package to get well-spaced horizontal lines; plus, I'd omit all vertical lines. ...


3

You can use a tabular with [t]op alignment. \documentclass{article} \usepackage{fontspec} \usepackage{lipsum} \begin{document} I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his progress through these had preceded mine, and he had been deeply ...


3

Here is an attempt with rasters. Not fully automatic as you have to specify the heights and the second and third boxed are engulfed in to a separate tcolobox. There is scope for improvement but this should serve as a starting point. \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \begin{tcbraster}[raster equal height,raster ...


3

You could use cases environment for piecewise functions ... \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} M(x)& = \begin{cases} 2(2x),& x < 0.5,\\ 2(2 - 2x),& x > 0.5 \end{cases} \\ & = \begin{cases} 4x,& x < 0.5,\\ 4 - 4x,& x > 0.5 ...


2

Use the landscape package. Landscape mode will make you portrait. The headers will remain in their usual positions. Like this: \documentclass{article} \usepackage[a4paper,margin=1in,landscape]{geometry} \usepackage{pdflscape} \begin{document} Test (landscape page) \begin{landscape} Test (this is a portrait page) \end{landscape} \end{document}


2

If the tabular and image has roughly the same height, then align them at their baselines. By default, \includegraphics is aligned at the base, but tabular is aligned at the vertical centre. Using \begin{tabular}[b] would suffice as it changes the vertical centre alignment to be aligned with the last line's baseline... Other options include adding ...


2

As long as we add not too many one-cipher numbers, we can use the effect, that all ciphers have the same width. It gives a little bit more general solution, then the one of the predecessor. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{r@{{}={}}c} 1 + 1 + 1 +1& 1 + 1+ \underbrace{1 + 1} \\ ...


2

The simplest solution is to put a \strut both at the end of the preceding text and inside the \hbox: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lipsum} \begin{document} I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his ...


2

\Centering tries to be kind and avoids redefining \\ so \\ is safe to use in the first column but not the second. this just tells \Centering not to worry about the tabular version of \\. Unrelated, but don't use [h!]. \documentclass{article} \usepackage{array,booktabs} \usepackage{tabularx} \usepackage{ragged2e} \usepackage{hhline} \newcolumntype{x}[1] ...


2

If you add \fbox{This is the top line of text and I want it to go on a bit.} at the start of the first column, you can see that the image is perfectly aligned: So some adjustments are needed to make things 'look right': \documentclass{article} \usepackage[export]{adjustbox} \usepackage{multicol} \usepackage{lipsum} \begin{document} \hrule ...


2

This is the stackengine (by our fellow user Steven B. Segletes) version of linebreaking There are some macros, but for this purpose, \Centerstack seems to be quite useful. The optional argument contains the alignment character, r is used for right justified stacking. There is a \Vectorstack command for math content too. The vertical spacing between the ...


2

This gets (like some other answers) the proper math spacing and (unlike the other answers), gets the proper (right) alignment on the numbers, using tabular stacks. \documentclass{article} \usepackage{tabstackengine} \stackMath \setstacktabulargap{0pt} \begin{document} \[ \tabularCenterstack{rrcr}{ \textit{Angle}: & -45^{\circ} \le& \theta ...


1

A small proposition, in lack of more features. It will break the appearances of \section etc. in the ToC however. The date itself is used instead of a section number, but this date is not aligned so far. \documentclass{article} \usepackage{tocloft} \usepackage{xstring} \usepackage{xpatch} \addtolength{\cftsecnumwidth}{70pt} \makeatletter ...


1

Note the fl in flalign is for full length, not flush left. the fleqn option is intended to flush left math layouts: \documentclass[fleqn]{article} \usepackage{amsmath} \setlength\mathindent{0pt} \begin{document} left aligned equation: \begin{align*} {\begin{array}{c} \text{Something long}\\ {[\text{Something}_{\text{else}}]} \end{array}} &= ...


1

I think I may have found a solution: (based on this question and answer) % !TEX TS-program = xelatex \documentclass[showtrims]{memoir} \usepackage{tikz} \setstocksize{11in}{8.5in} \settrimmedsize{8.5in}{5.5in}{*} \settrims{1in}{1in} \setulmarginsandblock{1in}{1in}{*} \setlrmarginsandblock{1in}{.75in}{*} \checkandfixthelayout \newcounter{headeronpage} ...


1

An alternative possibility with tikz-cd: \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{tikz-cd} \newcommand{\numberset}[1]{\mathbb{#1}} \newcommand{\R}{\numberset{R}} \DeclareMathOperator{\im}{Im} % \Im is preempted \DeclareMathOperator{\su}{\mathfrak{su}} \DeclareMathOperator{\so}{\mathfrak{so}} \begin{document} \begin{equation} ...


1

\documentclass[twoside]{scrbook} \usepackage{xtab} \usepackage{array} \newcommand\z[1]{\hspace*{\fill}{\rlap{\hspace{2\tabcolsep}#1}}} \begin{document} \begin{xtabular}{r p{10em} b{5em}} 11 may & Long multiline text. Long multiline text. Long multiline text. Long multiline text. Long multiline text.\z{10}&\mbox{} \\ \end{xtabular} ...


1

If I understand well what you need, then this is something like this: First of all you must decide the main macro design. You need a table (or \halign in my example) only because of first column can include texts with different width. The second column can include page numbers, there is no need of the third column. The second column is only specially ...


1

This could very conveniently be handled by left-aligned under-stacks. \documentclass{scrreprt} \usepackage{stackengine,lipsum} \setstackEOL{\cr} \def\stackalignment{l} \begin{document} \lipsum[1] \bigskip \noindent\Longunderstack{ [Name]\cr [Designation]\cr Address Line 1.,\cr Address Line 2.,\cr Address Line 3. } \hfill \Longunderstack{ [Name]\cr ...


1

Use tabular \documentclass{article} \usepackage{lipsum} \begin{document} {\centering\LARGE\bfseries Certificate \par} \lipsum[1-2] \vfill \begin{tabular}[t]{l} Name\\ Designation\\ Address\\ Address\\ Address \end{tabular} \hfill \begin{tabular}[t]{l} Name\\ Designation\\ Address\\ Address\\ Address \end{tabular} ...



Only top voted, non community-wiki answers of a minimum length are eligible