Tag Info

Hot answers tagged

9

For one-off spacing changes, \smallskip, \medskip, and \bigskip are defined for this task. \documentclass{article} \newcommand\TestSkip[1]{% \begin{minipage}[t]{0.2\linewidth} \raggedright This is some dummy text. #1 This is some dummy text. \end{minipage}} \begin{document} \TestSkip{} \TestSkip{\smallskip} \TestSkip{\medskip} ...


7

In a similar way to how one can define Sterling numbers of the second kind, amsmath's \genfrac can be used to set a fraction that has no horizontal line: \documentclass{article} \usepackage{amsmath} \newcommand{\psymbol}[2]{\genfrac{}{}{0pt}{}{#1}{#2}} \newcommand{\tpsymbol}[2]{\genfrac{}{}{0pt}{1}{#1}{#2}} ...


7

There is a TeX math-mode primitive called \atop that does exactly what you need. However, it uses so-called infix notation and is not widely used in LaTeX. Fortunately, it's not difficult to create a LaTeX-style macro called, say, \myatop that mimics the syntax of the LaTeX macro \frac. In fact, the construction of the \myatop macro in the example below is ...


7

You might use anchors something like this to align the items in the legend on the left (i.e. west) side: %Legend \node[anchor=east] at (-9,-6) (leg1) {$1$. PSU}; \node[below=1mm of leg1.south west, anchor=north west] (leg2) {$2$. Sputter Source}; \node[right=6mm of leg1,anchor=west] (leg8) {$8$. Pumps}; However, you will probably need ...


5

Here's an example which makes simple use of flowfram. The package also supports non-rectangular frames but you cannot have the text automatically flow into and out of such frames. See the documentation for details. \documentclass[a4paper]{article} \usepackage{xcolor} \usepackage{flowfram} \pagestyle{empty} ...


5

It is sometimes easy to forget that nodes are very flexible and powerful with respect to the text they can contain. Pure TikZ solutions are possible, of course, as the other answers show. But TikZ/TeX solutions to the problem exist as well. Try this with a minipage environment: \node at (-9,-6) (leg) {% \minipage{4cm} %% alter to suit 1. PSU\\2. ...


5

\documentclass{article} \usepackage[T1]{fontenc} \usepackage{fouriernc} \usepackage{mathtools} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \begin{align*} \omega_{1}^2&=1-2\sqrt[3]{19}+\sqrt[3]{19^2}\\ \omega_{1}^{2}&=b\omega_{1}+a\omega_{2}+r\\ a=3, & \qquad b=-3, \qquad r=-3 \\ ...


4

You can use $\vcenter{...}$: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} \begin{document} \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}} \hline $\vcenter{\includegraphics[keepaspectratio,width=\linewidth]{example-image-a.jpg}}$ & $\!\begin{aligned} A &= b\cdot{}h\\ P &= 2(b+h)\\ ...


4

You can use adjustbox package with export option so that the keys are available inside the \includegraphics command. \usepackage[export]{adjustbox} and then use valign=c \includegraphics[keepaspectratio,width=\linewidth,valign=c]{example-image-a.jpg} Code: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} ...


4

