Tag Info

New answers tagged

0

\documentclass{article} \usepackage{amsmath,showframe} \begin{document} \paragraph{a)} $ \begin{aligned}[t] &D=b²-4ac=5²-4\cdot-2\cdot3=49 \\ &x=\dfrac{-5+√{49}}{2\cdot-2}=-\dfrac{1}{2} & \vee \qquad\qquad\qquad & &x=\dfrac{-5-√{49}}{2\cdot-2}=3 \end{aligned} $ \end{document}


1

Supposedly your images may have different widths. As such, you'll be forced to adjust the width manually using \captionsetup{width=X} for every figure. \documentclass{report} \usepackage{ragged2e,graphicx} \usepackage[margin=2cm]{geometry} \usepackage{caption} \captionsetup[figure]{% justification = RaggedRight,% Or justified singlelinecheck = off} ...


2

Here is version using tabular or array (saves you having to go into and out of math mode for each cell) : Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Code: \documentclass{article} \usepackage{amsmath} \usepackage{array} \usepackage{showframe} ...


2

For simple lists of equations like this all you really need is an array with a single column that you can align left, center, or right. \documentclass{article} \usepackage{amsmath} \begin{document} \paragraph{a)} $ \begin{array}[t]{l} D=b^2-4ac=5^2-4\cdot-2\cdot3=49 \\ x=\dfrac{-5+\sqrt{49}}{2\cdot-2}=-\dfrac{1}{2} \qquad\text{or}\qquad ...


4

Use align, or if you want only one number use aligned inside an equation. \documentclass{article} \usepackage{mathtools} \begin{document} \begin{align} e^{-\lambda T} &= ( 1 - \log S_j^* (T))^{\frac{1}{1-\theta}} \\ - \lambda T &= \dfrac{1}{1-\theta} \log ( 1 - \log S_j^*(t)) \\ T &= \dfrac{1}{\lambda (\theta-1)} \log ( 1 - \log S_j^*(t)) ...


3

You need p columns for fixed width, not X also there is not room for that many columns of 1.5cm so I changed it to 1.1 \documentclass[a4paper,12pt,oneside]{article} \usepackage{amsmath,amssymb,bm,mathtools,amsthm} \usepackage{graphicx} \usepackage{float} \usepackage{wrapfig,booktabs} \usepackage{array} \usepackage{multirow,dcolumn,booktabs} ...


3

The use of ragged2e's \justifying is the cause of the problem. One could just add \centering to the start of the center environment via the following preamble addition: \makeatletter \g@addto@macro\center\centering \makeatother


2

Put align=left after fit = {...}. \documentclass{book} \usepackage{trace} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{fit} \usepackage{lua-visual-debug} \begin{document} % \tikz\node[fill=red](end marker){}; % same as at(0,0) % \tikz\coordinate(end marker) at (0,0); % must have overlay, remember picture for the fit to work Lorem ipsum dolor ...


4

You need to alter the value of \labelsep for the list. The default is 0.5em. This changes that to 1.5em: \documentclass{article} \usepackage{regexpatch} \usepackage{algpseudocode} \makeatletter \xpatchcmd{\algorithmic}{\labelsep 0.5em}{\labelsep 1.5em}{\typeout{Success!}}{\typeout{Oh dear!}} \makeatother \begin{document} \begin{algorithmic}[1] \State ...


5

There are not many uses for it besides after control sequences or to ensure non extended spaces after periods that are not punctuation (but in these cases, a tie ~ would be better). The tie is defined in terms of \ : in Plain TeX it is \def~{\penalty\@M \ } % tie while in LaTeX we see \def~{\nobreakspace{}} ...


5

The following is taken directly from Knuth's TeXbook (Chapter 3: Controlling TeX, p 8): When a space comes after a control word (an all-letter control sequence), it is ignored by TeX; i.e., it is not considered to be a "real" space belonging to the manuscript that is being typeset. But when a space comes after a control symbol, it's truly a space. ...


7

