Tag Info

New answers tagged

5

If you start a paragrah inside a vbox (or vcenter) the lines will be broken to \hsize which is \textwidth here which is wider than you want. You should use a tabular which will vertically centre and look more like latex. All LaTeX box and rule commands consistently start a paragraph (so \rule here) but TeX primitives like \hbox do not.


5

m columns and [..] argument to \\ work in well specified ways, but they don't work well together or how people always expect. I'd avoid both here: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{array,pifont,xcolor} \newcolumntype{C}[3]{@{\hspace*{#1}}>{\centering\arraybackslash}p{#2}@{\hspace*{#3}}} ...


3

I usually use a combination of eso-pic, graphicx and rotating as it is easy to adjust in terms of location, angle and size. \documentclass[12pt]{scrartcl} \usepackage{blindtext} \usepackage{eso-pic, rotating, graphicx} \AddToShipoutPicture{\put(30,200){\rotatebox{90}{\scalebox{3}{Examiners copy}}}} \begin{document} \blindtext[4] \end{document}


4

One way would be to use the background package: Code: \documentclass[10pt,a4paper]{article} \usepackage[all]{background} \usepackage{url} \usepackage{lipsum} \SetBgContents{\url{http://tex.stackexchange.com/}}% Set contents \SetBgPosition{0.25cm,-5.0cm}% Select location \SetBgOpacity{1.0}% Select opacity \SetBgAngle{90.0}% Select rotation of logo ...


2

Define a bprooftree environment that sets the reference point of the proof tree at the bottom rather than at the center. \documentclass{amsart} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \usepackage{prooftree,adjustbox} \newenvironment{bprooftree} {\begin{adjustbox}{raise=\depth}\begin{prooftree}} {\end{prooftree}\end{adjustbox}} \begin{document} ...


0

It seems that \sidepar aligns to the bottom, not the baseline. Also, centering seems to have an odd effect on \sidepar (hense \hfil). \documentclass[a3paper, 14pt, twoside, showtrims]{memoir} \settrimmedsize{340mm}{210mm}{*} \settrims{0mm}{86.99mm} \setlrmarginsandblock{23.3mm}{46.7mm}{*} \setulmarginsandblock{23.3mm}{54.9mm}{*} ...


5

The amsmath package seems to add extra vertical space for an equation only with the fleqn option. I'm not sure if that's a bug or a feature, but currently tcolorbox is not aware of the different space settings with or without fleqn. The following patch seems to do the trick: \makeatletter \if@fleqn \tcbset{% ams equation upper/.style={before ...


4

\documentclass[fleqn]{article} \usepackage[many]{tcolorbox} \usepackage{amsmath} \begin{document} \begin{tcolorbox}[ams align] A = B \end{tcolorbox} \end{document}


1

If you define an exercises list of type enumerate, with problems at level 1, questions at level 2 and subquestions at level 3, you can do that without margin notes while having consistent left margins for multiline (sub)questions. To make the code more readable, I also define \qu and \subqu as aliases for \item, to be used in the relevant context: ...


2

Seek help from adjustbox package with valign=m or c (t for top, b for bottom) does the objectives. Code \documentclass{minimal} \usepackage[export]{adjustbox} \usepackage{forest} \forestset{ tag/.style={for tree={parent anchor=south, child anchor=north, align=center, base=top}, where n children=0{}{}} } \begin{document} \hfill ...


1

I found a nice solution which satisfies properties (1)--(3) using one of egreg's answers to another question (apologies, but I lost track of which question this was). In this answer, egreg suggested using a dummy description environment to avoid the undesired line break after the beginning of the itemize environment. In this case, I use marginnote instead of ...


0

This is one possible solutin. Putting the two images(top and bottom) in one subfigure environment and use vspace{-xx} to close the gap. Code \documentclass[]{article} \usepackage{mwe} \usepackage[]{graphicx} \usepackage{caption} \usepackage{subcaption} \usepackage{tikz} \begin{document} \begin{figure} \centering % Waveform ...


3

\documentclass{article} \usepackage{tabu} \begin{document} \begin{tabu} to \linewidth{ | X[m] | X[-1,m] | c | X[-1,b] | } \tabucline- A somewhat longer text to show that the next row's content \emph{is not} presented in the middle of the cell and the last not at the bottom.& Second& ...


6

The reference point of an \infer box is at the bottom. You can change its vertical alignment with adjustbox; I show three versions. \documentclass{article} \usepackage{amsmath,proof,adjustbox,calc} \begin{document} \[ \infer[\forall x \mathrm{i}] {\forall x \phi} {% \boxed{ x_0 \quad \begin{adjustbox}{valign=t,raise=-.6ex} ...


1

You definitely don't want the figure environment. Try \documentclass{memoir} \usepackage[demo]{graphicx} \usepackage{showframe} \makeatletter \newenvironment{appfigure} {\par\vspace{\fill}\centering \begin{adjustwidth}{-.12\textwidth}{-.12\textwidth}% \def\@captype{figure}% \setkeys{Gin}{width=.6\textwidth}} {\end{adjustwidth}\par} ...


2

Maybe I've misunderstood but could you not do something like this? \documentclass{article} \usepackage{forest} \usepackage{gb4e} \begin{document} \begin{exe} \ex{ \begin{forest} for tree={ where level=0{ for children={% l sep=0pt, baseline}, }{}, }, ...


2

You want \begin{aligned}[t] to align on the top.


0

Try this: \documentclass{memoir} \usepackage[demo]{graphicx} \begin{document} \begin{vplace}[1] \begin{figure}[!h] \includegraphics[width=28.8mm]{img1v1} \end{figure} \begin{figure}[!h] \includegraphics[width=28.8mm]{img1v1} \end{figure} \begin{figure}[!h] \includegraphics[width=28.8mm]{img1v1} \end{figure} \end{vplace} \end{document} or ...


2

This is what I would do: use a real theorem structure, with the amstheorem or ntheorem package, and not align, using a gather* environment instead. There's no reason to align whatever in such a context. \documentclass[11pt,a4paper]{article} \usepackage{blindtext} \usepackage{amsthm, mathtools} \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] ...


3

I assume that by "horizontal" alignment, you mean that the four = symbols should appear "stacked". You can use the align* environment along with \intertext and \shortintertext statements to achieve this objective. I would also suggest you create a theorem-related environment for the theorem-related material; doing so will make a lot of visual formatting ...


2

Is this what you want? Just place the narrow figure in the first \subcaptionbox. \documentclass[11pt,twocolumn]{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \usepackage{caption} \begin{document} \begin{figure}[htpb] \centering \subcaptionbox{}{% \includegraphics[width=0.48\columnwidth]{figs/Fig_a}% \hspace{0.04\columnwidth}% ...


1

You can capture the tallest image in a box, which you can then use to measure the height by which you want/have to raise the other not-so-tall images: \documentclass[final,5p,times]{elsarticle} \usepackage{subcaption} \begin{document} \begin{figure*}[htpb] \setbox9=\hbox{\includegraphics[width=.3\linewidth]{example-image-1x1}}% Capture tallest image ...


1

A similar approach without adjustbox is to use \raisebox: \documentclass{article} \usepackage{graphicx} \setlength{\parindent}{0pt}% Just for this example \begin{document} Some text \includegraphics[height=3\baselineskip]{example-image} (bottom-aligned with baseline) \medskip Some text \raisebox{-\height}{% ...


2

The solution has already been mentioned in the comments. I introduced the great package siunitx here, as it prints numbers nicer and gets the spacing for units right. I also declared two new units for you. If you decide later that \text{sabine} should become \mathscr{S} or whatever, you can change this for your whole document with just one edit. % arara: ...


0

I answer as per David Carlisle's request. The point is that I tend not to invent too much, and I had no idea \hspace could accept a negative argument, so I tried \! which isn't allowed in text mode since it's defined in terms of \thinmuskip. The character I wanted to compose was the Biang in Biangbiang noodles. I ended up doing it like this: %Comandi comuni ...



Top 50 recent answers are included