Tag Info

New answers tagged

5

The matrix environments need to be placed in math mode. For that, either use $\begin{matrix}...\end{matrix}$, or \[\begin{matrix}...\end{matrix}\]. The former is an in-line math expression, while the latter is a display math environment. The \hbox badness stems from lines that are too wide to fit within the text block margins, or when you're using ...


0

Your problem arises from trying to include an environment inside a sectioning command. LaTeX is not XML – don't pretend it is! It's a common mistake, but a critical one. You have a ton of other problems in this document – at this point, it isn't really salvageable. Work from this: \documentclass{article} \title{Title} \begin{document} \maketitle ...


-1

hi kimi add following code line to your code the problem be solved: \usepackage{graphicx} \usepackage{epstopdf}


2

You may get this error also if you use different language for bibtex. In that case project.bbl may contain characters in different encoding (e.g latin2). What you need to do is swap encoding when rendering bibliography to latin2 and switch back to utf8 after. \inputencoding{latin2} \bibliography{mybib} \inputencoding{utf8} Hope this helps.


2

I used equation inside a minipage. \documentclass{article} \usepackage[table]{xcolor} \usepackage{amsmath} \begin{document} \begin{tabular}{p{0.5\textwidth}} \cellcolor{yellow}\begin{minipage}{.5\textwidth}\begin{equation} S = \pi r ^2 \end{equation}\end{minipage}\\ \end{tabular} \end{document} Edited After see David´s comment to use without ...


4

This possibly does the right thing. \documentclass{article} \usepackage{amsmath} \usepackage{colortbl} \begin{document} \begin{tabular}{p{0.5\textwidth}} {\makeatletter\CT@everycr{\the\everycr}\begin{align} S &= \pi r ^2 \end{align}} \end{tabular} \end{document}


3

