Tag Info

New answers tagged

2

what is happening here is that you've had the bad luck to run into the situation where two lines of the "next" paragraph (the one that starts on page 2) won't fit at the bottom of page 1, so the page is broken after the first paragraph of section 2, and the pre-section-head stretch (quite a large stretch) takes over. if you really want to modify the space ...


2

This is the purpose of the paracol package. The text of a leftcolumn carries over to the left column on the next page, and likewise for the rightcolumn. It still balks if you give it too much at once (like \lipsum[1-50]), and there are some issues with line-breaking, which may be solvable from within the package options. EDIT I edited the example to show ...


1

It is well known that any TeX typesetting engine refrains from breaking lines while in math mode; when it does this takes place before a \relation operator. In your simple exression $\exists x.p(x)$ there are no breakpoints suitable for any typesetting engine; manually dividing after \exists would not be typegraphically and mathematically correct. What you ...


1

Just to close this off You have to give the position specifiers to the table environment. It is preferrable to give [htb] instead of [!t] so that latex has some room to improve the appearence. \documentclass{article} \usepackage{array,kantlipsum} \begin{document} \kant[1-4] \begin{table}[htb] %%<<--- give it here \centering \caption{Vertical ...


1

With aligned inside a gather environment. Note there already exists a faktor package that uses \diagup from amssymb and typesets nicely quotient structures; you'll compare in the proposed code. Your definition of \abs does not introduce correct spacing and has fixed height, whatever the content; it's better to use \DeclarePairedDelimiter from the mathtools ...


1

Some suggestions: You could use \parbox macros to typeset the shorter pieces in each of the two groups of statements. The widths of the parboxes would be those of the corresponding longer pieces. Use two separate, nested equation and split environments instead of one large align environment. This will give you the equation number placement and numbering ...


1

The m{} tabular alignment from the array package (which you already load) was made for this. Change your table spec to: \begin{longtable}[c]{>{\centering\arraybackslash}m{0.1\textwidth}>{\centering\arraybackslash}m{0.2\textwidth}>{\centering\arraybackslash}m{0.4\textwidth}} Then you can remove all of your \multirow kludges: ...


2

You are abusing \multirow anyway, hence do it once more ;-). \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{blindtext} \setkomafont{disposition}{\normalfont\bfseries} \usepackage{graphicx} ...


2

Option-1: You can add the space after each \\ like \\[2mm] at every row end. \documentclass{article} \usepackage{array} %% habitual addition \begin{document} \begin{tabular}{ l | c c c } \textbf{Programming Languages} & Java & C & Python \\[2mm] %%<-- note [2mm] here \textbf{Web Development} & Javascript & jQuery & ...


2

There are two factors that influence your problem. The default behavior of geometry is to divide the available vertical space for the top and bottom margins in a ratio 2:3. Another slight source for space is the usage of the center environment. Just use \centering that doesn't add vertical space. You can look at how geometry sets the page elements by adding ...


0

Thanks to the tip of cgnieder with using tabular, I was able to produce the desired result. His suggestion was close but didn't yet align the individual molecules vertically. I did that using a Lyx table (and getting the resulting LaTeX code here), so it is possibly easier to achieve good looking layout with m{} type columns as mentioned in the comments from ...


4

Here's a crazy idea: use a tabular. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{array,chemfig} \usepackage{lipsum}% dummy text \begin{document} \lipsum[1] \begin{figure}[htbp] \centering \begin{tabular}{c@{\qquad}c@{\qquad}c} \chemfig{ ...


1

First of all, you have to center each tikzpicture inside each subfigure. You achieve that with \centering just to the left of the \begin{tikzpicture}. Also, giving every subfigure the same width (0.16\textwidth) is a good deal. To have every subfigure in the same line, you should probably play with document margin, because with six figures you are very ...


2

It seems to work fine for me if I delete the \raggedright command. Then I just used the same code you used for Section and it aligns just like you wanted. \titlecontents{figure} [2.25pc] {} {\hspace*{-.75pc}\makebox[0pt][r]{\thecontentslabel}\hspace*{.75pc}} {} {\hspace{.5pc}\raisebox{.3ex}{$\scriptstyle\cdot$}\hspace{.5pc}\thecontentspage} But then the ...


3

\vfill instructs TeX to insert vertical space as necessary to, well, fill when appropriate. What this means depends on the context but, in this case, you are telling TeX that if it needs to, it is perfectly fine to put such space before and after the table, effectively pushing the first page of the table to the bottom and the final page to the top. If you ...


5

The interrow padding is because the bottom of an image is on the baseline and the tabular rows take into account the possible depth of descenders. We can remove the white space by lowering the images on the top row. A similar trick can be used to have a symmetric padding above the images. \documentclass{article} \usepackage{graphicx} ...


5

You can change the \arraystretch like \def\arraystretch{0.15} Choose an appropriate value. \documentclass{article} \usepackage{graphicx} \usepackage{siunitx} \sisetup{per-mode=symbol} \begin{document} \begin{center} \setlength{\tabcolsep}{0pt} \def\arraystretch{0.15} \begin{tabular}{c} \hline \includegraphics[height=27mm]{example-image-a} ...


