New answers tagged

0 votes
Accepted

table of content file is empty after pdflatex compilation

The \section* command is, in fact, for sections that won't appear in the table of content. Replace them with \section and it'll work. Just removing the two spurrious starts gives the output below.
user avatar
  • 640
2 votes
Accepted

Why are my footnotes using symbols instead of numbers?

The tablefootnote package provides the command \tablefootnote to be used in a table or sidewaystable environment, where \footnote will not work. \documentclass[12pt,a4paper]{article} \usepackage{...
user avatar
  • 24.4k
1 vote

amsmath: Erroneous nesting of equation structures

You want aligned or more likely matrix. But there are much better ways to do what you want. \documentclass{article} \usepackage{mathtools} \usepackage{nicematrix} \DeclarePairedDelimiter{\bra}{\...
user avatar
  • 984k
2 votes

amsmath: Erroneous nesting of equation structures

Since the align environment works as a mathematical context while the inner of matrix is a text context, then align should be revised as aligned to work. The mistakes and codes are improved as follows....
user avatar
  • 2,747
4 votes

How to use U+1F54A (DOVE OF PEACE) with pdfLaTeX?

You can use the twemojis package with \twemoji{1f54a} or \twemoji{dove}. It works with PDFLaTeX. Unfortunately the dove is hard to see against a white background, so here I made the background gray: \...
user avatar
  • 35.6k
6 votes

How to use U+1F54A (DOVE OF PEACE) with pdfLaTeX?

Maybe it's not the exact same symbol, but fontawesome5 has a dove icon. \documentclass{article} \usepackage{fontawesome5} \begin{document} \faDove \end{document}
user avatar
  • 15.4k
8 votes

Should we give up pstricks?

I'd say yes. Overall, I think that it's time leaving Postscript and non-UTF8 encodings behind, and that TikZ is, and has been for years, a good replacement for PStricks. LaTeX evolves slowly, but it ...
user avatar
  • 640
28 votes

Should we give up pstricks?

In my opinion everyone who can should switch to LuaLaTeX. It is much more extensible and therefore much more likely to stay relevant in the future. To make the transition easier especially for ...
user avatar
3 votes
Accepted

Effecting a Shift of an FCOLORBOX within a Simple Lettrine

\fcolorbox will draw a box with the same inner padding and border width in all directions. The longbox allows you to separately set the top, bottom left and right widths of the padding and border. It ...
user avatar
  • 24.4k
0 votes
Accepted

Writing a form-style table

With {NiceTabular} of nicematrix. \documentclass[landscape]{article} \usepackage{nicematrix} \begin{document} \setlength{\tabcolsep}{0pt} \sffamily \begin{NiceTabular}{*{38}{wc{3mm}}} \Block[l]{1-...
user avatar
-1 votes

Writing a form-style table

This is by no means the answer I'm only just starting myself, but it might get you on the right track. \documentclass{article} \begin{document} Name\\\ \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline &...
user avatar
  • 1
1 vote

\mathit{\vec{…}} silently swallows up the vector when using latex/pdflatex and newtxmath

I'm not sure how you could get \vec to forget the italic shape, but a workaround would be to use newtxmath's \vv command instead of \vec. It's another command to add an arrow above other symbols, but ...
user avatar
  • 15.4k
1 vote

What is the code for selecting the top n integers from a list in Latex inside an algorithm?

I'm aware that you're using the pdftex tag, but just in case, here is a solution with LuaLaTeX: \documentclass{article} \usepackage{luacode} \directlua{ function sortf(x, y) return x > ...
user avatar
  • 640
1 vote

What is the code for selecting the top n integers from a list in Latex inside an algorithm?

The solution based only on TeX primitives and basic Plain TeX macros is here: \newcount\selected \def\alist{} \def\scanlist#1 {% \ifx;#1\else \addtoalist\alist{#1}% \ifnum\selected&...
user avatar
  • 51.8k
0 votes

What is the code for selecting the top n integers from a list in Latex inside an algorithm?

Here is an example that selects the n largest integers from a comma-separated list. \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\listmax}{mm}{ % #1: list, #2: n \clist_set:Nn \...
user avatar
  • 2,390
0 votes
Accepted

Long table in four-column document

I would use a list here. I used itemize of course if your first column really is a counter in your real document it can be simplified more and use enumerate I used multicolumn not multicolumn* as ...
user avatar
0 votes

Export two copies of document with a \newif variable toggled on and off

Solution for pdflatex on Unix-based systems Gather the \newif declaration one line, say line 3, of the test.tex: \documentclass{article} \usepackage{blindtext} \newif\ifoption\optiontrue % ...
user avatar
  • 273
8 votes
Accepted

pdflatex stops when both german and hungarian languages are set in babel

magyar.ldf patches the (internal) latex command \@begindocumenthook to inject some code into the aux-file: {\toks@\expandafter{\expandafter\@@magyar@protect@backtick\@begindocumenthook}% \xdef\@...
user avatar
0 votes

Alignment ampersand within \underbrace

If you can use LuaLaTeX, then luamathalign is the best choice. Here's a fixed version, where instead of \underbrace I use the defined command \ubrace that avoids a shortcoming of \underbrace as ...
user avatar
  • 984k
1 vote
Accepted

Alignment ampersand within \underbrace

You can do this with tikzmark: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark,decorations.pathreplacing,calligraphy} \begin{document} \begin{align*} \...
user avatar
  • 19.8k
1 vote

Alignment ampersand within \underbrace

If it's possible to use LuaTeX, then the luamathalign package can be used to solve this problem elegantly. It only requires replacing & with \AlignHere inside the \underbrace. \documentclass{...
user avatar
1 vote

I have installed "mactex" (because I need "pdflatex") but it looks like not opening/working

Solution provided by @AlanMunn in the comments: brew uninstall mactex, download MacTeX.pkg from MacTex website Now, if I type which pdflatex from my Terminal, I get the following: /Library/TeX/...
user avatar
  • 151
7 votes
Accepted

is there a way to produce a similar table in LaTeX?

Here's my attempt using the tabularray package, which I recommend for any complex tables. It comes pretty close; though following your lead I used cyan rows rather than gray. (Muted a little as yours ...
user avatar
  • 35.6k
0 votes

How to put a box around a single page?

\AddToHook{shipout/background} We can draw the frame using tikz and add to background using \AddToHook{shipout/background}{...some code...}: \documentclass{article} \usepackage{lipsum} \usepackage{...
user avatar
  • 1,313
2 votes

How to set the Bibliography title for BibTex in Pandoc

If you're using citeproc, you can put in reference-section-title in the metadata. https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md pandoc --template template.latex --...
user avatar
  • 152
0 votes

Anyone knows how to show DOI or URL in \bibliographystyle{apa}?

You can use biblatex-apa for this purpose. I think that's the only implementation of APA 7 edition as of now. If you are using Zotero citation manager software, it can generate APA 7 bibliography. In ...
user avatar
  • 1
2 votes
Accepted

Tikz Graph: TeX capacity exceeded, sorry [input stack size=10000]

You are using \tikz inside a tikzpicture environment. The manual uses only \tikz. You'll have to choose one. This works for me using a tikzpicture environment: \documentclass[10pt]{article} \...
user avatar
  • 2,390
0 votes

LyX won't let me add flags to the converter

On the Windows version 2.3.6.1, this option is also "buried" in the settings of the document:
user avatar
2 votes

Align works well everywhere but at plus sign

As @daleif comments, the problem could be solved easily by add a {} before & which could protect the space around symbols near &. By the way the codes could be simplified and rewritten as ...
user avatar
  • 2,747
2 votes

Align works well everywhere but at plus sign

Here is a solution using the IEEEeqnarraybox environment from the IEEEtrantools (Appendix F of the documentation) package. This tutorial on typesetting equations also demonstrates the usage of the ...
user avatar
  • 2,732
6 votes
Accepted

Align works well everywhere but at plus sign

No additional package is needed. The root of the issue is the way the columns are align in the aligned structure: rlrlrlr .... To synchronized the alignment two & are needed before the second + ...
user avatar
  • 24.4k
2 votes

PDFLatex producing absurdly large pdf when using axessibility package

Likely Overleaf has modified the structure of the package to set the \pdfcompresslevel=1 which produces a compressed version of the pdf. arXiv has not customized the behavior of this package in any ...
user avatar
  • 673
3 votes

Align works well everywhere but at plus sign

You can use alignedat instead, or \systeme. \documentclass{article} \usepackage{amsmath} \usepackage{systeme}% for the second solution \begin{document} \[ \left\{ \begin{alignedat}{3} a_{11}x_1 &...
user avatar
  • 984k
9 votes

Align works well everywhere but at plus sign

Depending on your desired look, you can just align once at the = signs and let the natural math spacing of LaTeX take care of the rest: \[\left\{ \begin{aligned} a_{11}x_1 + a_{12}x_2 + ...
user avatar
  • 19.8k
3 votes

Align works well everywhere but at plus sign

I have worked out a solution with the array package. \documentclass{scrarticle} \usepackage{amsmath} \usepackage{array} \begin{document} \begin{equation*} \left\{ \begin{array}{...
user avatar
  • 109
0 votes

eps figures with pdflatex

I tried many of the options cited in many posts. It is not epstopdf package, neither -shell-escape. For me, the solution was to install texlive-font-utils
user avatar
  • 1
1 vote

How to give multiple authors same footnote?

acmart (now) supports this directly. From the documentation: Sometimes one may need to have the same footnote connected to several authors. The command \authornotemark[⟨number⟩] adds just the ...
user avatar
  • 138
0 votes
Accepted

About Set of formulas with numbering put in a tables which reported (It's hard to come up with a name)?

I would like to suggest that you not employ a tabular environment. Instead, use (i) a couple of \hrule directives to draw lines that span the width of a column and (b) multline and alignat display ...
user avatar
  • 435k

Top 50 recent answers are included