# Tag Info

10

You can define your own environment for this. There's space for improvements; for instance, you might want that the space reserved on the right is fixed for all items. The \lipsum paragraphs are just to show how the environment's content is typeset with respect to the page margins. \documentclass{article} \usepackage{lipsum} \newlength{\datumlen} ...

9

I'd much prefer Jubobs's approach, but just to show another method, you can split into two lines the radicand: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{fourier} \usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry} \begin{document} \[ V_{DABC}=\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot ...

8

As suggested by egreg in his comment, the angles take up a lot of horizontal space, which you can claim back by defining shorter variables for them (alpha, beta, gamma, in my code). \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} % <---- for \triangleq \usepackage{fourier} ...

7

Like any code using a \lastbox loop this will fail badly if there is any unexpected material in the vertical list being measured. specials, inserts, writes, rules, will "hide" any material above the unremovable item. \documentclass{article} \makeatletter \def\IfFull#1{% \global\let\@IfFull\@secondoftwo \setbox\z@\vbox{% \hbadness\maxdimen ...

7

If a break is taken at \hfill, it will disappear at the beginning of the following line. With \hspace{0.5em} we introduce a feasible break point; then \hspace*{\fill} won't disappear at the start of the line if the break is taken at that space. \documentclass[a6paper]{scrartcl} \usepackage{geometry} ...

7

Or use \hphantom{{}={}}: \documentclass[10pt, a4paper]{article} \usepackage{amsfonts, amsmath, amssymb, amsfonts} \begin{document} \begin{align} \sum_i{ c_i} &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\ \sum_i{ c_i} &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ ...

6

You can define a command \seqref that mimics what \eqref does, without using a box; we have to use refcount to allow hyphenation also in the last word. I wouldn't redefine \eqref, because hyphenation of tags should not be used generally. \documentclass[draft,11pt]{article} \usepackage{amsmath,refcount} \newtheorem{thm}{Theorem} \makeatletter ...

6

As you see from the original definition, proof from amsthm typesets its title as the argument for \item and this prevents line breaking; you can change this by redefining proof: \documentclass{scrartcl} \usepackage{amsthm} \makeatletter \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist ...

6

I think this is one of those cases where a local definition may help; in the code below, I have introduced f(A,B,C,D) under your radical, and then defined it immediately below. % arara: pdflatex % !arara: indent: {overwrite: yes} \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry} ...

5

An approach that produces a result that's very similar to the one in @egreg's answer relies on the \splitfrac macro of the mathtools package. In the example below, I also utilize a macro called \V that typesets its argument in text italics instead of math italics. The macro is applied to the strings "DABC", "ADB", "DA", etc to keep TeX from typesetting ...

5

You should listen to what cslstr says regarding the use of \\ :). Hwoever, you can use package enumitem and adjust the distances between items as below: \documentclass[]{article} \usepackage[demo]{graphicx} \usepackage[export]{adjustbox} \usepackage{enumitem} \begin{document} \begin{enumerate}[itemsep=1in] \item ...

5

The problem here is that you set the section title in a TikZ \node, and by default this is a box that doesn't allow line breaking, it will just become as wide as the contents of the node. To fix this, set a text width for the node, this will cause the node text to break when exceeding that width. You probably also want to change the anchor of that node, or ...

5

You need to insert a paragraph break, but the usual \par command will not work here. Rather you need to use \endgraf: \documentclass{sig-alternate} \begin{document} \conferenceinfo{Text 1 here}{\endgraf Text 2 here.\endgraf More.} \title{My title} \author{Me} \maketitle \end{document} The \conferenceinfo macro is defined in a way that does not allow ...

5

This seems to work flawlessly: \documentclass{sig-alternate} \usepackage{lipsum} % just for the example \begin{document} \conferenceinfo{Text 1 here}{\\ Text 2 here.} \title{My title} \author{Me} \maketitle \section{A} \lipsum[1-20] \end{document} Magnified view

5

use \mathrel{...} \documentclass[10pt, a4paper]{article} \usepackage{amsfonts, amsmath, amssymb, amsfonts} \begin{document} \begin{align} \sum_i{ c_i} &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\ \sum_i{ c_i} &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ ...

4

Long unbreakable objects are always a problem for good typesetting. I'd personally go with short names. You can bend LaTeX to break the names, though. I'd do it only in otherwise unsolvable situations; rewording paragraphs is usually the best way to solve bad line breaks. \documentclass{article} \sbox0{$\mathbf{\xdef\mybffam{\the\fam}}$} ...

4