6

Since you're using punctuation (which I agree with), the QED symbol should share the baseline with the punctuation. Here's a trick that avoids using ntheorem (which I never use nor recommend); I also show why you shouldn't lower the tombstone. \documentclass{article} \usepackage[width=7cm]{geometry} % Only for reducing space in this MWE ...


3

As Enrico already mentioned, I wouldn't use a stop after the matrix. However, you can use the \tag amcro from amsmath: \documentclass{article} \usepackage[width=7cm]{geometry} % Only for reducing space in this MWE \usepackage{amsmath} % For `bmatrix` \usepackage{amsthm} % For `proof` environment \begin{document} \begin{proof} And this proof ends with ...


3

Here is a solution with the ntheorem package: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{heuristica} \usepackage{amsmath} \usepackage[thmmarks, amsmath, thref]{ntheorem} \usepackage{cleveref} \theoremstyle{plain} \theoremheaderfont{\bfseries} ...


6

\documentclass[openany]{book} \usepackage{marginnote} \renewcommand*\marginfont{\normalcolor\normalfont\small} \begin{document} \chapter{Chapter Heading} \section[Section Heading]{Section Heading\marginnote{Associated text}} %The optional argument of \section is used for the TOC Is it working? \end{document}


7

Move the \marginpar inside the argument for \section: \documentclass[openany]{book} \begin{document} \chapter{Chapter Heading} \section[Section Heading]{Section Heading\protect\marginpar{\normalfont\normalsize Associated text}} Is it working? \end{document} As an alternative, you can use \marginnote from the marginnote package instead and move the ...


1

This simple aligment can be done by simple tools without tabularx: \centerline{\href{mailto:\email}{\nolinkurl{\email}} \hfill \address} \centerline{\rlap{\texttt{\phone}}\hfill \smash{\Huge \textsc \name}\hfill \llap{\province \space \postalCode}}


4

You could use three (vertically centered) side-by-side minipages: The code: \documentclass[letterpaper]{article} \usepackage[margin=0.75in]{geometry} \usepackage[colorlinks=true,urlcolor=cyan]{hyperref} \usepackage{tabularx} \def\name{John Doe} \def\email{john.doe@gmail.com} \def\phone{(123) 456-7890} \def\address{123 Main St} \def\city{Toronto} ...


3

You need \multirow{2}{*}{content} to substitute the \multicolumn environment. Thanks to @Mico. Code \documentclass{article} \usepackage{multirow} \begin{document} \begin{table}[htbp] \centering \caption{caption} \label{} \begin{tabular}{|c|c|c|c|c|c|} \hline \textbf{111} & \textbf{222} & \textbf{333} & \textbf{444} & \textbf{555} ...


0

I re-designed the table, also using the makecell package for column heads, with S type columns, to have alignment on decimal comma (from siunitx) and finally threeparttable so that the caption has the same widthj as the table. No vertical lines, that's bad typographical practice: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} ...


3

To get the right wide of the \multicolumn you have to add the right \tabcolsep from the first column and the left from the second column to the both column widths. For example: \multicolumn{2}{|>{\centering\arraybackslash}m{\dimexpr2.5cm+2\tabcolsep\relax}|}{Courant} Code: \documentclass[captions=tableabove]{scrartcl} \usepackage{array} ...


1

As a possible solution I would use the package makecell. VoilĂ : \documentclass[a4paper, 12pt]{article} \usepackage[utf8]{inputenc} \usepackage[english,french]{babel} \usepackage{makecell} \begin{document} %makecell setting for fonts, spacing etc. \setlength\rotheadsize{3cm} \renewcommand\theadfont{\small} \renewcommand\theadfont{\bfseries} ...


6

