Tag Info

New answers tagged

2

Two options: Using some tabulars for each layer and the subcaption package: The code: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure} \begin{minipage}{\linewidth} \centering \begin{tabular}{ccc} \includegraphics[width=.28\linewidth,height=1cm]{example-image-a} & ...


-1

You can have multiple rows, e.g. look at this example from ClassicThesis: begin{figure}[bth] \myfloatalign \subfloat[Asia personas duo.] {\includegraphics[width=.45\linewidth]{gfx/example_1}} \quad \subfloat[Pan ma signo.] {\label{fig:example-b}% \includegraphics[width=.45\linewidth]{gfx/example_2}} \\ \subfloat[Methodicamente o ...


-1

Turning @Bernhard's comment into an answer: By replacing \newline with \endgraf, the alignment got fixed.


0

You could use trim axis left and trim axis right as options for the tikzpicture and additionally border={45pt 0pt} as option for the standalone class. The first value inside the class option is the space added to the left and the right border of resulting bounding box of the image. It must be large enough to show the y-label but it could be also larger. In ...


10

I think you wanted to write *{2}{c@{{}\mathrel{<}{}}}l instead of c*{2}{@{{}\mathrel{<}{}}l} which means having the last two columns left-aligned. In fact, the syntax for multiple columns with same alignment is *{<number of columns>}{<column alignment>} Also, since the < symbol is defined as \mathrel by default, you can ...


2

May be you are looking for \documentclass{article} \def\inv{^{-1}} \begin{document} \[ \begin{array}{c*{2}{@{{}\mathrel{<}{}}c}} 1 & |z| & |k|\inv \\[\jot] |k| & |\phi(z)| & \hphantom{|} 1 \end{array} \] \end{document} in your original code c*{2}{@{{}\mathrel{<}{}}l} means first column is center and the two last column ...


1

When you process the first example Here some metrical text, longer than one line, and I want the {\raggedleft second line to be right aligned.\quad 1\par} the \par command appears when \raggedleft is in effect and so the whole paragraph will be ragged left. In the second case you're telling TeX where to break the first line, but the paragraph is ragged ...


0

Not really centred, but numbering is automatic with the taskspackageand the code is much simpler: \documentclass{amsart} \usepackage[showframe]{geometry} \usepackage{tasks} \settasks{counter-format=(tsk[a]), label-offset = 0.5em, label-align=right, column-sep=3em, before-skip=1.5ex} \begin{document} \noindent \textbf{Example}\bigskip \noindent Verify ...


0

Remove the use of the minipage, as align-and-friends center themselves with respect to the text block: \documentclass{amsart} \usepackage{showframe}% Just for this example \begin{document} \noindent \textbf{Example} \noindent Verify the following evaluations of the sine and cosine functions. \begin{alignat*}{6} \textrm{i.)~} & ...


3

Since the material should be in math mode, I suggest using an array environment instead of a tabular environment. If nothing else, it saves you from having to enter lots of $ characters by hand. Observe that the array has only two explicit columns. The middle column, with all the = symbols, is generated automatically and needn't be typed by you. The ...


6

You can use the path operator |- in the paths: \draw[->] (model) -> (model|-solver.north); And also in the node positioning: \node[font=\bfseries] (solution) at (model|-simplification) {Solution}; Fixes: The alignment problem was due to the fact that Solution was much shorter in height than Simplification, because this last one has a "P" in it ...


2

copied from a very similar question on SO, the following code should work: \begin{fullwidth} \makeatletter\setlength\hsize{\@tufte@fullwidth}\makeatother ... \end{fullwidth}


3

One possibility using a \makebox and a minipage (which means no page breaks are allowed now): The code: \documentclass[12pt,english,nohyper,draft]{tufte-handout} \usepackage[]{color} \usepackage{lipsum} \usepackage{graphicx} \usepackage{alltt} \usepackage{longtable} \usepackage{geometry} \begin{document} \centerline{\Large\bf A title here} \lipsum[2] ...


3

