Tag Info

Hot answers tagged

9

Nice example. This is actually not really a TeX bug or anything but a design approach (or rather some uptimization to keep computing expense low --- remember when TeX was designed) in the paragraph breaking algorithm. In a nutshell TeX keeps looking at breakpoints in a paragraph starting at the beginning and working towards the end. In this manner it ...


8

Several comments: Since you're (i) using the agsm bibliography style, which is distributed with the harvard citation management package and (ii) loading the natbib package rather than the harvard package, you should load the har2nat package as well. As its name indicates, it "translates" various macros that are defined by the harvard package (and which are ...


6

the hyphenation patterns for English do not help here. That's the problem seqsplit is trying to fix, but you are not using it in all the cell. Note it is unrelated to longtable you would get the same behavior in a paragraph on the main page. \documentclass{report} \usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}% ...


5

\documentclass[hidelinks,12pt]{amsbook} \RequirePackage[bookmarks, bookmarksopen=true, plainpages=false, pdfpagelabels, pdfpagelayout=SinglePage, breaklinks = true]{hyperref} \begin{document} \chapter{Troubleshooting long URLs} \section{Test 1} A complete list of participants and presentations can be found on the conference web site: \href ...


5

You should always include end of paragraph (not \newline) if you have size changes. An entire paragraph is set with the baselinespacing in force at the end of the paragraph, so you were getting inconsistent settings. \documentclass[11pt,paper=a4,11pt,parskip=half,draft]{scrartcl} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} ...


4

LaTeX will refuse to break a 'word' if it contains, among a few other characters, a /. This has very solid reasoning that's outside the scope of this answer, but the url LaTeX package will handle these things very cleanly. Instead of typing in the file path directly, use Insert -> URL. This will (presumably) wrap the argument in \url{<my text ...


4

\showoutput will cause the information you want to be put in the log file, getting the information in tex might be harder (unless you use luatex) but it depends what form you want the information.


4

\documentclass[tikz,border=5mm]{standalone} \newcommand{\mytab}[1]{% \begin{tabular}{@{}c@{}} #1 \end{tabular} } \begin{document} \begin{tikzpicture} \draw (0,0) -- (11,0); \foreach \x in {0.8,4,5.5,7,10.2} \draw(\x cm,3pt) -- (\x cm, -3pt); \draw (0.8,0) node[below=3pt] {$T_0$}; \draw (4,0) node[below=3pt] {$T_1$}; \draw (5.5,0) node[below=3pt] {$0$}; \draw ...


3

Possibly the closest to what you ask is to allow a small amount of raggedness to the right margin. The alternative of course, if manual correction is feasible, is to add an explicit \\ before the offending word on line 5. \documentclass{article} \begin{document} \def\t{ short words and \texttt{veryVeryLongWords}} \def\tst{\t\t\t\t\t\t\t\t\t\t\t\t} ...


3

\documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{msc} \usepackage[parfill]{parskip} \title{aaa} \author{aaa } \begin{document} \normalsize \maketitle \tableofcontents \newpage \subsection{whatever} \begin{center} \begin{msc}{diagram} \setlength{\instdist}{9cm} \setlength{\envinstdist}{2\envinstdist} ...


3

I suspect that I'm missing something very important. If you want to make a document look like it was generated by MS Word, why employ (La)TeX? Much more straightforward to use MS Word, isn't it? Using \linebreak "works" -- but at the high cost of making the paragraph look pitiful. \documentclass[a4paper]{scrartcl} \usepackage{newtxtext} % text font: ...


3

There are a number of ways to achieve this. Here is a list, taken from Herbert's mathmode document: \documentclass{article} \usepackage[paper=a3paper,margin=1in]{geometry}% Just for this example \usepackage{amsmath,array} \newcommand{\BOX}[1][0.125\columnwidth]{\framebox[#1]} \begin{document} \[ \begin{array}{r@{}>{{}}l@{\qquad}r@{}>{{}}l} ...


3

You should really consider using bibtex or biblatex/biber to manage citations and references. However, if you really insist on doing this manually, then you need a more intelligent underlining macro which allows line breaks. soul can do this: \documentclass[a4paper,12pt]{article} \usepackage{indentfirst} \usepackage[margin=1.0in]{geometry} ...


3

The reason you're getting different spacing results is because (a) you're using \newline instead of \par to insert line breaks and (b) different font sizes are used for items of type Itemhead (\normalsize), Itemplace (\footnotesize), and Iteminfo (\scriptsize). The interline space that is used in a (logical) paragraph depends on the fontsize that's in ...


2

The error comes from the \newline which you have immediately at the start of the minipage You can not end the current line and start a new line until you have started the paragraph, hence the error. Simply deleting the \newline makes the error go.


2

Put the url on a separate paragraph and use a \parbox. It also works within a list: \documentclass[hidelinks,12pt]{amsbook} \RequirePackage[bookmarks, bookmarksopen=true, plainpages=false, pdfpagelabels, pdfpagelayout=SinglePage, breaklinks = true]{hyperref} \usepackage{enumitem} \begin{document} \chapter{Troubleshooting long URLs} \section{Test 1} A ...


2

p columns allow line breaking so the macro is not needed at all, just use \begin{longtable}{p{4cm}p{1.5cm}p{1.2cm}p{1.2cm}p{1.2cm}p{\dimexpr\columnwidth-9.1cm-12\tabcolsep\relax}} \toprule Title 1 & Title 2 & Title 3 & Title 4 & Title 5 & Title 6 \\ \midrule a & b & c & d & e & This is a ...


2

EDIT: As pointed out by Joseph Wright in the comment, the new version (4.6) of chemmacros provides the \iupac command which does similar thing with the \IUPAC command in bpchembut with many more customisations, it is detailed in the section 8 in the user manual. For your case using chemmacros should be ...


2

For the table itself, all I did was to manually break the headers. But then I added stacks above the table for the extended header. It still looks too big for a lettersize page, but maybe your configuration (fontsize, papersize, etc.) will accommodate. \documentclass[12pt, a4paper] {article} \usepackage{booktabs} \usepackage{rotating} ...


2

You can do that with the makecell package. In addition, I used the siunitx package to have a proper formatting and alignment of numbers, and threeparttable for table notes: \documentclass[12pt, a4paper] {article} \usepackage{booktabs} \usepackage{rotating} \usepackage{makecell, threeparttable} \usepackage{siunitx} ...


2

I suggest you proceed as follows: Provide a bit more structure in the table's header, by creating extra categories called No. of and AUM (thousands of $), to remove some redundancy from the headers of columns 2, 3, 5, and 6. Lop off the leading $ symbols and trailing .000 strings in columns 5 and 6 and place that information in the header (see also the ...


2

(Without knowing much about your cell contents), You can use ltablex package and convert your long table in to breakable tabularx. Here one can use X column type that will be evenly wider. \documentclass[]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pdflscape} \usepackage{tabularx} \usepackage{ltablex} % uncommenting this line ...