You are missing an awful lot of % at the ends of lines, and \parbox{1.75in}{\textsf{ \hspace{-5pt} } { }} Just always makes an empty parbox. I don't think the tikz code is helping here really it is just complicating things if you just want to draw three lines. \documentclass[final,oneside,11pt]{memoir} \usepackage{wrapfig} ...


3

Another alternative is the use of newcommand which is similar to newenvironment. For references: Link1 Link2 Code \documentclass[final,oneside,11pt]{memoir} \usepackage{tikz} \usepackage{calc} \usepackage{wrapfig} \usepackage{lipsum} % \usepackage{showframe} \newcommand*{\offset}[1] { \begin{wrapfigure}[19]{r}[1in]{2in} \noindent ...


6

Several things are going on that are not working for you. First, the new lengths that you're defining should be defined outside of the environment. Secondly, you cannot call \parbox{1.75in}{ in one part of the definition for your new environment and close it in the second part. It's best to use an lrbox for that purpose. Thirdly, wrapfigure needs to be ...


0

You need to use balance package in your tex, like \usepackage{balance} and before you bibliography just use \balance. It works perfectly for me.


3

Although use as bounding box plus \vspace would probably be my first or "default" choice for this kind of thing, in this case you could try the trim right key which would make the \vspace unnecessary. \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture}[trim right=(c)] \draw[fill] (0,0) circle ...


2

You can define a \\newlength{\WidestLength} and then store the length as: \settowidth{\WidestLength}{\bfseries Army Group Center} Notes: There is no need to guess the \hspace*{-6pt} and +12pt. You can simply remove the column padding that gets added at the start and end of the table via @{}. The showframe package was used just to show the page ...


6

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture} \draw[fill,use as bounding box] (0,0) circle [radius=0.075] node [inner sep=0pt] (c) {}; \draw [red] (c) edge [bend right] node[at end, right]{this is the center} (5,-1); \end{tikzpicture} \vspace{1cm} \caption{} \end{figure} ...


3

\documentclass{report} \usepackage[leqno]{amsmath} \makeatletter \newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno} \newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno} \makeatother \begin{document} \begin{align} f(x) &= ax^2 + bx + c \\ g(x) &= dx^2 + ex + f \end{align} \reqnomode \begin{align} f(x) &= ax^2 + bx + c \\ ...


3

If you really don't want to use any additional code (why not?, I'd use varwidth here) then you can just use a normal minipage but you would have to tell it how many characters are on the longest line. \documentclass{article} \begin{document} \begin{center} hello world \end{center} \begin{center}\ttfamily\sbox{0}{a}% \begin{minipage}{24\wd0}% 24 ...


1