\*${\sum\limits_{n=1}^\infty}$$\delta_a$ $(E_n)$=${\sum\limits_{n=1 n\neq i}^\infty}$$\de here you are going into and out of math mode for each term which makes the source impossible to follow (it is not surprising that you missed a $ but also makes a very poor layout. this is a single displayed expression and should be set as such. I probably missed some ...


0

I have word2010 and it worked for me: In case it makes any difference these are the settings in my math tools settings thing (I think they are the default, I never use Word)


2

The last $ is missing: \item Let E = $\{n_1 \dots n_k\ \Leftrightarrow$E = ${\bigcup\limits_{n=1}^k}$ $\{n_k\}$\\*
 %%% ^^^^^ and this one looks not correct: $\int_E f d\mu = {\int_{\bigcup\limits_{n=1}^k{n}} f d\mu_c}=
 {\sum\limits_{n=1}^k} {\int_\{n\}} f d\mu_c = 
 ...


4

unfortunately svg loads a load of packages not directly related to svg inclusion itself including subfig which is incompatible with subcaption. You can suppress subfig inclusion by: \documentclass{article} \usepackage{subcaption} \expandafter\def\csname ver@subfig.sty\endcsname{} \usepackage{svg} \usepackage{hyperref} \begin{document} ...


0

You need to create a folder inside your TeX home directory. You can find this directory typing this in your console: kpsewhich -var-value=TEXMFHOME Then, inside the directory that your console echoed create a folder that holds your .sty. I think you should look at this question: Where do I place my own .sty files, to make them available to all my .tex ...


1

The immediate cause of the error was the blank line, which is not allowed in display math environments as noted in comments. Also you should never have a blank line before display math, or two display math environments with no text in between. One possible layout would be \documentclass{article} \usepackage{amsmath} \begin{document} First: ...


3

I can confirm that as of the recent updates to bigfoot the above MWE is now working (xref: How do I update my TeX distribution?).


3

You are confusing latex with the square backets for the optional arguments. When latex sees \TestA[\TestB[111]] it thinks that the optional argument for \TestA is \TestB[111. Now it tries to evaluate this expression and gets confused because \TestB is not conforming to syntax. To fix this you need to put brackets around the optional argument to \TestA: ...


0

I don't think you should use both {hi} and {desktop/hi.jpg} in your code. Try: \begin{figure} \centering \includegraphics[scale=0.3]{hi.jpg} \caption{Placering og budget} \label{fig:hi} \end{figure} The hi.jpg should be located in same directory as the *.tex file you are running. If it is located on the desktop you can use: ...


3

I'm not sure whether this answers your question - use XeLaTeX to compile using the fontawesome package: \documentclass[margin,line]{res} \usepackage{fontawesome} \usepackage{hyperref} \topmargin=-0.2in \oddsidemargin=-.2in \evensidemargin=-.5in \textwidth=5.8in \textheight=9.0in \itemsep=0in \parsep=0in \usepackage{fancyhdr} \pagestyle{fancy} ...


4

Here is feyn11.mf: % Feynman diagram font, 11pt display size, release 0.3.3, 2009 October 8. % % Copyright 1991, 1994, 2001, Norman Gray <norman@astro.gla.ac.uk> % Mercurial revision 204fc9a2e560, 2009-10-08 12:56 +0100 font_identifier "FEYN"; font_size 11pt#; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % First the base ...


4

If you can not remove this (rather pointless) definition as it is being auto-generated, put \newcommand\mathplus{+} in your document preamble so that \mathplus expands to +.


1

I was really forgetting to post how I finally handled it: functions domains modified where necessary (see %% error! in the question code). \documentclass[11pt,twoside]{book} \usepackage[paperheight=24cm, paperwidth=35cm, margin=0pt, % voffset=-140cm, hoffset=-1.4cm]{geometry} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \pagestyle{empty} ...


1

Solution: Simply add pdfauthor={Michael Shell, My institution} to the options of hyperref, i.e. \documentclass[conference]{IEEEtran} \usepackage [pdfusetitle, pdfauthor={Michael Shell, My institution}] {hyperref} \begin{document} \title{A simple test} \author{ \IEEEauthorblockN{Michael Shell} \IEEEauthorblockA{My institution} } \maketitle \end{document} ...


0

\makeindex and \index{} are standard (La?)TeX, and not part of the package makeidx, only \printindex is. So if you miss adding \usepackage{makeidx}, you only get an error at the point where you want to actually print the index, not before. This is a bit confusing.


2

As I explained in the comment, gb4e changes the category codes of character ^ and _, which makes CJK fail to decode Japanese characters. As is suggested in the gb4e doc, you can use \noautomath where you want to disable the special effects of _ and ^. Here is the solution. %!TeX encoding = UTF-8 %!TeX program = pdflatex \documentclass{article} ...


9

You get that error if latex starts trying to typeset paragraphs before \begin{document} has set things up. During that processing the aux file is read (to resolve cross reference information saved on the previous run). It can happen that the aux file is corrupt and so a command in the file is misinterpreted and characters start being interpreted as text to ...


5

The ulem documentation suggests hiding \cite in \mbox and this seems to work: \documentclass[10pt,twocolumn,letterpaper]{article} \usepackage[table]{xcolor} \definecolor{Gray}{gray}{0.85} \definecolor{red}{RGB}{255,0,0} \usepackage{color} \newcommand{\cellem}{\cellcolor{gray}\color{white}} \usepackage{booktabs} \usepackage{multirow} ...


0

The problem is solved by running TeXmaker as an administrator.


3

The best approach is to define a new macro-function. Its name could be value(<tag>): EDIT: the list \ST@functions@with@assign@argument must be updated too. \documentclass{article} \usepackage{spreadtab} \makeatletter \newcommand\ST@func@value[2]{% \ifcsname ST@celltag@\detokenize\expandafter{#1}\endcsname ...


-1

Add \usepackage{float} and put the minipage (with grphics) inside figure. \begin{figure} \begin{minipage} \begin{figure} ... \end{figure} \end{minipage} \begin{minipage} \begin{figure} ... \end{figure} \end{minipage} \end{figure}


0

I am using TexLive 2014 on linux . I experienced same problem. The issue was resolved by adding the following in bashrc ( the shell environment ) PATH="/usr/local/texlive/2014/bin/x86_64-linux:$PATH" and updating actual paths in TexMaker Configuration


2

I know that there is an other way to export data from the tabular: \documentclass{article} \usepackage{spreadtab} \begin{document} \begin{spreadtab}[\STsavecell\savedValue{a1}]{{tabular}{c}} 10 \end{spreadtab} \begin{spreadtab}{{tabular}{c}} \savedValue \end{spreadtab} \end{document} This way do not generate error and may be simpler than putting ...


5

spreadtab doesn't seem very robust if you have tab references within the cell. You can hide the reference in a macro: \documentclass{article} \usepackage{spreadtab} \begin{document} \begin{spreadtab}{{tabular}{c}} 10tag(savedValue) \end{spreadtab} \newcommand\foo{\STtag{savedValue}} \begin{spreadtab}{{tabular}{c}} \foo \end{spreadtab} ...


4

There is an error in nath.sty in the definition of \axis@@, which occurs in the definition of \longrightarrow@ which is invoked by \to (and other commands, including \mapsto). Here is what that definition is: \def\axis@@{\mkern-4.5mu %%% mkern setting adjusted 24 Sept. 2002 \axis@@@\mskip 3mu plus \arrow@expandability mu %%% thanks to E.H. Lohse ...


3

I tried to compile an example in nath documentation: \documentclass[12pt,a4paper]{article} \usepackage{nath} \begin{document} $$ A \to^f_{\text{isomorphism}} B, \qquad a \mapsto^f a’ $$ \end{document} and, while the output is as expected, LaTeX stops with the error message ! Leaders not followed by proper glue. <to be read again> ...


5

Use graphicx (not graphics) \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[scale=1]{example-image} \includegraphics[scale=0.5]{example-image} \end{document}


3

texdoc web2c says --with-editor=cmd Change the default editor invoked by the e interactive command. See Section 3.5.3 [Editor invocation], page 12. Page 12 says that as an alternative to the command line you can set the TEXEDIT environment variable to emacs %s Hint for those who don't know this (like the Original poster): ...


3

I would suspect that your bibliography is in UTF-8 rather than latin1, but one way to see what is causing the error is to redefine the command that makes the error. This document has a control character (129) between aaa and bbb \documentclass{article} \usepackage[latin1]{inputenc} \begin{document} aaaa bbbb \end{document} and normally makes ! ...


6

You need to put the optional argument in the right place, and slightly oddly the value of rulecolor is apparently a command not a colour name \documentclass{article} \usepackage{minted} \definecolor{red}{rgb}{1,0,0} \begin{document} %\tracingall \begin{minted}[rulecolor=\color{red},frame=lines]{c} int main() { printf("hello, world"); return 0; } ...


2

OK, the issue seems to be solved for me. First of all many thank to @UlrikeFischer and @DavidCarlisle for helping me understand the problem. As can be seen in the Update1 section of the question, the system complains for the lack of some font, however that is not the case. I checked it @ C:\Program Files\MiKTeX 2.9\fonts\tfm\mathdesign\mdbch and all the ...


3

As Bernard mentioned, if the list is a new one, you need to set at least the label because, in this case, you are creating a new list from scratch. If you just want to alter attributes of the default lists, you can instead specify enumerate, for example. \documentclass{article} \usepackage{enumitem} \setlist[enumerate,1]{leftmargin=0pt}% if you just want ...


4

Don't put $ inside the equation environment. You can't use math mode (ie, $...$ inside math mode (ie, \begin{equation}... \end{equation}) Don't leave empty lines inside the equation environment. \pia should be \pi a. Note the space. Code: \documentclass{article} \begin{document} \begin{equation} C = \frac{2}{\omega²N²μ\pi a} \end{equation} ...


3

All theorem-like environments, along with center, flushleft, flushright, quote, quotation (and some others) are implemented as lists. For instance, center is defined by % latex.ltx, line 3965: \def\center{\trivlist \centering\item\relax} \def\endcenter{\endtrivlist} and \begin{center} something \item \end{center} would not raise an error, because \item ...


1

The matrix environments of the amsmath package have to be set in math mode. You didn't do that, thus TeX is searching for some $ which enables this math mode. If you put it in $...$, \(...\), \[...\], \begin{displaymath}...\end{displaymath}, \begin{equation}...\end{equation} or \begin{equation*}...\end{equation*}, (and most certainly others...,) it will ...


1

Check your bib file for the line which google, or journal, often add when you export a citation. language={english} delete it, then delte the .bbl and the .aux, then recompile


2

baposter.cls has a rather involved definition of the environment poster, wherein it sets some lengths headerheight, colheight, etc. If you leave the title argument blank and put \setlength{\colheight}{\textheight} after \begin{poster}{...} the headerboxes move to the top. Please try the code below. \documentclass[paperwidth=50cm,paperheight=100cm]{baposter} ...


5

You use \addplot table, but then provide a coordinate stream instead of a table. Also, you say y=Y, but there's no column called Y in your data: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat = newest} \begin{document} \begin{tikzpicture} \begin{axis}[ title={BET Plot ...


1

Too long for a comment: I get no errors with the following document. Note that I've removed all of the packages except the necessary textcomp and pgfplots. If you still have errors, please post the exact error message. \documentclass{article} \usepackage{textcomp} \usepackage{pgfplots} \pgfplotsset{compat = newest} \begin{document} \begin{tikzpicture} ...


2

If you use package hyperref you will get the inbuild bookmarks of hyperref. If you want to configure the bookmarks you can load package bookmark after hyperref. See texdoc hyperref and texdoc bookmark for more information or search this side ;-) Give the following a try: \usepackage[hypcap=true]{hyperref} % hypcap corrects an error pointing to images ...


0

This is an answer to the specific issue raised in your updated question i.e. now we have an MWE. First, do you want to use KOMA or not? To my mind, if you do not generally agree with the design principles laid out in chapter 2 of the manual - or if you are not permitted to abide by them - then you would be better advised to choose another class. These ...


5

Your code has two \documentclass lines so will generate an error whatever document follows. Also never use epsfig package, use graphicx. If you have a problem with \mathbb it would have helped if you had provided an example showing that problem. But you need to load amsfonts package.


2

Here's an example based on one of your other questions: \documentclass[paper=6in:9in,10pt,twoside,pagesize=pdftex,openright]{scrbook} \usepackage{kantlipsum} \begin{document} \kant[1-20] \end{document} This gives me 2 overfull boxes (for 10 pages of text). And this is a text with its fair share of bizarre Kantian terminology which is probably not the ...


5

There are many better solutions. Some short sugestions for a start. More characters in a line is one of the simplest solutions. You should have 60 characters in a line as the starting point. More than, say, 70 can deeply improve the appearance of a paragraph. If you can tolerate occasional too long spaces, \sloppy solves most of the problems. \sloppy means ...



Top 50 recent answers are included