New answers tagged

0

Either compile in LuaLaTeX/XeLaTeX, or normalize your source file to NFC form. PDFTeX chokes on combining characters, but your accented character most likely has a canonical precomposed form that inputenc can handle. You might be able to do this with iconv -f utf8-mac -t utf8, or here is a little program I wrote that does it.


0

On Windows, you should download the file, and install it for all users (as an Administrator). Installing it as a regular user will not work. If you need it for just one project, you can save it in the project folder. You could also create a local TeX tree and put it there. However, just installing the font for all users is simpler.


0

If you run into this error while using pstricks in general, I found a solution in different question. So give the original author an upvote, if this works for you: % GhostScript 9.53 \usepackage[pspdf={-dALLOWPSTRANSPARENCY}]{pstricks-pdf} % GhostScript < 9.53 \usepackage[pspdf={-dNOSAFER}]{pstricks-pdf}


1

The problem boils down to the following rather minimal example showing the same error. \documentclass{scrbook} % From preambel/preambel.tex \usepackage{titlesec} \titleformat{\section} [hang]%[frame]display {\usekomafont{sectioning}\Large} {\thesection} {6pt} {} [\titlerule \vspace{0.5\baselineskip}] \titleformat{\subsection} [hang] {...


1

For strange reasons, the class does \long\def\addtocontents#1#2{} which is pretty useless because it doesn't even define \tableofcontents and alike commands so it's not a problem having \addtocontents do something. You can avoid the error by replacing \addtocontents with its kernel meaning and do what the class wants later on (even if useless). I'd avoid ...


0

There are a number of solutions proffered at How to obtain verbatim text in a footnote? Is there a particular reason that you're calling \footnotetext directly? If so, some of these may not work, but using fancyvrb and its \SaveVerb/\UseVerb facility may give you what you need. See the documentation for more details.


1

You want to use \cite to do the citations, not \ref. The reason you're seeing a citation undefined message is that \cite gets its information about a reference from the previous run of LaTeX, so you'll need to run LaTeX twice to get the citation resolved. On the first run, you'll see something like the following in your log output: LaTeX Warning: Citation `...


0

As others have already said, the issue is the accented characters, likely in the .bib file. Replace the culprit characters there with the corresponding latex-appropriate e.g. \'{i}.


0

With the excellent nicematrix package and the tikz overlap -- completed in about 4 hours -- the coloring may not be as desired in the columns but I think the code is fairly easy to understand the red!15 can be varied to a darker shade by increasing the percentage of opacity to 30% by writing red!30 the width of the column colors can be varied by the column ...


2

The new version of tasks allows for setting the label formatting in the options of the environment. MWE: \documentclass{article} \usepackage{tikz} \usepackage{tasks} \newcommand*\Choice[1]{% \begin{tikzpicture}[baseline=-5pt] \node[gray,inner sep=8pt,draw=gray!50,rounded corners] {#1}; \end{tikzpicture}} \everymath={\displaystyle} \...


0

The same error occurs if you by accident delete or forget to close a curly bracket } Such as in this example \begin{table} … \label{This is a caption after which you forgot to close the bracket, exactly here --> \end{table}


1

As you've seen nested \discretionaryies are not supported in TeX but as a workaround you can use that in most documents every line will have more than five characters, therefore it is unlikely that both hyphenation opportunities are taken. So usually you can archive your goal with յան\h{֊}{դը}{դ}\h{ըգ֊}{}{գ}նել Of course this technically allows the (wrong) ...


1

You're mixing incompatible packages here - algorithmic (from the algorithms bundle) and algpseudocode (from algorithmicx). Drop the former and make some new definitions for your variables and function calls. Of course, you can change these to suit your liking. \documentclass{article} \usepackage{algorithm} \usepackage[noend]{algpseudocode} \usepackage{...


0

As Joost mentioned in a comment, this can happen when using a specific option for the tocloft package. In my case, I had the following code in the preamble: \usepackage[subfigure]{tocloft} The subfigure option caused the problem. The manual says it best, emphasis mine: This option is required if, and only if, the tocloft and subfigure packages are being ...


9

It depends what exactly your mydoc environment does with \document and when. If you just want for \begin{mydoc} ... \end{mydoc} to be a shortcut for \begin{document} \begin{mydoc} ... \end{mydoc} \end{document} then you can do \AddToHook{env/mydoc/before}{\begin{document}} \AddToHook{env/mydoc/after}{\end{document}} and it will execute \begin{...


1

I can offer an expandable mechanism \UD@CheckWhetherLeadingTokens by means of which you can have LaTeX check by means of macros that process delimited arguments whether a macro argument's leading tokens form a specific set of tokens. \UD@CheckWhetherLeadingTokens is different from \@ifnextchar/\kernel@ifnextchar in several aspects: \UD@...


2

You have defined several times the same symbol font; each \DeclareSymbolFont declaration uses up a math family. I reorganized your preamble in sections, so it's easier to spot duplications. I also added notes about packages not to use. Finally, defining \R as \mbox{$\mathbb{R}$} is wrong: you'll get normal size also in subscripts, for instance. If the aim is ...


1

It’s all the \DeclareSymbolFont commands, on top of packages such as ammsymb. You only have 16 symbol alphabets in legacy TeX. One option is to switch to unicode-math, which removes this limit completely. You can also remove those redefinitions of symbol alphabets. You don’t appear to actually need them. Usually, if you’re using PDFTeX, you want to pick ...


1

EDIT: As pointed out by ejazz, the below is merely a workaround. I reverted with tlmgr by doing $ tlmgr restore latex Available backups for latex: 53958 (2020-10-08 13:20) $ tlmgr restore latex 53958 and now I can compile documents using menukeys again without any error.


3

catoptions is incompatible with a lot of latex code and finally does not work at all in the current latex release. Until it is updated you can roll back the changes as follows \RequirePackage[2020-02-02]{latexrelease} \documentclass[10pt]{article} \usepackage[a4paper,margin=1in]{geometry} %\usepackage{menukeys}% Compilation error \usepackage{catoptions}% ...


0

On Debian or Ubuntu you can install the texlive-latex-extra package. It is a part of texlive-full package which is a lot bigger. sudo apt install texlive-latex-extra


2

The problem is solved in RevTex 4.2e.


2

This might be a problem with special characters (e.g. accents) in your .bib file. My problem was solved thanks to this comment, which suggested simply adding \usepackage[T1]{fontenc} to the preamble of the .tex document.


8

You need to specify as many columns as you use in the table. Do yourself a favor and learn a bit of siunitx for this kind of tables, so the numbers will line up perfectly. I also recommend booktabs for the better rules. I lined up also the input, but it's not required: it's just easier to read the code and maybe fix faulty entries. Note that \centerline is ...


1

You need to add more columns to your table. \begin{tabular}{llrlll} … \end{tabular} \begin{table}[!ht] \centering{\begin{tabular}{llrlll} \hline \hline \cline{1-2} Område & Area & x & y & $Ax$ & $Ay$ \\ \hline \hline Triangeln & 157,5 & 14,83 & 6 & 2335,25 & 945 \\ Halvcirkeln & 127,17 & 5,18 & 9 & 658,...


4

You can use the es-notilde option to babel for nowadays the shorthands ~n and ~N are no longer needed, since you can directly type in ñ and Ñ. \documentclass{article} \usepackage[spanish,es-notilde]{babel} \usepackage{polynom} \begin{document} \polylongdiv[style=D]{x^5}{x^3+2x^2+9x+8} \end{document} Alternatively, patch the relevant macro in polynom.sty ...


3

Use \shorthandoff*{~} in a group before the macro: \documentclass{article} \usepackage[spanish]{babel} \usepackage{polynom} \begin{document} {\shorthandoff*{~} \polylongdiv[style=D]{x^5}{x^3+2x^2+9x+8}} \end{document}


0

Indeed the solution is an update. I starting today facing the same problems you describe and as you can see from the picture everything was from 2018: After the update, the problem was solved.


4

When you make the list with e.g. 3 / 2 / 1, the space is actually included, and it becomes included in the node name as well. Hence, if you were to do \draw (3 ) -- (4 );, note (X<space>), it works. Probably better to define the list without the spaces in the first place, i.e. 3/2/1. \documentclass[border=5mm]{standalone} \usepackage{tikz} \begin{...


3

This issue was also reported at the biblatex bugtracker (https://github.com/plk/biblatex/issues/1044) and should be resolved on the biblatex side in the upcoming biblatex release. The workaround biblatex now uses to avoid the problem is to isolate the problematic ^^^^200b to a file that is only read by the Unicode engines, where it is apparently not ...


4

This is an unfortunate side effect of using the pdfx package. A simpler example is \documentclass{article} \usepackage{pdfx} \begin{document} \iffalse ^^^^200b \fi \end{document} You could make the catcode of character 30 normal (12) rather than invalid (15) \documentclass{article} \usepackage{pdfx} \catcode30=12 \begin{document} \iffalse ^^^^200b ...


0

@IanThompson gave me a solution and it was literally it. You can either manually download the latest version or you can use the MiKTeX console to automatically update it. I did the latter and it solved the problem. to find the MiKTeX console, try to search your start bar by typing "MiKTeX console".


0

Install package "symbol" to solve your mistake. Start MiKTeX's Package Manager (Start -> Programs -> MiKTeX 2.8 -> Maintenance (Admin) -> Package Manager) and make sure to install the package "symbol".


1

I ran into the same issue, and in my case, simply removing the package bm was sufficient to remove the error message.


1

The problem is the undesirable use of {} in \edef\lastrecorddate{\expandafter\datetoint\lastrecorddate@debug{} } Because of this, \lastrecorddate does not expand to a <number>, nor can its expansion be completed to form a <number>. However, a <number> is required before the comparison operator in \ifnum tests. When \lastrecorddate is put ...


0

I tried using MikTex instead of TexLive and it works now.


Top 50 recent answers are included