Why not use an array or tabular? \documentclass{article} \newcommand{\myfrac}% % macro with LaTeX-style syntax [2]{\begin{array}{@{}c@{}}#1 \\[-0.75ex]#2\end{array}} \begin{document} $\myfrac{22}{6}$, and $\myfrac{22}{6}$ \end{document} If you want it to be small: \documentclass{article} \newcommand{\myfrac}% % macro with LaTeX-style syntax ...


4

You can use the subarray environment of amsmath, that also allows left alignment: \documentclass{article} \usepackage{amsmath} \newcommand{\pseudofrac}[2]{% \begin{subarray}{l}#1\\#2\end{subarray}% } \begin{document} I need this $\pseudofrac{12}{6}$ aligned vertically like this $\frac{12}{6}$. \end{document}


4

Converting comment in to answer, just to close things, noting that jobapp.sty is not included in miktex (atleast). Use [b] instead of [t] in \begin{tabular}[t]{@{}l@{}}. This will align First Last (name) to the table's bottom.


4

I created a legend using @ClaudioFiandrino 's suggestion. My code is \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \newenvironment{customlegend}[1][]{% \begingroup % inits/clears the lists (which might be populated from previous % axes): \csname ...


4

The question includes: "If I use a fraction $\frac{12}{6}$ the alignment is good, but the horizontal line shouldn't be there." This is the reason why there are answers which emulates exactly fraction but without line. After edit of the question, we can read:"the answers do not produce a result which is identical to $^{12}_{6}$". Of course, this was not in ...


4

Modifying arraystretch doesn't produce vertically centred cells. I propose a solution based on the cellspace package: it defines minimal distances between the top of a cell and the bottom of the above cell or line, and betwen the bottom of a cell and the top of the below cell/line. One has to use the pre-qualifier S before the qualifier. By default it works ...


4

You can add a strut using an invisible rule: \newcommand{\mystrut}{\rule[-12pt]{0pt}{30pt}} %% adjust -12pt and 30pt as you wish and add it in >{\mystrut} c. Code: \documentclass[a4paper,11pt,twoside]{article} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{array} \usepackage{mathtools} \usepackage{mathabx} \usepackage{tabularx} ...


4

I assume you don't need individual captions for these. If you remove the paragraph break (the empty line) between the two they are placed on the same line. The vertical alignment is a bit off, because the bottom of the tikzpicture is placed on the current line, and so is the middle of the tabular. While the vertical 'anchoring' of the tabular can be ...


3

I think you are looking for something like \documentclass[a4paper,11pt,twoside]{article} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{array} \usepackage{mathtools} \usepackage{mathabx} \usepackage{tabularx} \begin{document} \begin{table} \centering \renewcommand\arraystretch{1.7} \begin{tabularx}{\textwidth}{ c | ...


3

The harmony package creates very tightly spaced, vertically aligned and centered numerals with the \Takt command. It is intended for time signatures in musicological writing (Takt is German for "measure" or "time"). \documentclass{article} \usepackage[rm]{harmony} % rm option uses the roman family instead of the default sans-serif \begin{document} ...


3

You have to decide first, if you want to have one equation and hence only one number or multiple equations with multiple numbers (for this choice see the remark at the end of the post). For the first use \begin{equation} and \end{equation} with an ed environment (like aligned, gathered). Since you have multiple alignment points, you should use the alignedat ...


3

If the exponent to x had “normal size”, for instance if it is just mn, an empty superscript to H would suffice as the second example shows. In the present case the parentheses force more lowering of the subscript, which can be obtained with \mathstrut also for H. TeX places subscripts and superscripts considering only the base symbol, it doesn't know what ...


3

\documentclass{book} \usepackage{amsmath} \begin{document} \[ y(m,n) =\mathbf{H}^{\vphantom{(m,n)}}_{ISI} \mathbf{x}^{(m,n)}_{ISI} + w(m,n) \] \end{document}


3

Since you are loading mathtools, you can use its \mathmakebox macro. \documentclass[10pt]{article} \usepackage{mathtools} \usepackage{mathtools} %\usepackage{amsmath} %% already loaded by mathtools \usepackage{amsthm} %for proof \usepackage{calc} %% provides \widthof \begin{document} \begin{align*} \frac{\partial V(u)}{\partial ...


3

You can use split for getting equation numbers and \\[2ex] for the additional space \documentclass[11pt,a4paper,oneside]{report} \usepackage{graphicx} %% no need of pdftex \usepackage[T1]{fontenc} \usepackage{fouriernc} \usepackage{mathtools} \usepackage{amsfonts,amssymb,amsthm} %% no need of amsmath, already loaded by mathtools \usepackage[a4paper, ...


2

You need to put the vspace before the hspace and leave a blank line before the vspace, so it is working in vertical mode.


2

The code could be written as shown below \documentclass{article} \usepackage[pdftex]{graphicx} \usepackage[T1]{fontenc} \usepackage{fouriernc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \begin{align*} \omega_{1}^2&=1-2\sqrt[3]{19}+\sqrt[3]{19^2}\\ ...


2

mathtools provides a multlined environment, which is to multline as aligned is to align, so you can use this within the flalign. Note the negative space \!. \documentclass[11pt,a4paper]{article} \usepackage{mathtools} \usepackage{showframe} % to indicate border of text area \begin{document} \begin{flalign*} &D= ...


2

A solution that relies on the stackengine package. I define a \varfrac command in math mode and a \varfractextcommand for textmode. An optional argument is the vertical spacing between the numerator and denominator (separated by \\), that defaults to 8pt. Depending on the contents of the fraction you may reduce or increase this spacing. Another way of ...


2

Here is some dirty method. you have to use proper widths \documentclass[10pt]{article} \usepackage[a6paper]{geometry} \usepackage{longtable} \usepackage{tabu} \tabulinesep = 1mm %% for better look \begin{document} \begin{longtabu} to \textwidth {|X|p{10mm}|p{10mm}|p{10mm}|} \hline \multicolumn{4}{|p{\linewidth}|}{ \centering ...


2

Your minimal example only replicates problem (1), not (2). To solve (1), add \renewcommand{\partnumberlinebox}[2]{#2 } \renewcommand{\chapternumberlinebox}[2]{#2 } to your preamble. It allows for a flexible spacing around the number for both \parts and \chapters, effectively discarding the requirement to place the part/chapter number inside a box of ...



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