Hot
- fix spacing in ∰ \oiiintby mathrm alpha on June 14, 2026 at 5:59 am
Although I used his/her method and got \oiiint, the not big display mode spacing wasn't handled well. https://tex.stackexchange.com/a/404609/329597 \documentclass{article} \usepackage{esint} \newcommand{\oiiint}{\oiint \hspace{-13.5pt} \int} \begin{document} $A\oiiint B$\\ \[A \oiiint B\] \end{document}
- Looking for a automatic online Latex compilationby Seb on June 14, 2026 at 5:58 am
I'm working on a digital communication project at the municipal level. I'm looking for a free tool (no budget at this stage) to compile a LaTeX file hosted on one of my servers. My LaTeX code is therefore located on my server, and I want a user (who knows the URL of this file) to be able to submit it to an online compiler such as latexonline.cc. I'm contacting you simply to find out if there are other online compilation tools that can take a URL as a parameter and automatically compile my LaTeX code? Thank you.
- Tikz snail's outline rotation text layoutby mathrm alpha on June 14, 2026 at 2:31 am
Although this was mentioned last time: TeX chinese image poetry image text layout However, it seems no one has mentioned the layout of the snail's rotating circle text in the TeX code. Source: https://jedi.nehs.hc.edu.tw/newsletter/306/poem.html I wrote a LaTeX program that rotates text, but the result isn't quite like this image; it's just a reference to the circle rotation text format. Furthermore, the "比羚羊還要快。" part is missing display. \documentclass{article} \usepackage{tikz,xeCJK} \usepackage[margin=0.5in]{geometry} \setCJKmainfont{Noto Sans CJK TC} \usetikzlibrary{decorations.text} \begin{document} \centering \begin{tikzpicture} % Define colors based on the image \definecolor{snailbody}{RGB}{240, 200, 180} \definecolor{shellbase}{RGB}{220, 170, 150} % Body and Tail \fill[snailbody] (-3.5, 0.5) .. controls (-4, -1) and (-3.5, -3.5) .. (0, -3.5) -- (6, -2.5) -- (0, -2.8) .. controls (-2, -2.8) and (-3, -1) .. (-3.5, 0.5); % Head \fill[snailbody] (-3.5, 0.5) circle (0.9); % Antennae \draw[snailbody, line width=4pt] (-3.9, 1.2) -- (-4.3, 2.6); \fill[snailbody] (-4.3, 2.7) circle (0.2); \draw[snailbody, line width=4pt] (-3.1, 1.2) -- (-2.9, 2.6); \fill[snailbody] (-2.9, 2.7) circle (0.2); % Shell (large circle) \fill[shellbase] (0.5, 0) circle (3.7); %text parts \path [ decorate, decoration={ text along path, text={背著重重的家,上山下海,尋找食物,我總比別人慢一步,我想如果我拋棄沉重的家,我一定爬得比羚羊還要快。}, text align=center } ] (0.5, 0) ++(180:4.0) arc (180:0:4.0); \end{tikzpicture} \end{document} Although there are similar: How to fine tune rotation of text along circular path? However, There was no mention of a text rotation format resembling a snail's outline.
- Making only /hyperref links to figures blueby X3nius on June 14, 2026 at 2:13 am
Is there a possibility to only make the hyperref links to figures blue? You can see this in \hyperref[fig1]{Figure 1} and in \hyperref[fig2]{Figure 2} and Figure 1, Figure 2 shall be printed in blue. When using \hypersetup{ colorlinks = true, linkcolor = blue } even my table of contents and the links in the bibliography section become blue.
- TeXpresso does not render Chinese characters correctly — how to enable Chinese support?by Tom on June 13, 2026 at 11:10 pm
I am using https://github.com/let-def/texpresso and https://github.com/let-def/texpresso.vim to write LaTeX on ubuntu 22.04. It provides real-time preview, but it cannot properly display Chinese characters. How can I make it correctly support and display Chinese? \documentclass[UTF8]{ctexbook} \begin{document} KK你好,世界!Ka \\ KWMA \end{document} The log is below: hello@hello:~/test$ ls -la total 76 drwxrwxr-x 2 hello hello 4096 6月 14 08:31 . drwxr-x--- 17 hello hello 4096 6月 13 17:55 .. -rw-rw-r-- 1 hello hello 79 6月 13 17:38 latexmkrc -rw-rw-r-- 1 hello hello 32 6月 13 21:23 main.aux -rw-rw-r-- 1 hello hello 4858 6月 13 21:23 main.fdb_latexmk -rw-rw-r-- 1 hello hello 16011 6月 13 21:23 main.fls -rw-rw-r-- 1 hello hello 14111 6月 13 21:23 main.log -rw-rw-r-- 1 hello hello 4862 6月 13 21:23 main.pdf -rw-rw-r-- 1 hello hello 815 6月 13 21:23 main.synctex.gz -rw-rw-r-- 1 hello hello 89 6月 14 08:31 main.tex -rw-rw-r-- 1 hello hello 976 6月 13 21:23 main.xdv hello@hello:~/test$ cat main.log This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2022/dev/Debian) (preloaded format=xelatex 2026.6.13) 13 JUN 2026 21:23 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **main.tex (./main.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-01-21> (/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexbook.cls (/usr/share/texlive/texmf-dist/tex/latex/ctex/config/ctexbackend.cfg File: ctexbackend.cfg 2021/12/12 v2.5.8 Backend configuration file (CTEX) ) (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty Package: expl3 2022-01-21 L3 programming layer (loader) (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def File: l3backend-xetex.def 2022-01-12 L3 backend support: XeTeX (|extractbb --version) \c__kernel_sys_dvipdfmx_version_int=\count181 \l__color_backend_stack_int=\count182 \g__color_backend_stack_int=\count183 \g__graphics_track_int=\count184 \l__pdf_internal_box=\box50 \g__pdf_backend_object_int=\count185 \g__pdf_backend_annotation_int=\count186 \g__pdf_backend_link_int=\count187 )) Document Class: ctexbook 2021/12/12 v2.5.8 Chinese adapter for class book (CTEX ) (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty Package: xparse 2022-01-12 L3 Experimental document command parser ) (/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty Package: l3keys2e 2022-01-12 LaTeX2e option processing using LaTeX3 keys ) (/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty Package: ctexhook 2021/12/12 v2.5.8 Document and package hooks (CTEX) ) (/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexpatch.sty Package: ctexpatch 2021/12/12 v2.5.8 Patching commands (CTEX) ) (/usr/share/texlive/texmf-dist/tex/latex/base/fix-cm.sty Package: fix-cm 2020/11/24 v1.1t fixes to LaTeX (/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file LaTeX Font Info: Redeclaring font encoding TS1 on input line 47. )) \l__ctex_tmp_int=\count188 \l__ctex_tmp_box=\box51 \l__ctex_tmp_dim=\dimen138 \g__ctex_section_depth_int=\count189 \g__ctex_font_size_int=\count190 (/usr/share/texlive/texmf-dist/tex/latex/ctex/config/ctexopts.cfg File: ctexopts.cfg 2021/12/12 v2.5.8 Option configuration file (CTEX) ) (/usr/share/texlive/texmf-dist/tex/latex/base/book.cls Document Class: book 2021/10/04 v1.4n Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo File: bk10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) ) \c@part=\count191 \c@chapter=\count192 \c@section=\count193 \c@subsection=\count194 \c@subsubsection=\count195 \c@paragraph=\count196 \c@subparagraph=\count197 \c@figure=\count198 \c@table=\count199 \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen139 ) (/usr/share/texlive/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def File: ctex-engine-xetex.def 2021/12/12 v2.5.8 XeLaTeX adapter (CTEX) (/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK.sty Package: xeCJK 2021/12/12 v3.8.8 Typesetting CJK scripts with XeLaTeX (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty Package: xtemplate 2022-01-12 L3 Experimental prototype document functions \l__xtemplate_tmp_dim=\dimen140 \l__xtemplate_tmp_int=\count266 \l__xtemplate_tmp_muskip=\muskip16 \l__xtemplate_tmp_skip=\skip49 ) \l__xeCJK_tmp_int=\count267 \l__xeCJK_tmp_box=\box52 \l__xeCJK_tmp_dim=\dimen141 \l__xeCJK_tmp_skip=\skip50 \g__xeCJK_space_factor_int=\count268 \l__xeCJK_begin_int=\count269 \l__xeCJK_end_int=\count270 \c__xeCJK_CJK_class_int=\XeTeXcharclass1 \c__xeCJK_FullLeft_class_int=\XeTeXcharclass2 \c__xeCJK_FullRight_class_int=\XeTeXcharclass3 \c__xeCJK_HalfLeft_class_int=\XeTeXcharclass4 \c__xeCJK_HalfRight_class_int=\XeTeXcharclass5 \c__xeCJK_NormalSpace_class_int=\XeTeXcharclass6 \c__xeCJK_CM_class_int=\XeTeXcharclass7 \c__xeCJK_HangulJamo_class_int=\XeTeXcharclass8 \l__xeCJK_last_skip=\skip51 \g__xeCJK_node_int=\count271 \c__xeCJK_CJK_node_dim=\dimen142 \c__xeCJK_CJK-space_node_dim=\dimen143 \c__xeCJK_default_node_dim=\dimen144 \c__xeCJK_default-space_node_dim=\dimen145 \c__xeCJK_CJK-widow_node_dim=\dimen146 \c__xeCJK_normalspace_node_dim=\dimen147 \l__xeCJK_ccglue_skip=\skip52 \l__xeCJK_ecglue_skip=\skip53 \l__xeCJK_punct_kern_skip=\skip54 \l__xeCJK_last_penalty_int=\count272 \l__xeCJK_last_bound_dim=\dimen148 \l__xeCJK_last_kern_dim=\dimen149 \l__xeCJK_widow_penalty_int=\count273 Package xtemplate Info: Declaring object type 'xeCJK/punctuation' taking 0 (xtemplate) argument(s) on line 2337. \l__xeCJK_fixed_punct_width_dim=\dimen150 \l__xeCJK_mixed_punct_width_dim=\dimen151 \l__xeCJK_middle_punct_width_dim=\dimen152 \l__xeCJK_fixed_margin_width_dim=\dimen153 \l__xeCJK_mixed_margin_width_dim=\dimen154 \l__xeCJK_middle_margin_width_dim=\dimen155 \l__xeCJK_bound_punct_width_dim=\dimen156 \l__xeCJK_bound_margin_width_dim=\dimen157 \l__xeCJK_margin_minimum_dim=\dimen158 \l__xeCJK_kerning_total_width_dim=\dimen159 \l__xeCJK_same_align_margin_dim=\dimen160 \l__xeCJK_different_align_margin_dim=\dimen161 \l__xeCJK_kerning_margin_width_dim=\dimen162 \l__xeCJK_kerning_margin_minimum_dim=\dimen163 \l__xeCJK_bound_dim=\dimen164 \l__xeCJK_reverse_bound_dim=\dimen165 \l__xeCJK_margin_dim=\dimen166 \l__xeCJK_minimum_bound_dim=\dimen167 \l__xeCJK_kerning_margin_dim=\dimen168 \g__xeCJK_family_int=\count274 \l__xeCJK_fam_int=\count275 \g__xeCJK_fam_allocation_int=\count276 \l__xeCJK_verb_case_int=\count277 \l__xeCJK_verb_exspace_skip=\skip55 (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty Package: fontspec 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty Package: fontspec-xetex 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTe X \l__fontspec_script_int=\count278 \l__fontspec_language_int=\count279 \l__fontspec_strnum_int=\count280 \l__fontspec_tmp_int=\count281 \l__fontspec_tmpa_int=\count282 \l__fontspec_tmpb_int=\count283 \l__fontspec_tmpc_int=\count284 \l__fontspec_em_int=\count285 \l__fontspec_emdef_int=\count286 \l__fontspec_strong_int=\count287 \l__fontspec_strongdef_int=\count288 \l__fontspec_tmpa_dim=\dimen169 \l__fontspec_tmpb_dim=\dimen170 \l__fontspec_tmpc_dim=\dimen171 (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2021/04/29 v2.0v Standard LaTeX package ) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg File: xeCJK.cfg 2021/12/12 v3.8.8 Configuration file for xeCJK package )) \ccwd=\dimen172 \l__ctex_ccglue_skip=\skip56 ) \l__ctex_ziju_dim=\dimen173 (/usr/share/texlive/texmf-dist/tex/latex/zhnumber/zhnumber.sty Package: zhnumber 2020/05/01 v2.8 Typesetting numbers with Chinese glyphs \l__zhnum_scale_int=\count289 (/usr/share/texlive/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg File: zhnumber-utf8.cfg 2020/05/01 v2.8 Chinese numerals with UTF8 encoding )) \l__ctex_heading_skip=\skip57 (/usr/share/texlive/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.d ef File: ctex-scheme-chinese-book.def 2021/12/12 v2.5.8 Chinese scheme for book (C TEX) (/usr/share/texlive/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg File: ctex-name-utf8.cfg 2021/12/12 v2.5.8 Caption with encoding UTF-8 (CTEX) )) (/usr/share/texlive/texmf-dist/tex/latex/ctex/ctex-c5size.clo File: ctex-c5size.clo 2021/12/12 v2.5.8 c5size option (CTEX) ) (/usr/share/texlive/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def File: ctex-fontset-fandol.def 2021/12/12 v2.5.8 Fandol fonts definition (CTEX) Package fontspec Warning: Font "FandolSong-Regular" does not contain requested (fontspec) Script "CJK". Package fontspec Info: Font family 'FandolSong-Regular(0)' created for font (fontspec) 'FandolSong-Regular' with options (fontspec) [Script={CJK},Extension={.otf},BoldFont={FandolSong-Bold },ItalicFont={FandolKai-Regular}]. (fontspec) (fontspec) This font family consists of the following NFSS (fontspec) series/shapes: (fontspec) (fontspec) - 'normal' (m/n) with NFSS spec.: (fontspec) <->"[FandolSong-Regular.otf]/OT:language=dflt;" (fontspec) - 'small caps' (m/sc) with NFSS spec.: (fontspec) - 'bold' (b/n) with NFSS spec.: (fontspec) <->"[FandolSong-Bold.otf]/OT:language=dflt;" (fontspec) - 'bold small caps' (b/sc) with NFSS spec.: (fontspec) - 'italic' (m/it) with NFSS spec.: (fontspec) <->"[FandolKai-Regular.otf]/OT:language=dflt;" (fontspec) - 'italic small caps' (m/scit) with NFSS spec.: )) (/usr/share/texlive/texmf-dist/tex/latex/ctex/config/ctex.cfg File: ctex.cfg 2021/12/12 v2.5.8 Configuration file (CTEX) ) (./main.aux) \openout1 = `main.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. LaTeX Font Info: ... okay on input line 4. Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid (fontspec) this). \symlegacymaths=\mathgroup4 LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold' (Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 4. LaTeX Font Info: Redeclaring math accent \acute on input line 4. LaTeX Font Info: Redeclaring math accent \grave on input line 4. LaTeX Font Info: Redeclaring math accent \ddot on input line 4. LaTeX Font Info: Redeclaring math accent \tilde on input line 4. LaTeX Font Info: Redeclaring math accent \bar on input line 4. LaTeX Font Info: Redeclaring math accent \breve on input line 4. LaTeX Font Info: Redeclaring math accent \check on input line 4. LaTeX Font Info: Redeclaring math accent \hat on input line 4. LaTeX Font Info: Redeclaring math accent \dot on input line 4. LaTeX Font Info: Redeclaring math accent \mathring on input line 4. LaTeX Font Info: Redeclaring math symbol \colon on input line 4. LaTeX Font Info: Redeclaring math symbol \Gamma on input line 4. LaTeX Font Info: Redeclaring math symbol \Delta on input line 4. LaTeX Font Info: Redeclaring math symbol \Theta on input line 4. LaTeX Font Info: Redeclaring math symbol \Lambda on input line 4. LaTeX Font Info: Redeclaring math symbol \Xi on input line 4. LaTeX Font Info: Redeclaring math symbol \Pi on input line 4. LaTeX Font Info: Redeclaring math symbol \Sigma on input line 4. LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 4. LaTeX Font Info: Redeclaring math symbol \Phi on input line 4. LaTeX Font Info: Redeclaring math symbol \Psi on input line 4. LaTeX Font Info: Redeclaring math symbol \Omega on input line 4. LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 4. LaTeX Font Info: Redeclaring symbol font `operators' on input line 4. LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font (Font) `operators' in the math version `normal' on input line 4. LaTeX Font Info: Overwriting symbol font `operators' in version `normal' (Font) OT1/cmr/m/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font (Font) `operators' in the math version `bold' on input line 4. LaTeX Font Info: Overwriting symbol font `operators' in version `bold' (Font) OT1/cmr/bx/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Overwriting symbol font `operators' in version `normal' (Font) TU/lmr/m/n --> TU/lmr/m/n on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal' (Font) OT1/cmr/m/it --> TU/lmr/m/it on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal' (Font) OT1/cmr/bx/n --> TU/lmr/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal' (Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal' (Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 4. LaTeX Font Info: Overwriting symbol font `operators' in version `bold' (Font) TU/lmr/m/n --> TU/lmr/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold' (Font) OT1/cmr/bx/it --> TU/lmr/b/it on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold' (Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 4. LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold' (Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 4. [1 ] (./main.aux) ) Here is how much of TeX's memory you used: 6660 strings out of 476191 200691 string characters out of 5812072 543018 words of memory out of 5000000 27379 multiletter control sequences out of 15000+600000 470997 words of font info for 42 fonts, out of 8000000 for 9000 1348 hyphenation exceptions out of 8191 89i,5n,97p,481b,270s stack positions out of 5000i,500n,10000p,200000b,80000s Output written on main.xdv (1 page, 976 bytes). The nvim config(default) is below: hello@hello:~/.config/nvim/start/texpresso.vim/lua$ cat texpresso.lua local M = {} -- Configuration M.texpresso_path = "texpresso" -- Logging routines -- Debug logging function, silent by default -- Change this variable to redirect the debug log. -- E.g. require('texpresso').logger = foo M.logger = nil -- Cache last arguments passed to TeXpresso M.last_args = {} -- Debug printing function -- It uses vim.inspect to pretty-print and vim.schedule -- to delay printing when vim is textlocked. local function p(...) if M.logger then local args = {...} if #args == 1 then args = args[1] end local text = vim.inspect(args) vim.schedule(function() M.logger(text) end) end end -- ID of the buffer storing TeXpresso log -- TODO: current logic is clunky when the buffer is closed. -- look how other plugins handle that. local log_buffer_id = -1 -- Get the ID of the logging buffer, creating it if it does not exist. local function log_buffer() if not vim.api.nvim_buf_is_valid(log_buffer_id) then for _, buf in ipairs(vim.api.nvim_list_bufs()) do if vim.api.nvim_buf_get_name(buf) == "texpresso-log" then log_buffer_id = buf end end end if not vim.api.nvim_buf_is_valid(log_buffer_id) then log_buffer_id = vim.api.nvim_create_buf(true, true) vim.api.nvim_buf_set_name(log_buffer_id, "texpresso-log") end return log_buffer_id end -- Append an array of lines to a buffer -- The first entry is appended to the last line, other entries introduce new -- lines. local function buffer_append(buf, lines) local last = vim.api.nvim_buf_get_lines(buf, -2, -1, false) lines[1] = last[1] .. lines[1] vim.api.nvim_buf_set_lines(buf, -2, -1, false, lines) end -- Get buffer lines as a single string, -- suitable for serialization to TeXpresso. local function buffer_get_lines(buf, first, last) if first == last then return "" else return table.concat(vim.api.nvim_buf_get_lines(buf, first, last, false), "\n") .. "\n" end end -- Format a color VIM color to a TeXpresso color. -- VIM represents a color as a single integer, encoding it as 0xRRGGBB. -- RR, GG, BB are 8-bit unsigned integers. -- TeXpresso represents a color as triple (R, G, B). -- R, G, B are floating points in the 0.0 .. 1.0 range. local function format_color(c) local b = math.fmod(c, 256) / 255 c = math.floor(c / 256) local g = math.fmod(c, 256) / 255 c = math.floor(c / 256) local r = math.fmod(c, 256) / 255 return {r, g, b} end -- Tell VIM to display file:line local skip_synctex = false local function synctex_backward(file, line) skip_synctex = true if not(pcall(function() vim.cmd("b +" .. line .. " " .. file) end)) then vim.cmd("e +" .. line .. " " .. file) end end -- Manage quickfix list -- Allocate and reuse a quickfix id local qfid = -1 local function getqfid() local id = vim.fn.getqflist({id=qfid}).id if id > 0 then return id end vim.fn.setqflist({}, ' ', { title = "TeXpresso" }) qfid = vim.fn.getqflist({id=0}).id return qfid end -- Set quickfix items local function setqf(items) local idx idx = vim.fn.getqflist({id=getqfid(), idx=0}).idx vim.fn.setqflist({}, 'r', {id=getqfid(), items = items, idx=idx}) end -- Parse a Tectonic diagnostic line to quickfix format local function format_fix(line) local typ, f, l, txt typ, f, l, txt = string.match(line, "([a-z]+): (.*):(%d*): (.*)") if not typ then return { text = line } elseif string.match(txt, "^Overfull") or string.match(txt, "^Underfull") then return {} else return { type = typ, filename = f, lnum = l, text = txt } end end -- TeXpresso process internal state local job = { queued = nil, process = nil, generation = {}, } -- Log output from TeX M.log = {} -- Problems (warnings and errors) emitted by TeX M.fix = {} M.fixcursor = 0 local function shrink(tbl, count) for _ = count, #tbl - 1 do table.remove(tbl) end end local function expand(tbl, count, default) for i = #tbl + 1, count do table.insert(tbl, i, default) end end -- Internal functions to communicate with TeXpresso -- Process a message received from TeXpresso -- TODO: handle message, right now they are only logged local function process_message(json) -- p(json) local msg = json[1] if msg == "reset-sync" then job.generation = {} elseif msg == "synctex" then vim.schedule(function() synctex_backward(json[2], json[3]) end) elseif msg == "truncate-lines" then local name = json[2] local count = json[3] if name == "log" then shrink(M.log, count) expand(M.log, count, "") elseif name == "out" then expand(M.fix, count, {}) M.fixcursor = count end elseif msg == "append-lines" then local name = json[2] if name == "log" then for i=3,#json do table.insert(M.log, json[i]) end elseif name == "out" then for i=3,#json do local cursor = M.fixcursor + 1 M.fixcursor = cursor M.fix[cursor] = format_fix(json[i]) end vim.schedule(function() setqf(M.fix) end) end elseif msg == "flush" then shrink(M.fix, M.fixcursor) vim.schedule(function() setqf(M.fix) end) end end -- Send a command to TeXpresso function M.send(...) local text = vim.json.encode({...}) if job.process then vim.fn.chansend(job.process, {text, ""}) end -- p(text) end -- Reload buffer in TeXpresso function M.reload(buf) local path = vim.api.nvim_buf_get_name(buf) M.send("open", path, buffer_get_lines(buf, 0, -1)) end -- Communicate changed lines function M.change_lines(buf, index, count, last) -- p("on_lines " .. vim.inspect{buf, index, index + count, last}) local path = vim.api.nvim_buf_get_name(buf) local lines = buffer_get_lines(buf, index, last) M.send("change-lines", path, index, count, lines) end -- Attach a hook to synchronize a buffer function M.attach(...) local args = {...} local buf = args[1] or 0 local generation = job.generation M.reload(buf) vim.api.nvim_buf_attach(buf, false, { on_detach=function(_detach, buf) M.send("close", vim.api.nvim_buf_get_name(buf)) end, on_reload=function(_reload, buf) M.reload(buf) generation = job.generation end, on_lines=function(_lines, buf, _tick, first, oldlast, newlast, _bytes) if generation == job.generation then M.change_lines(buf, first, oldlast - first, newlast) else M.reload(buf) generation = job.generation end end, }) end -- Public API -- Use VIM theme in TeXpresso function M.theme() local colors = vim.api.nvim_get_hl(0, { name = "Normal" }) if colors.bg and colors.fg then M.send( "theme", format_color(colors.bg), format_color(colors.fg) ) end end -- Check if TeXpresso process is running function M.is_running() return job.process ~= nil end -- Stop the TeXpresso process function M.stop() if job.process then vim.fn.chanclose(job.process) job.process = nil end end -- Go to next page function M.next_page() M.send("next-page") end -- Go to previous page function M.previous_page() M.send("previous-page") end -- Go to the page under the cursor function M.synctex_forward() local line,_col = unpack(vim.api.nvim_win_get_cursor(0)) local file = vim.api.nvim_buf_get_name(0) M.send("synctex-forward", file, line) end local last_line = -1 local last_file = "" function M.synctex_forward_hook() if skip_synctex then skip_synctex = false return end local line,_col = unpack(vim.api.nvim_win_get_cursor(0)) local file = vim.api.nvim_buf_get_name(0) if last_line == line and last_file == file then return end last_line = line last_file = file M.send("synctex-forward", file, line) end -- Start a new TeXpresso viewer function M.launch(args) if job.process then vim.fn.chanclose(job.process) end local cmd = {M.texpresso_path, "-json", "-lines"} if #args == 0 then args = M.last_args else M.last_args = args end if #args == 0 then print("No root file has been specified, use e.g. :TeXpresso main.tex") return end for _, arg in ipairs(args) do table.insert(cmd, arg) end job.queued = "" job.process = vim.fn.jobstart(cmd, { on_stdout = function(j, data, e) if job.queued then data[1] = job.queued .. data[1] end job.queued = table.remove(data) for _, line in ipairs(data) do if line ~= "" then local ok, val = pcall(function () process_message(vim.json.decode(line)) end) if not ok then p("error while processing input", line, val) end end end end, on_stderr = function(j, d, e) local buf = log_buffer() buffer_append(buf, d) if vim.api.nvim_buf_line_count(buf) > 8000 then vim.api.nvim_buf_set_lines(buf, 0, -4000, false, {}) end end, on_exit = function() job.process = nil end, }) job.generation = {} M.theme() end -- Hooks vim.api.nvim_create_autocmd("ColorScheme", { callback = M.theme }) vim.api.nvim_create_autocmd("CursorMoved", { pattern = {"*.tex"}, callback = M.synctex_forward_hook }) -- VIM commands vim.api.nvim_create_user_command('TeXpresso', function(opts) M.launch(opts.fargs) end, { nargs = "*", complete = "file", } ) return M But when I use command: latexmk -xelatex main.tex I can get correct result.
- Errors in \newtheorem command when compiling after updating MikTex Updateby X3nius on June 13, 2026 at 11:05 pm
I'm experiencing issues in compiling after having updated MikTex repositories. A sample document looks like this \documentclass[a4paper,11pt]{article} \usepackage{geometry} \usepackage{layout} \usepackage{amssymb,amsmath,amsfonts,amsthm} \usepackage{thmtools} \usepackage[ngerman]{babel} \usepackage[arrow,curve,matrix,tips]{xy} \usepackage{enumerate} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{xpatch} \usepackage{nicefrac} \def\IR{{\mathbb{R}}} \geometry{top=2cm,bottom=1.5cm} \expandafter\def\expandafter\normalsize\expandafter{% \normalsize% \setlength\abovedisplayskip{10pt}% \setlength\belowdisplayskip{10pt}% \setlength\abovedisplayshortskip{10pt}% \setlength\belowdisplayshortskip{10pt}% } \numberwithin{equation}{section} \declaretheoremstyle[% spaceabove=0pt,% spacebelow=10pt,% headfont=\normalfont\itshape,% postheadspace=1em,% qed=\qedsymbol,% headpunct={} ]{mystyle} \theoremstyle{definition} \newtheorem{definition}{Definition}[section] \newtheorem{satz}[definition]{Satz} \newtheorem{lemma}[definition]{Lemma} \newtheorem{beispiel}[definition]{Beispiel} \newtheorem{beispiele}[definition]{Beispiele} \newtheorem{notation}[definition]{Notation} \newtheorem{bemerkung}[definition]{Bemerkung} \newtheorem{korollar}[definition]{Korollar} \newtheorem{derivation}[definition]{Herleitung} \declaretheorem[name={BeweisSpeziell:},style=mystyle,unnumbered]{Proofort} \makeatletter \addtotheorempostfoothook[Proof]{\@endpetrue} \makeatother \makeatletter \addtotheorempostfoothook[Proofort]{\@endpetrue} \makeatother \begin{document} \begin{satz} Lorem ipsum. \end{satz} \end{document} Now, I'm facing an error "\c@satz already defined. Or name \end... illegal, see p.192 of the manual", and the same error occurs for all the other \newtheorem environments. Before the update, the complete document was compiled perfectly! What is going wrong here? Also, when I use other names like "stz" instead of "satz" or "lmma" instead of "lemma", I get the same result.
- Flip edition "≝" Vertical proportions, eliminating redundant \scriptstyleby mathrm alpha on June 13, 2026 at 11:02 pm
Why does \overset{\mathrm{def}}{=} display correctly as ≝, but when I use \overset{=}{\mathrm{def}} (not use \scriptstyle) the letters are too large and the equals sign becomes too small? \documentclass{article} \usepackage{amsmath} \begin{document} $\overset{\mathrm{def}}{=}$ and $\overset{=}{\mathrm{def}}$ \end{document} Although using \scriptstyle fixed the display, the command still looks complicated and requires typing extra \scriptstyle command codes. \documentclass{article} \usepackage{amsmath} \begin{document} $\overset{\mathrm{def}}{=}$ and $\overset{=}{{\scriptstyle \mathrm{def}}}$ \end{document}
- Is it possible to make one of these sorts of bulleted tables of contents?by Electric Coffee on June 13, 2026 at 9:27 pm
I don't really know how else to describe it. I recently saw a ToC like this, and I was wondering if there's a way to do this in LaTeX, where the bullets also get filled out automatically depending on the individual category of the chapter:
- How to change the thickness of the sides of the triangle? [closed]by Intuition on June 13, 2026 at 8:02 pm
I want to draw the triangle in the following figure with sides a little thicker than the other sides please. Any help\hint on that?
- Coil decoration on curved path looks strangeby 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 titlepageby 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 slideby 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 MiKTeXby 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 TeXby 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} But I don't want to type \fontspec in every line of Newa formatting.
- Tikz customize in big operators symbols, can't display big tikz operatorsby 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 pitonby 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 environmentby 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 errorby 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 updateby 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 layoutby 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. Advanced Extension: Tikz snail's outline rotation text layout
- 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 TikZby 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}
- 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
- Drawing tikz five line style arrows in text displayby 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 arrows in the @Explorer answer (in the image) scaled down to the the same text size. This is example diagram text in: A \LLleftarrow B \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
- Querying CTAN packages by licenceby 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.)
- 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.
- Custom optional parameters for classes in LaTeXby 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.