You have to change the column with the package array. You could define a new column type for this: % arara: pdflatex \documentclass{article} \usepackage{helvet} \usepackage{tabularx} \usepackage{array} \raggedright % if you find some solution like \renewcolumntpye{X}{...} it would be even nicer \newcolumntype{R}{>{\raggedright\arraybackslash}X} ...


6

By default, table columns have a \tabcolsep (which is normally 6pt) space to each side of the column separator (or left/right table boundary.) The spacing can be omitted a the corresponding place with @{}, which is applied in the sample code below, only for the first left column, where the alignment with the outer text should occur. If the table is placed ...


0

The problem with your current code is that the widht of the arrow is discarded since you used \useasboundingbox (0,0); To have a better control over the arrow positioning, I'd suggest you to include also the image inside a \node in the tikzpicture and keep the natural bounding box, so the proper width will be taken into account for the centering. An ...


1

Is this what you were trying to achieve (more or less)? \documentclass[a4paper, twoside, 12pt]{report} \usepackage[a4paper,showframe,width=150mm,top=25mm,bottom=25mm]{geometry} \usepackage{subcaption} \usepackage{floatrow} \usepackage{tikz} \usetikzlibrary{shapes,arrows,backgrounds} \begin{document} \begin{figure}[h!] ...


1

tocloft provides commans to change the formatting for the main lists: the ToC (Table of Contents), the LoT (List of Tables), and the LoF (List of Figures). For example, \cfttoctitlefont allows changes to the font of the ToC; the corresponding command for the LoF is obtained replacing the infix toc with lof in the command name: \cftloftitlefont, and the ...


1

\documentclass{acm_proc_article-sp} \usepackage{caption} \usepackage[labelformat=simple,labelsep=colon]{subcaption} \newcommand{\tabc}{\stepcounter{table}} % \tabc command will be used to increment counter % in subtable. % add this command in the end of caption of a % subtable but leaving the subcaption of the first subtable. ...


2

Using minipages, the subfigure environment (from the subcaption package) and a tabular: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure} \captionsetup[subfigure]{labelformat=parens} \centering \begin{tabular}{@{}p{1cm}p{1cm}@{}} \begin{minipage}[c]{1cm} \centering ...


7