Using baseline option in tikz was the solution. Here is the MWE that produces the desired result: \documentclass{article} \usepackage{tikz} \newcommand{\rbox}[1]{ \begin{tikzpicture}[baseline] \node[rounded corners=3pt, draw, anchor=base]{#1}; \end{tikzpicture} } ...


1

The output is not what the OP wanted, but package tkz-linknodes is devised to create links between equations and label them. This is the code (some commands were taken from egreg's answer) \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{amsmath} \usepackage{lmodern} ...


1

Your image shows that that the chapter number and title are printed on one line INTRODUCTION The number is not prefixed by CHAPTER which we can fix, but first there is an entirely spurious CHAPTER at the start of the table of contents, that is written by the \startthechapters command with the lines \addtocontents{toc}{\protect\mbox{ ...


1

The table doesn't fit into the text block because of the material in the second header row and, in particular, the word "Probenahmeintervall" that occurs twice. Rather than reduce the font size to shrink the size of the stuff in the second header row, I suggest you create an acronym, say "PNI", for the long word and define the acronym's meaning in the ...


1

In the future please provide a full Minimum Working Example of your problem, it takes some of the guesswork out of helping you. The problem is your table is wider than the textwidth of your document. The \centering environment has pushed it all the way to the left margin, but since it can't violate that margin, it sticks out to the right. Two solutions: ...


3

Your table is too wide, hence centering in unvisible. Please try to divide Zyklus/Probenahmeintervall and Radiant/Probenahmeintervall into two or even three verses (I dont't know rules of hyphenation in German, hence no practical example) and the result should be visible. Of course, in that case, it is probably better to move harmonisch and Periode one line ...


9

Extending jlv's very good solution, here's one where the input is simpler, because common elements can be implicit. I also add some macros that help input and make it easier changing the rendering, if needed. So, instead of \to and \leftrightarrow I define \limplies and \liff for uniformity with \lnot, \lor and \land. Also, the justification is hidden in a ...


6

As @tohecz said, the amsmath package is quite helpful, and learning about it yourself is usually the best solution. The second best solution is seeing what other people have done, taking it, and adjusting it to your needs. Below is a second best solution. \documentclass{article} \usepackage{amsmath,array} \setlength{\tabcolsep}{2pt} ...


2

It's not clear what problem you had, but center alignment is obtained with \centering % document class \documentclass[a4paper,11pt,final]{memoir} % stuff \pagestyle{empty} % no page numbering \setlength{\parindent}{0pt} % no paragraph indentation % required packages (add your own) \usepackage{flowfram} % column layout ...


3

Are you sure res is the best class to use? it has hardly been updated since 1989, so is mostly older than LaTeX2e. Anyway, if I use the line you posted \documentclass[margin,line,8pt]{res} I get LaTeX Warning: Unused global option(s): [8pt]. as the class does not have an 8pt option, however it does have a centered option and ...


1

Second edit You need to specify another column, in order to have it, within that specific math environment. If not, then you are better off by using plain math mode. Anyhow, the two commands that are key to have full control of the formula and the numbering, are \numberdistance and \distance. The former separates the referencing to be used while numbering ...


3

It's much simpler: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[htp] \centering \includegraphics[width=.3\textwidth]{example-image-b}\quad \includegraphics[width=.3\textwidth]{example-image-b}\quad \includegraphics[width=.3\textwidth]{example-image-b} \medskip \includegraphics[width=.3\textwidth]{example-image-b}\quad ...


3

The code you provided does indeed center them as you desire. Its just that the page is not wide enough. If I add \usepackage[paperwidth=25.0cm,showframe]{geometry} then you get: Furthermore, you don't need to use the array environment as you don't have math content, simple tabular will suffice. Also, you should use \centering instead of the center ...


1

In your case it suffices to remove any specification of itemindent: \documentclass{article} \usepackage{mathtools,enumitem} \begin{document} \begin{enumerate}[label = {\arabic*)}] \item before \begin{equation*} A \end{equation*} after \end{enumerate} \end{document}


1

\linebreak is not a command which is meant for tables. You will have to use a p column here or you define a table for each cell. In this answer it has been shown nicely, how to define a command for that. % arara: pdflatex \documentclass[11pt,a4paper]{article} \usepackage{mathpazo} \usepackage{amsmath} \usepackage{booktabs} \usepackage{caption} ...


1

For this specific case, David Carlisle's answer works great. But, in general if you want table to span the entire \linewidth, I find using the X column from tabularx to be very useful: Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. was just to show the page margins. Here I have used the X ...


6

\begin{tabular}[t]{@{}ll@{}} Name& zz\\ Work& zzz \end{tabular}% \hfill \begin{tabular}[t]{@{}rr@{}} email& z\\ phone& zzz \end{tabular} You need to align each side in a box (eg tabular) then push them apart with \hfill


1

Here's another solution, which uses an align* environment. Its virtue, so to speak, is that the left-hand edges of the main equation and of the description lines are aligned. Two reasons for using a \parbox for the description of \varepsilon: (i) no need to select a line break by hand, and (ii) the interline spacing inside the parbox won't be as wide as ...


1

Two tricky examples (your code at the beginning): \documentclass{article} \begin{document} When monochromatic light is shone through a solution of iron, Beer's law states that $$ A = \varepsilon l c $$ \begin{tabular}{l} Where $A$ is amount of light absorbed \\ \quad \quad \quad $\varepsilon$ is the molar absorbance coefficient, which varies ...


3

Another alternative is to use a (d)cases environment: Here's the code: \documentclass{article} \usepackage{mathtools} \begin{document} When monochromatic light is shone through a solution of iron, Beer's law states that \[ A = \varepsilon l c ,\quad \text{where }\quad \begin{dcases*} A& is amount of light absorbed \\ ...


3

Please have a look on Why is \[ ... \] preferable to $$ ... $$?, the description of the variables can be done in description or in an itemize list, for example. From a personal point of view, I would rather use \ell instead of l as equation identifier. \documentclass{article} \usepackage{mathtools} \begin{document} When monochromatic light is shone ...


0

I'm not sure if this helps but this is how usually I do what yo asks: \documentclass{article} \usepackage{amsmath} \begin{document} When monochromatic light is shone through a solution of iron, Beer's law states that: \begin{equation*} % The starred version avoid the automatic number. A = \varepsilon l c \end{equation*} \noindent Where:\\ $A$ ...


3

As David and Pier noted, empty nodes have automatically inner and outer separation distances, namely, inner sep and outer sep. For seeing it, add draw option to your temporary node (in)and you'll see. There is one special node shape that doesn't have a box and hence any separation installed and that is coordinate. It does only have one anchor center and ...


3

Nodes have some "inner space" whether you write something in them or not. In your case, just draw a line from the center of the node: in.center. \documentclass{article} \usepackage{tikz} \makeatletter \protected\def\vvv#1{\leavevmode\bgroup\vbox\bgroup\xvvv#1\relax} \def\xvvv{\afterassignment\xxvvv\let\tmp= } \def\xxvvv{% \ifx\tmp\@sptoken\egroup\ ...


4

Nodes have some default padding around them (I think). You can use the coordinate directly: \documentclass{article} \usepackage{tikz} \makeatletter \protected\def\vvv#1{\leavevmode\bgroup\vbox\bgroup\xvvv#1\relax} \def\xvvv{\afterassignment\xxvvv\let\tmp= } \def\xxvvv{% \ifx\tmp\@sptoken\egroup\ \vbox\bgroup\let\next\xvvv ...


5

Your titles are centred in the specifed width of 2cm, it's possible to make a vertical stack with a tight box that is centred in a c multicolumn by using a nested tabular \documentclass{article} \newcommand\hd[2]{\multicolumn{2}{c}{\bfseries\begin{tabular}{@{}c@{}}#2\end{tabular}}} \usepackage{array} \begin{document} \begin{table}[htbp]\centering ...


5

As I don't really understand why you should need a width of 2cm;, I propose a very simple solution based on the makecell package, and its \thead command, that allows for line breaks in cells and a common formatting of cells. Does this code produce what you want? \documentclass{article} \usepackage{makecell} \renewcommand\theadfont{\bfseries} ...


0

A \centering inside the minipage should do the trick, working on my side. \begin{minipage}[b]{0.4\linewidth} \subsection{Tercera Configuraci\'on} Con ... \vspace{1.3cm} \end{minipage} \hfill \begin{minipage}[b]{0.53\linewidth} \centering \includegraphics[scale=0.14]{CuboTres.png} \captionsetup{justification=centering} \captionof{figure}{Tercer ...


2

If you want to flush only this align, you may do as follows. If you want to flush all equations in your document, you may use \documentclass[fleqn]{article}. % arara: pdflatex \documentclass[12pt,a4paper]{article} \usepackage{mathtools} \usepackage{showframe} % for proof... \begin{document} \begin{flalign*} \beta&=\frac{\lambda.D}{d} & \\ ...


2

wrapfig doesn't really support two figures on the same line, but if we simplify things and just look at the case where there is a single paragraph that is large enough for the cutouts, and we don't have to do the clever continuation paragraph code that wrapfig does, then you can simply measure the two images and make a \parshape that fits around them. ...



Top 50 recent answers are included