You can use valign macro from the adjustbox package in \includegraphics[valign=c,height=0.3in]{example-image-a} Code: \documentclass[a4paper,11pt]{article} \usepackage[english]{babel} \usepackage[export]{adjustbox} %% export is needed \usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry} \usepackage{array} \newcommand{\mybox}[1]{% ...


6

You can use a m{length} column type for the first column: \documentclass[a4paper,11pt]{article} \usepackage[english]{babel} \usepackage{graphicx} \usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry} \usepackage{array} \newcommand{\mybox}[1]{ \begin{center} \fbox{% \parbox{0.8\linewidth}{% \begin{center} ...


4

There are a few problems with your table: You shouldn't use \hline. Instead, use \...rule from the booktabs package. Putting \textbf around a math expression has no effect; if you want bold math, use \mtathbf. If you use \ce from the mhchem package when typesetting chemical elements, you get the correct output. Here, use \si{<unit>} instead of ...


2

The package booktabs changes the spacing between lines and the table cells. It uses the commands \toprule and \bottomrule for thicker lines (you used a double \hline for it) and midrule inside the table. Vertical lines are problematic in booktabs and this solution somewhat changes your layout, but maybe it helps: \documentclass{article} ...


4

You can set extrarowheight with the help of array package. \documentclass{article} \usepackage{siunitx} \usepackage{array} \setlength{\extrarowheight}{2pt} %% adjust suitably \begin{document} \begin{tabular}{lcccc} \hline\hline & \textbf{$d_{(O_{1}-Zn/Mg)}(\SI{}{\angstrom})$} & \textbf{$d_{(O_{2}-Zn/Mg)}(\SI{}{\angstrom})$} & ...


2

My suggestion would be to use some sectioning command rather than your font-change macro. Perhaps \newcommand{\Largebf}{\subsection*} or the like. Why doesn't \textbf{\Large ...} provide the desired spacing? That's because font switching macros doesn't take the \baselineskip into account unless a \paragraph is set (or a proper \strut is inserted). The ...


3

The problem is that right after \begin{remarks} TeX is in vertical mode; using \leavevmode (and a possible negative vertical spacing), for example, solves the problem: \documentclass[12pt]{report} \usepackage{amsthm} \newtheoremstyle{multiple_remarks} {1.0em} {1.0em} {\normalfont} {0pt} {\bfseries} {:} {\newline} {} ...


0

It is my personal taste, you might not agree with me. Here is my rule of thumb. We know that the first line of all items of "list" (enumerate, itemize, etc) are left aligned. So if the item starts with a multi-line aligned equation, use aligned environment (plus t passed to its optional argument) rather than align*. See my the second item in my example ...


1

Edit There may well be a better way of doing this but here's a solution using tikz. It turns out be easier to anchor the nodes at the south west corner. \documentclass{article} \usepackage{tikz} \usepackage{lipsum} \begin{document} \begin{tikzpicture}[scale=\textwidth/15.2cm, every node/.style={anchor=south west, rectangle,rounded ...


3

Apart from reminding about the verse environment (and the package with the same name that provides some enhancements), I want to suggest using a special environment for this: the advantage is greater flexibility. In the example I show that by just modifying the definition of \poet you get a different effect without acting on all poems. ...


5

To answer your question, in an array or tabular environment, line spacing is done by placing a strut in every row of height and depth given by \arraystretch times the height and depth of the strut produced by an ordinary \strut commmand. Thus, you can get the desired value (under normal circumstances) with something like \newlength\mylen ...


4

Use t (top alignment) for the optional argument of tabularx: \documentclass[12pt]{report} \usepackage{amsmath, amssymb, amsthm} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand*\squared[1]{\tikz[baseline=(char.base)]{\node[shape=rectangle, draw, inner color = white, drop shadow = {opaque, black}, inner sep=3pt, text justified] (char) {#1};}} ...


14

This is because Word has no descenders, while A long word and Another long word both have a descender (g). Here are some options: \documentclass{article} \usepackage{amsmath} \begin{document} $\underbrace{\text{A long word}}_{=a}$, $\underbrace{\text{Another long word}}_{=b}$, $\underbrace{\text{Word}}_{=c}$ $\underbrace{\text{A long word}}_{=a}$, ...


3

Here's a solution that uses only arrays to align the three parts. The outermost array, which is set up to have three columns, serves to "house" the three horizontal parts. Each horizontal part consists of four rows, but some of the cells in the left-hand and right-hand parts -- which are constructed as nested arrays, each consisting of a single column -- are ...


4

This is a job for \valign! Although I don't think this will help readers much. \documentclass{article} \begin{document} \valign{#\cr \vbox{\hbox{% Equivalent if $A$ $\left\{\vphantom{\begin{tabular}{c} A\\B\\C\end{tabular}}\right.$% }} \vfill\cr \hbox{\begin{tabular}{@{}c@{}} Condition (1) \\ Condition (2) \\ Condition (3) \\ ...


2

\documentclass{article} \usepackage{amsmath} \usepackage{stackengine} \setstackEOL{\#} \setstackgap{L}{.7\baselineskip} \begin{document} \begin{equation*} \begin{aligned} &condition (1) &\\ equivalent\ if\ B - \smash{\left\{\Centerstack{\#\#\#}\right.} \, &condition (2) &\\ &condition (3) ...


2

Here's a mildly more complicated solution: the picture, with possible options, is given as a trailing optional argument to \chapter. It would be possible to use the standard \chapter syntax and define a \chapterfigure command that needs to be placed just before \chapter. \documentclass[a4paper]{book} \usepackage{xparse,graphicx,xpatch} ...


3

The 22pt was found by trial and error. It should represent the height of the font used for the title plus 1/2 the gap. For some reason \chapter didn't like \raisebox, hence the \savebox. \documentclass{book} \usepackage{graphicx} \usepackage{mwe} \newsavebox{\tempbox} \begin{document} ...


6

You have to measure the bigger picture. \documentclass[10pt, a4paper]{amsart} \usepackage{graphicx, subfig} \usepackage{graphics} \usepackage{tikz} \usepackage[all]{xy} \usetikzlibrary{arrows,automata} \usetikzlibrary{shapes,snakes} \usetikzlibrary{positioning} \newsavebox{\bigpicture} \newcommand{\adapttobigpicture}{% \vrule height\ht\bigpicture ...



Top 50 recent answers are included