# Tag Info

1

The magic number is 91=64+27: \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \newlength{\preferredwidth} \setlength{\preferredwidth}{12cm} \begin{document} \begin{figure} \centering \begin{subfigure}{\dimexpr\preferredwidth*64/91} \includegraphics[width=\linewidth]{example-image-4x3} \caption{Ratio 4:3 landscape} \end{subfigure}% ...

2

\documentclass{article}% always use a complete document not a fragment \usepackage{graphicx} \begin{document} \begin{figure}[htp]% include p % \begin{minipage}{\textwidth} a \textwidth minipage does nothing \centering%\begin{center} % mwe package images \sbox0{\includegraphics[height=4cm]{example-image-a}% no word space ...

2

This is a solution, but it should probably done with wrapfig or similar (depending on your actual use case). \documentclass{article} \begin{document} \begin{minipage}[t]{.6\linewidth} A patient population includes an initially-empty set of patients (as identified as by their unique set as type $P$). Each patient has some information about them of type ...

5

No need of captionof*. You can put a simple node. \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows, shapes.arrows,decorations.pathmorphing, matrix,chains,scopes,positioning,fit,shapes.gates.logic.US, shapes.gates.logic.IEC, calc} \usepackage{caption} \begin{document} \begin{center} ...

0

Obviously not the most practical or elaborate solution, but I tend to simply use align in conjunction with \text{}, for not knowing anything else that is close enough from an exact replica of align without math display. For example : \documentclass{article} \usepackage{amsmath} \begin{document} Here is some text before by aligned text \begin{align*} ...

3

As long as you are always grouping things on the right, you can make this work by making the right-hand side right-aligned (using an alignat environment), and then adding an appropriate amount of space on the right to get the alignment under the brace. This technique also works equally well for grouping on the left. \documentclass[a4paper]{article} ...

3

Here is an alternative view on the grouping, which might be of interest: \documentclass{article} \usepackage{mathtools,calc} \begin{document} %\setlength{\jot}{.5\jot} Adjust to bring the equations closer vertically \begin{aligned} 1 + 1 + 1 &= 1 + \underbrace{1 + 1} \\ &= ... 2 As long as we add not too many one-cipher numbers, we can use the effect, that all ciphers have the same width. It gives a little bit more general solution, then the one of the predecessor. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{r@{{}={}}c} 1 + 1 + 1 +1& 1 + 1+ \underbrace{1 + 1} \\ ... 2 You can use array instead of aligned if this this what you require: \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \begin{array}{rcc} 1 + 1 + 1 &= &1 + 1 + 1 \\ &= &\underbrace{1 + 2}\\ &=&3 \end{array} \end{document} 1 Your images are wider then width of minipages. If you accommodate the width of images to width of minipages, than images are not overlapped anymore. See: \documentclass[10pt,a4paper]{memoir} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \newsubfloat{figure} \begin{document} ... 2 Use a combination of hphantom and mathrlap provided by the package mathtools. Put the longest expression in hphantom and wrap mathrlap around the expression that hphantom is placed after. In your example, the longest expression is -\sqrt{-x}. To place hphantom where x is, use \mathrlap{x}\hphantom{-\sqrt{-x}} For example: \documentclass{article} ... 3 A simplification of the already answered: \documentclass{article} \def\D{\par\noindent\makebox[1em][l]{-- }\hangindent1em} \begin{document} \subsubsection*{This is a header} \D This is a detail \D This is a detail that has too many words in it and consequently runs onto The next line of the page, and I want it to have a hanging indent. \end{document} 2 \documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1--\,\,#1} \newlength{\mylen} \settowidth{\mylen}{--\,\,} \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want ... 2 You can use more columns like \[ \begin{array}{|r|r@{{}+{}}c@{{}+{}}r|} \hline S & \multicolumn{3}{|c|}{P(x)} \\ \hline 9 & x & x^2 &x^3 \\ 10 & 3x & x^2 & x^3 \\ 11 & \mc{x} & & 10x^3\\ \hline \end{array} where \mc is defined to take care of alignment without ...

8

\documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1-- #1} \newlength{\mylen} \settowidth{\mylen}{-- } \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want it to ...

3

