New answers tagged

1

Here's how you do directly in LyX: Wrap the figure float in a minipage box (Width: 100% linewidth, box vertical align: middle). Set the figure float position as "Here definitely" ([H] in LaTex). If you get errors about being not in outer par mode, then you forgot this step. Set the minipage on its own indented paragraph (notice the red vertical bar on the ...


2

First: You can ignore the warning or you set xmin and xmax symmetrical to 0. For example: xmin=-1 and xmax=1. Second: The bounding box of your picture is enlarged to the left by the long plot title. So with \raggedright the plot title is left aligned. So you have to change the position of the plot title. Code: \documentclass[paper=a4, parskip=half-, ...


1

to right align text in a \parbox use \parbox{6em}{\raggedleft (The colorbox is not really involved at all)


2

You're using the wrong tool, in my opinion: a tabular is much simpler. \documentclass[14pt,handout,t]{beamer} \usetheme{Warsaw} \geometry{paperwidth=297mm,paperheight=210mm} \setbeamersize{text margin left=100pt,text margin right=100pt} \newcommand*\arrowx{\item[\large$\Rightarrow$]} \newcommand*\tabit[1]{\makebox[6cm][l]{#1}} \begin{document} ...


6

Some words about line breaking. TeX assigns a badness to each line, based on the amount of stretching of the glue in it. In a ragged right setting, there's only stretchable glue at the right (\rightskip), which has the consequence that this glue (if finite) will usually stretch more than stated. The default for \RaggedRight has an the “optimal” stretching of ...


7

The "raggedness" of \RaggedRight can be configured by length \RaggedRightRightskip, which is inserted at the right end of a line, when TeX breaks the paragraph. The default is 0pt plus 2em, which means the line can be full or short with upto 2em white space at the right side. Increasing the value to 2.8em reduces the number of hyphenations to one at the ...


3

First, we define a \newcommand for the \rightarrow, called \arrowx (so we don't inadvertently break something), and then we can enclose the first part of your list in a \makebox like: \makebox[<horizontal length>][<alignment>]{<text>} We can even turn this into a command without having to type everything every time, like ...


2

You also could use \underbrace\overbrace and \mathclap. I give an example with \underbracket/\oberbracket (defined in mathtools): \documentclass{article} \usepackage{mathtools} \begin{document} \[ \underbracket[0.6pt][0.6ex]{\{\varphi\}\cup\Delta_M\cup\{p_M\} }_{\text{Finito e instasifacible.} } \subseteq ...


2

The answer given by @Zarco is very complete it I'll give another option. The problem seems to be the text under the braces. Here is my alternative : \[ \underbrace{\{\varphi\}\cup\Delta_M\cup\{p_M\}}_{\text{Finito e}\atop\text{insatisfacible}} \subseteq \underbrace{\Gamma\cup\Delta_{M+1}}_{\text{Finitamente} \atop \text{satisfacible}} \]


4

I can't reproduce your problem with braces. Regarding centering of symbol: it is easy to center, if you broke "Finitamente satisfacible" into two lines: \documentclass{article} \usepackage{mathtools} \usepackage[active,displaymath,tightpage]{preview} \setlength\PreviewBorder{1em} \begin{document} \[ \underbrace{ ...


8

That is the correct variable to play with. It is allow lines to be up to 8% shorter than standard. Try reducing it via e.g. \setlength{\RaggedRightRightskip}{0pt plus 0.02\hsize} for a percentage (here 2%) of the line length or \setlength{\RaggedRightskip}{0pt plus 1em} for an absolute possible shortfall. For the tufte classes this change needs to ...


2

Like this: \documentclass[]{article} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \sisetup{input-symbols = ()} \begin{table}[h] \begin{tabular}{ c S[table-format = 2.1]@{} S[table-format = 2.1] S[table-format = 2.1]@{} S[table-format = 2.1] S[table-format = 3.1]@{} S[table-format = 2.1] S[table-format = ...


0

\documentclass{article} \usepackage{amsmath} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=(\roman*)] \item $\frac{1}{2}$ VS $\dfrac{1}{2}$ \item $\sum_{k=0}^{n} f(k)$ VS $\displaystyle\sum_{k=0}^{n} f(k)$ \item $\int_{1}^{2} f(x)\,\mathrm{d}x$ VS $\displaystyle\int\limits_{1}^{2} f(x)\,\mathrm{d}x$ \end{enumerate} \end{document}


3

Please make sure to include a full minimal working example as stated in the comments. It makes it much more rapid and easy for people to help you. However I think your code can be improved. \text{} is used to include text into math-mode. But you've beforehand left math-mode by "closing" the formula block with $. Therefore you don't need it. That is what ...


2

You could use a left-aligned tabular environment to achieve your objective. (The line along the left-hand edge of the following screenshot is there to illustrate the edge of the textblock.) Incidentally, I don't think it's really necessary to render the explanatory text snippets in italics. To render the material in the upright text font, simply remove ...


2

I would do this on the following way: \documentclass{book} \usepackage{amsmath,amssymb,amsthm} \usepackage[showframe]{geometry}%for show page layout \begin{document} \noindent where\\ $\begin{array}{rl} \Delta f_{res}: & \textit{lock time in microseconds} \\ \mathcal{L}: & \textit{loop bandwidth in kHz, and} \\ f_{m}: & ...


3

Here's a possibility that doesn't abuse flalign: \documentclass{book} \usepackage{amsmath,siunitx} \begin{document} \noindent where \[ \makebox[\displaywidth][l]{$\displaystyle \begin{array}{@{} l l @{}} \Delta f_{\mathrm{res}} & \mbox{---\quad \emph{lock time in microseconds,}} \\ \mathcal{L} & \mbox{---\quad \emph{loop ...


2

What about this, it looks even better. \documentclass[11pt,fleqn]{book} \usepackage{amsmath,amsfonts,amssymb,amsthm} \begin{document} \noindent where \begin{flalign*} &\Delta f_{res} & \hspace{-1.6cm}{:~} & \mbox{\emph{lock time in microseconds}}&&\\ &\mathcal{L} & \hspace{-2.1cm}{:~} & \mbox{\emph{is the loop ...


2

Here is your updated code: \documentclass[11pt,fleqn]{book} \usepackage{amsmath,amsfonts,amssymb,amsthm} \begin{document} \noindent where \begin{flalign*} &\Delta f_{res} & \hspace{-1.6cm} - & \mbox{\emph{lock time in microseconds}}&&\\ &\mathcal{L} & \hspace{-2.1cm} - & \mbox{\emph{is the loop bandwidth in kHz, ...


2

To patch "normal" frames, the solution can be found text justify in beamer Itemize has also already a solution on this side: Justify text inside itemize environment with beamer class But I could not find one to automatically justify the contents of columns. So I tried a bit, failed in the attempt to patch \begin{column}..., but with \column it works as ...


3

Here are two ways: a regular align that uses the regular spacing parameters associated with spreading out multiple equations on the same line; and using a fixed-gap from the alignment operator. This requires you to set the RHS inside a zero-width box and inserting a fixed-width horizontal space that suits your needs. \documentclass{article} ...


5

You can easily do that. You shouldn't use `eqnarray, which is deprecated and can produce bad horizontal spacing. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{2} 12 \left( \frac{1}{4}(2x-1)-x \right) &<12 \left( \frac{x}{6}-\frac{1}{3} \right) & \qquad \leftarrow\enspace & \text{multiplicar por 12} \\ -6x - ...


1

Something like this? \documentclass{article} \newcommand\mybullet{{\tiny\raise0.5ex\hbox{\textbullet}\ }} % custom-size "bullet" \begin{document} \noindent \begin{tabular}{@{\mybullet}ll} list-item & i want this\\ longgg-item & and this to be aligned\\ another-item & at the same level auto\\ \end{tabular} \bigskip\noindent ...


3

A little bit different from @Mico solution and a little bit later. \documentclass{report} \usepackage{lipsum} \usepackage[showframe,head=2.5em]{geometry} \usepackage{fancyhdr} \lhead{% \begin{tabular}{@{}l} Element 1\\Monica \end{tabular}% } \rhead{% \begin{tabular}{r@{}} Element 3\\\today \end{tabular}% } \chead{% \begin{tabular}{c} {\large CS ...


3

I would load the fancyhdr package and place the following code in the preamble: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{Monica} \chead{\begin{tabular}[b]{c} \Large CS2800 \\ Homework 1 \end{tabular}} \rhead{February 8, 2015} The body of the document would then start off like this: \begin{document} \pagestyle{plain} ...


1

Following the answer given here, I added the following in a LaTeX block immediately after the item text in LyX: \par\begin{minipage}{\linewidth} \centering\includegraphics{myimage} \captionof{figure}{My very very ... very long caption text} \end{minipage}


3

The simplest way to do this is to use an array inside your math environment with centered columns. \documentclass{article} \begin{document} \[ \setlength{\arraycolsep}{3em} \begin{array}{c c} 1 & 1 \\ 1\quad1 & 1\quad1 \\ 1\quad2\quad1 & 1\quad2\quad1 \\ 1\quad3\quad3\quad1 ...


3

Assuming that you do not have paragraphs in your parshape: \def\triangledownpar#1{\vspace*{\fill}\noindent% \makebox[\linewidth]{% \Shapepar\triangledownshape#1\unskip\ .\par}\vfill}


3

Box it inside a varwdith environment, which allows you to move it around: \documentclass{article} \usepackage{showframe} \usepackage{shapepar,varwidth} \def\triangledownshape{% {0}% {0}b{0}\\% {0}t{-10}{20}\\% %{8.66}t{-5}{10}\\% {17.32}e{0}% } \def\triangledownpar#1{\Shapepar\triangledownshape #1\unskip\ .\par} \begin{document} ...


1

I propose another layout, based on tabular only: \documentclass{article} \usepackage[table, x11names]{xcolor} \usepackage{graphicx} \usepackage{caption, makecell} \renewcommand\theadfont{\normalsize} \renewcommand\theadalign{bc} \usepackage{siunitx} \usepackage{etoolbox} \colorlet{slightgray}{LightSteelBlue3!25} ...


2

Even after your edit of question it is still cryptic to me. So on basis of guessing and a bit of considering, how I will wrote similar table, I made the following example: \documentclass{article} \usepackage{tabularx} \usepackage[table]{xcolor} \usepackage{siunitx} \begin{document} \begin{table}[h] \renewcommand{\arraystretch}{1.5} \sffamily ...


3

Here are some more options, using either a tabularx or list (via enumitem) to make full use of the text block width. \documentclass{article} \usepackage{tabularx,array} \usepackage{enumitem} \begin{document} \noindent \begin{tabularx}{\textwidth}{@{}l<{:}@{\ }X@{}} item in list & item description \\ another item in list & ...


3

You could use a longtable environment. In the example below, I've chosen p for the second column to allow automatic line breaks. Set the width of the p column to suit your page layout (of which we know nothing so far). \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{ l p{3in} } % choose suitable width for "p" column item in ...


1

Don't change \footnotesize... We need to change three components to address your three requirements. Change the footnote number. For this we need to adjust \@makefnmark, which starts out like this (from latex.ltx): \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}} We can replace the insertion of \normalfont with ...


0

The following code does everything except aligning the "left column" correctly. \documentclass[11pt]{article} \usepackage{sectsty} \usepackage{amsmath} \sectionfont{\fontsize{11}{15}\selectfont} \usepackage{xcolor} \usepackage{graphicx} \usepackage[usestackEOL]{stackengine} \usepackage[top=1cm, bottom=1cm, left=1cm, right=1.5cm]{geometry} \begin{document} ...


3

When you don't let siunitx 'know' otherwise, the strategy used for centring on a decimal marker is to put it at the centre of the column. That means that in your example you've got a lot of white space about in the output. The better approach is to tell siunitx exactly how much space you need, which ideally will include any 'post text' part. That might lead ...


1

Something like this perhaps: \documentclass[a4paper]{article} \begin{document} \begin{table}[htp] \begin{minipage}{.5\textwidth}\centering \textbf{Advantages} \begin{itemize} \item Very efficient! \item Use of mild conditions \item Broad spectrum of reactions, almost everything \item Not Bound to Natural decision! ...


1

Something like that? \documentclass{article} \usepackage{amsmath} \usepackage{fourier} \usepackage{mathtools} \begin{document} \begin{alignat*}{2} x &= a + b &\\[-1ex] & & {} + c + d & \\ % this line should be aligned to the right y &= a + b \\[-1ex] & & \mathllap{{}+ c + d + e} & % this should be aligned ...


0

I recommend the usage of the simple command \hspace{xcm}. The \hspacecommand when put infront of an equation, pushes it farther towards the right and the shift is basically defined by the user in cm. I haven't tried left shifts but I guess negative values within the braces can get the job done. Additionally, to align the equations, one can use an ampersand ...


3

When the width of the caption is less than that of the float, by default, ConTeXt centers the caption box. So, visually, the captions don't appear to be left aligned. The simplest workaround is to tell ConTeXt to always choose the width of the caption box to be equal to that of the float. This can be done by adding the option width=max to \setupcaption. ...


3

Is the following what you want? It's achieved by removing the second & alignment point from each row. (Note that whereas the deprecated eqnarray syntax requires two &s, align requires only one.) \documentclass{article} \usepackage[fleqn]{amsmath} \setlength{\mathindent}{0pt} \begin{document} \hrule % just to illustrate the width of the text block ...


2

After cropping the image, I've used the following latex code: \begin{figure} \centering\includegraphics[scale=0.4]{Figure5_RPC_Problem_1}\caption{Wider than figure text. Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider than figure text.Wider ...


2

You can hide the width of the hyphen, but i am not sure it looks much better. \documentclass[8pt, marklength=20mm, coverwidth=162mm, coverheight=229mm, bleedwidth=30mm,spinewidth=65mm]{bookcover} \usepackage[icelandic, latin, czech]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tgpagella} % ...


2

When using the caption package with the IEEEtran class you receive the following package warning: Package caption Warning: Unsupported document class (or package) detected, (caption) usage of the caption package is not recommended. See the caption package documentation for explanation. So let's not use caption. You can set the ...


4

It's easy to do it with the threeparttable environment, which measures the width of tables: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[showframe]{geometry} \usepackage{fourier, erewhon} \usepackage[justification=justified,singlelinecheck=false]{caption} \usepackage{booktabs} \usepackage{threeparttable} \begin{document} \vspace*{2cm} ...


3

In the meantime of me thinking about something more clever, you can go with % arara: pdflatex \documentclass[a4paper,11pt,fleqn,oneside]{book} \usepackage{mathtools} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[row sep = 0ex, column sep=1.9em] \text{something long} \arrow{r} & \text{something else long}\\ \makebox[\widthof{something ...


1

The numbers for \sections inside memoir's ToC is set inside a box of with \cftsectionnumwidth. Since it's placed inside a fixed-width box, we can insert \hfill at the start (thereby pushing the number to the right of the box) and insert a space at the end (to separate it from the remaining ToC entry title): \documentclass{memoir} ...


4

Measure the expression and use \mathpalette in order to get the rule at the correct height. \documentclass{article} \usepackage{amsmath} \newcommand{\exprrule}[2]{% #1#2\mathpalette\addexprrule{#1}% } \newcommand{\addexprrule}[2]{% \sbox0{$#1#2$}% \rule[-\dimexpr\dp0+1pt]{5cm}{1pt}% } \begin{document} $\exprrule{\frac{18e-12}{10}}{=}$ ...


2

\documentclass{article} \begin{document} $\frac{18e-12}{10}=\rule{5cm}{1pt}$ $\frac{18e-12}{10}=\rule[-4pt]{5cm}{1pt}$ \end{document}


3

If your aim is to equalize the spaces, then \null\hfill is not the right way. Note that \null does not start horizontal mode (that is, a paragraph), so all it does is to create some vertical space. Note also that subfigure has been obsolete and deprecated for 15 years. \documentclass[10pt]{article} \usepackage{showframe} % just for the example ...



Top 50 recent answers are included