Hot answers tagged

10

I think the best way to proceed is to stop using \hline -- and, while you're at it, ditch all vertical bars -- and to use the line-drawing macros of the booktabs package. For the table at hand, \toprule and \bottomrule should be used. If, for some reason, you simply must use vertical bars (and hence can't use \toprule and \bottomrule), I suggest you load ...


10

The problem is not in diacritics, it is in LaTeX tables. You can give rows some vertical padding with the cellspace package, which ensure a minimal vertical distance between a cell and the above and below rules. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{array, cellspace} \setlength\cellspacetoplimit{3pt} ...


8

To align lines on different pages (or columns) you need to typeset "on a grid". (https://en.wikipedia.org/wiki/Grid_%28graphic_design%29). That's rather difficult in LaTeX. There are a lot of irregular spaces and line heights which don't fit on a grid, e.g. sectioning commands, display math, lists. But in your case where only normal text is on the page ...


7

Insert a large \strut. \documentclass{article} \begin{document} \begin{table}[!h] \begin{tabular}{|c|c|c|c|c|c|} \hline {\Large\strut}\"Ostersund & \AA m\aa l & Oxel\"osund & Alings\aa s & \'Orlaith &O\'O\"O\H{O}\\ \hline \end{tabular} \end{table} \end{document}


6

(simplified the answer to show both candidate solution methods in one go) Here are two candidate solutions. The first positions the sub- and superscript terms relative to the right-hand edge of the immediately preceding box, while the second ignores the height of the immediately preceding box. The main changes, relative to your code, are (a) making ...


5

I propose this solution… but I would advise for something simpler (second solution): \documentclass[preview]{standalone} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{makebox} \begin{document} \begin{align*} ( A - B) ∪ (A - C) & = (A ∩ B^\mathrm{c}) ∪ (A ∩ C^\mathrm{c}) \\% & = A ∩ (B^\mathrm{c} ∪ C^\mathrm{c}) \\% ...


4

This is dependent on the length within \parskip. If it has some glue, it may stretch to better-fit the page. In your case, I see > 0.0pt plus 1.0pt > l.22 \showthe\parskip implying that your \parskip could be anything from 0pt to 1pt, which leads to what you see as a mis-alignment within the baselines. Is this normal? Sure. It allows for some ...


4

You do not need different boxes etc. You just need to remove baseline and use TikZ's baseline option to centre the trees vertically. For example, \documentclass[]{article} \usepackage{microtype} \usepackage[T1]{fontenc} \usepackage{adjustbox} % forest \usepackage{forest} % parsing tree \forestset{ declare toks={wff}{}, declare toks={connective}{}, ...


4

As defined, there is only one box and no other reference for alignment hence all trees are top-aligned. Choosing to put each tree on separate boxes and choosing the middle alignment, M the vertical center (equal height and depth), we obtain the desired result. Something like: \begin{adjustbox}{valign=M} <content> ...


3

Just because it is there, here's a version which uses coffins to arrange and typeset the boxes. The syntax is identical to that specified in the question except that \cwrapper can take an optional argument specifying the horizontal distance between the larger box and the superscript and subscripts. Since this is optional, the OP's syntax can be used ...


3

Here's a version respecting the clumsy syntax you want. \documentclass{article} \makeatletter \newcommand{\cwrapper}[1]{% \leavevmode\check@mathfonts \begingroup\ignorespaces #1% \clement@wrap \endgroup } \newcommand{\crepeat}[1]{% \def\clement@repeat{#1}\ignorespaces } \newcommand{\csup}[1]{\def\clement@sup{#1}\ignorespaces} ...


3

The original syntax of the OP can be preserved with this formulation: \documentclass{article} \usepackage{amsmath} \newcommand*{\csub}[1]{_\textnormal{~#1}} \newcommand*{\csup}[1]{^\textnormal{~#1}} \newcommand*{\cnotation}[1]{#1} \newcommand*{\crepeat}[1]{\fbox{#1}} \newcommand*{\cwrapper}[1]{\ensuremath{#1}} \begin{document} \cwrapper{\crepeat{% AAA ...


3

You're overspecificating: stating column widths is usually unnecessary; you also have p{2.5cm}X which means two column specifiers. If you want that the first column takes all the available space, use X; for getting centered entries, >{\centering}X. \documentclass{article} \usepackage{array} \usepackage{tabularx} \usepackage{booktabs} ...


3

You can use the makecellpackage, and its multirowcell command, which allow for multiline cells. I added cellspace, which define minimal vertical padding at the top and bottom of cells in column with specifier prefixed with the letter. And finally, using utf8 encoding for your code and a T1` encoded font, you can directly type accented letters. ...


2

It is easier to show how to fix it than explain why it fails, which would require looking into exactly how \settototalheight works. It is generally safer to expand \usebox{\mybox} than just \mybox (which deletes the contents, at least locally). Since you have glue inside the minipage, you might as well use [s]. The difference is that the default ...


2

An different approach to construct your images with text: use tabularx, accordingly redefine column types and you can obtain: \documentclass[14pt,oneside]{memoir} \usepackage{graphicx} % Insert image \graphicspath{ {images/} } \usepackage{wrapfig} \usepackage{float} \usepackage{lipsum} \pagestyle{plain} \usepackage{tabularx}% <-- new ...


2

In your B you have aligned the centre of the image with the first row of the text which looks odd, just remove the [t] so they are both centred


2

OPTION 1: Row specific padding One can add a \stackgap to a given element of the line, which pads the element vertically by the amount of the optional argument (default 3pt). The MWE below shows 3 rows that have been padded with 1pt, 3pt, and 5pt, respectively. \documentclass{article} \usepackage{stackengine} \begin{document} \begin{table}[!h] ...


1

You have already named the left plot. Set a name for the right too and use \begin{tikzpicture}[trim left=(first.south west),trim right=(second.south east)] Code: \documentclass{article} \usepackage{blindtext} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{figure} \begin{tikzpicture}[trim left=(first.south west),trim ...


1

Just replace the extravagant \vspace{200cm} with \vfill:


1

Your input misses a couple of &, but it also has some other glitches. Use environments for the logical structures such as theorems and proofs; if you use \noindent in the document body more than once, there's something wrong Never use $$ (see Why is \[ ... \] preferable to $$ ... $$?) The syntax {\Bbb Z} has been replaced by \mathbb{Z} a couple of ...


1

It seems that you looking for this: Anchors for split of equations should be present in each line of equation: \documentclass{article} \usepackage{amssymb} \usepackage{mathtools} \usepackage{setspace} \usepackage{bm} \begin{document} \noindent \textbf{Binomial Theorem:} If $n \in {\mathbb Z_{\geq 0}}$, then \[ (x+y)^n = \sum_{k=0}^{n} ...


1

I propose a solution that doesn't require \rowstyle for the first row. The makecell package allows for line breaks in cells, and a common formatting with the \thead, \makecell and a few other commands. Further, your caption and text at the bottom of the table will use a whole \linewidth, which is probably not what you want. It couldn't be detected ...


1

I found a way to do the second option by inserting a strut and adjusting the minipage accordingly. The adjustbox package has everything available that is needed: \documentclass{article} \usepackage{graphicx} \usepackage{lipsum} \usepackage{wrapfig} \usepackage{calc} \usepackage{adjustbox} \newlength{\strutheight} \begin{document} ...


1

Here, I use a \raisebox wrapped inside a macro named \Includegraphics (capital "I"). The key is knowing the proper downward vertical shift of the image, which is otherwise aligned to the baseline. That shift, in this case, is -.5\dimexpr\height-\ht\strutbox+\dp\strutbox, which will work regardless of image height and font size. \documentclass{beamer} ...


1

\setbeamertemplate{frametitle}[default] is defined in beamerouterthemedefault.sty. If you take the definition from there, you can redefine it according to your needs. For example add a shift with \hspace*{1cm}: \documentclass{beamer} \makeatletter \setbeamertemplate{frametitle}{ \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}% ...


1

Here's an example with the rotated labels via graphicx, some formatting cleanup from booktabs, and ensuring the longtable never breaks up a category: \documentclass{article} \usepackage{longtable} \usepackage{multirow} \usepackage{graphicx} \usepackage{booktabs} \begin{document} \begin{longtable}[c]{cccc} \toprule \textbf{Category} & \textbf{Name} ...


1

"10-point type, 12-point vertical spacing" may be achieved by passing the option 10pt to the \documentclass instruction. For the specific document class of interest, you'd write: \documentclass[10pt,journal]{IEEEtran} I must confess I don't fully understand the expression "14 double column, 12 pt pages".


1

You can try this: $$ \Qcircuit @C=1em @R=.7em { & \gate{H} & \ctrl{1} & \gate{H} & \qw & \raisebox{-2.2em}{=} & & \targ & \qw \\ & \gate{H} & \targ & \gate{H} & \qw & & & \ctrl{-1} & \qw } $$


1

You have to load tocloft with the titles option (see section 2.1 in the manual). \documentclass[draft,a4paper,11pt,oneside]{book} \usepackage[DIV=9,BCOR=2mm,headinclude=true,footinclude=false]{typearea} \usepackage{titlesec} \usepackage[titles]{tocloft} \usepackage{lipsum} %---Chapter Title Format \titleformat{\chapter}[display] ...



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