2

In order to fix that, you will have to give the \left\{ its counterpart which would be \right. on the same line. The second line would need a \left. ... \right\} . As you do not need auto-sized brackets here, I would leave it all away. Here is your example and my version: % arara: pdflatex \documentclass{article} \usepackage{mathtools} \begin{document} ...


1

Here is a solution similar to LaRiFaRi's but with a different alignment: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} R = \{&(S_{1},S_{1}), (S_{1},S_{4}), (S_{4},S_{4}), (S_{4},S_{1}), (S_{2},S_{2}), (S_{2},S_{3}),\\ &(S_{3},S_{3}), (S_{3},S_{2}), (S_{0},S_{0}), (S_{0},S_{5}), ...


1

You also can use the following code, heavily inspired by Sebastien Gouezel's code for \DeclarePairedDelimiter (pp. 28-29 of mathtools documentation), that allows for line breaks in paired delimiters: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \newcommand\MTkillspecial[1]{% helper macro \bgroup \catcode`\&=9 \let\\\relax% ...


1

Is this an acceptable solution? The line is not being broken after the item in the trivlist (actually, the solution is stolen from the amsthm) \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts} %% Packages \usepackage{amsmath,amsfonts} \usepackage{amsthm} \usepackage[matha,mathb]{mathabx} ...


1

If you invoke the inline option to enumitem, then using enumerate* instead of enumerate gives you inline lists: Code: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amsfonts} %% Packages \usepackage{amsmath,amsfonts} \usepackage{amsthm} \usepackage[matha,mathb]{mathabx} ...


1

not elegant, but it works \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}\label{fig: timeline} \begin{center} \begin{tikzpicture} \draw (0,0) -- (11,0); \foreach \x in {0.8,4,5.5,7,10.2} \draw(\x cm,3pt) -- (\x cm, -3pt); \draw (0.8,0) node[below=3pt] {$T_0$}; \draw (4,0) node[below=3pt] {$T_1$}; \draw (5.5,0) node[below=3pt] ...


1

Copy the text in another text editor capable of removing line breaks. The editor I'm actually referring to is Sublime Text. You just have to follow these steps: Install Sublime Text; Install Package Control (this is not necessary but is almost a sine qua non); Search for Paste PDF Text Block with Package Control and install it, or install it manually if ...


1

By default, \and is set to insert a line-break (and vertically skip 1em... technically \\[1em]) within \institute. To that end, define your own \samelineand that doesn't insert this vertical skip: \documentclass{beamer} \useoutertheme{infolines} \title{Title} \author{Me\inst{1} \and Someone\inst{2} \and Someone else\inst{3}} \institute[short]{\inst{1} ...



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