The table is too wide to be centered. If you insist in a wide table, you can use a sidewaystable from rotating package. \documentclass{article} \usepackage{tabularx, booktabs, rotating} \newcolumntype{Y}{>{\centering\arraybackslash}X} \begin{document} \begin{center} \begin{sidewaystable} \begin{tabularx}{\textwidth}{c ...


1

Actually your solution is almost correct. The reason why it is not working is the fact that LaTeX removes the horizontal space that comes at the end of a line. This answer further elaborates on this fact but to prevent this either you need to insert a dummy text -- e.g., \null{}, \mbox{}, \hfill -- after the last \hfill: ...


1

Here a solution \documentclass{article} \usepackage{longtable} \usepackage{pgfplots}%\pgfplotsset{compat=1.10} \usepackage{pgfplotstable} \usepackage{lmodern} \usepackage{wasysym} \begin{document} \pgfplotstableread[col sep=comma, header=true]{ age,man,woman 0,30,32 1,40,42 2,30,32 3,36,32 4,33,25 5,34,35 6,26,28 7,16,22 8,30,38 9,21,32 10,22,24 11,29,27 ...


1

If you don't use the titlesec package or use the titlesec package without the explicit option your redefinition of \l@section works fine.


2

When writing content to the ToC, you should be aware that macros could be expanded to reveal their inner workings. This expansion could lead to problems. Here's what happening in your instance, when looking at the .toc file: \contentsline {section}{\numberline {0.1}First section header}{1} \contentsline {section}{\numberline {0.2}Second section header}{1} ...


0

This is a very late answer. But for people who may be having problems with full pages and refman, refart, refrep, etc. Just enclose what you want within a fullpage environment. \begin{fullpage} \end{fullpage} You don't need to define anything. It is a cleaner way to do this.


7

Because even after scaling it, the image's width is bigger than \textwidth so it protrudes to the right. With your example code you get a warning about this: Overfull \hbox (11.64403pt too wide) in paragraph at lines 10--10 Instead of scale, control the width using: \includegraphics[width=\textwidth]{tikz.pdf} or a fraction of \textwidth: ...


1

I approximated it using lhs2tex’s polytable package directly, and I now get the desired output with: \begin{acode} \> !let t1 = foo x \\ \> !in \> !let g x = \> !if x > 10 \\ \> \> \> !then \> t1 \\ \> \> \> !else \> !let t2 = bar x \\ \> \> \> \> !in ...


1

If I understand correctly, you like to obtain something like this: This I got above picture with: \documentclass[11pt,fleqn,border=2mm,preview]{standalone} \usepackage{mathptmx} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{empheq,tabularx} \begin{document} \noindent This is just some text ...


1

The package siunitx is made for such things: % arara: pdflatex \documentclass{article} \usepackage{siunitx} \usepackage{booktabs} \begin{document} \begin{tabular}{S[table-format=2.2]S[table-format=3.2]} \toprule {Landings (mton)} & {Landings (mton)} \\ 73.57&877.36\\ 1.28&5.19\\ \bottomrule \end{tabular} \end{document} ...


3

No need to use the facilities of the adjustbox package; use \noindent instead, and set up the tabular's structure as \begin{tabular}{@{} l l }. I'd say, incidentally, that apa6 is a reasonably well known document class; I wouldn't call it "nonstandard". By the way, if you need the material in the table to be single-spaced, I'd encase the tabular ...


5

You can use the half of the height of the node content (roughly) to adjust the baseline \documentclass{article} \usepackage{tikz} \begin{document} \begin{equation} \lambda = \begin{tikzpicture}[baseline={(0,{-0.5*height("$\alpha_2$")*1pt})}] \draw(1,0) -- (3,0) node[below,midway]{$\scriptstyle\alpha_2$}; \draw[fill=white]foreach\x in{1,2,3}{(\x ...


2

The solution is simple: add | after \select: The character “|” forces splitting of the atom when it is encountered. Thus we can write C|{(CH_3)_3} to ensure that ChemFig separates just two atoms here: “C” and “{(CH_3)_3}”. Without \select_{Argomento='moto'} is considered one atom and the bond is centered. With | we have two atoms where the bond can ...


2

Is this what you want? \documentclass{article} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{chemfig} \usepackage{amsmath} \usepackage{amssymb} \usepackage{relsize} \newcommand{\select}{\sigma} \newcommand{\project}{\pi} \newcommand{\join}{\mathlarger{\mathlarger{\mathlarger{\mathlarger{\Join}}}}} ...


0

There's no need to reduce the font size of the tabular material. Just use 2 side-by-side minipages and use the table-format option of the siunitx package to properly center the material in the third column of each table. And, se the [t] positioning directive for both minipage environments. (The horizontal line in the image below is there just to illustrate ...


2

A solution with \captionbox provided by caption.sty. You can resize the width of tables with {0.49\linewidth} acc. to your needs. \documentclass{report} \usepackage{siunitx} \sisetup{output-decimal-marker={,}} \usepackage{booktabs,tabularx} \usepackage[showframe]{geometry} \usepackage[tableposition=above]{caption} \captionsetup[table]{% ...


3

You were right about having to resize the tabulars to fit side by side. \documentclass{report} \usepackage{siunitx} \sisetup{output-decimal-marker={,}} \usepackage{booktabs} \usepackage{adjustbox}% or graphicx \begin{document} \begin{table} \centering \resizebox{0.45\textwidth}{!}{\begin{tabular}{SSS} \toprule {Col A} & {Col B} & {Col C} \\ ...


3

With the linedheaders package option, classicthesis formats chapter titles using \titleformat{\chapter}[display]% {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}% {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule] so all you have to do is to ...


2

One option would be to use fixed height minipage's instead of column environments: The code: \documentclass[10pt,aspectratio=1610,t]{beamer} \usepackage{tikz} \begin{document} \begin{frame}\frametitle{Minimum Working Exaple} \begin{minipage}[t][.8\textheight][t]{.5\textwidth} This is the first column.\par ...


0

The tabto package can help. Just make sure the tabbing location is rightward of the current location. \documentclass[12pt]{article} \usepackage{amsmath, amsfonts, tabto} \begin{document} \begin{itemize} \item Given $p = 4k+1$ \tabto{3.4cm}find $(a,b)$ \tabto{6cm}such that $p = a^2 + b^2$ \item Given $n \in \mathbb{N}$ \tabto{3.4cm}find ...


1

You can use a makebox to create a box of the appropriate width to obtain the desired alignment: Code: \documentclass[12pt]{article} \usepackage{amsmath, amsfonts} \usepackage{calc} \newcommand*{\AsWideAs}[3][l]{% % #1 = alignment: l, r, c % #2 = content whose width this is supposed to match % #3 = content to be output ...


1

Here is another way, with \stackinset. In this MWE, I inset it 10pt from the right-top of the main image. Those values can be changed in the argument list, even including negative offsets. \documentclass{beamer} \usepackage{stackengine} \begin{document} \begin{frame}{Title} \begin{figure} \centering ...


2

You may be interested in the following setup: \documentclass{beamer} \usepackage{adjustbox} \begin{document} \begin{frame} \frametitle{My title} \centering \adjustbox{valign=T}{\begin{tabular}[t]{@{}c@{}} \includegraphics[width=.7\linewidth]{example-image-a} \\ Some caption \end{tabular}}% ...


4

You have a choice between a six-pointed asterisk, generated by \ast, and a five-pointed asterisk, generated by \star. Both of these macros need to be used in math-mode; choose whichever symbol you like better. I would also enlarge the floor-related symbols of the "outer" \floor directive slightly as a visual aid towards parsing the equation. ...


2

Use the \tag{\textasteriskcentered} command to provide for a (*) equation 'number', either in align* or in align environment, equation would do too. \documentclass{article} \usepackage{mathtools} \usepackage{mleftright} \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \begin{document} \begin{align*} \floor{7\mleft(n\pi - \floor{n\pi}\mright)} ...


1

Here is a version using booktabs and makecell. The results are different with IEEEtran.cls, however. (See below: this is why a Minimum Working Example is so important.) \centering is a better option than the center environment within floats (e.g. table, figure etc.) as it avoid adding excessive vertical spacing. \documentclass{article} ...


5

The simplest way to do that is to use the makecell package, which is done for formatting column heads. Here are two ways, with and without vertical rules: \documentclass{article} \usepackage{array, booktabs, caption} \usepackage{makecell} \renewcommand\theadfont{\bfseries} \begin{document} \begin{table}[!htbp] \centering \caption{table description} ...


3

Use \centering inside the \begin{table}...\end{table} pair, this is safe, since it's inside a group and won't bleed into the following text... Use \multicolumn{1}{|c|}{\textbf{Key}} for the first column and \multicolumn{1}{c|}{\textbf{Value}} for the 2nd column. Note that the 2nd is c| and not |c|, otherwise the | would be doubled. \textbf{Key} etc. for ...


1

Here is a complete solution with lualatex using directlua: \documentclass[]{article} \usepackage{fontspec} \setromanfont{Rockwell Extra Bold} \newcommand\distributed[1]{% \makebox[\linewidth][s]{% \directlua{ letters = {} for letter in string.gmatch("#1", ".") do if letter == " " then table.insert(letters, "{}") ...


1

Replace spaces by {} (so a double space will appear) and put a space after each letter. Caveat Accented letters won't work. For that much more work is needed unless you use XeLaTeX or LuaLaTeX. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\widen}{mm} { \tl_set:Nx \l_tmpa_tl { #2 } \tl_replace_all:Nnn \l_tmpa_tl { ~ } ...



Top 50 recent answers are included