Please always post the code not just an image of code. You only showed a tiny fragment but it shows that you are missing most of the features of latex to automate numbering, layout and cross references. Possibly something like the following would be a reasonable markup, then the layout can be adjusted if needed without changing the markup, which is a major ...

2

As David Carlisle wrote above, the package varwidth is the way to go. It provides the environment varwidth which does what I was asking for. Here is a minimal example to draw text on a gradient shaded background using beamer. \documentclass{beamer} \usepackage{calc,varwidth} \colorlet{titleshadeA}{white!30!orange} \colorlet{titleshadeB}{red!30!black} ...

1

By patching \beamer@sectionintoc command, I could use varwidth inside center environment to make ToC lines left aligned and in the center. The only limitation of this solution is, ToC lines could not be wrapped. \documentclass{beamer} \usepackage{varwidth} \usepackage{etoolbox} \makeatletter ...

3

Here is one way; using a tabular-like structure: \documentclass{beamer} \usetheme{CambridgeUS} \newcommand{\tabitem}{% \usebeamertemplate{itemize item}\hspace*{\labelsep}} \begin{document} \begin{frame}{Centering the itemize} My first try: Centering the itemize \begin{itemize} \item item1 \item item2 \end{itemize} \begin{center} ...

3


3


2

That's because you're setting the heading in a \parbox of pre-specified width. Since you're using a manual line-breaking inside these \parboxes, you might just as well set them in a tabular which will expand to the natural width of the content. makecell simplifies this input: \documentclass{article} \usepackage{booktabs,makecell} ...

2

There's no hope of having those long formulas in one line. The denominator is the same, so you can move it in front of \phi(x) The denominators can be split across two or three lines numcases should not be used Example \documentclass{article} \usepackage{amsmath,empheq} \begin{document} \begin{empheq}[ ...

4

Here is one possibility. \documentclass{article} \usepackage{mathtools} \usepackage{empheq} \begin{document} \begin{empheq}[left={\phi(x) =\empheqlbrace}]{align} &-\frac{e^{-\frac{x}{k}}T_0(A)}{2\Big(1+e^{\frac{L}{2k}}\Big)GJ_t}\text{,} & x \in \biggl[0,\frac{L}{2}\biggr], \\ ...

4

Apart from the wrong dots, it seems an align*: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amssymb} \usepackage{lipsum} \begin{document} \lipsum*[2] \begin{align*} \{B_1,\dots,B\cup\{\lnot\lnot\phi\},\dots,B_i\}\quad & \rightsquigarrow \quad \{B_1,\dots,B\cup\{\phi\},\dots,B_i\} \\ ...

2


10

Stop and resume the enumerate: \documentclass{memoir} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{enumerate}[itemsep=-4pt] \item My first item \item My second item \end{enumerate} %%<---------------------- stop here Along with these should be mentioned: \begin{enumerate}[resume] %%<----------- resume \item ...

3

beamer adds center to figure which causes nag to complain whatever you do. You could not load nag or if you want to load it you can stop it messing with center \let\zcenter\center \let\zendcenter\endcenter \RequirePackage[l2tabu,orthodox]{nag} \documentclass[aspectratio=43]{beamer} \usepackage{mwe} \usepackage{lmodern} \begin{document} \let\center\zcenter ...

3