Redefine \cventry as \renewcommand*{\cventry}[7][.25em]{ \begin{tabular*}{\textwidth}{p{7cm}@{\extracolsep{\fill}}r}% {\bfseries #4} & {\bfseries #5} \\% {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\% \end{tabular*}% \ifx&#7&% \else{\\\vbox{\small#7}}\fi% \par\addvspace{#1}} and adjust 7cm to your needs. MWE: ...

4

use \begin{sloppypar} By writing this sentence, we will get a feeling for the textwidth of this document. Then we will talk about some type definition: \lstinline$delegate TResult here.we.have.a.looooong.typename.containing.some.Calcualtion<in TArgument, out TResult>(TArgument argument)$. Now that that's out of the way, we can continue writing about ...

4

Yes, this can be done with the environment inparaitem from paralist. Add the following lines to your preamble. \usepackage{paralist} \renewenvironment{thebibliography}[1]{\let\par\relax% \section*{\refname}\inparaitem}{\endinparaitem} \let\oldbibitem\bibitem \renewcommand{\bibitem}{\item[\textbullet]\oldbibitem} Complete MWE: \documentclass{scrreprt} ...

4

Here are two options: Replace the space character with \\ using xstring: \documentclass{article} \usepackage{xstring}% http://ctan.org/pkg/xstring % Ideas from Output generated macro content with newline (http://tex.stackexchange.com/q/124810/5764) \newcommand{\cellspacebreak}[1]{% \saveexpandmode\expandarg\exploregroups \StrSubstitute{#1}{ ...

4

Working from Formatting source listings with listings & framed packages, if you don't mind the frame going around the line numbers, you can use the framed package and keep your frames and linebreaks intact. \usepackage{framed} ... \begin{framed} \begin{lstlisting}[escapeinside={@}{@}] Lorem ipsum dolor sit amet,@\newline\postbreak@ ...

4

Building on Mike Renfro's answer, you can use the mdframed package to produce the frame as the original one, not including line numbers: \documentclass{article} \usepackage{xcolor, listings} \usepackage[framemethod=tikz]{mdframed} \def\postbreak{% \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}}} \lstset{postbreak=\postbreak, ...

4

Here's one option that uses a paragraph break rather than a forced line break: \documentclass[12pt,letterpaper]{article} \usepackage{amsmath,amsthm,enumitem} % LSP is short for Lamport Structured Proof \newlist{lsp}{enumerate}{10} \setlist[lsp]{label=\arabic*.,ref=\arabic*} \newcommand{\lspproof}{\par\nobreak{\scshape Proof:}\quad} ...

4

The right way to add a "blank line" would be to insert some horizontal space. Inserting \bigskip you have the corresponding space: \begin{itemize} \item This \item That \item Where \end{itemize} \bigskip I am doing it here to test this. If you also want to start a new (indented) paragraph add a blank line: \begin{itemize} \item This ...

4

By using the multlined environment (package mathtools) or the aligned environment of package amsmath (of which mathtools is an extension), for example. \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{subfig, tikz} \begin{document} \begin{figure}[!ht] \centering \subfloat[First figure]{% \begin{tikzpicture}[>=stealth, shorten ...

4

Here are some examples with explanations: \documentclass{article} \begin{document} \begin{itemize} \item This \item That \item Where \end{itemize} I am doing it here to test this. \begin{itemize} \item This \item That \item Where \end{itemize} Putting \verb|\newline| or \verb|\\| here will cause an error that there is `no line here ...

4

It would be possible to get automatic line breaking for the list of edges, but a suitable width needs to be guessed at. If you're not forced to use subfig because of document class constraints (say, IEEEtran), I believe it's better to use subcaption and its \subcaptionbox that's similar to \subfloat in that it doesn't need to specify a width. For the list ...

3

Here's one way, with stacks. \documentclass{article} \usepackage{subfig} \usepackage{tikz} \usetikzlibrary{arrows} \usepackage[usestackEOL]{stackengine} \stackMath \begin{document} \begin{figure}[!ht] \centering \subfloat[First figure]{ \begin{tikzpicture}[>=stealth', shorten >=1pt, auto, node distance=3cm, thick, main ...

3

that's possible for commands like \cite or \ref and difficult for \$. Example for \ref \documentclass{article} \textwidth=5.5cm \parindent=0pt %%%% only for demo \let\myRef\ref \renewcommand\ref{\unskip~\myRef} \begin{document} \section{foo}\label{sect:bla} \rule{\textwidth}{1pt} xxxxx xxx xxx xxx xxxx see Section \myRef{sect:bla} %%% the original ...

3

The default glossary style (list) uses the description environment which doesn't like a line break immediately after \item. Your second entry has a line break at the start of the description which tries to break the line immediately after \item, which is what's causing the problem. You can add an empty box immediately before the line break (which is what the ...

Only top voted, non community-wiki answers of a minimum length are eligible