Hot
- A question about matrixby Jasmine on October 29, 2025 at 7:48 pm
How can I add the numbers $k$ and $n-k$ as in the figure?
- Empty matrix with a colored row or columnby Antonio Sesto on October 29, 2025 at 6:37 pm
I am trying to typeset an empty matrix with a colored row or column. I know how to do it using tikz, but would rather not use it - if possible. I made some attempts, but the colored row (rectangle) overlaps the left bracket and is typeset below the right bracket. Do you have any suggestions? You can see my attempts below: \documentclass[10pt]{article} \usepackage[usenames]{color} %used for font color \usepackage{amssymb} %maths \usepackage{amsmath} %maths \usepackage[utf8]{inputenc} %useful to type directly diacritic characters \usepackage[table]{xcolor} \usepackage{nicematrix} \begin{document} \begin{equation*} % \begin{bmatrix} \rowcolor{red} \ & & \\ \ & & \\ \ & & \\ \end{bmatrix} % \qquad % \left[ \begin{array}{@{}ccc@{}} \rowcolor{green} \ & & \\ \ & & \\ \ & & \\ \end{array} \right] % \qquad % \begin{bNiceMatrix}[] \rowcolor{blue} \ & & \\ \ & & \\ \ & & \\ \end{bNiceMatrix} \end{equation*} \end{document} The output is:
- tex4ebook and background imageby G. Bay on October 29, 2025 at 5:22 pm
Yes, another tex4ebook question. This time I am having issues with background images. The generated ePub simply has no image at all. Is it not possible at all? Maybe we should create an \if and replace this with simple includegraphics...? \PassOptionsToPackage{usenames,dvipsnames,svgnames,table,x11names}{xcolor} \documentclass[openright]{memoir} \usepackage{graphicx} \usepackage[english]{babel} % \usepackage{mwe} \usepackage[placement=center,pages=some]{background} \begin{document} \BgThispage \backgroundsetup{scale=1,opacity=1, angle=0,contents={\includegraphics[height=1\paperheight]{Imagens/Capa/Wiesen_bei_Greifswald.jpg} } } \chapter{title} text \section{test} text \chapter{another} \end{document} michal.h21 will either love me or hate haha.
- Is there a simpler way to accomplish the \ifx construction described belowby John Forkosh on October 29, 2025 at 5:03 pm
I'm working on a long document that will eventually take the general form %<preamble stuff> \begin{document} \input{doc1} \input{doc2} \etc \end{document} And while writing it all, I want to separately run pdflatex on each of the doc1,doc2,etc, just to carefully think about each without all the surrounding mess. I successfully did that as illustrated by the "minimum working example" below, but that is itself somewhat of a mess. So I'm hoping you can suggest a simpler way to accomplish the same thing. I separated the <preamble stuff> into a separate file, which for our "mwe" is % --- preamtext.tex --- \documentclass[12pt]{article} \newcommand{\preaminp}{preamble text inputted} % --- other preamble commands, etc --- \newcommand{\spinor}[2]{\ensuremath{\left({{#1}\atop {#2}}\right)}} % --- end-of-file preamtext.tex --- And the "main" file, so to speak, is just % ---test.tex -- \input{preamtext} \begin{document} \input{doc1} %\input{etc} \end{document} % --- end-of-file preamtest.tex --- Finally, each doc1,doc2,etc is of the general form % --- doc1.tex --- \ifx\preaminp\undefined \input{preamtext} \begin{document} \newcommand{\preamend}{\end{document}} \else \newcommand{\preamend}{ } \fi Hello, world. This is a test, albeit a silly one: \spinor ab. \preamend % --- end-of-file doc1.tex --- So each such doc will check whether or not \preaminp is defined. If not, it will itself \input the preamble stuff, and insert a \begin{document} and \end{document} for a complete self-contained document. If \preaminp is defined, it does none of that. Bib stuff will be similalry handled, but not necessary for our mwe, though it does add to the overall mess introduced by this hack. Nevertheless, it does seem to work okay, i.e., pdflatex test.tex and pdflated doc1.tex both produce the same pdf file, illustrating the example \spinor command from the preamble. But is there any simpler way to accomplish this mess? Thanks.
- LyX: Compiling problem - missing glyphsby יהונתן אדיב on October 29, 2025 at 3:43 pm
Hi I try to compile a hebrew file and it gives me this message:
- LuaLaTeX + hvlogos : missing characterby projetmbc on October 29, 2025 at 1:09 pm
Can we fix the following problem obtained with the tiny M(not)WE below? Missing character: There is no 𝑂 (U+1D442) in font cmr10! M(not)WE used. % !TEX TS-program = lualatex \documentclass{article} \usepackage{hvlogos} \begin{document} $O$ \end{document}
- Column offset tabularrayby Fractal on October 29, 2025 at 12:45 pm
I almost managed to reproduce this table, but there is a difference between the first three lines and the rest of the table. What I tried : \documentclass{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{tabularray} \usepackage{adjustbox} \begin{document} \begin{center} \begin{adjustbox}{width=1.05\textwidth,center=\textwidth} \begin{tblr}{ colspec={Q[l]Q[l]Q[c]Q[c]Q[c]Q[c]Q[c]Q[c]}, hlines, vlines, % Variante testée : même souci si j'active ceci % cell{1}{3}={c=5}{}, cell{2}{3}={c=5}{}, cell{3}{3}={c=5}{}, } \bfseries Immobilisation & Matériel et outillage & \SetCell[c=5]{l}{\bfseries VNA au 31-12-2021} &&&& & 102\,600 DH \\ \bfseries Durée de vie & 5 ans & \SetCell[c=5]{l}{\bfseries Valeur d’entrée} &&&& & 450\,000 DH \\ \bfseries Mode et coefficient & Dégressif ; 2 & \SetCell[c=5]{l}{\bfseries Date d’entrée} &&&& & 01-02-2019 \\ \bfseries Périodes & \bfseries VNA début de période & \bfseries TD & \bfseries TC & \bfseries TR & \bfseries Annuité & \bfseries Amortissements cumulés & \bfseries VNA fin de période \\ 2022 & & 40 & 48 & & & & \textbf{26 \, 208} \\ 2023 & & & & & & & \\ 2024 & & & & & & & \\ \end{tblr} \end{adjustbox} \end{center} \end{document} The result :
- Problem with sans-serif compiled PDFby Brasil on October 29, 2025 at 12:39 pm
I want to write an article in Portuguese using sans-serif font. I face the following problem: the generated PDF can't handle selection of words with accents (see the GIF below). Can anyone help, please? This is my MWE: \documentclass[12pt]{article} \usepackage[brazil]{babel} \usepackage[a4paper, top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry} %... handles paper layout \usepackage[scaled]{helvet} %... sets text font to helvetica \renewcommand{\familydefault}{\sfdefault} \usepackage{indentfirst} %... força indentação (recuo) do primeiro parágrafo \usepackage{setspace} \onehalfspacing %... espaçamento entre linhas: 1.5 \usepackage{hyperref} %... personalizes links \hypersetup{ colorlinks=true, linkcolor=black, filecolor=black, citecolor=black, urlcolor=black, } \title{Problemas com o uso de fonte \textit{sans-serif} no \LaTeX} \author{Fulano de Tal} \begin{document} \maketitle \begin{abstract} O presente relatório é sobre o estudo dos fenômenos fundamentais da Óptica Geométrica: a reflexão e a refração da luz em interfaces planas. A luz, ao se propagar de um meio para outro ou ao incidir sobre uma superfície, interage de maneiras que podem ser descritas e modeladas por leis físicas bem definidas. \end{abstract} \end{document}
- Selectively Shift Axis Ticks in 3D Plotby Ludger on October 29, 2025 at 12:36 pm
I am currently working on a 3D surface plot in which both x-, and y-axis are logarithmic. The issue I am facing and why I am posting is that the measurements are too close to each other, and I hence end up with overlapping axis ticks on the x-, and y-axis. Is there a good way to transform individual ticks, bet it an odd/even selection, or directly picking out individual ticks and then shifting them? Thank you for your help! \documentclass[crop,tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \usepgfplotslibrary{groupplots} \usepackage{xcolor} \begin{document} \begin{tikzpicture} % Ablation 1 (Linear System) \begin{axis}[ grid=major, tick align=outside, tick pos=left, view={210}{30}, xmin=0.0001, xmax=0.05, xmode=log, ymin=0.0001, ymax=0.0005, ymode=log, xtick={0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05}, xticklabels={$10^{-4}$, $5 \cdot 10^{-4}$, $10^{-3}$, $5 \cdot 10^{-3}$, $10^{-2}$, $5 \cdot 10^{-2}$}, ytick={0.0001, 0.0005}, yticklabels={$10^{-4}$, $5 \cdot 10^{-4}$}, ] \addplot3+ [mesh,scatter] table { 0.0001 0.0005 10 0.0001 0.0001 10 0.0005 0.0005 11 0.0005 0.0001 11 0.0010 0.0005 12 0.0010 0.0001 12 0.0050 0.0005 13 0.0050 0.0001 13 0.0100 0.0005 14 0.0100 0.0001 14 0.0500 0.0005 16 0.0500 0.0001 16 }; \end{axis} \end{tikzpicture} \end{document}
- Error with `\DocumentMetadata` and nicematrixby Keks Dose on October 29, 2025 at 12:00 pm
TexLive 2025, up to date MWE: \DocumentMetadata{pdfstandard=A-2b, lang=de-DE, pdfversion=1.7} \documentclass{article} \usepackage{nicematrix, array} \begin{document} \begin{NiceTabular}{p{4em}p{4em}p{4em}} \multicolumn{3}{p{8em}}{Überschrift}\\ $\downarrow$ & zwei & drei \\ \end{NiceTabular} \end{document} % Local Variables: % TeX-engine: luatex % End: Works, if I comment out the first line. Throws errors otherwise, first one: ./251029-lua-dev-nicematrix.tex:9: Use of \@@array doesn't match its definition. \@ifnextchar ...\reserved@d = #1\def \reserved@a { #2}\def \reserved@b {#3}\f... It took me hours to boil my file down to this mwe. The \downarrow line threw errors with the developer version of LuaLaTeX, I had to replace it with \(\downarrow\). And for whatever reason another error isn't visible, but there was another error with the dev version. I added here the tag "tagged-pdf", because neither "documentmetadata", nor PDF-management were predefined. Feel free to change to better fitting tag of this question.
- \bullet is causing a 'missing character ... in nullfont!'by user1850133 on October 29, 2025 at 11:45 am
It seems that \bullet is causing a problem in environment using a complex character set. In my code where I created a NewDocumentEmvironment using a tblr, the problem appears only once, that's the at the first use of the environment. It seems that the problem is not related to beamer. MWE \documentclass[aspectratio=169,t]{beamer} \mode<presentation> \usepackage{tabularray} \usepackage{polyglossia} \newfontfamily\devanagarifonttt[Script=Devanagari]{NotoSansDevanagari} \newfontfamily\devanagarifont[Script=Devanagari]{NotoSerifDevanagari} \newfontfamily\devanagarifontsf[Script=Devanagari]{NotoSansDevanagari} \setmainlanguage{sanskrit} \setmainfont[Script=Devanagari]{NotoSansDevanagari} \NewDocumentEnvironment{tblrnew}{+b}{ \begin{tblr}{ll} \SetCell[c=2]{l} \bullet\hspace{.4ex} #1 \end{tblr} }{} \begin{document} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{tblrnew} अ&\\ \end{tblrnew} \column{.5\textwidth} \begin{tblrnew} अ&\\ \end{tblrnew} \end{columns} \end{frame} \begin{frame} \begin{columns}[t] \column{.5\textwidth} \begin{tblr}{l} \bullet अ\\ \end{tblr} \column{.5\textwidth} \bullet अ \end{columns} \end{frame} \begin{frame} \begin{tblrnew} अ&\\ \end{tblrnew} \end{frame} \end{document}
- How to Outline Index Heading Letters? [duplicate]by DDS on October 29, 2025 at 11:14 am
Consider the code: \RequirePackage{filecontents} \begin{filecontents*}{\jobname.mst} %delim_0 "\\IndexDotfill " %delim_1 "\\IndexDotfill " headings_flag 1 heading_prefix " \\IndexHeading{" heading_suffix "}\n" \end{filecontents*} \documentclass{book} \usepackage{xcolor} \let\cleardoublepage\clearpage \usepackage{imakeidx} \makeindex \usepackage{idxlayout} \usepackage[tikz]{bclogo} \usetikzlibrary{calc,shapes.callouts,shapes.arrows} \newcommand*{\IndexDotfill}{% \nobreak\dotfill\ \nobreak } \renewcommand*{\indexspace}{% \par \vspace{25pt plus 6pt minus 4pt}% } \newcommand*{\IndexHeading}[1]{% \vspace{27pt} \hfil \tikz\node[ rounded corners=5pt, draw=black, fill=black!43, line width=1.3pt, inner sep=10pt, align=center, font=\sffamily\bfseries\Large\color{white}, text=white, minimum width=1.25in ] {#1};% \nopagebreak \par \vspace{2mm}% \hfil } % Make all page numbers in index bold \let\oldindex\index \renewcommand{\index}[1]{% \oldindex{#1|textbf}% }% \begin{document} \LARGE \newpage This is a sentence.\index{S Subheading@\textbf{{Subheading}}!A subentry} \index{S Subheading@\textbf{{Subheading}}!Another subentry} \index{S Subheading@\textbf{{Subheading}}!Yet another subentry} \idxlayout{columns=1} \printindex \end{document} which produces the Index: QUESTION: How may I outline the white heading letters (in this case `S') with black? Thank you.
- Tikz-feynman vertex labelsby Beth Long on October 29, 2025 at 11:14 am
I wanted to make the following feynman diagram with tikz-feynman The code below gives me the following diagram: Is there a way to move the edge labels further towards the outermost vertex? \documentclass[a4paper,12pt]{article} \usepackage[compat=1.0.0]{tikz-feynman} \begin{document} \feynmandiagram [horizontal=i1 to o1] { i1 -- [fermion, very thick, edge label=\bf{s}] v1 -- [fermion, very thick, edge label'=\bf{u,c,t}] v3 -- [fermion, very thick, edge label'=\bf{u,c,t}] v2 -- [fermion, very thick, edge label=\bf{d}] o1, v1 -- [photon, very thick, edge label=\(\bf{W}\)] v2, v3 -- [photon, very thick, edge label'=\(\bf{Z}\)] v4, %label' puts label below/to the right i2 -- [fermion, very thick, edge label=\bf{Nu}] v4 -- [fermion, very thick, edge label=\bm{\nu}] o2 }; \end{document}
- Tikz-feynman verticesby Beth Long on October 29, 2025 at 11:13 am
The code below gives me the following diagram: Why does i2 correspond to a final state vertex? \documentclass[a4paper,12pt]{article} \usepackage[compat=1.0.0]{tikz-feynman} \begin{document} \feynmandiagram [horizontal=i1 to o1] { i1 -- [fermion, very thick, edge label=\bf{s}] v1 -- [fermion, very thick, edge label'=\bf{u,c,t}] v3 -- [fermion, very thick, edge label'=\bf{u,c,t}] v2 -- [fermion, very thick, edge label=\bf{d}] o1, v1 -- [photon, very thick, edge label=\(\bf{W}\)] v2, v3 -- [photon, very thick, edge label'=\(\bf{Z}\)] v4, %label' puts label below/to the right i2 -- [fermion, very thick, edge label=\bf{Nu}] v4 -- [fermion, very thick, edge label=\bm{\nu}] o2 }; \end{document}
- bropd and yathesis compatibilityby 20-sided-dice on October 29, 2025 at 11:01 am
I usually use the bropd package, which provides an automatic way to alternate different kinds of brackets with the \br command. They even automatically change size to accomodate their content. This greatly improves the readibility of large formulae. Here is a minimal example showing how it is supposed to work \documentclass[english]{article} \usepackage{bropd} \begin{document} \begin{equation} \br{\br{n+1}\br{\sum_{i=1}^n i+n\br{n+3\br{n+2}}}}^2 \end{equation} \end{document} Unfortunately, the \br command specifically is incompatible with the yathesis package I intend to use, which provides a very complete template for PhD theses, following the french legal requirements. A friend of mine suggested the following correction in a minimal example \listfiles{} \RequirePackage{bropd} \NewCommandCopy{\Br}{\br} \let\br\relax \documentclass[mainlanguage=english]{yathesis} \usepackage[T1]{fontenc} \begin{document} \begin{equation} \Br{\Br{n+1}\Br{\sum_{i=1}^n i+n\Br{n+3\Br{n+2}}}}^2 \end{equation} \end{document} It did repair the now \Br command in the sense that now it does produce brackets, which automatically match the size of their content. But it does not alternate anymore. The documentation of the bropd package does explain the implementation of the \br command but I am not savy enough to know how to proceed.
- spath3: bridges at nodes (rather than intersections)by BGaraiko on October 29, 2025 at 8:51 am
How can spath3 split a path at its coordinates? I have used spath3 to mark line intersections with an arc, but now I want the same arcs at the coordinates my line runs through. My understanding of the documentation is not sufficient to apply split at in a correct way. \documentclass[tikz]{standalone} \usetikzlibrary{spath3,intersections} \begin{document} \begin{tikzpicture} \path[nodes={circle,fill=red}] (-1.5,-.6) node(a) {a} (-.9, -.2) node(b) {b} (-1.5,1.5) node(c) {c} (-.3, .7) node(d) {d} (.5, 1.7) node(e) {e} (1.1, 1.1) node(f) {f} (.3, -.6) node(g) {g} (1.8, -.7) node(h) {h}; \path[spath/save=mainline] plot [smooth, tension=1] coordinates {(a) (b) (c) (d) (e) (f) (g) (h)}; \path[spath/save=arc] (0,0) arc[radius=1cm,start angle=180, delta angle=-180]; \tikzset{ % spath/split at intersections with={mainline}{???} spath/insert gaps after components={mainline}{5mm}, spath/join components with={mainline}{arc} } \draw[->,spath/use=mainline,line join=round]; \end{tikzpicture} \end{document}
- What is the meaning of "escapeinside=\#\%" in minted package in LaTeX?by Y. zeng on October 29, 2025 at 8:45 am
With or without escapeinside=\#\% in minted package, the result is the same. So, what is the meaning of escapeinside=\#\%? \documentclass{article} \usepackage{minted} \setminted{escapeinside=\#\%} \begin{document} \mintinline{html}{50\%} \end{document} \documentclass{article} \usepackage{minted} \begin{document} \mintinline{html}{50\%} \end{document}
- How to remove the space between text and table created by "tabularray" in LaTeX?by Y. zeng on October 29, 2025 at 6:31 am
There is too much space between the text and the table created by tabularray in LaTeX. How to reduce it or remove it? \documentclass{article} \usepackage[a4paper]{geometry} \usepackage{tabularray} \usepackage{lipsum} \begin{document} \lipsum[5] \begin{longtblr}[ ]{ colspec={X[r,7em] X[l]}, } 1&2\\ 3&4\\ \end{longtblr} \end{document}
- Asymptote can't draw figures with fillby user386618 on October 29, 2025 at 4:47 am
Recently i updated my windows and after some compilations, my asymptote setup started to give that error after trying to draw file with fill command, i tried to reinstall ghostscript and asymptote itself but that doesn't help if(!settings.multipleView) settings.batchView=false; settings.tex="pdflatex"; defaultfilename="Grid Coloring-1"; if(settings.render < 0) settings.render=4; settings.outformat=""; settings.inlineimage=true; settings.embed=true; settings.toolbar=false; viewportmargin=(2,2); import geometry; size(2.5cm); for(int i=0; i<10; ++i){ for(int j=0; j<10; ++j){ path p=(i,j)--(i+1,j)--(i+1,j+1)--(i,j+1)--cycle; if(i%2==0){ fill(p, gray+opacity(0.5));} draw(p);}} I tried to compile that file That's what asy --version return miktex-asy version 2.88 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince] ENABLED OPTIONS: WebGL 3D HTML rendering OpenGL 3D OpenGL rendering CURL URL support DISABLED OPTIONS: V3D 3D vector graphics output SSBO GLSL shader storage buffer objects GSL GNU Scientific Library (special functions) FFTW3 Fast Fourier transforms Eigen Eigenvalue library XDR External Data Representation (portable binary file format for V3D) LSP Language Server Protocol Readline Interactive history and editing Editline interactive editing (if Readline is unavailable) Sigsegv Distinguish stack overflows from segmentation faults GC Boehm garbage collector threads Render OpenGL in separate thread
- How to define a new "longtblr" environment with "tabularray" in LaTeX?by Y. zeng on October 29, 2025 at 3:33 am
I want to define a new longtblr environment with tabularray in LaTeX by the name of mytblr, but it isn't a longtblr environment here. What the problem and how to creat a new longtblr environment? \documentclass{article} \usepackage{tabularray} \NewTblrEnviron{mytblr} \DeclareTblrTemplate { caption-tag } {mytblr} {} \DeclareTblrTemplate { caption-sep } {mytblr} {} \begin{document} \begin{mytblr}{colspec={X[r] X[l]},} block & hello\\ \end{mytblr} \end{document}
- Centering Loop in rectangleby Nick B on October 28, 2025 at 11:38 pm
I am trying to create this image from Bryan Passwater. I can move my digits around, and would like the numbers to be centered (same distance from border on each side (see image). Is there a better way to make this? \documentclass{article} \usepackage{parskip,fullpage,hyperref} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \usetikzlibrary{backgrounds} %<- New Today \title{Drawing in the Background Using TiKZ} \author{\href{https://www.youtube.com/@UnlockingLaTeXGraphics}{@UnlockingLaTeXGraphics}} \date{} \begin{document} \begin{tikzpicture}[font=\Huge] % box (width 14, height 2) \draw (0,0) rectangle (14,2); % digits 0..9, evenly spaced from x=1 to x=13 at mid-height y=1.5 \foreach \n in {0,...,9} \node[align=center] at ({1 + 1.32*\n}, 1) {\n}; \end{tikzpicture} \end{document}
- Tex4ebook with unnumbered sectionby G. Bay on October 28, 2025 at 10:59 pm
I can't seem to get unnumbered sections to work with tex4ebook. I need all my chapters and sections to be unnumbered and appear in the ToC using memoir (so starred version wouldn't fit). I have read some old questions with similar problems, but my example seems to me much simpler. I get ! Undefined control sequence. <argument> \Hy@SectionHShift l.49 \section{test} MWE: \PassOptionsToPackage{usenames,dvipsnames,svgnames,table,x11names}{xcolor} \documentclass[openright]{memoir} \usepackage{graphicx} \usepackage[english]{babel} % \usepackage{mwe} \usepackage{tex4ebook} \usepackage[unicode]{hyperref} \hypersetup{hidelinks} \usepackage{calc} \usepackage{etoolbox} \renewcommand{\chapternumberline}[1]{}% Gobble chapter number in ToC \renewcommand{\numberline}[1]{}% Gobble section number in ToC \renewcommand{\cftchapterdotsep}{\cftdotsep}% Chapter dots in ToC \setsecnumdepth{none} %\maxsecnumdepth{none} % Hide chapter number in document heading \renewcommand{\printchapternum}{} %\setcounter{secnumdepth}{0} %this also breaks it \setbeforesecskip{-\baselineskip} \setaftersecskip{1sp} \begin{document} % \begingroup % \thispagestyle{empty} % \addtocontents{toc}{\protect\pagestyle{empty}} % \addtocontents{toc}{\protect\thispagestyle{empty}} % \tableofcontents* % \addtocontents{toc}{\protect\pagestyle{empty}} % \addtocontents{toc}{\protect\thispagestyle{empty}} % \thispagestyle{empty} % \endgroup % \newpage \chapter{title} text \section{test} text \chapter{another} text \chapter{another} text \chapter{another} text \chapter{another} text \end{document} This time I have properly tested and clean all auxiliary files many times 🙂
- wrapfigure conflict with custom commandby Daniel Neskorodov on October 28, 2025 at 9:51 pm
I have this annoying problem with wrapfigure and my custom \task command. Here's MWE: \documentclass[a4paper,12pt]{article} \usepackage{wrapfig} \usepackage{graphicx} \usepackage{lipsum} \newcounter{taskNum} \newcommand{\task}[1]{% \vspace{0.1cm}\par\noindent \begin{minipage}[t]{\textwidth}% \addtocounter{taskNum}{1}% \textbf{Problem \arabic{taskNum}. }#1% \vspace{0.1cm}% \end{minipage}% } \begin{document} \task{ \begin{wrapfigure}{r}{0.4\textwidth} \vspace{-2em} \centering \includegraphics[width=0.4\linewidth]{example-image} \vspace{-1em} \end{wrapfigure} \lipsum[1] } \end{document} And here's how it ruins the first line: I want my problem statement starting right after problem 1. How do I do that?
- Center align an arbitrary equation within an aligned environment?by jII on October 28, 2025 at 8:07 pm
Is it possible to center align an arbitrary equation within an align environment (or similar), with equation numbers for each line? For example \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \\ x&=1 (\mbox{center this line}) \end{align} Attempt 1 Using a sequence of two align. Requires manually adjusting spacing such as \setlength{\belowdisplayskip}{0pt} to avoid large gap, which may lead to inconsistent spacing \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \end{align} \begin{align} x = 1 \end{align} Attempt 2 Use gather + aligned. But this approach does not give each line its own number. \begin{gather} \begin{aligned} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \end{aligned} \\ y = 1 \end{gather} Attempt 3 Use multispan. Equation of last line is too far. \begin{align} x & =y & w & =z \\ 2x & =-y & 3w & =\frac{1}{2}z \\ \multispan{4}{\hfill $y = 1$\hfill} \end{align}
- making the includepdf command betterby user2925716 on October 28, 2025 at 8:01 pm
I have a code like this: And I wish to put the 2 pages closer the left one to the right and the right one to thye left. How can I achieve that? \documentclass[landscape,a4paper]{article} \usepackage{pdfpages} \usepackage[bidi=bidi, hebrew, provide=*,english]{babel} \babelfont{rm}{Arial} \usepackage{fancyhdr} \setlength{\footskip}{34pt} \fancypagestyle{Moreimportedpages2}{%for this MWE <<<< \fancyhf{}% Clear header/footer \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% \fancyfoot[C]{% \foreignlanguage{hebrew}{\localecounter{letters}{page}} \raisebox{-\baselineskip}[30pt][40pt]{\thepage} }% } \begin{document} \includepdf[%[scale=\scale,noautoscale,nup=2x1,pages=1-,delta={\delta} 0pt, offset=0pt -3mm,% offset in reverse order trim=0.2cm 1.5cm 1.5cm 1.5cm, pages=-, nup=2x1,% 1 row; 2 cols pages=-,% pagecommand=\thispagestyle{Moreimportedpages2}, ]{companion.pdf} \end{document}
- How do I make a quantum circuit with parititioned maximally entangled states?by jrobins on October 28, 2025 at 6:24 pm
I want to make a quantum circuit (with possibly quantikz) that starts in a maximally entangled state for which each tensor factor is partitioned. That is, I want to replicate some of the quantum circuits as below (from https://arxiv.org/abs/1911.06314, p26): I know quantikz has the command \makeebit[s]{l} (p13), but it seems like it's only possible to use it for the lines connecting Br and Bl on the right hand side, not both and not either side. I am looking for a way to at least replicate the right side of the figure, preferably also the left side and preferably using a package. Is that possible? A satisfactory answer would be: some command like \eebit that generates the drawn line as in the 'desired outcome' some alternative tensor graphing package that does the job I'd greatly appreciate your considerations and thanks in advance. MWE \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{quantikz2} \input{preamble} \begin{document} \begin{quantikz} &\\ \makeebit[angle=-20]{$\ket{\text{epr}}$} &\\ &\\ & \end{quantikz} \end{document} outcome MWE vs desired outcome
- Exam document similar to word, Tahoma font 11, 1.5 spacing Texlive on Linuxby Freeman on October 28, 2025 at 3:44 pm
Kindly assist, I am required to typeset a high school science exam paper using Tahoma font size 11 and double spacing. However, I am using Linux and the online web version is not working well, how can I produce that, using Tahoma, not Tahoma-lookalikes \documentclass[12pt,a4paper]{exam} \usepackage[margin=2cm]{geometry} % Use fontspec for Tahoma (requires XeLaTeX) \usepackage{fontspec} \setmainfont[ Path = /usr/share/fonts/truetype/msttcorefonts/, % adjust path if needed UprightFont = *, BoldFont = *bd, ItalicFont = *i, BoldItalicFont = *bi ]{Tahoma} % Tighter baseline spacing for Tahoma readability \linespread{1.5} % Layout controls \usepackage{enumitem} \setlist[enumerate]{leftmargin=*, labelindent=0pt, itemsep=6pt, topsep=6pt} \usepackage{array} \usepackage{booktabs} \begin{document}
- How to get stripes in sections?by Ñupi on October 28, 2025 at 3:08 pm
I'm trying to get the section title to have lines like the image. I've tried two ways but haven't been able to get it right. Perhaps you have a more suitable and elegant option? Thank you in advance. I tried to do it in two ways. first try: \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} % Define the stripe color \definecolor{franjacolor}{RGB}{0,102,204} % ---- Custom macro: left stripe before number ---- \newcommand{\SectionLeftStripe}[1]{% % draw a small rule (stripe) on the left, aligned with the number \color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\hspace{0.8em}% \color{black}#1% } % ---- Section format ---- \titleformat{\section} {\normalfont\Large\bfseries} % format of text {\SectionLeftStripe{\thesection.}} % number preceded by stripe {0.5em} % space between number and title {} % title text follows normally % ---- Section spacing ---- \titlespacing*{\section}{0pt}{3ex plus 1ex minus .2ex}{2ex plus .2ex} \begin{document} \section{Introduction} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Development} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Conclusion} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text \end{document} Second try \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} \usepackage{calc} % Define stripe color \definecolor{franjacolor}{RGB}{0,102,204} % --- Custom macro: left/right stripes with section number --- \newcommand{\SectionSideStripes}[1]{% \noindent % Left stripe \color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\hspace{0.8em}% % Section number + title \color{black}#1% % Right stripe \hspace{0.8em}\color{franjacolor}\rule[0.6ex]{1.2em}{1pt}\par } % --- Section format --- \titleformat{\section} {\normalfont\Large\bfseries} % font and weight {\thesection.} % section number (with dot) {0.5em} % space between number and title {\SectionSideStripes} % macro for stripes % --- Spacing before/after section title --- \titlespacing*{\section}{0pt}{3ex plus 1ex minus .2ex}{2ex plus .2ex} \begin{document} \section{Introduction} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Development} text text text text text text text text text text text text text text text texttext text text text text text text texttext text text text text text text text \section{Conclusion} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text \end{document}
- Vertical spacing front matter in table of contentsby MathematicallyUnsound on October 28, 2025 at 10:01 am
I'd like to group my front matter entries together in the table of contents so that there is no vertical space between them. Here's my current code: \frontmatter \chapter*{Abstract} % Abstract here \setcounter{page}{1} \pagestyle{headings} \addcontentsline{toc}{chapter}{Abstract} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \tableofcontents \listoffigures \addcontentsline{toc}{chapter}{\listfigurename} {\let\cleardoublepage\relax \listofalgorithms} \addcontentsline{toc}{chapter}{\listalgorithmname} My current contents page looks like this: I'd like to keep all the rest of the spacing between chapters exactly as is, though move the abstract, list of figures, and list of algorithms together to eliminate the two gaps in between them. How do I go about this?
- Lualatex issue with luaotfload using WSL on Windows 10by Jacek Guzik on October 28, 2025 at 9:53 am
I'm having trouble running Lualatex in WSL on Windows 10. The same latex file runs smoothly on Linux with Lualatex (both from Texlive 2023). I'm attaching an error message. Thanks! This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Debian) restricted system commands enabled. (./tests.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> luaotfload | init : No match for requested fontloader "fontloader-2023-08-19.lua". luaotfload | init : Defaulting to predefined fontloader "reference". luaotfload | load : FATAL ERROR luaotfload | load : × Failed to load "luaotfload" module "multiscript". luaotfload | load : × Error message: luaotfload | load : × "[string "-- luatex-core security and io overloads ....."]:53: bad argument #1 to 'io_open' (string expected, got nil)". stack traceback: .../texlive/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:200: in field 'luaotfload' ...ive/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:424: in local 'action' ...ive/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:581: in upvalue 'init_post' ...ive/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:594: in function 'luaotfload-init.lua' .../texlive/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:322: in field 'main' [\directlua]:1: in main chunk