Hot
- "Continued" text odd page only using tcolorboxby MadyYuvi on July 15, 2026 at 1:27 pm
From my previous post: "(Continued)" text should come at the end of page tcolorbox thanks to Sam Carter \documentclass{book} \usepackage[most,skins,breakable]{tcolorbox}% \tcbuselibrary{skins,breakable}% \tcbset{enhanced,breakable}% \usepackage{lipsum} \begin{document} \begin{tcolorbox}[ colback=white, colframe=black!80, arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, overlay first and middle={ \node[anchor=south east] at (frame.south east) {(continued)}; }, bottom=15pt ]% \sffamily\normalsize% \lipsum[1-15] \end{tcolorbox} \end{document} But I need the text Continued text only on Odd pages, for this, I've tried with: \begin{tcolorbox}[ colback=white, colframe=black!80, arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, if odd page={ overlay first and middle={ \node[anchor=south east] at ([yshift=4pt]frame.south east) {(continued)}; }}{}, bottom=15pt ]% But nothing happens, please suggest what mistake I did, please
- List of theorems in HTML using tex4ht + thmtoolsby Stephen Powell on July 15, 2026 at 12:19 pm
The following (listoftheorems.tex) uses the command \listoftheorems provided by the thmtools package: \documentclass{article} \usepackage{hyperref} \usepackage{amsthm} \usepackage{thmtools} \declaretheorem{theorem} \begin{document} \begin{theorem}[Euclid] For every prime $p$, there is a prime $p'>p$. \end{theorem} \listoftheorems \end{document} Compiled to PDF, it gives a \section* containing a numbered list of theorems. But when I compile the document to HTML (make4ht listoftheorems.tex), the list of theorems is empty.
- Inconsistent font feature rendering with plain luatexby niru on July 15, 2026 at 11:08 am
For some reasons, I have to work with plain LuaTeX. All this while, I have used LuaLaTeX with fontspec and moving to LuaTeX is not exactly easy. I am getting surprised by LuaTeX's behaviour. For example, let's have a look at the following code: \input luaotfload.sty \font\main={NewCM10-Book:+onum,+cv06,+liga} \font\deva={Mukta-Light:Language=Marathi,Script=Devanagari} \main hello world 1234567890 {\deva निरंजन ल श} \bye When I run the exact same code multiple times (with the same terminal command, i.e., luatex test.tex), I sometimes get: which is incorrect. Sometimes I get: which is partly correct (the special linguistic forms of Marathi are not rendered). Sometimes, with the same code, I have gotten the following which is fully correct: I mean, what? I chose this particular MWE because this is a typical setup in most of my PDF files. NewCM10-Book with old style numbers and old style one (provided by +cv06) and Mukta-Light for Marathi text. I added the features on purpose to show that in both the screenshots, multiple features are working correctly for NewCM10, but in some compilations, it is breaking for Mukta. I compared the log of both correct and incorrect output and the only difference was in the byte size reported by "Output written on test.pdf (1 page, 17621 bytes)". Rest everything was okay. What exactly could be happening? Note that this is happening with a fully updated TeX Live 2026 on a GNU Linux machine.
- "(Continued)" text should come at the end of page tcolorboxby MadyYuvi on July 15, 2026 at 9:50 am
I need a breaking box with all side frames even it breaks, I tried with \documentclass{book} \usepackage[most,skins,breakable]{tcolorbox}% \tcbuselibrary{skins,breakable}% \tcbset{enhanced,breakable}% \usepackage{lipsum} \begin{document} \begin{tcolorbox}[enhanced,colback=white,colframe=black!80,arc=9pt, skin first=enhanced, skin middle=enhanced, skin last=enhanced, ]% \sffamily\normalsize% \lipsum[1-5] \end{tcolorbox} \end{document} This produced the output as: But, need to add the text (Continued) at the end of page when the box breaks
- Question About Running Headers with Multiple Indexesby test on July 15, 2026 at 8:56 am
I have another question regarding the index. I have two indexes, and the second one begins on the same page on which the previous index ends. As a result, the running header on that page remains blank. Instead, I would like the header to display the title of the index that is ending (in this case, "Wirr"). How can I achieve this? I considered using headers={\leftmark}{\rightmark} together with firstpagestyle=headings, but that would also produce a running header on the first page of the index, which I would prefer to avoid. Here is my MWE: % Source - https://tex.stackexchange.com/a/764587 % Posted by David Carlisle, modified by community. See post 'Timeline' for change history % Retrieved 2026-07-15, License - CC BY-SA 4.0 % Source - https://tex.stackexchange.com/q/764586 % Posted by test % Retrieved 2026-07-10, License - CC BY-SA 4.0 % Notes: % - delim_0 is the separator between entry and page number of level 0 % we use it to add insert a fix space of 1cm % - delim_1 is the same for level 1 % - delim_2 is the same for level 2 \begin{filecontents}[overwrite]{\jobname.ist} delim_0 " \\foo" delim_1 " \\foo" delim_2 " \\foo" \end{filecontents} \def\foo{ \nobreak \hskip 3pt plus 1 fill minus 1pt % \begin{minipage}[t]{2cm}\raggedright \foox} \long\def\foox#1#2#3{% \ifx,#3% #1{#2}#3 % \expandafter\foox\else #1{#2} \end{minipage}\par #3% \fi} \documentclass{scrbook} \usepackage[automark]{scrlayer-scrpage} \clearpairofpagestyles \ohead{\pagemark} \chead{\headmark} \setkomafont{pagehead}{\fontsize{8.5pt}{10pt}\selectfont\slshape} \setkomafont{pagenumber}{\normalfont\fontsize{10pt}{12pt}\selectfont} \renewcommand{\chaptermark}[1]{% \markboth{\thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{% \markright{\thesection.\ #1}} \usepackage{scrlayer} \DeclareNewLayer[ background, rightmargin, contents={% \parbox[b][\layerheight][c]{\dimexpr\footskip+\footheight\relax}{% \hfill\rotatebox{90}{\pagemark}}} ]{lscape.foot} \DeclareNewLayer[ background, textarea, addhoffset=\dimexpr-\headsep-\headheight\relax, width=\dimexpr\headsep+\headheight\relax, contents={\hfill\rotatebox{90}{\headmark}\hspace*{\headsep}} ]{lscape.head} \DeclareNewPageStyleByLayers{lscape}{} \usepackage{imakeidx} \usepackage{hyperref} \makeindex[options={-s \jobname.ist}, title={1. Wirrwarr}] \makeindex[options={-s \jobname.ist}, name=Bibel,title={2. Bibelstellen}] \makeatletter \renewcommand*{\@idxitem}{\par\hangindent 0.4cm}% use a hanging indent of 0.4cm on all levels \makeatother \indexsetup{level=\section*} \indexsetup{level=\section*,toclevel=section,noclearpage} %\indexsetup{level=\chapter*} %\makeatletter %\renewcommand*{\idx@@heading}{\section} %\makeatother \makeatletter \patchcmd{\idx@@heading}{\section*}{\chapter*}{}{} \makeatother \begin{document} \section{First section} Lorem ipsum dolor sit amet, consectetur adipiscing elit. \index{0@Genesis!1} Aliquam rutrum aliquet elit in pellentesque. Proin nulla eros, consequat nec\index{1@pu} convallis vel, vulputate vitae purus\index{0@purusu rusuru surus Schönheitswahnsinn}. Pellentesque consequat euismod sapien, ac porttitor diam laoreet id. Pellentesque habitant morbi tristique senectus\index{senectus} et netus et malesuada fames ac turpis egestas. Sed vehicula magna orci, nec congue sem congue ac. Sed fringilla aliquam interdum. Nullam quis commodo massa.\index{Schönheitswahnsinn abc def ghi jklmnopq} \newpage A \index{senectus} \index[Bibel]{Genesis} \newpage TEST \index{senectus} \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \index{k} \index{aj} \index{aq} \index{ah} \index{aw} \index{ga} \index{ae} \index{fa} \index{ar} \index{j} \index{q} \index{h} \index{w} \index{g} \index{e} \index{f} \index{r} \index{dd} \index{t} \index{d} \index{z} \index{rr} \index{u} \index{s} \index{i} \index{sv} \index{o} \index{a} \index{p} \index{y} \index{ü} \index{x} \index{n} \index{c} \index{öä} \index{v} \index{l} \index{b} \index{ll} \newpage Test \newpage B \index{0@Genesis!1} \newpage C \newpage Test \index{dd2} \index{t1} \index{d2} \index{z2} \index{r2r} \index{u2} \index{s2} \index{i4} \index{sv2} \index{o4} \index{a2} \index{p4} \index{y2} \index{ü4} \index{x2} \index{n4} \index{c2} \index{ö4ä} \index{v2} \index{l4} \index{b1} \index{ll4} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage xxx \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage xxx \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage Test \index{1@pu}\index{senectus} \newpage Test \index{0@Exodus!2, 100} \index{0@Genesis!1} \index{1@pu} \newpage \pagestyle{scrheadings} \manualmark \markboth{Wirr}{Register} \printindex \pagestyle{scrheadings} \manualmark \markboth{Quellenregister}{Register} \printindex[Bibel] \end{document}
- Include corresponding author details at the bottom in two columnby HPS on July 15, 2026 at 5:24 am
I am writing a two-column paper in LaTeX. When I did not use \begin{onecolumnabstract} (like below). I am getting author Email ID and corresponding author Email at the bottom. But it disappears as soon as I use \begin{onecolumnabstract}. I want what is shown in the following attachment. Kindly help. I am attaching LaTeX code for the reference. \documentclass[11pt, twocolumn]{article} \usepackage[top=1in, bottom=1in, left=0.9in, right=0.9in]{geometry} \usepackage{setspace} \usepackage{amsfonts} \usepackage{epsfig} \usepackage{enumerate} \usepackage{latexsym} \usepackage{amsthm} \usepackage{amsmath} \usepackage{amssymb} \usepackage{array} \usepackage{graphicx} \usepackage{multirow} \usepackage{booktabs, makecell} \usepackage{algorithm} \usepackage{algorithmicx} \usepackage{algpseudocode} \usepackage{tabularx} \usepackage{abstract} \newcommand\mcc[1]{\multicolumn{2}{>{$}c<{$}}{#1}} \usepackage{cite} \usepackage{caption} \captionsetup[figure]{ position=below, } \usepackage{subcaption} \usepackage{titlesec} \titleformat*{\section}{\Large\bfseries} % change font of section headings \usepackage{lipsum} % for filler text \def\demo{% \par\topsep6pt plus6pt \trivlist \item[\hskip\labelsep\it Proof.]\ignorespaces} \def\enddemo{\qed \endtrivlist} \expandafter\let\csname enddemo*\endcsname=\enddemo \newcommand{\tab}{\hspace*{2em}} \newtheorem{Theorem}{Theorem}[section] \newtheorem{Definition}{Definition}[section] \newtheorem{Proposition}{Proposition}[section] \newtheorem{Lemma}{Lemma}[section] \newtheorem{Corollary}{Corollary}[section] \newtheorem{Example}{Example}[section] \newtheorem{Remark}{Remark}[section] \newtheorem{Note}{Note}[section] \newcommand{\R} {\mbox {$ I\!\!R $}} \newcommand{\bea}{\begin{eqnarray}} \newcommand{\eea}{\end{eqnarray}} \newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}} \newcommand{\ba}{\begin{algorithm}} \newcommand{\ea}{\end{algorithm}} \newcommand{\nn}{\nonumber} \newcommand{\nii}{\noindent} \newcommand{\bee}{\begin{eqnarray*}} \newcommand{\eee}{\end{eqnarray*}} \numberwithin{equation}{section} % This line resets equation numbering when starting a new section. %\renewcommand{\theequation}{Eq. \thesection.\arabic{equation}} % This line ads "Eq." in front of your equation numbering. \usepackage[us,12hr]{datetime} \usepackage{fancyhdr} \fancypagestyle{plain} { \fancyhf{} \lfoot{\footnotesize Date : {\ddmmyyyydate\today}} \rfoot{ \footnotesize \thepage} \renewcommand{\headrulewidth}{0pt} } \pagestyle{plain} \normalsize \begin{document} \title{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA} \author{ABCDEFGH\thanks{E-mail: ABCDEFGH@yahoo.co.in} and PQRSTUV\thanks{Corresponding author E-mail: PQRSTUV@gmail.com} \\ \small Department of Electronics and Telecommunication Engineering, \\ \small XYZ UNIVERSITY \small CITY, } \date{} \twocolumn[ \maketitle \begin{abstract}\noindent This study presents a novel diagnostic framework for the \\ \noindent{\bf Keywords}: {Electrocardiogram (ECG), Atrial Fibrillation, IDPP, Lightweight CNN, Medical Image Encoding, Sensors Signal Processing.} \end{abstract} ] \end{document}
- force text into one lineby Nate on July 15, 2026 at 4:52 am
I have a line of text that LaTeX refuses to group into one line even though it fits. I used \thinspace the whole way which has worked every one of the hundreds of other times I've tried it, but not this time. \documentclass{book} \usepackage[margin=1in]{geometry} \begin{document} \noindent \begin{minipage}{3.5in} (other text in other rows) angle\thinspace into\thinspace two\thinspace congruent\thinspace $30^\circ\!-60^\circ\!-90^\circ$\thinspace right\thinspace triangles ($\triangle$s\thinspace BMA\thinspace and\thinspace BMC),\thinspace the \end{minipage} \end{document} which the program breaks in weird ways: Is there another way to further force text into a given space (especially as one line, i.e. a "line minipage") that can be implemented cleanly as part of a larger paragraph? (I'm using the book class and, if it matters, TeXstudio).
- preferred representation of the square of the arctangent of 1/2 in LaTeX math modeby Michael Aramini on July 14, 2026 at 9:57 pm
I'm seeking advice as to the preferred representation of the square of the arctangent of 1/2 in LaTeX in math mode. Here are the alternatives I can think of: {\tan^{-1}\,\left(\frac{1}{2}\right)}^2 {\arctan\left(\frac{1}{2}\right)}^2 {\mathrm{atan}\left(\frac{1}{2}\right)}^2 {\operatorname{atan}\left(\frac{1}{2}\right)}^2 \left[\tan^{-1}\,\left(\frac{1}{2}\right)\right]^2 \left[\arctan\left(\frac{1}{2}\right)\right]^2 \left[\mathrm{atan}\left(\frac{1}{2}\right)\right]^2 \left[\operatorname{atan}\left(\frac{1}{2}\right)\right]^2 \left(\tan^{-1}\,\left(\frac{1}{2}\right)\right)^2 \left(\arctan\left(\frac{1}{2}\right)\right)^2 \left(\mathrm{atan}\left(\frac{1}{2}\right)\right)^2 \left(\operatorname{atan}\left(\frac{1}{2}\right)\right)^2 \left(\tan^{-1}\,\frac{1}{2}\right)^2 \left(\arctan\,\frac{1}{2}\right)^2 \left(\mathrm{atan}\,\frac{1}{2}\right)^2 \left(\operatorname{atan}\,\frac{1}{2}\right)^2 \arctan^2\,\left(\frac{1}{2}\right) \mathrm{atan}^2\,\left(\frac{1}{2}\right) \operatorname{atan}^2\,\left(\frac{1}{2}\right) \arctan^2\,\frac{1}{2} \mathrm{atan}^2\,\frac{1}{2} \operatorname{atan}^2\,\frac{1}{2}
- Using expl3 syntax in my command. How to fix my code that uses a command to set fonts for foreign scripts in math mode in LuaLaTeX?by Sageof6Paths on July 14, 2026 at 4:59 pm
From my previous question here, I wanted a way to be able to write foreign scripts directly in math mode in LuaLaTeX while having different fonts for rm, sf, and tt. niru's answer provided what I wanted, but I wanted to wrap it all in a command like egreg's answer. When I rewrote niru's answer in the style of egreg's, foreign fonts don't render in text mode. I believe the problem lies here: \babelfont[#1]{rm}[NFSSFamily = {#1rm},#3]{#2} \babelfont[#1]{sf}[NFSSFamily = {#1sf},#5]{#4} \babelfont[#1]{tt}[NFSSFamily = {#1tt},#7]{#6} Anyhow, here is the code I'm using: \documentclass{article} \usepackage{babel} \usepackage{unicode-math} \usepackage{xcolor} \ExplSyntaxOn % Resetting math fonts with \rmfamily \hook_gput_code:nnn { cmd / rmfamily / before } { . } { % English \mathversion { rm } } % Resetting math fonts with \sffamily \hook_gput_code:nnn { cmd / sffamily / before } { . } { % English \mathversion { sf } } % Resetting math fonts with \ttfamily \hook_gput_code:nnn { cmd / ttfamily / before } { . } { % English \mathversion { tt } } \hook_gput_code:nnn { begindocument / end } { . } { \mathversion { rm } } % \enableblockformath{symbolic name}{rm font}[rm further options]{sf font}[sf further options]{tt font}[tt further options]{blocks} \NewDocumentCommand{\enableblockformath}{mmO{}mO{}mO{}m} {% #1 = symbolic name % #2 = rm font % #3 = rm further options % #4 = sf font % #5 = sf further options % #6 = tt font % #7 = tt further options % #8 = blocks % Loading language \babelprovide[import,onchar={ids fonts}]{#1} % Loading fonts \babelfont[#1]{rm}[NFSSFamily = {#1rm},#3]{#2} \babelfont[#1]{sf}[NFSSFamily = {#1sf},#5]{#4} \babelfont[#1]{tt}[NFSSFamily = {#1tt},#7]{#6} % Resetting math fonts with \rmfamily \hook_gput_code:nnn { cmd / rmfamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {rm} } } % Resetting math fonts with \sffamily \hook_gput_code:nnn { cmd / sffamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {sf} } } % Resetting math fonts with \ttfamily \hook_gput_code:nnn { cmd / ttfamily / before } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {tt} } } \hook_gput_code:nnn { begindocument / end } { . } { \clist_map_inline:nn {#8} { \__egreg_blocksformath:nnn {#1} {##1} {rm} } } \DeclareSymbolFont{#1rm}{TU}{#1rm}{m}{n} \DeclareSymbolFont{#1sf}{TU}{#1sf}{m}{n} \DeclareSymbolFont{#1tt}{TU}{#1tt}{m}{n} } \cs_new_protected:Nn \__egreg_blocksformath:nnn { \seq_set_split:Nnn \l_tmpa_seq {-} {#2} \int_step_inline:nnn {\seq_item:Nn \l_tmpa_seq {1}} {\seq_item:Nn \l_tmpa_seq {2}} { \Umathcode ##1 = "0 ~ \use:c {sym#1#3} ~ ##1 } } \ExplSyntaxOff \babelprovide[import,main,onchar={ids fonts}]{english} \babelfont{rm}[Color = {red}]{NewCM10-Book.otf} \babelfont{sf}[Color = {green}]{NewCMSans10-Book.otf} \babelfont{tt}[Color = {blue}]{NewCMMono10-Book.otf} \setmathfont[version = {rm}, Color = {red}]{NewCMMath-Book.otf} \setmathfont[version = {sf}, Color = {green}]{NewCMSansMath-Regular.otf} \setmathfont[version = {tt}, Color = {blue}]{NewCMSansMath-Regular.otf} \enableblockformath{japanese}{HaranoAjiMincho-Regular.otf}[Color = {red}]{HaranoAjiGothic-Regular.otf}[Color = {green}]{HaranoAjiGothic-Regular.otf}[Color = {blue}]{"3040-"30FF,"4E00-"9FFF} \enableblockformath{thai}{NotoSerifThai-Regular.ttf}[Color = {red}]{NotoSansThai-Regular.ttf}[Color = {green}]{NotoSansThai-Regular.ttf}[Color = {blue}]{"0E00-"0E7F} \begin{document} English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \sffamily English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \ttfamily English language ภาษาไทย 日本語 $x+y=ก+ข=あ+い$ \end{document}
- Is possible using wolframscript in listings with tcolorbox combined with listings (code/in AND execution/out)?by Mika Ike on July 14, 2026 at 8:44 am
With tcolorbox you can code LaTeX and shot the result, as you can see in the first box. Is that possible with Rscript? and with wolframscript?. \documentclass[12pt]{article} \usepackage{geometry} \usepackage{parskip} \usepackage{amsmath,mathtools} \usepackage{tcolorbox} \tcbuselibrary{listings} \tcbset{listing engine=listings} \tcbuselibrary{minted} \begin{document} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black} This is a \LaTeX\ example which displays the text as source code and in compiled form. \hfill $x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$ \end{tcblisting} %\tcbset{listing engine=wolframscript} % https://www.wolfram.com/wolframscript/ \begin{tcblisting}{colback=red!5!white,colframe=red!75!black}[language=wolframscript] Solve[2x+y==3 && 4x-2y==7, {x,y}]//N \end{tcblisting} \end{document}
- Is possible using Rscript in listings with tcolorbox combined with listings (code/in AND execution/out)?by Mika Ike on July 14, 2026 at 7:43 am
With tcolorbox you can code LaTeX and shot the result, as you can see in the first box. Is that possible with Rscript?. \documentclass[12pt]{article} \usepackage{geometry} \usepackage{parskip} \usepackage{amsmath,mathtools} \usepackage{tcolorbox} \tcbuselibrary{listings} \tcbset{listing engine=listings} \tcbuselibrary{minted} \begin{document} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black} This is a \LaTeX\ example which displays the text as source code and in compiled form. \hfill $x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$ \end{tcblisting} %\tcbset{listing engine=Rscript} \begin{tcblisting}{colback=red!5!white,colframe=red!75!black}[language=Rscript] a<-sample(1:24,5,replace=TRUE) mean(a) barplot(a) \end{tcblisting} \end{document}
- how to make local table of contents using etoc all start without shifting to the right?by Nasser on July 14, 2026 at 4:00 am
I am not using \cftsubsubsecindent 0pt so the following question did not help me figure why How to correctly indent a local table of contents with etoc? This is my MWE \documentclass[12pt,titlepage]{article}% \usepackage[titles]{tocloft} \usepackage{etoc} \newcommand{\makeLocalSectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{2} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \newcommand{\makeLocalSubsectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{3} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \newcommand{\makeLocalSubsubsectionToc} { \begingroup % Keeps layout changes isolated to just this local TOC \etocsetnexttocdepth{4} \etocsettocstyle{}{}% Completely removes "Local contents" and saves space \localtableofcontents \endgroup % Restores standard settings immediately after printing } \begin{document} \section{First order differential equations}% \makeLocalSectionToc \subsection{Algorithm charts} \makeLocalSubsectionToc \subsubsection{First chart}% \makeLocalSubsubsectionToc \paragraph{A} text \paragraph{B} text \end{document} compiled with lualatex Is the way the commands are defined not correct?
- Text overflowing in tabular cell with makecellby Matias Aznar on July 13, 2026 at 11:05 pm
I'm creating a table in LaTeX with images and multi-line text in one column. The text in the "Observaciones" (Observations) column is overflowing outside the table boundaries and not wrapping properly within the cell. The third row's text wraps correctly, but the first two rows' text extends beyond the table width. I'm using \makecell[l] but it's not containing the text properly. How can I ensure the text stays within the cell boundaries and wraps properly regardless of content length? All rows should align at the top with text contained within the column width. The images sizes are 1257x1262 px \documentclass{article} \usepackage{geometry} \usepackage{makecell} \usepackage{graphicx} \geometry{ letterpaper, margin=3cm } \setlength{\marginparwidth}{2cm} \begin{document} \begin{table}[H] \centering \small \begin{tabular}{ >{\raggedright\arraybackslash}m{2cm} >{\centering\arraybackslash}m{3.4cm} >{\centering\arraybackslash}m{3.4cm} >{\raggedright\arraybackslash}m{6cm} } \hline \textbf{Fase} & \textbf{$L_1$} & \textbf{$L_3$} & \textbf{Observaciones} \\ \hline Poros & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 127,090\\ $P_j$: 1.52\\ $T_G$: -1.16\\ Fuerte linealidad vertical } \\ \hline Óxido & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 2,228\\ $P_j$: 1.09\\ $T_G$: -0.18\\ Débil anisotropía } \\ \hline Plagioclasa & \includegraphics[width=3.3cm]{example-image} & \includegraphics[width=3.3cm]{example-image} & \makecell[tl]{ $N$: 1,065\\ $P_j$: 1.29\\ $T_G$: -0.73\\ Orientación preferencial moderada sin embargo, se concentra en el eje Z } \\ \hline \end{tabular} \caption{Análisis de orientación de fases de la muestra L187.} \label{tab:stereonets_l187} \end{table} \end{document}
- Hollowed-out sphere effectby Sebastiano on July 13, 2026 at 10:49 pm
How can I obtain the hollowed-out sphere effect? The drawing above is my original done many years before. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ scale=1.2, axis/.style={thick, ->} ] \coordinate (O) at (0, 0); \coordinate (X) at (-2, -2.3); \coordinate (Y) at (5.5, 0); \coordinate (Z) at (0, 4); \coordinate (P) at (3.1, 1.3); \draw[axis] (O) -- (X) node[left, font=\large, xshift=-3pt] {$x$}; \draw[axis] (O) -- (Y) node[below, font=\large, yshift=-3pt] {$y$}; \draw[axis] (O) -- (Z) node[left, font=\large, xshift=-3pt] {$z$}; \begin{scope} \shade[ball color=gray!30!white, opacity=0.85] (O) circle (0.9); \draw[gray!60, thin] (O) circle (0.9); \fill[gray!60!black, opacity=0.9] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \shade[inner color=black!80, outer color=gray!70!black, opacity=0.5] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \end{scope} \fill[black] (O) circle (0.07) node[below, yshift=-4pt, font=\large] {$O$}; \draw[->, >=Stealth, shorten >= 2.5pt, shorten <= 2pt] (O) -- (P) node[midway, above, yshift=2pt, font=\large] {$r$}; \fill[black] (P) circle (0.08) node[above, yshift=3pt, font=\large] {$P$}; \node[right, font=\Large\itshape, xshift=2pt, yshift=-2pt] at (P) {$m$}; \node[below, font=\large] at (0.2, -0.95) {$M$}; \end{tikzpicture} \end{document}
- Why does cycle produce a diagonal?by D G on July 13, 2026 at 7:11 pm
I don't understand why there is a diagonal. \documentclass[tikz,border=12pt]{standalone} \begin{document} \begin{tikzpicture} \node [draw=red] (A) at (1,1) {A}; \draw (0,0) |- (A) |- cycle; \end{tikzpicture} \end{document} Expected output \begin{tikzpicture} \node [draw=red] (A) at (1,1) {A}; \draw (0,0) |- (A) |- (0,0); \end{tikzpicture} Edit Considering the following code. \begin{tikzpicture} \node [draw=red] (A) at (1,1) {A}; \draw (0,0) |- (A) |- cycle; \end{tikzpicture} Suppose there were two separate paths within a single \draw command: first path: (0,0) |- (A.west) second path: (A.south) |- cycle In that interpretation, cycle seems to have two contradictory behaviors: It remembers (0,0) from the first path and uses it as the destination of |- in the second path. However, it also treats (A.south) as the starting point of the second path instead of (0,0). Am I misunderstanding how cycle is supposed to work?
- "Decorating" sections and subsections in \documentclass{article}by CrocoDuck on July 13, 2026 at 7:08 pm
I looked for a package that would handle the "decoration" of section and subsection titles, but I couldn't find one. I tried using tcolorbox, but only managed to generate errors. And the code needs to work with hyperref. The decoration would be something like what is shown in the figure below. \documentclass[a4paper,12pt]{article} \usepackage[brazilian]{babel} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \usepackage{hyperref} \usepackage{enumitem} \usepackage{tcolorbox} \tcbuselibrary{skins} \usepackage{enumitem} \usepackage{colortbl} \usepackage{tabularx,booktabs} \hypersetup{ backref=true, colorlinks=true, % false: boxed links; true: colored links linkcolor=blue, % color of internal links citecolor=blue, % color of links to bibliography filecolor=magenta, % color of file links urlcolor=blue, bookmarksdepth=4 } \newtcbox{\meubox}[1][blue]{arc=12pt,colback=blue!80!white,colupper=white,colframe=blue!50!black} \begin{document} \tableofcontents \hypertarget{sumario}{} \newpage \section{\meubox{Considerações Gerais e de Segurança}} \newpage \section{Considerações Gerais} \newpage \section{Considerações de Segurança} %\tcbox[arc=12pt,colback=blue!80!white,colupper=white,colframe=blue!50!black]{\textbf{TESTE TESTE}} \meubox{\textbf{TESTE}} %\end{tcolorbox} \end{document}
- Elevating a pbox and Maintaining the Default Spacing Between the Linesby DDS on July 13, 2026 at 3:57 pm
Consider the code: \documentclass[10pt]{book} \usepackage{color,lipsum} \newcommand{\pbox}[1]{% % MACRO for increasing the space between fbox and the beginning of the subsequent sentence. \par \textcolor{red}{\fbox{\bfseries #1}}% #1. adds a period after the number within the fbox \hspace{0.2em} %\vspace{3pt} \ignorespaces } \begin{document} \thispagestyle{empty} {\pbox{3.}} \lipsum[1] \end{document} which produces: I would like to elevate the pbox a little, say 3pt. However, when I include the command \vspace{3pt} in the compilation, I get: As you can see, the vertical spacing between the first two lines has been increased as well (which I don't want.) QUESTION: How may I elevate the pbox while maintaining the default vertical spacing between the firs two lines of text? I compile the code with lualatex Thank you.
- texlive 2026 make4ht input.tex "mathml,mathjax" rendering fails for user-defined macrosby krone on July 13, 2026 at 2:38 pm
Using texlive 2025 (distributed by archlinux) user-defined macros are rendered 'correctly' calling make4ht -ul test.tex "mathml,mathjax" With texlive 2026 (again archlinux package) and the same call, some things render correctly and others don't. MWE: \documentclass{article} \usepackage{siunitx} \usepackage{amssymb} \newcommand{\ilfrac}[2]{{}\sp{#1}\!/\!\sb{#2}} \newcommand{\ft}{\mathop{\mathcal{FT}}} \newcommand{\ift}{\mathop{\mathcal{FT}\sp{-1}}} \begin{document} %%% first equation %%% \[ \ift{\left[a(x)\right](f)} \] %%% second equation %%% \[ \ft \neq \ift \] %%% third equation %%% \[ \ift \neq \ft \] %%% fourth equation %%% \[ \chi(f) = \ift{\left[a(x)\right](f)} = \int_{-\infty}^{\infty} a(x) \exp{\left[i 2 \pi x f \right]} dx \] %%% fifth equation %%% \[ \ilfrac{a}{b} = \qty{3}{\mm} \] \end{document} In the above, the first, third and fourth equations render correctly, while the second displays as 'Math input error' (unexpected text node -1) and the fifth renders 'msup'. I do get a domfilter warning about an Unbalanced Tag (/msup). If I comment out the fifth equation this warning is suppressed, but the second equation still displays 'Math input error'. I can do more test but am unsure where to start. Edit As per my comments below and to the solution from Michael.h21 I've dug further into the problem. It turns out that in my real document, near all the maths were rendered as 'Math Input Error' due to how I (re)-configure \chapter to include an image file. I've created an MWE with a test.tex file: \documentclass{book} \usepackage{graphicx} \makeatletter \global\let\loutcme\@empty \global\let\expphoto\@empty \newcommand{\loutcome}[1]{\gdef\loutcme{#1}} \newcommand{\experimentphoto}[1]{\gdef\expphoto{#1}} \makeatother \begin{document} \loutcome{This is the learning outcome} \experimentphoto{./path/to/pdf/or/png/or/jpeg} \chapter{A test} \section{A section in the chapter} \[ a = b \] \end{document} and a test.cfg file \Preamble{xhtml,mathml,mathjax} \Configure{chapter} {\ifvmode\IgnorePar\fi\EndP\HCode{<section class="chapter">}} {\ifvmode\IgnorePar\fi\EndP\HCode{</section>}} {% \ifvmode\IgnorePar\fi\EndP\HCode{<div class="expphoto">} %%% The line below is the culprit %%% %%% If it is commented out and 'some text' is commented in %%% %%% the conversion renders the subsequent equation w/o error %%% \ifvmode\IgnorePar\fi\EndP\includegraphics{\expphoto} % Some text. \ifvmode\IgnorePar\fi\EndP\HCode{</div>} \ifvmode\IgnorePar\fi\EndP\HCode{<h2 class="chapterHead">} \TitleMark \HCode{<br />}} {\HCode{</h2>} \ifvmode\IgnorePar\fi\EndP\HCode{<div class="learningoutcome">}\par\ShowPar \loutcme \ifvmode\IgnorePar\fi\EndP\HCode{</div><br />}\par\ShowPar} \Css{.learningoutcome { font-family: sans-serif; padding-top: 1ex; padding-bottom: 1ex; border-top-style: solid; border-bottom-style: solid; }} \Css{.expphoto img { width: 100\%; aspect-ratio: 5 / 2; object-fit: cover; } } \begin{document} \EndPreamble and make4ht is called with make4ht -l -c test.cfg test.tex "mathml,mathjax" I've liberally applied \ifvmode\IgnorePar\fi trying to avoid warnings, but admit I have no idea if I am doing this correctly. To summarize: using \includegraphics in the configuration of the chapter makes subsequent math(jax) render as 'Math Input Error'. Thanks for your attention.
- Automate adding to pdf outline but hiding from tocby Zlog on July 13, 2026 at 11:36 am
Below is my MWE: \documentclass{article} \usepackage{hyperref} \newcommand{\nocontentsline}[3]{} \newcommand{\tocless}[2]{\bgroup% \let\addcontentsline=\nocontentsline#1{#2}% \egroup} \begin{document} \tableofcontents \newpage \section{test} \subsection{test1} \subsubsection{test2} \subsubsection{test3} \subsection{test4} \pdfbookmark[3]{test5}{mark1} \tocless\subsubsection{test5} \subsection{test6} \section{test7} \tocless\subsection{test8} \newpage a \end{document} The code above makes the toc without sections (and sub...sections) that have \tocless command before them. Thanks to \pdfbookmark subsubsection "test5" appears in pdf outline. I want to have it automatically bookmarked in \tocless, I think I would need to add a counter and the like (to increment "mark1"). However the most difficult part is [3] in \pdfbookmark, as it needs to be appropriate for command (subsection -> 2, subsubsection -> 3). I think my question boils down to: Can I - from command (subsection, subsubsection) - get correct number (2, 3). If not, is it possible at all to automate adding it to pdf outline without appearing in toc. In my use case documentclass is set to book, however I am interested in broader picture if possible.
- CJK fonts not working without \text{}by Climber of Mount. LaTeX on July 13, 2026 at 10:34 am
Sorry if anything I ask or provide is inappropriate; I am new to TeX Stack Exchange. I am writing a Traditional Chinese LaTeX document. Sometimes I will need commentary in either align or equation, which is, of course, in Chinese. I usually use \text{} for the commentary, but they look cluttered and hard to read. However, removing the \text{} around the commentary simply makes the commentary disappear in the output. Is there a workaround? Re-defining \text{} won't help me, 'cause it'll still look cluttered. For reference I am on https://overleaf.com, using XeLaTeX. \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{Noto Sans CJK TC} \usepackage{amsmath} \begin{document} This works: \begin{align} 1 + 1 &= 2 \text{ 一個人和一隻狗合起來是兩個東西}\\ 2 + 3 &= 5 \text{ 兩個人和三隻狗合起來是五個東西} \end{align} This doesn't: \begin{align} 1 + 1 &= 2 \quad 一個人和一隻狗合起來是兩個東西\\ 2 + 3 &= 5 \quad 兩個人和三隻狗合起來是五個東西 \end{align} \end{document} EDIT By "cluttered" I mean the code, not the output. Also, I would like to clarify that without \text{}, the commentary simply doesn't get displayed in the output at all, and I am looking for a way to de-clutter my code while getting the output to also work. UPDATE @Explorer suggested that I use LuaLaTeX to compile, but free Overleaf only gives 20 seconds of compile time, and LuaLaTeX exceeds that time even for small documents. Is there a workaround? Or do I have to stick to cluttered code?
- Glitch with the UnderWavy example in `lua-ul` package?by Explorer on July 13, 2026 at 10:09 am
I have the following code example taken from texdoc lua-ul: \documentclass{article} \usepackage[paperheight=5cm,paperwidth=10cm]{geometry} \usepackage{lipsum} \usepackage{xcolor,luacolor} \usepackage[soul]{lua-ul} \newunderlinetype\beginUnderWavy[\number\dimexpr1ex]{\cleaders\hbox{% \setlength\unitlength{.3ex}% \begin{picture}(4,0)(0,1) \thicklines \color{magenta}% \qbezier(0,0)(1,1)(2,0) \qbezier(2,0)(3,-1)(4,0) \end{picture}% }} \NewDocumentCommand\underWavy{+m}{{\beginUnderWavy#1}} \pagestyle{empty} \begin{document} \lipsum[2][1-5] \underWavy{Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world} \lipsum[2][1-3] \end{document} However, when we zoom in, there exists glitch, but in texdoc lua-ul, the wavyline were smooth? Is this a bug or feature? Or maybe I missed some parameters setting?
- Use siunitx S column type with `\pgfplotstabletypeset`by Manuel Schmidt on July 13, 2026 at 7:51 am
I am trying to use the S column type from siunitx setting a tabularray table with \pgfplotstabletypeset. However, I do not know how to tell latex that the first row is a string and not a number. Manually, I would escape the header as {col name}, but this does not work here. \documentclass{article} \usepackage{pgfplotstable} \usepackage{siunitx} \usepackage{tabularray} \usepackage{filecontents} \UseTblrLibrary{siunitx} \begin{filecontents*}{mydata.csv} Price Weight 12.50 3.2 7.99 1.05 100.00 25.4 \end{filecontents*} \begin{document} \pgfplotstabletypeset[ begin table=\begin{tblr}, end table=\end{tblr}, columns/Price/.style={ column type={S[table-format=3.2]}, column name={{{Price}}} }, columns/Weight/.style={ column type={S[table-format=1.4]}, column name={{{Weight}}} }, ]{mydata.csv} % expected: % \begin{tblr}{ % colspec = {S[table-format=3.2] S[table-format=1.4]}, % } % {Price} & {Weight} \\ % 12.50 & 3.2 \\ % 7.99 & 1.05 \\ % 100.00 & 25.4 \\ % \end{tblr} \end{document} The error is Package siunitx Error: Invalid number 'e' .
- Request for feedback: modernization of linguexby Gerhard Schaden on July 13, 2026 at 6:05 am
Over the years, I had developed a suite of patches on top of Wolfgang Sternefeld's linguex package for typesetting linguistic examples that evolved over the years. I really like linguex, but it is sadly unmaintained. With the (re)release of Claude Fable, I got ambitious and vibe-coded a new package (tentatively called `linguexx') that removes the dependencies on linguex, xspace, etc., and reimplements the underlying mechanisms. You can find the package here: http://gerhard.schaden.free.fr/files/linguexx.zip Basically, everything you can do in linguex (except the \exi. ...) you can do in linguexx; the user-facing implementation has not changed, and every document compiled with linguex should compile with linguexx. From the (vibe-written) documentation (included in the link): Linguexx uses the syntax of Wolfgang Sternefeld’s linguex, which this package owes almost everything to, and which it is designed to replace. linguexx is a reimplementation from the ground up, undertaken for two reasons. The first is to repair the structural weaknesses of the original: a globally drifting sub-example depth counter, a judgment tokenizer built on catcode manipulation, and a termination rule that failed at the end of a beamer frame. All three are gone — not patched, but designed out. The second is to bring the glossing up to the level of John Frampton’s expex, the one facility in which linguex was decisively behind: glosses may now have any number of tiers, each with its own font, rather than the two or three that cgloss4e allowed. The package depends on nothing beyond etoolbox, amsmath and ulem. I do not know if there is any interest in having such a package, and whether it would make sense to release it to the larger community via ctan. Also, is there any functionality any of you feels this package is lacking and could easily be added? Thank you in advance for any feedback.
- How to write a chemical reactionby Brasil on July 13, 2026 at 3:04 am
I am trying to write a simple chemical reaction like this one: I have the MWE below. Can anyone help, please? \documentclass{article} \usepackage{chemfig} \begin{document} Nuclear reaction: \[ \schemestart \chemfig{^{235}U} \arrow{->} \chemfig{^{231}Th} \+ ^4\alpha \schemestop \] \end{document} with the error: ! Missing $ inserted. <inserted text> $ l.16 \schemestop ?
- How to Point the Rounded Corners of a Filled Tikzpicture Inward?by Jethro on July 12, 2026 at 7:49 pm
MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\W{9} % width of the rectangle \def\H{15} % height of the rectangle \def\R{0.8} % radius of the inverted corners. \draw[ultra thick, fill=blue!80] (0, \R) arc (180:270:\R) -- (\W-\R, 0) arc (270:360:\R) -- (\W, \H-\R) arc (0:90:\R) -- (\R, \H) arc (90:180:\R) -- cycle; \end{tikzpicture} \end{document} output: How may I modify the code such that all four rounded corners are pointing inward; that is, the rounded part is pointing towards the interior of the figure and not the exterior? Thanks.
- cvitem and cventry have different vertical spacing in moderncv banking styleby A.B. on July 12, 2026 at 6:53 pm
I am trying to build a CV in Overleaf (pdflatex) using moderncv and the banking style. I noticed that when a \cvitem entry is placed in a section, the vertical space above it is more than the vertical space above a \cventry, and I can't seem to figure out where this space is being controlled from in the Github documentation. I would like all entry/item styles to have the same vertical space between it and the section header as the \cventry does. My question is similar to moderncv: Increase space between cventry, but concerns the vertical space before an entry or item, rather than the space after. MWE below. Is there a command I can use to modify this spacing? %% start of file `template.tex'. %% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2022 moderncv maintainers (github.com/moderncv). % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License version 1.3c, % available at http://www.latex-project.org/lppl/. \documentclass[11pt,letterpaper,roman]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') \moderncvcolor{black} % color options 'black', 'blue' (default), cerulean, 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' % moderncv themes \moderncvstyle[]{banking} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' %\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name %\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page % adjust the page margins \usepackage[scale=0.75]{geometry} \setlength{\footskip}{136.00005pt} % --- Add collapsed code back in and change style to casual for left aligned dates %{ \makeatletter % commands from moderncvstylebanking.sty to have the title % from that style \newcommand*{\maketitlesymbol}{% {~~~{\rmfamily\textbullet}~~~}}% the \rmfamily is required to force Latin Modern fonts when using sans serif, as OMS/lmss/m/n is not defined and gets substituted by OMS/cmsy/m/n % internal command to add an element to the footer % it collects the elements in a temporary box, and checks when to flush the box \newsavebox{\maketitlebox}% \newsavebox{\maketitletempbox}% \newlength{\maketitlewidth}% \newlength{\maketitleboxwidth}% \newif\if@firstmaketitleelement\@firstmaketitleelementtrue% % adds an element to the maketitle, separated by maketitlesymbol % usage: \addtomaketitle[maketitlesymbol]{element} \newcommand*{\addtomaketitle}[2][\maketitlesymbol]{% \if@firstmaketitleelement% \savebox{\maketitletempbox}{\usebox{\maketitlebox}#2}% \else% \savebox{\maketitletempbox}{\usebox{\maketitlebox}#1#2}\fi% \settowidth{\maketitleboxwidth}{\usebox{\maketitletempbox}}% \ifnum\maketitleboxwidth<\maketitlewidth% \savebox{\maketitlebox}{\usebox{\maketitletempbox}}% \@firstmaketitleelementfalse% \else% \flushmaketitle{}\\% \savebox{\maketitlebox}{#2}% \savebox{\maketitletempbox}{#2}% \settowidth{\maketitleboxwidth}{\usebox{\maketitlebox}}% \@firstmaketitleelementfalse\fi} % internal command to flush the maketitle \newcommand*{\flushmaketitle}{% \strut\usebox{\maketitlebox}% \savebox{\maketitlebox}{}% \savebox{\maketitletempbox}{}% \setlength{\maketitleboxwidth}{0pt}} \renewcommand*{\maketitle}{% \setlength{\maketitlewidth}{0.8\textwidth}% \hfil% \parbox{\maketitlewidth}{% \centering% % name and title \namestyle{\@firstname~\@lastname}% \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title) % detailed information \addressfont\color{color2}% \ifthenelse{\isundefined{\@addressstreet}}{}{\addtomaketitle{\addresssymbol\@addressstreet}% \ifthenelse{\equal{\@addresscity}{}}{}{\addtomaketitle[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty \ifthenelse{\equal{\@addresscountry}{}}{}{\addtomaketitle[~--~]{\@addresscountry}}% \flushmaketitle\@firstmaketitleelementtrue\\}% \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \addtomaketitle{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@email}}{}{\addtomaketitle{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtomaketitle{\homepagesymbol\httplink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtomaketitle{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomaketitle{\@extrainfo}}% \flushmaketitle}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \maketitle \renewcommand*{\namefont}{\Huge\bfseries\upshape} \renewcommand*{\titlefont}{\Huge\mdseries\upshape} \renewcommand*{\addressfont}{\normalsize\mdseries\upshape} \renewcommand*{\quotefont}{\large\slshape} % styles \renewcommand*{\namestyle}[1]{{\namefont\textcolor{color1}{#1}}} \renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{#1}}} \renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color1}{#1}}} \renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}} \renewcommand*{\makecvtitle}{% % recompute lengths (in case we are switching from letter to resume, or vice versa) \recomputecvlengths% \maketitle% % optional quote \ifthenelse{\isundefined{\@quote}}% {}% {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle} \makeatother %} % depending on the amount of information in the footer, you need to change this value. comment this line out and set it to the size given in the warning %\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates %\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... % font loading % for luatex and xetex, do not use inputenc and fontenc % see https://tex.stackexchange.com/a/496643 \ifxetexorluatex \usepackage{fontspec} \usepackage{unicode-math} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Latin Modern Roman} \setsansfont{Latin Modern Sans} \setmonofont{Latin Modern Mono} \setmathfont{Latin Modern Math} \else %\usepackage[utf8]{inputenc} -- already loaded by overleaf \usepackage[T1]{fontenc} %\usepackage{lmodern} \fi % document language \usepackage[english]{babel} % FIXME: using spanish breaks moderncv % personal data \name{John}{Doe} \title{Résumé title} % optional, remove / comment the line if not wanted \born{4 July 1776} % optional, remove / comment the line if not wanted \address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and "country" arguments can be omitted or provided empty \phone[mobile]{+1~(234)~567~890} % optional, remove / comment the line if not wanted; the optional "type" of the phone can be "mobile" (default), "fixed" or "fax" \phone[fixed]{+2~(345)~678~901} \phone[fax]{+3~(456)~789~012} \email{john@doe.org} % optional, remove / comment the line if not wanted \homepage{www.johndoe.com} % optional, remove / comment the line if not wanted % Social icons \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted \social[xing]{john\_doe} % optional, remove / comment the line if not wanted \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted \social[github]{jdoe} % optional, remove / comment the line if not wanted \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted % \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted % \social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted % \social[skype]{jdoe} % optional, remove / comment the line if not wanted % \social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted % \social[researchgate]{jdoe} % optional, remove / comment the line if not wanted % \social[researcherid]{jdoe} % optional, remove / comment the line if not wanted % \social[telegram]{jdoe} % optional, remove / comment the line if not wanted % \social[whatsapp]{12345678901} % optional, remove / comment the line if not wanted % \social[signal]{12345678901} % optional, remove / comment the line if not wanted % \social[matrix]{@johndoe:matrix.org} % optional, remove / comment the line if not wanted % \social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted \extrainfo{additional information} % optional, remove / comment the line if not wanted \photo[64pt][0.4pt]{picture} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file %\quote{Some quote} % optional, remove / comment the line if not wanted % bibliography adjustments (only useful if you make citations in your resume, or print a list of publications using BibTeX) % to show numerical labels in the bibliography (default is to show no labels) %\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother \renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]} % to redefine the bibliography heading string ("Publications") %\renewcommand{\refname}{Articles} % bibliography with mutiple entries %\usepackage{multibib} %\newcites{book,misc}{{Books},{Others}} %---------------------------------------------------------------------------------- % content %---------------------------------------------------------------------------------- \begin{document} %\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK %----- resume --------------------------------------------------------- \makecvtitle \section{EDUCATION} \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} %-------------------------------------------------------------------- \section{RESEARCH AND PUBLICATIONS} \cvitem{Research interests:}{} %---------------------------------------------------------- \section{Master thesis} \cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{} Detailed achievements: \begin{itemize} \item Achievement 1 \item Achievement 2 (with sub-achievements) \begin{itemize} \item Sub-achievement (a); \item Sub-achievement (b), with sub-sub-achievements (don't do this!); \begin{itemize} \item Sub-sub-achievement i; \item Sub-sub-achievement ii; \item Sub-sub-achievement iii; \end{itemize} \item Sub-achievement (c); \end{itemize} \item Achievement 3 \item Achievement 4 \end{itemize}} \cvitem{description}{Short thesis abstract} \end{document}
- Controlling what appears in front in a 3d pgfplotby James on July 12, 2026 at 6:00 pm
I'm trying to make a nice diagram to illustrate partial derivatives for my multivariable class. I have the graph of a function, a plane, the intersection of these in the graph, a tangent line, and some guide lines to show what's occurring, but (presumably because of the order in which they appear in the code) the diagram doesn't respect what object is behind a different object, i.e., the graph is drawn on top of the plane, or the plane is drawn on top of the graph, even though they ``should'' pass through one another. Is there any nice way to make whatever ``should'' be on top be drawn on top without manually finding intersections and having different domains/clip regions for different features? My code so far is below, along with the image that is produced \begin{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines = center, xmin = 0, xmax = 3, ymin = 0, ymax = 3, view = {100}{30}, xlabel = {$x$}, ylabel = {$y$}, zlabel = {$z$}, xtick=\empty, ytick=\empty, ztick=\empty, ] % Using f(x,y) = 2 - (x-2)^3 - (y-1.5)^2 %graph \addplot3[ domain =1:3, y domain = 0.5:2.5,surf,colormap/viridis, opacity=0.9] {-(x-2)^3 - (y-1.5)^2 + 2}; %plane \draw[fill = blue!90, color = blue, opacity = 0.3] (2,0,0)--(2,3,0)-- (2,3,3) node[black, above, opacity = 0.9] {$x=a$}--(2,0,3)--cycle ; %intersection of line and plane \addplot3[domain = 0.5:2.5, blue, samples y = 1, thick] ({2},{x},{2 - (2-2)^3 - (x-1.5)^2}); %tangent line \addplot3[black, thick, domain = -1:1.23] ({2},{x+1},{-2*(1-1.5)*x + 2 - (1-1.5)^2}); %point of tangancy \draw[fill = black] (2,1, {2 - (1-1.5)^2}) circle (2pt); %guide lines for point \draw[dashed, thick] (2,0,0)--(2,1,0) node[below] {$(a,b,0)$}--(0,1,0); \draw[dashed, thick,] (2,1,0) -- (2,1,{2 - (1-1.5)^2}); \end{axis} \end{tikzpicture} \end{document}
- How to plot a graph?by charuanl on July 12, 2026 at 11:18 am
I want to plot a graph for this below picture I already tried but the graph wasn't smooth. This is the graph that I tried to plot Here's my code : \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[x=1.2cm, y=0.7cm] \draw[thick, ->, >=stealth] (-2, 0) -- (6, 0) node[right] {X}; \draw[thick, ->, >=stealth] (0, -3.5) -- (0, 6.5) node[above] {Y}; \draw[thick, <->, >=stealth, color=black!80!blue] plot[smooth, tension=0.7] coordinates {(-1.5, 1.5) (0, 5) (2, 0) (4, -2) (4.8, 3)}; \fill (0, 5) circle (2.5pt); \node[above right] at (0, 5) {$(0, 5)$}; \fill (2, 0) circle (2.5pt); \node[above right] at (2, 0) {$(2, 0)$}; \fill (4, -2) circle (2.5pt); \node[below, yshift=-2pt] at (4, -2) {$(4, -2)$}; \node[above left] at (5.2, 3) {$y = f(x)$}; \end{tikzpicture} \end{center} \end{document}
- Nesting tikzcd (specifically) within tikzpictureby Just Some Old Man on July 10, 2026 at 7:34 pm
I would like to have a tikzcd within tikzpicture. The reason for this is I want to have a standard commutative diagram from tikzcd, but then also put lines, text, and shapes in the "background" of the diagram using tikzpicture treating the diagram as static and without interacting with the diagram at all (allowing for overlap, for example). A solution for tikzpicture within tikzpicture is using \newsavebox, but this doesn't work for tikzcd within tikzpicture. Specifically, \UseRawInputEncoding \documentclass[11pt]{article} \renewcommand{\baselinestretch}{1.05} \usepackage{tikz-cd} \begin{document} \newsavebox{\mybox} \sbox{\mybox}{ \begin{tikzpicture} \end{tikzpicture} } \end{document} compiles, but \UseRawInputEncoding \documentclass[11pt]{article} \renewcommand{\baselinestretch}{1.05} \usepackage{tikz-cd} \begin{document} \newsavebox{\mybox} \sbox{\mybox}{ \begin{tikzcd} A \arrow[r] & B \end{tikzcd} } \end{document} does not compile and throws the following error. Moreover, \UseRawInputEncoding \documentclass[11pt]{article} \renewcommand{\baselinestretch}{1.05} \usepackage{tikz-cd} \begin{document} \newsavebox{\mybox} \sbox{\mybox}{ \begin{tikzpicture} \begin{tikzcd} A \arrow[r] & B \end{tikzcd} \end{tikzpicture} } \end{document} does not compile and throws the following error. How can I have a tikzcd within tikzpicture?
- How to make a relatively more beautiful classification table of quadratic functions?by D G on July 9, 2026 at 12:16 am
Objectives: remove top left cell all contents are vertically and horizontally centered well balanced padding in each cell make it relatively much more beautiful \documentclass[12pt,border=12pt]{standalone} \usepackage{amsmath,array,tikz} \usetikzlibrary{math} \newcommand{\graph}[2][]{ \begin{tikzpicture}[baseline=(current bounding box.center)] \draw[blue,thick,->] (-1.5,#2)--(1.5,#2) node[right]{$x$}; \draw[red,thick,domain=-1.5:1.5,samples=100] plot(\x,{#1\x*\x/2}); \end{tikzpicture} } \renewcommand{\arraystretch}{1.8} \setlength{\tabcolsep}{18pt} \begin{document} \begin{tabular}{| >{\centering\arraybackslash}m{2.2cm}| >{\centering\arraybackslash}m{5.2cm}| >{\centering\arraybackslash}m{5.2cm}|} \cline{2-3} & $\mathbf{a>0}$ & $\mathbf{a<0}$ \\ \hline $\mathbf{D<0}$ & \graph{-1/2} & \graph[-]{1/2} \\ \hline $\mathbf{D=0}$ & \graph{0} & \graph[-]{0} \\ \hline $\mathbf{D>0}$ & \graph{1/2} & \graph[-]{-1/2} \\ \hline \end{tabular} \end{document} Any improvements are always welcome!