Use adjustbox to get the right vertical alignment: \documentclass[12pt,a4paper]{article} \usepackage{amsmath,adjustbox} \newenvironment{Pbmatrix}[1][c] {\begin{adjustbox}{valign=#1}$\begin{bmatrix}} {\end{bmatrix}$\end{adjustbox}} \newcommand{\matt}[5]{ \begin{bmatrix} \begin{Pbmatrix}[b] 2+r & -1 \\ -1 & 2+r & -1 \\ & ...

1

This is an answer to the revised question. It involves issues not evident in the original question. You cannot use wrapfigure without ensuring that there is sufficient text in regular paragraphs to accommodate it. In particular, you can't use it too near things like lists and other special environments, such as multicols. I would use minipage environments ...

2

Note: This is an answer to the original question. It does not answer the current question. If I complete your code in a standard way, I don't see any problem. However, I have replaced \\ by paragraph breaks and added \noindent just to avoid the problems which \\ in regular text mode can cause. \documentclass{article} \usepackage{multicol} \begin{document} ...

1

You can use m column type. \documentclass{article} \usepackage{array} \begin{document} \begin{table}[htb] \centering \begin{tabular}{ | m{10cm} | c | c |} \hline Scenario & A & B \\ \hline Subscenario & A.1 & B.1 \\ \hline Number of registered individuals/impostors & 25/65 & 23/14 \\ \hline Number of face images ...

2

Use a nested matrix; in this case, adding a small vertical space between the rows seems better. Using bm is recommended; when it's loaded, \boldsymbol becomes equivalent to \bm, but the latter command is easier to type. \documentclass{scrartcl} \usepackage{amsmath,bm} \begin{document} \begin{pmatrix} \bm{\Phi}_{l,t}^F \\[1ex] ...

2

Since the pmatrix environment is set up to typeset its content without much whitespace, it may not be the most suitable environment for the application at hand. I suggest you use a plain and simple array environment. Incidentally, you may want to load the bm package and use \bm instead of \boldsymbol. \documentclass[]{scrartcl} \usepackage{amsmath,bm} ...

2

You can use \multicolumn{}{}{} to get a value centered. The first argument is the total number of columns you want to merge (2 in your case). The second argument is the horizontal alignment (c in your case). The third argument is the value you want to center (\Phi in your case). This gives you \multicolumn{2}{c}{\boldsymbol{\Phi}_{l,t}^F}. In your matrix, ...

1

Here is a solution: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label*=\arabic*.,wide =0pt, labelindent = 1em, leftmargin =*] \item First Text text text. Text text text.Text text text. Text text text. Text text text. Text text text.Text text text. Text text text. \begin{enumerate}[label*=\arabic*.,align = left] ...

7

Try setting your own alignment to something that contains the enumeration in a fixed-width box. This way you can specify the location to suit your needs: \documentclass{article} \usepackage{enumitem} \SetLabelAlign{fixedwidth}{\hss\llap{\makebox[2.5em][l]{#1}}} \setlist[enumerate]{label*=\arabic*.,leftmargin=0pt,align=fixedwidth} \begin{document} ...

2

Is this what you are trying to accomplish? \documentclass[11pt,a4paper]{scrartcl} \usepackage[T1]{fontenc}% unused, not needed \usepackage[utf8]{inputenc} \usepackage{tgheros} \renewcommand{\familydefault}{\sfdefault} \usepackage{tikzpagenodes} \begin{document} \begin{flushleft} \rule{\textwidth}{1pt}\newline% check alignment ...

1

try this code may be it help \documentclass[ 11pt, a4paper ] {scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{tgheros} \renewcommand{\familydefault}{\sfdefault} \usepackage{ tikz, } \begin{document} \noindent {\Large Hellow} \hrulefill%\hfill \parbox[c][1cm][t]{1cm}{% \begin{tikzpicture} \draw (0,0) coordinate (A) (1,0) ...

3

The default in inline math mode is to stretch white space and justify lines to the specified width, if that is not happening in your real example you will need to show your real example. \documentclass{article} \begin{document} \$\mathit{verylongword}+ \mathit{verylongword}+ \mathit{verylongword}+ \mathit{verylongword}+ \mathit{verylongword}+ ...

1

Following are two examples of how to typeset the pseudocode. The first example uses the cryptocode package (https://www.ctan.org/pkg/cryptocode) which gives you a lot of flexibility when writing pseudocode. The syntaxhighlighting is a bit slow to render so you might go for draft mode or do manual highlighting. \documentclass{article} ...

3

You're overriding the placement parameters by saying \begin{longtable}[l]. \documentclass{article} \usepackage{showframe} \usepackage{longtable} \begin{document} \begin{enumerate} \item text \setlength\LTleft{\leftmargin} \setlength\LTright{\fill} \begin{longtable}{@{}lll@{}} a & b & c \\ d & e & f \\ g & h & i \\ l & m & n ...

4

Here's a guess at what you might want, after minimising your example: \documentclass[11pt,a4paper,twoside,openright]{report} \usepackage[demo]{graphicx} \usepackage{float} \usepackage[scriptsize]{caption} \usepackage[textwidth=160mm, textheight=240mm, hmarginratio=1:1, showframe]{geometry} \pagestyle{empty} \begin{document} \begin{figure}[H] ...

Top 50 recent answers are included