• Coil decoration on curved path looks strange
    by nogrodrigo on June 13, 2026 at 3:52 pm

    I am trying to achieve something like this in TikZ: The black path should go straight up and the red one should go down bent to the right, both must look like a coil. I have tried to do this using bezier curves and arcs, but the coil decoration of the bent path looks very strange, it's pointy in some parts. What am I doing wrong? MWE: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture} \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (0,2) arc (90:-90:1); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (0,0) -- (0,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}] (3,0) -- (3,2); \draw[-latex, decorate, decoration = {coil, aspect = 1.2}, color = red] (3,2) .. controls (4,2) and (4,0) .. (3,0); \end{tikzpicture} \end{document}

  • Is there any way of producing a clean ordered readable pdf with smallcaps?
    by arrobbe on June 13, 2026 at 3:26 pm

    Now I tried to solve this for several hours/days now, even with LLM support, but could not find a solution that just works even though the problem seems simple enough: For my CV, I wanted to have sections in small-caps, and the font I use on Overleaf (SourceSansPro) does support this. The rendered PDF looks great, exactly what I had in mind. However, with ATS software automatically screening CVs, They need to survive the pdf-to-text (poppler) conversion. I test this on Ubuntu with the simple pdftotext -layout shell command. With my simple and ordered article, this works fine out of the box. I used accsupp to hide some symbols and the footer, which also works good. However, the smallcaps are nasty. Out of the box ordering is fine, but they get converted to f.e. "EXPERiENCE", that is all caps but ONLY the letter i as lowercase. This simply does not look professional (or should I say "PROFESSiONAL"), and might influence some person's or machine's judgement when presented with the extracted text. My goal is to get either "Experience" or "EXPERIENCE", as long as it is consistent. You will not believe how many hours I tried to fix this, my best tries: Use accsupp again. A fix that will not work for copy-paste, but atleast for pdftotext (which would be fine enough for me). But this messes with the reading order: The sections may appear after the block text at time. fake smallcaps. The spacing between the larger initial and the rest gets converted to a space though, so you will get something like "E XPERIENCE". manually tweaking a capital I down to look like smallcaps i. I've had it as far as to get they height and width perfectly, but gave up after finding out the distance to next and previous letters needs adjustment as well. I fear adding hspace or kern will again be interpreted as space, and hope someone here has a better nonhack solution anyway. I would also be interested (optional) why this was implemented in Latex this way. But first and foremost: Does anyone know a clean solution to this? % # minimal example for my CV \documentclass[10pt,a4paper]{article} % XeLaTeX \usepackage{fontspec} \newfontfamily\sectionfont{SourceSansPro}[ Extension=.otf, UprightFont=*-Light, Letters=SmallCaps] \usepackage{lipsum} \usepackage[explicit]{titlesec} \titleformat{\section}[block]{\sectionfont\LARGE}{}{0em}{ \addfontfeatures{LetterSpace=1.8}\spaceskip=1.35\fontdimen2\font% #1% \hspace{0.55em}\leaders\hbox{\rule[0.513em]{0.077ex}{0.077ex}\hskip 2.1pt}\hfill\null}% dotted line \titlespacing*{\section}{0pt}{0.85em}{0.50em} \begin{document} \section{Experience} \lipsum[1] \section{Activities} \lipsum[2] \end{document}

  • help me create my titlepage
    by Chamanga on June 13, 2026 at 11:58 am

    I follow many articles in order to create my titlepage that meet the given standard titlepage but no success. here my preamble : \documentclass[a4paper,12pt]{report} \usepackage[margin=1in]{geometry} % define the margins on a layout paper for print \usepackage[french,american]{babel} % define text languages, second language is always the principal layout \usepackage{times} % define text policy 'times new roman' \usepackage[T1]{fontenc} % for special characters \usepackage[utf8]{inputenc} % international characters \usepackage{amssymb,amsthm,mathtools} % for symbols, definitions, and math symbols \usepackage{stmaryrd} % for extended different arrows and shapes \usepackage{graphicx,float,eso-pic,fancyhdr} % manage graphs, float, and heading/foot \usepackage{tabularx,multirow} %booktabs, % for tables \usepackage{caption,subcaption} %for titles and subtitles on tables and figures \usepackage[table]{xcolor} % for color in table and color anywhere else \usepackage[doublespacing]{setspace} %\setstretch{1.15} for interline spacing \usepackage{parskip} %parindent ,, set paragraph \setlength{\parindent}{0.5in} \begin{document} \end{document} here the titlepage and two logo. forgive me I could not get a word format of the designated titlepage.. here the content : AGENCY FOR THE SAFETY OF AIR NAVIGATION IN AFRICA AND MADAGASCAR AFRICAN SCHOOL OF METEOROLOGY AND CIVIL AVIATION DIVISION OF AIR NAVIGATION AND TRANSPORTATION END OF TRAINING PROJECT Submitted in partial fulfillment for the requirements of the awards of Air Traffic Controller Diploma TOPIC Analysis and Optimization of local Traffic Management within the CTR of Diori Hamani International Airport, Niamey: Implications for Traffic Flow Efficiency Presented and defended by: NUMUKOBWA Rosemary // RAWHOUDINE Said Charriffaini // CCA 2026A Mentored by: ISSA KANA Kossi Ndjaha // ICA EAMAC// IRO MAGAGI Amoumine //IAIM EAMAC Jury: President: Mr. ALI SAYABOU Members: Mr. ISSA KANA KOSSI NDJAHA // Mr. HASSAN DADI KEBIR Project N° 2024/DNTA/CCA2023G/09 Academic year : 2023-2024

  • Handling an image on a Beamer slide
    by Carl on June 13, 2026 at 11:58 am

    I am trying to reduce the width and height of the image on the top, and also move it a few inches down and right on the slide generated by the following code: \documentclass{beamer} \usetheme[microtype,logo={example-image}]{fibeamer} \title{Presentation Title} \subtitle{Presentation Subtitle} \author{Author's name} \begin{document} \maketitle \end{document} How can I do this?

  • PSTricks transparency ignored warning with -dNOSAFER in MiKTeX
    by Sebastiano on June 13, 2026 at 11:53 am

    I am using an up-to-date MiKTeX installation on Windows and I encounter the following warning when compiling a PSTricks document with pst-dart: %%%% WARNING: Transparency operations ignored - need to use -dNOSAFER I suspect this issue is related to the rendering of transparency and may affect the visibility of elements (e.g., numbers on the dartboard / psDart objects). I have already tried: \usepackage[pspdf=-dNOSAFER]{auto-pst-pdf} but it does not seem to have any effect. The document still compiles, but the process becomes very slow. Has anyone experienced this issue or knows the correct way to enable -dNOSAFER (or properly handle transparency) in MiKTeX + PSTricks + auto-pst-pdf on Windows? \documentclass{article} \usepackage{pstricks} \usepackage{pst-dart} \usepackage[pspdf=-dNOSAFER]{auto-pst-pdf} \begin{document} \begin{center} \begin{pspicture}(-5,-5)(5,5) \psDartBoard[fontsize=12pt,unit=2] \end{pspicture} \end{center} \end{document}

  • Direct type newa characters in TeX (without \fontspec)
    by mathrm alpha on June 13, 2026 at 11:22 am

    It seems that LaTeX does not provide a babel usepackage for the Unicode Newa region U+11400 ~ U+1147F. https://fonts.google.com/noto/specimen/Noto+Sans+Newa?preview.script=Newa I typed "Newa character in XeTeX", but must use the \fontspec command. \documentclass{article} \usepackage{fontspec} \begin{document} \fontspec{NotoSansNewa-Regular.ttf}{𑐀𑐄𑐷𑑅} \end{document}

  • Tikz customize in big operators symbols, can't display big tikz operators
    by mathrm alpha on June 13, 2026 at 8:59 am

    I followed the LaTeX question reference below to adapt it to the tikz big operators version, but it didn't display in tikz "⅌" symbol. How can I define a big plus operator that works like \bigcup? ⅌ apply in tikz text symbols? % Source - https://tex.stackexchange.com/a/394912 % Posted by GuM, modified by community. See post 'Timeline' for change history % Retrieved 2026-06-13, License - CC BY-SA 3.0 \documentclass{article} \usepackage{tikz,iftex,amsmath} \usepackage{graphicx} \makeatletter \newcommand*\@bigper[1]{\vcenter{\hbox{#1$\m@th ⅌$}}} \newcommand*\bigper{% \DOTSB % omit this line if you are not using the amsmath package \mathop{% \mathchoice {\@bigper ⅌}% {\@bigper \LARGE}% {\@bigper {}}% {\@bigper \footnotesize}% }% \slimits@ % omit this line if you are not using the amsmath package } \makeatother \ifPDFTeX \usepackage[utf8]{inputenc} \else \usepackage{newunicodechar} \fi \DeclareRobustCommand{\TikZPerSign}{% \tikz[ baseline=-.25ex, x=.13em, y=.13em, line cap=round, line join=round ]{% % Fixed box: this is important for text-like behaviour. \path[use as bounding box] (-3.05,-3.35) rectangle (3.95,4.35); % 1. The horizontal ellipse \draw[line width=.05em] (0.4,0) ellipse[x radius=2.2,y radius=.7]; % 2. The main U shape \draw[line width=.05em] (-.6,1.5) .. controls (-.6,-3.2) and (.6,-3.2) .. (.6,1.5); % 3. The top-left flourish \draw[line width=.05em] (-.6,1.5) .. controls (-1.8,2.8) and (-3.0,1.5) .. (-2.2,1.2); \fill (-.5,1.9) circle[radius=.22]; % 4. The large right loop \draw[line width=.05em] (.6,1.5) .. controls (.6,4.2) and (3.5,3.2) .. (3.5,.5) .. controls (3.5,-.8) and (2.5,-1.2) .. (1.8,-1.0); }% } \ifPDFTeX \DeclareUnicodeCharacter{214C}{\TikZPerSign} \else \newunicodechar{⅌}{\TikZPerSign} \fi \begin{document} $$\sum^1_2 \bigper^3_4$$ \end{document}

  • Moving from listings to piton
    by Pablo González L on June 13, 2026 at 1:04 am

    I'm trying to migrate from listings to piton, but unfortunately, piton doesn't have native support for Lua. From what I can understand of the documentation, I've modified lstlang2 and converted it to piton, but I don't understand how \NewPitonLanguage works or how to color things with \SetPitonStyle. This is my compiled file, but it's not producing the expected result: \documentclass{article} \usepackage[osf,nomath,mono=false,ScaleSF=0.95,ScaleRM=0.95]{libertinus-otf} \usepackage{sourcecodepro} \defaultfontfeatures[\ttfamily] { Numbers = OldStyle, Scale = 0.84249, Extension = .otf, } \setmonofont[ UprightFont = *-Regular, ItalicFont = *-RegularIt, BoldFont = *-Semibold, BoldItalicFont = *-SemiboldIt, RawFeature = {+zero,+ss01}]{SourceCodePro} \usepackage{unicode-math} \setmathfont[Scale = 0.95]{latinmodern-math.otf} \usepackage{piton} % (Pygments colors) \definecolor{pyg_comment}{HTML}{408080} \definecolor{pyg_string}{HTML}{BA2121} \definecolor{pyg_keyword}{HTML}{000080} \definecolor{pyg_builtin}{HTML}{008000} \definecolor{pyg_function}{HTML}{0000FF} \definecolor{pyg_punct}{HTML}{A020F0} % New languaje \NewPitonLanguage{SpintentLua}{ sensitive = true, alsoletter = {.}, morecomment = [l]{--}, morecomment = [s]{--[[}{]]}, morestring = [b]", morestring = [b]', morestring = [s]{[[}{]]}, morekeywords = [Delim]{ (, ), [, ] }, % Clase nativa: Keyword (Por defecto si no se especifica corchetes) morekeywords = { and, break, do, else, elseif, end, false, for, function, goto, if, in, local, nil, not, or, repeat, return, then, true, until, while }, % Clase nativa: Name.Builtin (Para funciones del sistema) morekeywords = [Name.Builtin]{ _ENV, _G, _PROMPT, _PROMPT2, _VERSION, arg, assert, collectgarbage, coroutine, coroutine.create, coroutine.isyieldable, coroutine.resume, coroutine.running, coroutine.status, coroutine.wrap, coroutine.yield, debug, debug.debug, debug.gethook, debug.getinfo, debug.getlocal, debug.getmetatable, debug.getregistry, debug.getupvalue, debug.getuservalue, debug.sethook, debug.setlocal, debug.setmetatable, debug.setupvalue, debug.setuservalue, debug.traceback, debug.upvalueid, debug.upvaluejoin, dofile, error, getmetatable, io, io.close, io.flush, io.input, io.lines, io.open, io.output, io.popen, io.read, io.stderr, io.stdin, io.stdout, io.tmpfile, io.type, io.write, ipairs, load, loadfile, math, math.abs, math.acos, math.asin, math.atan, math.ceil, math.cos, math.deg, math.exp, math.floor, math.fmod, math.huge, math.log, math.max, math.maxinteger, math.min, math.mininteger, math.modf, math.pi, math.rad, math.random, math.randomseed, math.sin, math.sqrt, math.tan, math.tointeger, math.type, math.ult, next, os, os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv, os.remove, os.rename, os.setlocale, os.time, os.tmpname, package, package.config, package.cpath, package.loaded, package.loadlib, package.path, package.preload, package.searchers, package.searchpath, pairs, pcall, print, rawequal, rawget, rawlen, rawset, require, select, setmetatable, string, string.byte, string.char, string.dump, string.find, string.format, string.gmatch, string.gsub, string.len, string.lower, string.match, string.pack, string.packsize, string.rep, string.reverse, string.sub, string.unpack, string.upper, table, table.concat, table.insert, table.move, table.pack, table.remove, table.sort, table.unpack, tonumber, tostring, type, utf8, utf8.char, utf8.charpattern, utf8.codepoint, utf8.codes, utf8.len, utf8.offset, xpcall }, % Clase nativa: Name.Function (custom API) morekeywords = [Name.Function]{ register_tex_cmd, scan_string, set_macro, clean_lexical_accents, luafun_spmoney_parse, __spintent_money_render, luafun_spdate_parse, luafun_sptime_parse, spintent_gcd_algorithm } } \SetPitonStyle { Comment = \color{pyg_comment}\fontfamily{lmtt}\small\itshape, String = \color{pyg_string} , Keyword = \color{pyg_keyword}\bfseries , Name.Builtin = \color{pyg_builtin}\bfseries , Name.Function = \color{pyg_function} , Delim = \color{pyg_punct}, } \NewPitonEnvironment{luapiton}{ !O{} } {\PitonOptions{language=SpintentLua, #1}}{} \begin{document} \begin{luapiton} -- "Submódulo Financiero: Core de validación estructural spintent" local token = token local luatexbase = luatexbase function luafun_spmoney_parse() -- Captura bidireccional nativa libre de expansiones TeX local raw_input = token.scan_string() local clean_num = string.gsub(raw_input, "%s+", "") if not clean_num:match("^[%+%-]?%d+$") then token.set_macro("l__spintent_money_status_str", "error") return "error" end -- El Puente del Millón requiere inyección canónica token.set_macro("l__spintent_money_bridge_str", "true") return "success" end local function spintent_gcd_algorithm(val_a, val_b) while val_b ~= 0 do val_a, val_b = val_b, val_a % val_b end return val_a end \end{luapiton} \end{document} How do I define a new language in piton so that it's beautifully colored? I want to copy more or less the style of the lua-widow-control documentation (which is written in ConTeXt).

  • Why doesn't \DeclareMathAlphabet applied with \bm or \boldsymbol automatically search for bx style edition?
    by mathrm alpha on June 12, 2026 at 9:26 pm

    Although you can define \mathsfit or \mathsfbfit using \DeclareMathAlphabet, it \mathsfit doesn't work within \bm or \boldsymbol. The key point is that using \bm or \boldsymbol with the \DeclareMathAlphabet math-fonts format will not automatically search for the bx edition style. \documentclass{article} \usepackage{bm} \DeclareMathAlphabet{\mathsfit}{OT1}{lmss}{m}{sl} \DeclareMathAlphabet{\mathsfbfit}{OT1}{lmss}{bx}{sl} \begin{document} use boldsymbol: $\boldsymbol{\mathsfit{ABCabc}}$\\ use bm: $\bm{\mathsfit{ABCabc}}$\\ direct sans-serif bold italic: $\mathsfbfit{ABCabc}$\\ \end{document}

  • Can enumext and enumext* share a counter?
    by Teepeemm on June 12, 2026 at 8:24 pm

    I would like to have enumext and enumext* share a counter in my tagged pdf. The best I've found so far is to use start={1+\value{enumXi}} or start={1+\value{enumXvii}}, depending on which environment came before. But that requires that I track which environment came before. Is there a way to make this happen automatically? The following outputs "1. one, 2. two, 1. three, 3. four". \documentclass{article} \usepackage{enumext} \begin{document} \begin{enumext} \item one \end{enumext} \begin{enumext}[resume] \item two \end{enumext} \begin{enumext*}[resume] \item three \end{enumext*} \begin{enumext}[resume] \item four \end{enumext} \end{document}

  • vertical line between items symbol in itemize environment
    by Aviroum on June 12, 2026 at 2:07 pm

    Is it possible to add a vertical line to the itemize environment, starting before the first item and continuing between each item until the end? similar to this, but line start before. \starttext \startitemize[5] \item text \item text \item text text. \stopitemize \stoptext

  • xeCJK typesetting: Chinese poems vertical CJK character angle error
    by mathrm alpha on June 12, 2026 at 12:47 pm

    I used TeX to create a Chinese poems. https://faculty.ndhu.edu.tw/~chenli/poetry1.htm When using the He/she method to typeset Chinese poems, it seems that individual CJK characters are not rotated correctly; only the overall angle of the text is correct: Vertical Chinese text with XeTeX \documentclass{article} \usepackage{graphicx,xeCJK} \newfontlanguage{Chinese}{CHN} \setCJKmainfont{Noto Serif CJK TC} \setCJKfamilyfont{songvert}[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs]{Noto Serif CJK TC} \newcommand*\CJKmovesymbol[1]{\raise.35em\hbox{#1}} \newcommand*\CJKmove{\punctstyle{plain}% do not modify the spacing between punctuations \let\CJKsymbol\CJKmovesymbol \let\CJKpunctsymbol\CJKsymbol} \newcommand{\six}{\qquad\qquad\qquad\qquad\qquad\qquad} \begin{document} \CJKmove \begin{center} \rotatebox{-90}{\fbox{\begin{minipage}{20em} \CJKfamily{songvert}\CJKmove 儘纏著見不得人的一張巨床\\ 那蕩婦,整日\\ 與她的浪人\\ 把偌大一張滾白的水藍被子\\ 擠\\ \hspace*{0em}\six 來\\ 擠\\ \hspace*{0em}\six 去 \end{minipage}}} \end{center} \end{document}

  • Unexpected sansmath behaviour after recent TeXLive update
    by Marius Jansen on June 12, 2026 at 7:26 am

    I have noticed that after a recent TexLive update, the behaviour of the sansmath package has changed. The two example below illustrate: The instructions: \documentclass{article} \usepackage{sansmath} \begin{document} \sansmath This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} result in the contents of the tabular environment to be italized (as if it is in a math environment). This is new, unexpected behaviour. If the \sansmath is omitted, then the content of the tabular environment is not placed in italics: \documentclass{article} \usepackage{sansmath} \begin{document} This is normal text. \begin{tabular}{ll} One & Two \\ \end{tabular} and the rest of the document follows. \end{document} I will greatly appreciate any advice on how to revert to the behaviour of \sansmath to what is expected: it impacts only math environments.

  • TeX chinese image poetry image text layout
    by mathrm alpha on June 12, 2026 at 4:06 am

    Someone helped me figure out how to create LaTeX Chinese image poetry, The vertical CJK text was not arranged according to the size of the shape. Source: https://jedi.nehs.hc.edu.tw/newsletter/306/poem.html LaTeX code I've tried with tikz text typesetting: \documentclass{article} \usepackage{tikz} \usepackage[margin=0.5in]{geometry} \usepackage{xeCJK} \definecolor{carcolor}{RGB}{242, 186, 166} \begin{document} \centering \begin{tikzpicture} % Wheels (車輪) \fill[carcolor, rounded corners=6pt] (1.8, 0.7) rectangle (2.6, 1.5); \fill[carcolor, rounded corners=6pt] (3.4, 0.7) rectangle (4.2, 1.5); % Main body of the car (主車身) \fill[carcolor, rounded corners=10pt] (0, 1) rectangle (6, 2.3); % Top cabin part (車頂) \fill[carcolor, rounded corners=12pt] (1.6, 2.2) rectangle (4.4, 3.6); \linespread{0.8}\selectfont \scriptsize % 第 1 行:叭叭(最右側,車身內) \node[text width=0.35cm, align=center] at (5.2, 1.65) {叭\\叭}; % 第 2 行:我是(車身內) \node[text width=0.35cm, align=center] at (4.8, 1.65) {我\\是}; % 第 3 行:一輛車(進入車頂邊緣) \node[text width=0.35cm, align=center] at (4.3, 1.9) {一\\輛\\車}; % 第 4 行:我可以載人(深入車頂) \node[text width=0.35cm, align=center] at (3.8, 2.3) {我\\可\\以\\載\\人}; % 第 5 行:也可以載貨物(深入車頂) \node[text width=0.35cm, align=center] at (3.3, 2.45) {也\\可\\以\\載\\貨\\物}; % 第 6 行:雖然身不大(深入車頂) \node[text width=0.35cm, align=center] at (2.8, 2.45) {雖\\然\\身\\不\\大}; % 第 7 行:卻是大力士(深入車頂) \node[text width=0.35cm, align=center] at (2.3, 2.45) {卻\\是\\大\\力\\士}; % 第 8 行:不管是跑車(進入車頂邊緣) \node[text width=0.35cm, align=center] at (1.8, 2.3) {不\\管\\是\\跑\\車}; % 第 9 行:客車或是貨車(字數多,稍微往下靠在車身與車頂間) \node[text width=0.35cm, align=center] at (1.3, 1.9) {客\\車\\或\\是\\貨\\車}; % 第 10 行:全都是(左側,車身內) \node[text width=0.35cm, align=center] at (0.8, 1.65) {全\\都\\是}; % 第 11 行:神奇 車!(最左側,車身內) \node[text width=0.35cm, align=center] at (0.4, 1.65) {神\\奇\\車\\!}; \end{tikzpicture} \end{document} I only realized how strange the text position and height were when I used it.

  • Overleaf editor no longer accepts numbers and Chinese punctuation in one file [closed]
    by 毕竟话少 on June 12, 2026 at 1:18 am

    I accidentally pressed some unknown key combination in Overleaf, and since then I can no longer type numbers or Chinese punctuation marks (e.g. 123, ;, 。, ‘) in one specific .tex file. English letters still work normally. Environment: Windows 11 Chrome Chinese IME What I have checked: The same file can be edited normally on another collaborator's computer. If I copy the file to a local TeX editor, numbers and Chinese punctuation can be entered normally. The problem only occurs in Overleaf on my computer. Has anyone seen a similar issue or knows which editor shortcut/keybinding might have been triggered accidentally?

  • How do I draw the feedback loop in my latex code for my research paper?
    by Sajid Mahfuz on June 11, 2026 at 10:21 pm

    How do I create the feedback loop shown in the image? I’ve also been trying to make all the arrow lengths uniform, but I keep failing (bear with me, I’m a beginner in LaTeX), and I need the diagram to be larger. I’ve attached my code and the image. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, calc} \begin{document} \begin{center} \begin{tikzpicture}[ node distance=1.2cm and 1.2cm, block/.style={ draw, rectangle, minimum width=2.5cm, minimum height=0.9cm, line width=1pt, align=center }, innerblock/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, line width=1pt, % changed from 0.5pt to 1pt align=center }, disturbance/.style={ draw, rectangle, minimum width=1.8cm, minimum height=0.9cm, fill=red!10, line width=1pt, align=center }, arrow/.style={-{Triangle[length=2mm,width=2mm]}, line width=1pt} ] % ================= INPUT ================= \node[circle, draw, minimum size=0.8cm, line width=1pt] (sum) at (0,0) {}; % changed to 1pt % X inside circle (also 1pt) \draw[line width=1pt] (sum.north east) -- (sum.south west); \draw[line width=1pt] (sum.north west) -- (sum.south east); \draw[arrow] (-1.2,0) -- (sum.west); \node[left=1.2cm] {$Z_D$}; % ================= CONTROL ================= \node[block, above right=0.5cm and 1.0cm of sum] (sdre) {SDRE}; \node[block, below right=0.5cm and 1.0cm of sum] (pi) {PI}; \draw[arrow] (sum.east) -- ++(0.2,0) |- (sdre.west); \draw[arrow] (sum.east) -- ++(0.2,0) |- (pi.west); % ================= ACTUATION ================= \node[block, right=1.0cm of sdre] (actuator) {Actuator}; \node[block, right=1.0cm of pi] (thrust) {Thrust}; \draw[arrow] (sdre.east) -- (actuator.west); \draw[arrow] (pi.east) -- (thrust.west); % ================= THRUST MAP ================= \node[block, below=0.8cm of pi] (thrustMap) {Thrust Map}; \draw[arrow] (pi.south) -- (thrustMap.north); \draw[arrow] (thrustMap.east) -| (thrust.south); % ================= DYNAMICS ================= \node[innerblock, right=1.0cm of actuator] (att_dyn) {Attitude Dynamics}; \node[innerblock, right=1.0cm of thrust] (alt_dyn) {Altitude Dynamics}; \draw[arrow] (actuator.east) -- (att_dyn.west); \draw[arrow] (thrust.east) -- (alt_dyn.west); % ================= DISTURBANCES ================= \node[disturbance, above=0.6cm of att_dyn] (distAtt) {Gust}; \node[disturbance, below=0.6cm of alt_dyn] (distAlt) {Gust}; \draw[arrow] (distAtt.south) -- (att_dyn.north); \draw[arrow] (distAlt.north) -- (alt_dyn.south); % ================= OUTPUT MERGE ================= \coordinate (mergeTop) at ($(att_dyn.east)+(0.6,0)$); \coordinate (mergeBottom) at ($(alt_dyn.east)+(0.6,0)$); \draw[line width=1pt] (att_dyn.east) -- (mergeTop); \draw[line width=1pt] (alt_dyn.east) -- (mergeBottom); \draw[line width=1pt] (mergeTop) -- (mergeBottom); % Midpoint of the vertical line \coordinate (mergeMid) at ($(mergeTop)!0.5!(mergeBottom)$); % Output arrow from that midpoint \draw[arrow] (mergeMid) -- ++(0.8,0) node[right] {Output}; \end{tikzpicture} \end{center} \end{document}

  • Two overlapping circles with lens effect between two colored rectangles in TikZ
    by Morace Elegbele on June 11, 2026 at 3:43 pm

    I am trying to reproduce the following header style for exercises in a LaTeX document using TikZ. The header consists of two rectangles side by side: A blue rectangle on the left with rounded corners An orange rectangle on the right with rounded corners Each rectangle has a circle on its inner edge (right edge of the blue one, left edge of the orange one). The two circles overlap and their intersection should appear as a white lens-shaped area (vesica piscis effect), as if the circles were drawn on top of the rectangles and cut through both. The exercise number is placed inside the blue circle area, and the word "Exercice" appears in the orange rectangle. I tried using even odd rule and \clip with \begin{scope} but I cannot get the intersection to look clean — either one circle hides the other, or the background rectangle shows through. Here is my current code: [coller votre code ici] And here is the image I want to reproduce: [joindre l'image] How can I achieve this effect cleanly in TikZ? My code: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{xcolor} \definecolor{bleuFonce}{RGB}{30,100,180} \definecolor{orangeTitre}{RGB}{255,140,0} \newcounter{numexo} \newcommand{\titreExercice}{% \stepcounter{numexo}% \begin{tikzpicture} % Rectangle bleu avec bords arrondis \fill[bleuFonce, rounded corners=8pt] (0,0) rectangle (4.5,0.7); % Grand cercle bleu débordant à gauche \fill[bleuFonce,even odd rule] (2.3,0.35) circle(0.42); % Cercle blanc intérieur gauche \fill[white] (2.3,0.35) circle (0.28); % Rectangle orange avec bords arrondis (par dessus à droite) \fill[orangeTitre, rounded corners=8pt] (2.8,0) rectangle (5.8,0.7); % Grand cercle orange débordant à gauche du rectangle orange \fill[orangeTitre,even odd rule] (2.8,0.35) circle (0.42); % Cercle blanc intérieur droit \fill[white] (2.8,0.35) circle (0.28); % Numéro dans le cercle blanc gauche \node[bleuFonce, font=\large\bfseries] at (0.1,0.35) {\thenumexo}; % Texte "Exercice" en blanc \node[white, font=\large\bfseries] at (4.5,0.35) {Exercice}; \end{tikzpicture}% } \begin{document} \titreExercice \bigskip \titreExercice \end{document}

  • Can I use BFO to validate my PDFs locally?
    by Teepeemm on June 11, 2026 at 3:26 pm

    I've been creating PDFs using \DocumentMetadata{ lang=en, tagging=on, pdfstandard=ua-2, tagging-setup={ math/setup=mathml-SE } } Accessible math in PDF – finally! lists five accessibility checkers that support PDF/UA-2. The first one is BFO with an online tool OctoPDF. The online tool limits my uploads to 2MB, but they make their Java library available. Is it possible to use the BFO library to validate PDF/UA-2 files locally?

  • How to define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode?
    by Nyx on June 11, 2026 at 3:00 pm

    In [1] we have the following MWE of the definition and use-cases of a \set macro, which is a resizeable paired-brace delimiter with \suchthat detection for set-builder notation. \documentclass[varwidth]{standalone} \usepackage{amsmath} \usepackage{xparse} \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\set}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \ExplSyntaxOff \begin{document} $\set{a,b,c}\cup\set[\big]{a,b,c}$ $\set{x\suchthat a<x<b}$ $\set[\Big]{x\suchthat a<x<b}$ $\set*{x\suchthat \dfrac{1}{2}<x<3}$ \end{document} In [2] we have the following MWE of the definition and use-cases of a \splitatcommas macro, which allows for line breaks at commas inside inline math mode. \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff \newcommand{\tuple}[1]{(\splitatcommas{#1})} \newcommand{\set}[1]{\{\splitatcommas{#1}\}} \begin{document} \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} % for this particular case \setlength{\parindent}{0pt} % just for this example $\splitatcommas{ \frac{1}{2},\frac{3}{5},\frac{8}{13},\frac{21}{34},\frac{55}{89}, \frac{144}{233},\frac{377}{610},\frac{987}{1597},\frac{2584}{4181}, \frac{6765}{10946},\frac{17711}{28657},\frac{46368}{75025}, \frac{121393}{196418},\frac{317811}{514229},\frac{832040}{1346269}, \frac{2178309}{3524578},\frac{5702887}{9227465}, \frac{14930352}{24157817},\frac{39088169}{63245986},\frac{102334155}{165580141} }$ \medskip $\set{ \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88}, \tuple{a,b,c,d},\tuple{1,2,3,4,5,6},\tuple{11,22,33,44,55,66,77,88} }$ \end{document} My question is How can I define a 'smart', resizeable paired-brace delimiter macro that supports set-builder notation and line-breaking at commas in inline math mode (i.e., combine \set from [1] and \splitatcommas from [2])? The following is an MWE of my attempt so far. \documentclass[ border={10pt}, varwidth, ]{standalone} \usepackage{unicode-math} % \usepackage{amsmath} % Loaded by `unicode-math` \usepackage[default]{fontsetup} % For NewCM \usepackage{mleftright} % \usepackage{xparse} % Integrated into the kernel from 2020-10-01 \newcommand{\suchthat}{\mid} \ExplSyntaxOn \NewDocumentCommand{\setaux}{som} { % limit the scope for \suchthat \group_begin: \cs_set_protected:Npn \suchthat { \tl_use:N \l__egreg_set_st_tl } \IfBooleanTF{#1} { \egreg_set_auto:n { #3 } } { \egreg_set_fixed:nn { #2 } { #3 } } \group_end: } \tl_new:N \l__egreg_set_st_tl \cs_new_protected:Nn \__egreg_set_st:n { \tl_set:Nn \l__egreg_set_st_tl { #1 } } \cs_new_protected:Nn \egreg_set_auto:n { \__egreg_set_st:n { \nonscript\; \middle\vert \nonscript\; } \left\{ #1 \right\} } \cs_new_protected:Nn \egreg_set_fixed:nn { \tl_if_novalue:nTF { #1 } { \__egreg_set_st:n { \mid } \lbrace #2 \rbrace } { \__egreg_set_st:n { \mathrel{#1\vert} } \mathopen{#1\lbrace} #2 \mathclose{#1\rbrace} } } \NewDocumentCommand{\splitatcommas}{m} { \group_begin: \int_compare:nNnF { \char_value_mathcode:n {`,} }= {"8000} { \char_set_active_eq:nN {`,} \__kennytm_comma: \char_set_mathcode:nn {`,} {"8000} } #1 \group_end: } \cs_new_protected:Ne \__kennytm_comma: { \mathchar\char_value_mathcode:n {`,}~ \penalty0~\exp_not:n { \hspace{0pt plus 1em} } } \ExplSyntaxOff % Combined macro \NewDocumentCommand{\set}{som}{ \IfBooleanTF{#1}{\splitatcommas{\setaux*{#3}}}{% \IfNoValueTF{#2}{% \splitatcommas{\setaux{#3}}% }{% \splitatcommas{\setaux[#2]{#3}}% } } } % Empty set \setmathfont[CharacterVariant=2]{NewCMMath-Regular.otf} \AtBeginDocument{% \renewcommand{\emptyset}{\char"2300}% \renewcommand{\varnothing}{\char"2205}} \begin{document} % \setlength{\lineskiplimit}{2pt}\setlength{\lineskip}{3pt} \setlength{\parindent}{0pt} % \(\set{a,b,c}\cup\set[\big]{a,b,c}\) \(\set{x\suchthat a<x<b}\) \(\set[\Big]{x\suchthat a<x<b}\) \(\set*{x\suchthat \dfrac{1}{2}<x<3}\) We have \(\emptyset = \set{}\) and \(\omega_0 = \set{ \emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}, \set{\emptyset, \set{\emptyset}, \allowbreak {\set{\emptyset, \set{\emptyset}}, \set{\emptyset, \set{\emptyset}, \set{\emptyset, \set{\emptyset}}}}}, \dots }. \) % \end{document} References [1] E. Gregorio. (2020). TeX, LaTeX and math. TUGboat, 41(1), 43–53. https://www.latex-project.org/publications/2020-egreg-TUB-tb127gregorio-math.pdf [2] E. Gregorio. (2025, May 17). Allowing line break at ',' in inline math mode? (answer). TeX Stack Exchange. https://tex.stackexchange.com/a/309558

  • mathc10 don't apply bold mode
    by mathrm alpha on June 11, 2026 at 1:54 pm

    Although mathc10 has a lowercase version \mathcal, it cannot be used with bold fonts because it is undefined. % Source - https://tex.stackexchange.com/a/747706 % Posted by John, modified by community. See post 'Timeline' for change history % Retrieved 2026-06-11, License - CC BY-SA 4.0 \documentclass{article} \DeclareFontFamily{OT1}{mathc}{} \DeclareFontShape{OT1}{mathc}{m}{it}{<-> mathc10}{} \DeclareMathAlphabet{\mathcal}{OT1}{mathc}{m}{it} \DeclareMathAlphabet{\mathbfcal}{OT1}{mathc}{bx}{it} \begin{document} $\mathcal{Aa}$, $\mathbfcal{Aa}$ \end{document} This not only didn't become bold, but it was also fallen back to the \mathrm style. The bold \mathcal should look like this: It would be even better if it could fake bold and achieve a similar width styles effect. References: Lowercase \mathcal

  • Drawing tikz five line style arrows in text display
    by mathrm alpha on June 11, 2026 at 12:15 pm

    Although a five-line arrow was unearthed, but: This is simply a very long, cramped five-line tikz arrows result, not the size of the blue arrow in the image. Furthermore, none of the blue arrows in the answer (in the image) scaled down to the the same text size (arrows can be black). \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{nfold} \begin{document} \begin{tikzpicture} \draw[double equal sign distance, nfold=5, arrows=-Implies] (0,-0.7) -- (3,-0.7); \end{tikzpicture} \end{document} References: Drawing a quadruple arrow

  • How to use LaTeX to calculate the average divided by the sum and the ranking of values ​in a table? [closed]
    by mathrm alpha on June 11, 2026 at 8:34 am

    While there are similar posts on LaTeX for calculating sums, they don't seem to mention division for the average sum. How can I automatically calculate sums in a LaTeX table? There posts was no mention of automatic ranking based on score. \documentclass{article} \usepackage{datatool} \usepackage{xfp} \usepackage{booktabs} \newcommand{\addteam}[4]{% \DTLnewrow{basketball}% \DTLnewdbentry{basketball}{Name}{#1}% \DTLnewdbentry{basketball}{Winner}{#2}% \DTLnewdbentry{basketball}{Loser}{#3}% \DTLnewdbentry{basketball}{AvgScore}{#4}% \def\winrate{\fpeval{round(#2 / (#2 + #3), 3)}}% \DTLnewdbentry{basketball}{WinRate}{\winrate}% } \begin{document} \DTLnewdb{basketball} \addteam{Detroit Pistons}{60}{22}{117.8} \addteam{Boston Celtics}{56}{26}{114.9} \addteam{New York Knicks}{53}{29}{116.5} \DTLsort{WinRate=descending}{basketball} \begin{table}[htbp] \centering \caption{Basketball Team Standings} \begin{tabular}{cccccc} \toprule Ranking & Name & Winner & Loser & Win rate & Average score \\ \midrule \DTLforeach*{basketball}{% \Name=Name,\Winner=Winner,\Loser=Loser,\WinRate=WinRate,\AvgScore=AvgScore}{% \DTLcurrentrow~& \Name & \Winner & \Loser & \WinRate & \AvgScore \\ }% \bottomrule \end{tabular} \end{table} \end{document} Although there are results, the rankings and the winning percentage seem a bit odd. Source: https://www.espn.com/nba/standings

  • Querying CTAN packages by licence
    by Psychonaut on June 10, 2026 at 4:29 pm

    Packages on CTAN are tagged according to their licence; this information is displayed on each package's page along with other basic metadata such as its name, version, maintainer, and topics. I know that I can browse or search for all packages assigned to a given topic using the topics index or using the extended search form. Is there any similarly easy way of finding all CTAN packages with a given licence? Here's what I've tried so far: I checked the master licence list, but if I click on one of the licences in the list, the page I'm taken to gives me only basic information about the licence and (in some cases) some statistics about the number of packages that use that licence. I checked the extended search form form. It doesn't have a dedicated field for the licence. If I do search for a licence name, then it returns only the individual licence pages described above, not the packages that use that licence. I checked the XML API and JSON API. They provide endpoints for listing all licences, and for listing all packages, but not for listing packages by licence. The entries returned by the "List of licenses" endpoints list only a unique ID, name, and free/non-free status for each licence, but not which packages use that licence. The entries returned by the "List of Packages" endpoints list only a unique ID, name, and brief description for that package, but not its licence. I could use the XML or JSON API to get a full list of packages, extract the unique IDs to construct the URL for each package's page on CTAN, download each of those pages, and then scrape the licence data. But there are currently almost 7000 packages, so scraping the site in this way will take a long time, and I'm not sure that the site operators would appreciate all that traffic. (My use case, in case anyone is wondering, is finding packages that are available on CTAN but that are not distributed with TeX Live due to licensing restrictions. I'm curious as to what sort of functionality I and other TeX Live users might be missing out on, and might decide to code freely licensed replacements for any seemingly useful non-free packages.)

  • tikz: absolute coordinates of a node placed in a second node positioned relative to a third node
    by pluton on June 10, 2026 at 4:18 pm

    A MWE is probably better than lengthy explanations: \documentclass[tikz,10pt]{standalone} \usetikzlibrary{positioning} % savedbox with a sketch \newsavebox{\sdbox} \sbox{\sdbox}{% \begin{tikzpicture}[scale=0.35] \node (rbox) [fill=red] at (1,0) {}; \node (bbox) [fill=blue] at (1,1) {}; \end{tikzpicture}% } \begin{document} \begin{tikzpicture}[scale=0.5,font=\small] % blocks \node (comp) {computer}; \node[right = 1cm of comp] (sb) {\usebox{\sdbox}}; % arrow \draw[->] (rbox) -- (comp); \end{tikzpicture} \end{document} Upon compilation, you'll notice that the arrow does not link the node (rbox) from its absolute position after the node (sb) is drawn, as it should go from the red rectangle to the computer box. Would it be possible to achieve that goal?

  • How do I directly input foreign scripts into LuaLaTeX equations?
    by Sageof6Paths on June 10, 2026 at 4:03 pm

    How do I directly input foreign scripts into LuaLaTeX equations? I'm using LuaLaTeX with the unicode-math package. I have text mode setup that uses fallback font for any glyphs not covered. I also want to do the same for math mode, but with different font choices. I'm currently unable to input a foreign script like Kanji and Thai without adding commands like \text{} around it, despite having fonts that support Kanji and Thai. I want to be able to input scripts like Kanji and Thai into equations without extra commands as long as I have the proper font for it. \documentclass{article} \usepackage{unicode-math} \directlua{ luaotfload.add_fallback ("textFallback", { "SimSun:mode=harf;", } ) } \setmainfont{Arial}[RawFeature={fallback=textFallback}] \setmathfont{Latin Modern Math} \begin{document} This is a sample text. この文章は日本語です。 $∀天∈ℝ, ∀ค∈ℝ, 天+ค∈ℝ$ \end{document} Edit: Added clarification and included the Thai script.

  • Good way to write dynamical physics problems [closed]
    by Rassine Orange on June 10, 2026 at 3:58 pm

    I'm a physics teacher and I'd like to share here my way to write "dynamical" exercises. After posting a couple of questions more or less related, I've read comments implying that my way of doing could be improved. When I say "dynamical" I mean that the variables of my problem (\mass, \speed, ...) are coded in the questions. I don't wanna hard-code for the following reasons: If I write everything with, say, m=3kg, and then I wanna change to m=2kg, I don't wanna rewrite everything. I can reuse the questions very fast with different values, e.g. for exams or for the students to practise. Below a MWE of a "typical" problem. Please, do not focus on the Physics, but on the LaTeX ideas, mainly: Could I improve the way I store variables and compute other quantities? For the units, which command should I use: mathrm; text ; textup; ... ? Anything else? I want to make clear that, even if in this example I use basic maths (mainly the 4 operations), I typically need all the usual fonctions (powers, log, sqrt, exp, trigo), so any solution that you suggest should handle all these functions. \documentclass{article} \usepackage{xfp} % provides \fpeval \usepackage{amsmath} \begin{document} \def\mass{3} \def\speed{10} \def\distance{1} \edef\Ekin{\fpeval{0.5*\mass*\speed^2}} \edef\force{\fpeval{0.5*\mass*\speed^2/\distance}} A mass $m=\mass\, \mathrm{kg}$ starts moving from rest. After a distance $d=\distance\, \textup{m}$ its velocity is $\speed\, \text{m} \times \text{s}^{-1}$\,. Compute the force. \vspace{5cm} Solution First you compute the kinetic energy $$ E=\frac 12 mv^2 = \Ekin\, \mathrm{J} $$ blabla more details, more equations, blablabla Use the work theorem to find $$ F=\frac{mv^2}{2d} = \force\, \mathrm{N}\,. $$ \end{document} Community Edit: Current output

  • Custom section formatting with titlesec and ulem: making subsection underline span both number and title
    by Nevpzo on June 10, 2026 at 2:52 pm

    I found a section formatting style on TeX Stack Exchange that I really like. The only issue is that it applies the same formatting to sections, subsections, and subsubsections, whereas I would like a clearer hierarchy with sections having boxed number + colored underline; subsections having colored number + underline; subsubsections having colored number and text (no underline). My current implementation is below. It mostly works, but for some reason, there is a gap in the underline between the section number box and the title. I am using titlesec and ulem for the underlining. \documentclass{article} % === Required packages === \RequirePackage[explicit]{titlesec} \RequirePackage{soul} \RequirePackage{xcolor} \definecolor{titlepagecolor}{rgb}{.13, .36, .38} % === Underline helper === \newbox\TitleUnderlineTestBox \newcommand*\TitleUnderline[1]{% \bgroup \setbox\TitleUnderlineTestBox\hbox{\colorbox{titlepagecolor}\strut}% \setul{\dimexpr\dp\TitleUnderlineTestBox-.3ex\relax}{.3ex}% {\color{titlepagecolor}\ul{\mbox{#1}}}% \egroup } % === (sub)Section numbers === \newcommand*\SectionNumberBox[1]{% \colorbox{titlepagecolor}{% \makebox[2.5em][c]{% \color{white}\strut\csname the#1\endcsname }% }% \hspace{0.5em}% } \newcommand*\SubsectionNumberColored{% {\color{titlepagecolor}\thesubsection}% } % === Section === \titleformat{\section} {\Large\bfseries\sffamily\color{titlepagecolor}} {\SectionNumberBox{section}} {0pt} {\TitleUnderline{#1}} % === Subsection === \titleformat{\subsection} {\large\bfseries\sffamily} {} {0pt} {% \TitleUnderline{% \SubsectionNumberColored\hspace{0.8em}#1% }% } % === Subsubsection === \titleformat{\subsubsection} {\normalsize\bfseries\sffamily} {} {0pt} {\textcolor{titlepagecolor}{\thesubsubsection\hspace{0.8em}#1}} \begin{document} \section{Section} \subsection{Subsection} \subsubsection{Subsubsection} \end{document}

  • Bibliography not printing
    by Dots_and_Arrows on June 10, 2026 at 2:19 pm

    The Bibliography chapter name is visible but there are no bibliography entries. I have checked the bibtex file carefully and it is there in the folder containing BibTeX entries. What should I change in the code? \documentclass[a4paper,12pt,english,oneside]{book} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{4} \usepackage[T1]{fontenc} \usepackage{imakeidx} \usepackage[utf8]{inputenc} \usepackage[a4paper,left=1in,right=1in,top=1in,bottom=1in,bindingoffset=0.5in]{geometry} \usepackage{graphicx} \usepackage{import} \usepackage{verbatim} \usepackage{amsmath} \usepackage{afterpage} \usepackage{dashrule} \usepackage{amsmath,amssymb,amsfonts,amsthm} \usepackage{algorithmic} \usepackage[ruled,vlined]{algorithm2e} \usepackage{multirow} \usepackage{comment} \usepackage{array} \usepackage{ragged2e} \usepackage{type1cm} \usepackage{enumitem} \usepackage{pifont} \usepackage{dirtytalk} \usepackage{epigraph} \usepackage{setspace} \usepackage{indentfirst} \usepackage[super]{nth} \usepackage{enumitem} \usepackage{caption} \usepackage{lipsum} \usepackage{tikz} \usepackage{tikz-cd} \usepackage[all]{xy} \usetikzlibrary{cd} \usetikzlibrary{shapes,arrows,positioning} \setlength{\headheight}{15pt} \makeindex[columns=2, title=Index, intoc, options=-s mystyle.ist] \newcommand{\nomunit}[1]{% \renewcommand{\nomentryend}{\hspace*{\fill}#1}} %---------------------------------------------- % ******** PDF, URL AND HYPERLINK PACKAGES ********* % \usepackage{url} \usepackage[dvipsnames]{xcolor} \usepackage{indentfirst} \usepackage{hyperref} \hypersetup{colorlinks=false} % ************* DROPCAP PACKAGE ******************** % \usepackage{type1cm} \usepackage{lettrine} \setlength{\DefaultNindent}{0pt} \setlength{\DefaultFindent}{3pt} \setcounter{DefaultLines}{2} \renewcommand{\LettrineTextFont}{\rmfamily} \renewcommand{\LettrineFontHook}{\fontfamily{ptm}} %---------------------------------------------- %***************** GRAPHICS PACKAGES AND COMMANDS **************% \usepackage{float} \usepackage{subfigure} \usepackage{multicol} \newcolumntype{R}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % ****************** Chapter Title header *************************** \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{\nouppercase{\footnotesize\leftmark}} \fancyhead[C]{} \fancyhead[R]{} \renewcommand{\headrulewidth}{0.1pt} \cfoot{\thepage} \usepackage[explicit]{titlesec} \usepackage[style=numeric,backend=biber,sorting=nyt]{biblatex} \addbibresource{Bibliography.bib} %\titleformat*{\subsubsection}{\normalfont\normalsize\bfseries\color{Sepia}} % **************Theorem Environments ************************* \renewcommand{\baselinestretch}{1.2} \setlength{\oddsidemargin}{.2cm} \setlength{\evensidemargin}{.2cm} \topmargin -1.4cm \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{result}[theorem]{Result} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{observation}[theorem]{Observation} \newtheorem{observations}[theorem]{Observations} \newtheorem{definitions}[theorem]{Definitions} \newtheorem{example}[theorem]{Example} \newtheorem{examples}[theorem]{Examples} \newtheorem{remark}[theorem]{Remark} \newtheorem{remarks}[theorem]{Remarks} \newtheorem{notation}[theorem]{Notations} \newtheorem{note}[theorem]{Note} \newtheorem{notes}[theorem]{Notes} \newtheorem{ques}[theorem]{Question} \renewcommand{\thefootnote}{} %**************** BEGIN DOCUMENT *********************% % \begin{document} %***************** FRONT MATTER *****************% \pagestyle{empty} \import{FRONT MATTER/}{PAGE01-Title_Page} %\blankpage \import{FRONT MATTER/}{PAGE02-Certificate_from_Supervisors} \newpage \import{FRONT MATTER/}{PAGE03-Author declaration} \newpage \import{FRONT MATTER/}{PAGE04-Dedication} \clearpage %-------------------------------------------------- %************* NUMBERED FRONT PAGES ************% \frontmatter \pagestyle{plain} \pagenumbering{roman} \setcounter{page}{1} \singlespacing \phantomsection \addcontentsline{toc}{chapter}{Acknowledgements} \import{FRONT MATTER/}{PAGE05-Acknowledgement} \clearpage \phantomsection \addcontentsline{toc}{chapter}{Abstract} \import{FRONT MATTER/}{PAGE06-Abstract} \clearpage \onehalfspacing \phantomsection \addcontentsline{toc}{chapter}{List of Research Papers} \import{FRONT MATTER/}{List of publications} \clearpage \singlespacing \tableofcontents %---------------------------------------------------- %***************** CHAPTER_1 **********************% \mainmatter \pagenumbering{arabic} \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 1: Introduction} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter1} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_2 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 2: Preliminaries} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter2} % Change Chapter Number here \clearpage %\csname @openrightfalse\endcsname %---------------------------------------------------- %***************** CHAPTER_3 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 3: Running title} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter3} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_4 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 4: Running title} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter4} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_5 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 5: On Singquandle Shadows} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter5} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_6 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 6: Categorical interplay in Singquandles} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter6} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** CHAPTER_7 **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Chapter 7: Conclusions and Remarks} % Change Chapter Heading here \renewcommand{\headrulewidth}{1pt} \onehalfspacing \include{CHAPTERS/Chapter7} % Change Chapter Number here \clearpage %---------------------------------------------------- %***************** BIBLIOGRAPHY **********************% \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Bibliography} \renewcommand{\headrulewidth}{1pt} \printbibliography \clearpage \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\thepage} \fancyhead[LE,RO]{Index} \renewcommand{\headrulewidth}{1pt} \printindex \end{document}

  • Custom optional parameters for classes in LaTeX
    by Zerina on June 10, 2026 at 9:46 am

    I have customized a MyReport.cls file with a custom optional parameter "Reference", which functions as follows: It defaults to None. If the user passes a bib file path via \documentclass[Reference={ref.bib}]{MyReport}, then execute: \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{ref.bib}} \AtEndDocument{\printbibliography[heading=bibintoc]} How can I implement this feature? Here is the MyReport.cls \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \ProvidesClass{MyReport}[2024/01/01 v1.0.0 My custom report class] \def\xjtuthesis{MyReport} \def\meta@version{1.0.0} \def\metaversion{\meta@version} \newcommand{\MyReport@bibfile}{} \DeclareOption{Reference}{ \renewcommand{\MyReport@bibfile}{#1} } \ProcessOptions\relax \LoadClass[twoside]{article} \RequirePackage[zihao=-4]{ctex} \RequirePackage[a4paper,left=2.54cm,right=2.54cm,top=3.18cm,bottom=3.18cm]{geometry} \RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref} \makeatletter \ifx\MyReport@bibfile\@empty % do nothing \else \RequirePackage[hyperref=true,backend=biber,url=false,doi=false,sorting=none,style=gb7714-2015]{biblatex} \AtBeginDocument{\addbibresource{\MyReport@bibfile}} \AtEndDocument{ \clearpage \printbibliography[heading=bibintoc] } \fi \makeatother and the below is the main.tex \documentclass[Reference={ref.bib}]{MyReport} \begin{document} \section{test} text\cite{Deb2014} \end{document} the ref.bib: @article{Deb2014, title = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}: {{Solving Problems With Box Constraints}}}, shorttitle = {An {{Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach}}, {{Part I}}}, author = {Deb, Kalyanmoy and Jain, Himanshu}, date = {2014-08}, journaltitle = {IEEE Transactions on Evolutionary Computation}, shortjournal = {IEEE Trans. Evol. Computat.}, volume = {18}, number = {4}, pages = {577--601}, issn = {1089-778X, 1089-778X, 1941-0026}, doi = {10.1109/TEVC.2013.2281535}, url = {http://ieeexplore.ieee.org/document/6600851/}, urldate = {2025-11-08}, langid = {english} } No matter how I try, although the compilation does not report an error, it prompts: LaTeX: Unused global option(s): [Reference]. LaTeX: Empty bibliography. In fact, there is no "References" section, as if the operation to generate the references was not executed. How can I solve this problem? Note: \documentclass{MyReport} \addbibresource{ref.bib} \begin{document} \section{test} text\cite{Deb2014} \printbibliography[heading=bibintoc] \end{document} This main.tex can be compiled successfully, indicating that the basic functionalities of ref.bib and MyReport.cls are correct.

  • How to type rotated Khitan text format in TeX? [closed]
    by mathrm alpha on June 9, 2026 at 1:23 pm

    Example of rotated Khitan text on a web page: Image Source: https://www.babelstone.co.uk/Fonts/KhitanSmall.html Font: https://fonts.google.com/noto/specimen/Noto+Serif+Khitan+Small+Script But it seems LaTeX can't output rotated Khitan text. There is no command rotated Khitan text format in LaTeX. \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{NotoSerifKhitanSmallScript-Regular.ttf} \xeCJKDeclareCharClass{CJK}{"18B00 -> "18CD5} \begin{document} 𘬐𘬑𘬒 Doesn't type rotated Khitan text \end{document} References: How can xeCJK expand its support to include "new standard Unihan characters"? Unicode PDF: https://www.unicode.org/charts/PDF/U18B00.pdf