Hot
- How to control the custom titlebox and keep the header numbering together with ctexbook?by Explorer on April 4, 2026 at 7:50 am
Here below is my code: % lualatex needed \documentclass[12pt,fontset=fandol]{ctexbook} \usepackage{lipsum} \usepackage{tikz} \makeatletter \newcommand{\chapter@title@box}[1]{ % \stepcounter{chapter} \begin{center} \begin{tikzpicture} \draw[black!90] (.35\textwidth,0) -- ++ (.75\textwidth,0); \draw[black!90] (.35\textwidth,-1) -- ++ (0, 4cm); \node[anchor = south west,font = \Huge\heiti, inner xsep = 1cm] at (.35\textwidth,0) {#1}; \node[anchor = east, fill = gray, text = white, font= \Large\heiti,inner sep = 6pt] at (.35\textwidth,2) {第 \thechapter\ 章}; \end{tikzpicture} \end{center} } \ctexset{ chapter = { name = {}, number = {}, % numbering = false, format = \chapter@title@box, } } \makeatother \begin{document} \chapter{章节标题内容一} \lipsum[1-5] \chapter{章节标题内容二} \lipsum[1-5] \end{document} which gives: However, if I just use the plain ctexbook settings, the header would with numbering: \documentclass[12pt,fontset=fandol]{ctexbook} \usepackage{lipsum} \begin{document} \chapter{章节标题内容一} \lipsum[1-5] \chapter{章节标题内容二} \lipsum[1-5] \end{document} with numbering, it shows 第x章 as pointed out: The key point, here, is that I remove the numbering, and manually handle the chapter counter, which not in good compliable with marks. I have tried to mimic the example shown in texdoc ctex, Page.27, sec 7.6, which make good use of: nameformat with \chapternamebox format just with style setting But in my case, I want the "number" part and "title" part to be put in one tikzpicture, so I set numbering=false, but it also remove the heading's counter... Any suggestions on how to add the header's chapter counter, based on my code? I think maybe it could be controlled with the titleformat and numberformat seperately, and put then together in a tikzpicture, but I have no idea on how to put it as I was after...
- How create a new command fonts directive in usepackage "sty", that is, to use the TTF of fontspec to apply a new command?by 2023 Siri on April 4, 2026 at 7:14 am
I want to use usepackage sty to retrieve TTF files and then add new instruction mappings to glyphs. For example in create new font usepackage command: \matham{J} maps to U+2F182 (illustrated).
- How to make sidenote in proof enviroment with kaobook classby 조문수 on April 4, 2026 at 7:08 am
Sidenote works well in standard KAOBOOK CLASS. However, it appears that Sidenote does not work properly in the proof environment of AMS. How can I resolve this?
- pgf-PeriodicTable: monochrome (black/white) Periodic table - problem with radiation symbol and 'Ra' shorthandby cis on April 4, 2026 at 6:57 am
I want to create a perfect monochrome Periodic table (for black and white printing, etc.). 1/2. Instead of the colored "radioactive symbol" (which seems to be set hard-coded by the package), I'd like to use an asterisk '*' or a simple text character. 2/2. Secondly, the term 'Ra' in the legend must also be replaced by the star (or the other symbol used). Note: The aforementioned "radioactive symbol" seems to be (hard-coded) retrieved from the file /texmf-dist/tex/latex/pgf-periodictable/pgfPT_radio_symbol.pdf → which is located near the package file. One could therefore "hack" the problem by placing a PDF file with the same name in one's working directory. However, I'm wondering if there's a more elegant solution. PS: Since I'm not yet very familiar with the package, general suggestions for improvement are welcome. My progress so far: \documentclass[paper=a4, paper=landscape]{scrarticle} \usepackage[margin=11mm,showframe=false,]{geometry} \usepackage{lmodern} \usepackage{pgf-PeriodicTable} \begin{document} \pgfPT[ cell font=\sffamily,% normal LaTeX font (avoids font warnings of pgf-PeriodicTable) csSolid, show title=false, %Z list={1,...,36,87,88},% test Z backcolor=white, Z color=black, Z font=\footnotesize\bfseries, %CS render mode=fill and outline,% default CS outline color=black,% Outline always black CS solid=black, % Solid: black CS liquid=gray,% Liquid: gray CS synt=white,% Synthetic: white ("inline color") CS gas=lightgray,% Gaseous: white (only outline visible) light gray name color=black, name font=\fontsize{5.125pt}{6.125pt}\selectfont,% default: \tiny but seems to large Ar color=black, capitalize element names=true,% please! period label color=black,% Color of period numbers (left) group label color=black,% Color of group numbers (top) %legend radio color=red,% test MNM line width=1.4pt,% default: 0.8pt MNM line color=black,% default: red!80!black %show MNM line=false,% alternative ] \end{document}
- Fix large spacing when using align with casesby Your neighbor Todorovich on April 4, 2026 at 6:06 am
I have a simple piece of code: \begin{align} \nabla_x L(x, \mu) = \nabla f(x) + A^\top \mu & = 0\\ Ax & = b \end{align} which generates However if I put a cases around it \begin{align} \begin{cases} \nabla_x L(x, \mu) = \nabla f(x) + A^\top \mu & = 0\\ Ax & = b \end{cases} \end{align} then a very large white space appears What gives? And is there a fix to this?
- How to create a four-line style arrow and apply the style of a native LaTeX font? (include⟰⟱)by 2023 Siri on April 4, 2026 at 4:43 am
Example: ⭅⭆⟰⟱ The size of the 4-line arrow should be the same as the font size in mathematical format. Can only be used as a LaTeX mathematical format command Summary of requirements: The size must not differ from the original LateX symbols; it must maintain the native style.
- tikz, multipart node: how to define height of empty partby Zarko on April 4, 2026 at 3:21 am
My question is very similar to this question which unfortunately hasn't answered yet. in one comment is mentioned, that multi part node has a bug. Do anyone know, if meantime was this bug fixed or know some work around it? \documentclass[border=1mm, 11pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture}[ MPNV/.style args = {#1/#2}{%, rectangle split parts=#1, text width=#2, shape=rectangle split, draw, rectangle split empty part height=7mm, rectangle split part fill={white, cyan!50}, inner sep=1mm, outer sep=0mm, align=center, }, ] \node [MPNV=2/7mm] {\nodepart{one} \rotatebox{90}{some test} \nodepart{two} }; \end{tikzpicture} \end{document} As temporary solution I insert in the second node part the rule \rule{0mm}{5mm}. However, I would be much happier, if I can add some fix to my document preamble. BTW, I use recent version of tikz: 3.1.11a from August 29, 2025.
- How to Fix the text that is not flowing naturally on two columns and fixing some formatby user516076 on April 4, 2026 at 1:47 am
I hope giving the whole document here would be okay with you all, because I need a little help because when I implement the two columns on my document, it is not filling and flowing naturally like another document editor. Tex file: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[a4paper,top=0.78cm,bottom=1.10cm,left=1.0cm,right=1.0cm,includefoot]{geometry} \usepackage{graphicx} \usepackage{xcolor} \usepackage{amsmath,amssymb} \usepackage{newtxtext,newtxmath} \usepackage{enumitem} \usepackage{fancyhdr} \usepackage[hidelinks]{hyperref} \usepackage{tikz} \usepackage{eso-pic} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[L]{\fontsize{6.2}{7.2}\selectfont\textbf{TPA/RECRUITMENT TEST/SMP-SMA Ar-Rohmah Bogor IIBS/2025-2026}} \fancyfoot[R]{\fontsize{8}{8.5}\selectfont\thepage} \setlength{\footskip}{18pt} \definecolor{agreen}{RGB}{0,114,88} \definecolor{amaroon}{RGB}{120,35,33} \definecolor{ablue}{RGB}{48,83,176} \newcommand{\footerline}{% \AddToShipoutPictureFG*{% \begin{tikzpicture}[remember picture,overlay] \draw[line width=0.6pt,color=amaroon] ([xshift=0.55cm,yshift=1.05cm]current page.south west) -- ([xshift=-0.55cm,yshift=1.05cm]current page.south east); \end{tikzpicture}% }% } \newcommand{\doublehr}{\hrule height 0.45pt\vspace{1.2pt}\hrule height 0.45pt} \newcommand{\ops}[1]{\\[-1.5pt]#1} \newcommand{\qf}{\fontsize{10.05}{10.7}\selectfont} \setlist[enumerate]{leftmargin=1.35em,itemsep=3.5pt,topsep=0pt,parsep=0pt,partopsep=0pt,labelsep=0.45em} \newcommand{\HeaderBlock}{% \noindent \begin{minipage}[c]{0.16\textwidth} \centering \includegraphics[width=0.72\linewidth]{newarrohmah.png} \end{minipage}\hfill \begin{minipage}[c]{0.80\textwidth} \centering {\fontsize{13.8}{14.2}\selectfont\textbf{Yayasan Pendidikan Islam Ar-Rohmah Putri}\\[-0.5pt]} {\fontsize{20.5}{20.5}\selectfont\textbf{\textcolor{agreen}{MA'HAD AR-ROHMAH BOGOR}}\\[-0.8pt]} {\fontsize{9.4}{10.2}\selectfont Jl. Veteran III Jl. Tapos Lbc No. 18 RT. 003/ RW. 001, Cileungsi, Ciawi,\\[-1pt]} {\fontsize{9.4}{10.2}\selectfont Kab. Bogor, Jawa Barat 16720\\[-1pt]} {\fontsize{8.2}{8.8}\selectfont Telp 0821-3700-0200, email: mahadarrohmahbogor@gmail.com, website: \textcolor{ablue}{\underline{www.arrohmahbogor.sch.id}}} \end{minipage} \vspace{2.5pt}\doublehr\vspace{3pt} {\fontsize{8.25}{8.85}\selectfont \begin{tabular}{@{}p{0.14\textwidth}p{0.32\textwidth}p{0.16\textwidth}p{0.25\textwidth}@{}} Kegiatan & : Tes Calon SDM Tahun Pelajaran 2025-2026 & Mata Pelajaran & : Tes Potensi Akademik\\ Semester & : - & Hari, tanggal & : Sabtu, 19 April 2025\\ Jenjang & : SMP-SMA & Waktu & : 15 Menit \end{tabular}} \vspace{3pt}\doublehr \vspace{6pt} {\fontsize{10.2}{10.8}\selectfont\textbf{A.\ \,Berilah tanda silang (x) pada huruf A, B, C, atau D di lembar jawaban!}} \vspace{5pt} } \begin{document} \footerline \HeaderBlock \noindent \begin{minipage}[t]{0.46\textwidth} \qf \textbf{\underline{NUMERIK}}\vspace{1pt} \begin{enumerate} \item $3^2 + 5^2 + 7^2 =$ ..... \ops{A. 83}\ops{B. 74}\ops{C. 66}\ops{D. 61}\ops{E. 69} \item $356 - 72 : 2 + 5 \times 9 =$ ..... \ops{A. 334}\ops{B. 391}\ops{C. 386}\ops{D. 385}\ops{E. 365} \item Akar pangkat 3 dari $216^2$ adalah ..... \ops{A. 18}\ops{B. 36}\ops{C. 24}\ops{D. 20}\ops{E. 16} \item $201 \times 3 + y = 3.230$\\ Nilai $y$ yang tepat adalah ..... \ops{A. 2.834}\ops{B. 2.627}\ops{C. 3.012}\ops{D. 2.246}\ops{E. 2.476} \item $5 \times a \times 14 = 6 \times 7 \times 4$\\ Nilai $a$ yang tepat adalah ..... \ops{A. 24}\ops{B. 18}\ops{C. 21}\ops{D. 22}\ops{E. 36} \item $\frac{1}{2} + 5x = 30$\\ Maka nilai $x$ adalah ... \ops{A. 6,3}\ops{B. 7,5}\ops{C. 5,9}\ops{D. 4,9}\ops{E. 10,5} \item $\left(\frac{3}{4}\right)^2 + \left(\frac{1}{8}\right)^2 = \cdots$ \end{enumerate} \end{minipage}\hfill \begin{minipage}[t]{0.43\textwidth} \qf \vspace*{0.60cm} \textbf{7.}\ \ A. $\frac{36}{64}$\\[-1.5pt] B. $\frac{5}{16}$\\[-1.5pt] C. $\frac{25}{64}$\\[-1.5pt] D. $\frac{37}{64}$\\[-1.5pt] E. $\frac{18}{32}$ \vspace{7pt} \begin{enumerate} \setcounter{enumi}{7} \item Selisih dari $9{,}6 \times \frac{1}{16}$ dan $3\ \frac{7}{5} : \frac{5}{4}$ adalah ... \ops{A. $\frac{1}{35}$}\ops{B. $\frac{4}{35}$}\ops{C. $\frac{9}{35}$}\ops{D. $\frac{7}{35}$}\ops{E. $\frac{19}{35}$} \item $\frac{8}{5} : \frac{3}{4} = \cdots$ \ops{A. $3\ \frac{4}{15}$}\ops{B. $2\ \frac{5}{12}$}\ops{C. $4\ \frac{2}{15}$}\ops{D. $2\ \frac{2}{15}$}\ops{E. $2\ \frac{8}{12}$} \item $142 + 77 = 82 + A$\\ Nilai A yang tepat adalah ..... \ops{A. 142}\ops{B. 137}\ops{C. 135}\ops{D. 113}\ops{E. 156} \end{enumerate} \vspace{1.45cm} \textbf{\underline{VERBAL}}\vspace{2pt} \begin{enumerate} \setcounter{enumi}{10} \item MUKADIMAH = ..... \ops{A. Prapendapat}\ops{B. Keterangan}\ops{C. Salam}\ops{D. Bagian}\ops{E. Pendahuluan} \end{enumerate} \end{minipage} \newpage \footerline \noindent \begin{minipage}[t]{0.46\textwidth} \qf \begin{enumerate} \setcounter{enumi}{11} \item BENCANA = ..... \ops{A. Bantuan}\ops{B. Lawan}\ops{C. Bala}\ops{D. Rapat Sekali}\ops{E. Kawan} \item ADIKSI = ..... \ops{A. Reaksi}\ops{B. Ketagihan}\ops{C. Kebingungan}\ops{D. Fiksi}\ops{E. Afiksasi} \item SWAKARYA = ..... \ops{A. Swakarsa}\ops{B. Swadaya}\ops{C. Hasil Karya Sendiri}\ops{D. Dengan Kekuatan Sendiri}\ops{E. Swasembada} \item IMPRESIF $><$ ..... \ops{A. Keren}\ops{B. Mengagumkan}\ops{C. Sederhana}\ops{D. Mengesankan}\ops{E. Berharga} \item DINAMIS $><$ ..... \ops{A. Dinamit}\ops{B. Dinamo}\ops{C. Dimensi}\ops{D. Aktif}\ops{E. Statis} \item HETEROGEN $><$ ..... \ops{A. Oksigen}\ops{B. Homogen}\ops{C. Agen}\ops{D. Beragam}\ops{E. Berlainan Jenis} \item CABAI : ..... = GARAM : ASIN \ops{A. Rawit}\ops{B. Manis}\ops{C. Dingin}\ops{D. Pedas}\ops{E. Pahit} \item SAPI : HERBIVORA : MELAHIRKAN =\\ AYAM : ..... : ..... \ops{A. Rumput : Omnivora}\ops{B. Omnivora : Bertelur}\ops{C. Herbivora : Susu}\ops{D. Karnivora : Beranak}\ops{E. Omnivora : Daging Ayam} \item SOSIOLOGI : ILMU = MONOPOLI : ..... \ops{A. Kekuasaan}\ops{B. Permainan}\ops{C. Perdagangan}\ops{D. Perekonomian}\ops{E. Pertanian} \end{enumerate} \end{minipage}\hfill \begin{minipage}[t]{0.43\textwidth} \qf \textbf{\underline{BAHASA INGGRIS}}\vspace{2pt} \begin{enumerate} \setcounter{enumi}{20} \item I ... tennis every Sunday morning. \ops{A. playing}\ops{B. play}\ops{C. am playing}\ops{D. am play}\ops{E. plays} \item Don't make so much noise. Noriko ... to study for her ESL test! \ops{A. try}\ops{B. tries}\ops{C. tried}\ops{D. is trying}\ops{E. was trying} \item Jun-Sik ... his teeth before breakfast every morning. \ops{A. will cleaned}\ops{B. is cleaning}\ops{C. cleans}\ops{D. clean}\ops{E. cleaned} \item Sorry, she can't come the phone. She ... a bath! \ops{A. is having}\ops{B. having}\ops{C. have}\ops{D. has}\ops{E. had} \item ... many times every winter in Frankfurt. \ops{A. It snows}\ops{B. It snowed}\ops{C. It is snowing}\ops{D. It is snow}\ops{E. It was snowed} \item How many students in your class ... from Korea? \ops{A. comes}\ops{B. come}\ops{C. came}\ops{D. are coming}\ops{E. was coming} \item Weather report: ``It's seven o'clock in Frankfurt and ...'' \ops{A. there is snow}\ops{B. it's snowing}\ops{C. it snows}\ops{D. it snowed} \item Babies ... when they are hungry. \ops{A. cry}\ops{B. cries} \end{enumerate} \end{minipage} \newpage \footerline \noindent\hfill \begin{minipage}[t]{0.43\textwidth} \qf C. cried\\[-1.5pt] D. are crying\\[-1.5pt] E. was cried \vspace{7pt} \begin{enumerate} \setcounter{enumi}{28} \item Jane : ``What .... in the evenings?''\\ Mary : ``Usually I watch TV or read a book.'' \ops{A. you doing}\ops{B. you do}\ops{C. do you do}\ops{D. are you doing}\ops{E. do you doing} \item Jane : ``What ....?''\\ Mary : ``I'm trying to fix my calculator.'' \ops{A. you doing}\ops{B. you do}\ops{C. do you do}\ops{D. are you doing}\ops{E. do you doing} \end{enumerate} \end{minipage} \end{document} This is the image that is required for LaTeX to run: https://drive.google.com/drive/folders/12WaW8isH739pKG8toglo2vMgu6u6kx3z?usp=sharing This is the real document that I wish to have: https://docs.google.com/document/d/1HtVdvMNBqMCOW2QINInZzn6FTSZwBEwVWzSYDxt5LII/edit?usp=sharing and this is the LaTeX version. I bet some people would be asking why would I convert wordx to LaTeX, bcz I just moved to Linux and I don't have Microsoft Word, let alone on Google Docs doesn't have a feature to write maths equations, so I only have LaTeX as my best option. I hope you don't mind helping me with that. Thank you in advance. What I meant by "not flowing naturally" is like this: The document has a weird format. The text should filled up the whole first left column and then it goes to the next second right column, after all filled up, I want it to automatically to get next page. Honestly, this is a generated code, so I realise that it has no two columns format (I don't know how to do that). and I need a help with the footer to match with the original data.
- How to use LaTeX usepackages separately, And the letters are the same, the font follows usepackageby 2023 Siri on April 4, 2026 at 1:25 am
I hope to be like: \mathsf{\alpha \beta \gamma} - sansmathfonts \mathtt{\alpha \beta \gamma} - concmath And in the same LaTeX file, use different usepackages fonts in greek lowercase letters. Example As long as the two use packages are applied to the lowercase Greek letter (2 font-style | 1 docs)
- pgf-PeriodicTable: Adjust font alignment (and color scheme)by cis on April 3, 2026 at 6:37 pm
First of all: I've noticed that the search for pgf-PeriodicTable isn't currently yielding any significant results. I've created a new tag and hope to vitalize this wonderful package with this post; and I look forward to seeing many more great PTEs in the future. I want to create a very simple periodic table, similar to the one you find with a Google search (see image below); ideally, it should also use this color scheme for the text and background. I'm having a few problems with pgf-PeriodicTable: · How do I ensure that Z (in a slightly larger font) is perfectly left-aligned? · And that Ar is perfectly right-aligned? Since I am not very familiar with the package, suggestions for improvement of a general nature are welcome. My current approach: \documentclass[paper=a5]{scrarticle} \usepackage[margin=5mm, showframe=true, ]{geometry} \usepackage[en]{pgf-PeriodicTable} \begin{document} \pgfPTbuildcell(6,3)% [(1;1-2;Z), (1;2.5-3;Ar),% not sure but I set this (2-4;1-3;CS),(5-6;1-3;name) %,(4.75;1-3;radio)% do not know where to place best yet ] \pgfPTpreviewcell[1.8] \noindent\pgfPT[ % Common =========================== show title=false, show legend=false,% true does not work cell width=7.25mm, cell height=7.25mm, %back color scheme=Wikipedia, % Z =============================== Z font=\tiny\bfseries, Z backcolor=none, Z color=black, % Ar =============================== Ar font=\fontsize{4}{4}\selectfont, Ar precision=1, % names ============================ capitalize element names=true,% please! name font=\fontsize{3.5}{4}\selectfont, ] \end{document}
- Spurious Horizontal Line in longtable Documentby Masroor on April 3, 2026 at 6:26 pm
Please take a look at this MWE. Well, I understand that an MWE should be much leaner. But this issue is challenging my experience. I cannot find the reason for the line at the top of the second page. I was unable to identify the cause and decided to keep all the packages involved. I need to use all of them. (This is part of a huge project where the documents are generated using a dotnet based application using the data pulled from a PostgreSQL DB. A dedicated style file handles page layout and table rendering. I excerpted and garbled this from a multi-thousand-line document.) Here is the code: \documentclass[10pt]{article} \usepackage[legalpaper,landscape,head=30.0mm,foot=20.0mm,includeheadfoot,top=10.0mm,bottom=20.0mm,left=20.0mm,right=10.0mm]{geometry} \usepackage{longtable} \usepackage{array} \newcolumntype{C}[1]{>{\centering\arraybackslash\hspace{0pt}}p{#1}} \def\slno{{\scriptsize Sl.\ No.}} \def\centerh#1#2{\multicolumn{#1}{c|}{#2}} \def\ubbget{\textsf{\tiny Ubb Altot}} \def\continuationhead{{\textit{\textsf{\large (continued from previous page})}}} \def\continuationfoot{{\textit{\small(continued to next page})}} \def\arraystretch{1.5} % Normal posts \def\macroA#1{% \global\def\currentpostname{#1} \clearpage \def\currentsectionname{Ostx: \currentpostname} \section*{\currentsectionname} \markright{\currentsectionname}} \setlength{\tabcolsep}{1.250mm} \begin{document} \macroA{QzRtA-MnLpKsUvWxY (AbCdEfGhIjK LmNoPqRsTuVwXyZ AbCdEfGh)} \begin{longtable}[l]{| C{10.0mm}| C{15.0mm}| >{\raggedright\ }p{75.00mm}| *{13}{C{10.00mm}|} } \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{4}{Xabdd Cabded} & \centerh{6}{Cganghitta Cabded} & \centerh{3}{Hulnak Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Hkd & Tgl & Svr & \ubbget & Tgc & Kpt & Khg & Oxc & Rnm & \ubbget & Hlk & Bgh & \ubbget \\ \hline \endfirsthead \multicolumn{16}{l}{\continuationhead} \\[2.0mm] \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{4}{Xabdd Cabded} & \centerh{6}{Cganghitta Cabded} & \centerh{3}{Hulnak Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Hkd & Tgl & Svr & \ubbget & Tgc & Kpt & Khg & Oxc & Rnm & \ubbget & Hlk & Bgh & \ubbget \\ \hline \endhead \multicolumn{16}{r}{\continuationfoot} \endfoot \endlastfoot 1 & A/9321 & Plenor Vaskit Jormaq Xentul & 376 & 0 & -- & 376 & 186 & 0 & -- & 1 & -- & 187 & 1 & -- & 1 \\ \hline 2 & A/9321 & Plenor Vaskit Jormaq Xentul & 174 & 0 & -- & 174 & 66 & 0 & -- & 0 & -- & 66 & 1 & -- & 1 \\ \hline 3 & A/9321 & Xyqtr Velnop Grastik Ulmarq Ulmarq Zenth Gralix Vemtor Qunast & 277 & 5 & -- & 282 & 159 & 0 & -- & 1 & -- & 160 & 7 & -- & 7 \\ \hline 4 & A/9321 & Xyqtr Velnop Grastik Ulmarq Arqulm & 239 & 2 & -- & 241 & 113 & 0 & -- & 1 & -- & 114 & 7 & -- & 7 \\ \hline 5 & A/9321 & Bravix Qentor Malvik Zurnax & 3959 & 87 & -- & 4046 & 386 & 6 & -- & 28 & -- & 420 & 347 & -- & 347 \\ \hline \end{longtable} \begin{longtable}[l]{| C{10.0mm}| C{15.0mm}| >{\raggedright\ }p{75.00mm}| *{17}{C{10.00mm}|} } \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{7}{Ahirajsh Cabded} & \centerh{5}{Illacum Cabded} & \centerh{5}{Etsdfh Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Jhr & Pbn & Srj & Cnb & Ntr & Bgb & \ubbget & Cml & Enf & Kln & Chn & \ubbget & Yls & Hbj & Lvm & Ncf & \ubbget \\ \hline \endfirsthead \multicolumn{20}{l}{\continuationhead} \\[2.0mm] \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{7}{Ahirajsh Cabded} & \centerh{5}{Illacum Cabded} & \centerh{5}{Shetyl Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Jhr & Pbn & Srj & Cnb & Ntr & Bgb & \ubbget & Cml & Enf & Kln & Chn & \ubbget & Yls & Hbj & Lvm & Ncf & \ubbget \\ \hline \endhead \multicolumn{20}{r}{\continuationfoot} \endfoot \endlastfoot 1 & A/9321 & Plenor Vaskit Jormaq Xentul & 14 & 0 & 4 & 1 & 0 & 0 & 19 & 8 & 0 & 2 & -- & 10 & 6 & -- & -- & 1 & 7 \\ \hline 2 & A/9321 & Plenor Vaskit Jormaq Xentul & 3 & 1 & 0 & 0 & 0 & 0 & 4 & 3 & 0 & 0 & -- & 3 & 2 & -- & -- & 1 & 3 \\ \hline 3 & A/9321 & Xyqtr Velnop Grastik Ulmarq Ulmarq Zenth Gralix Vemtor Qunast & 19 & 0 & 3 & 1 & 1 & 0 & 24 & 3 & 0 & 2 & -- & 5 & 2 & -- & -- & 1 & 3 \\ \hline 4 & A/9321 & Xyqtr Velnop Grastik Ulmarq Arqulm & 7 & 2 & 0 & 1 & 0 & 0 & 10 & 4 & 0 & 1 & -- & 5 & 5 & -- & -- & 1 & 6 \\ \hline 5 & A/9321 & Bravix Qentor Malvik Zurnax & 256 & 65 & 15 & 25 & 25 & 10 & 396 & 123 & 32 & 19 & -- & 174 & 90 & -- & -- & 40 & 130 \\ \hline \end{longtable} \begin{longtable}[l]{| C{10.0mm}| C{15.0mm}| >{\raggedright\ }p{75.00mm}| *{12}{C{10.00mm}|} } \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{4}{Shwerari Cabded} & \centerh{4}{Ensdedfddx Cabded} & \centerh{4}{Purwesg Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Brs & Ptk & Bhl & \ubbget & Mmn & Jml & Trk & \ubbget & Rnp & Npl & Gbd & \ubbget \\ \hline \endfirsthead \multicolumn{15}{l}{\continuationhead} \\[2.0mm] \hline \multicolumn{3}{|c|}{Atedecdid Anfoddddion} & \centerh{4}{Barishal Cabded} & \centerh{4}{Mymenshing Cabded} & \centerh{4}{Rangpur Cabded} \\ \hline \slno& X/Y No.&\multicolumn{1}{c|}{Enam of the Didadddan} & Brs & Ptk & Bhl & \ubbget & Mmn & Jml & Trk & \ubbget & Rnp & Npl & Gbd & \ubbget \\ \hline \endhead \multicolumn{15}{r}{\continuationfoot} \endfoot \endlastfoot 1 & A/9321 & Plenor Vaskit Jormaq Xentul & 33 & -- & -- & 33 & 7 & 2 & 0 & 9 & 1 & -- & -- & 1 \\ \hline 2 & A/9321 & Plenor Vaskit Jormaq Xentul & 0 & -- & -- & 0 & 1 & 0 & 0 & 1 & 2 & -- & -- & 2 \\ \hline 3 & A/9321 & Xyqtr Velnop Grastik Ulmarq Ulmarq Zenth Gralix Vemtor Qunast & 3 & -- & -- & 3 & 3 & 1 & 3 & 7 & 2 & -- & -- & 2 \\ \hline 4 & A/9321 & Xyqtr Velnop Grastik Ulmarq Arqulm & 9 & -- & -- & 9 & 3 & 0 & 0 & 3 & 3 & -- & -- & 3 \\ \hline 5 & A/9321 & Bravix Qentor Malvik Zurnax & 71 & -- & -- & 71 & 167 & 50 & 21 & 238 & 170 & -- & -- & 170 \\ \hline \end{longtable} \end{document}
- Draw a cage for Cuyes using tikz [closed]by Robert on April 3, 2026 at 3:15 pm
I am a LaTeX newbie. Please, help me draw a cage to grow cuyes, with all the accesories. Thanks in advance.
- LaTeX stopped working on a Lenovo Thinkpad because I updated itby Michael Hardy on April 3, 2026 at 3:15 pm
I'm running miktex on a Lenovo Thinkpad. I was told I haven't checked for updates in a long time, so I updated it. Then when I click on a .tex file, I get an error message: miktex-texworks This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. When I try to unistall the application so that I can reinstall it, I get the same error message. How can I fix this?
- Nicely organized graph representing Feynmanby FishDrowned on April 3, 2026 at 1:26 pm
I don't quite understand why the first node is no longer pointing toward $C_0$. How can I move $C_0$ to be on the far right side, still level with the first node (kind of looking like a trapezoid) while still connected to the first node? \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \begin{center} \scalebox{1.2}{ \tikz \graph [grow right sep]{ x1 [as =$\displaystyle \int_a^b{f(x)dx}$] -> {x2[as=$C_0$, red], x3[as=$F(t)$] -> x4[as=$F^\prime(t)$] -> x5[as=$\displaystyle \int{F^\prime(t)dt}$] -> x6[as=$C(t) + C_{1}$, red]->x2}; }; } \end{center} \end{document} This is what it currently looks like: This is the intended result (essentially, ignore the terrible drawing lol): Any help or a push toward some sort of useful resource is much appreciated.
- Position labels Venn diagramby Arne Timperman on April 3, 2026 at 8:31 am
How can I place labels (A and B) on the outside in the venndiagram package \documentclass[10pt,a4paper,svgnames,openleft,explicit]{book} \usepackage{venndiagram} \begin{document} \begin{center} \begin{venndiagram2sets}[showframe=false] \fillA \fillB \node at (1,2) {a}; \node at (1.5,1) {b}; \node at (1.8,2) {c}; \node at (2.5,1.4) {d}; \node at (2.5,1.8) {e}; \node at (3.5,1.3) {f}; \node at (3.7,1.8) {g}; \end{venndiagram2sets} \end{center} \end{document}
- File path completion in command arguments for Emacs/AUCTeXby BAK on April 3, 2026 at 3:53 am
I have been using Neovim with lua configuration for the past few years. It has been good, but now that my document is nearing completion, my workflow requires working on the complete document and compiling the complete document. I had previously been working only parts of it (by commenting out some \inputs in the main.tex file), but now with the complete document, resource usage with the current set of Neovim plugins is not acceptable. So, I have switched to Emacs, and am happy with it, but one important convenience functionality is missing in Emacs that I had in Neovim. (Incidentally, memory usage with Neovim reaches 99%, but with Emacs it is 39%.) In Neovim I have completions through the plugins nvim-cmp, cmp-buffer, cmp-path, cmp-cmndline, cmp_luasnip, cmp-nvim-lsp, cmp-nvim-lua. cmp-path provides very magical completions of file paths. For example in: \includegraphics[width=6.868in]{document-subparts/part-0001-rontmatter/figures/topic_relationships_1.pdf} once I start typing the relative paths, it will give me completion options up to the / and then populate a list for selection for completion candidates until the next /, etc. It is a very convenient feature that obviates having to consult my file explorer. I can not replicate this functionality with Emacs/AUCTeX. I've made a little progress towards this with company-mode from the company and company-auctex packages, but it is not reliable. (For example it does not capitalize non-initial letters which should be capitalized in file path components that are in UpperCamelCase.) Can anyone point me to a way to replicate the missing functionality with Emcas/AUCTeX? Thanks.
- simplest way to raise exponent more than strut does [closed]by Nate on April 3, 2026 at 3:52 am
The original code compiles as follows: \Bigr)^2 Adding a strut helps: \Bigr)\strut^{\!2} But I'd like to raise the 2 even higher. What's the simplest way to do that? (I'm not using raisebox because it has a weird bug that makes the 2 huge.)
- How to correctly write \hom_{k\text{-alg}}?by Gargantuar on April 2, 2026 at 3:17 pm
How do I write \hom_{k\text{-alg}} correctly? Semantically, this is incorrect since -alg is not text, so it shouldn't be in the normal text font but in math font. Using \mathrm however is also wrong as the - sign will become a minus sign, which has wrong spacing. What is the best way to write this? If possible, I want to avoid stuff like \mathchardef\hyph="2D and use \hyph instead of - (this is meant for a beginners course). Edit: As there is a lot of debate and confusion, here an MWE (with the "correct" command in one of my commands). \documentclass{article} \usepackage{newtxtext} \usepackage{amsmath} \newcommand{\alg}[1]{\mathord{#1\!\operatorname{-alg}}} \begin{document} \[ \hom_{k\text{-alg}}, \hom_{k\mathrm{-alg}}, \hom_{\alg{k}} \] \end{document}
- Equation numbers with multiple alignmentsby lenskihe on April 2, 2026 at 3:11 pm
I would like to typeset an equation with two alignment points, but also have an equation number on each line. What I am aiming for should look like this: \begin{align} a &= \text{Something very very long} \\ &\begin{aligned} {}= b\Bigl(&ccc \\ &+d \\ &+e \Bigr) \end{aligned} \end{align} However, the inner aligned environment produces only a single equation number, whereas I would like one number per line. I tried to solve this is using alignat. \begin{alignat}{3} a &= \mathrlap{\text{Something very very long}} \\ &\leq b\Bigl(&&ccc \\ &&& +d \\ &&& +e\Bigr) \end{alignat} This gives me multiple equation numbers, but using \mathrlap causes the whole expression to become visually misaligned (no longer centered properly). My two tries are shown below. Is there a way to achieve what I am looking for?
- How toggle proof status so nothing appears at allby murray on April 2, 2026 at 2:52 pm
The package hideproofs, used as in the following, allows one to replace a proof with "Proof. Proof hidden." -- or to use some alternate phrase, such as nothing at all -- as shown here. But how can toggle the proof status so as to completely suppress the starred proof environment proof* so that nothing whatsoever appears, not even the word "Proof" or the end-of-proof symbol and not any vertical space that a proof would normally introduce above and below it? \documentclass[final]{article} \usepackage[thmtools-compat]{keytheorems} \usepackage[hide,message={}]{hideproofs} \newkeytheoremstyle{thmstyle}{headformat=swapnumber} \newkeytheorem{theorem}[style=thmstyle] \begin{document} \begin{theorem} The square upon the hypotenuse of a right triangle equals the sum of the squares upon the othe two sides. \end{theorem} \begin{proof} This proof would appear. \end{proof} \begin{theorem} $2+2=4$. \end{theorem} \begin{proof*} $2 + 2 = 2 +(1+1) = (2+1) + 1 = 3+1 = 4$. \end{proof*} \end{document} I tried to use the comment package. With excludecomment{proof*}, I get the desired result. However, with includecomment{proof*} instead, while the proof appears, the leading "Proof." and the end-of-proof symbol don't appear.`
- Good packages for maintaining multiple document versions, with simple interface like `tagging` and `optional`?by Peter LeFanu Lumsdaine on April 2, 2026 at 12:31 pm
This is a package-recommendation question: What good, modern packages exist for maintaining a document with multiple versions? This is something I find myself needing constantly, for many purposes (e.g. versions in different page geometries for printing/screenreading; versions with different styles for preprint/journal versions of an article…) One option is to define conditionals like “\newif\ifsmallscreen” at the start, and manage the conditional logic by hand. A cleaner approach is provided by the rather similar packages optional and tagging: you load them at the start of the preamble with your named options/tags e.g. \usepackage[smallscreen]{optional}, and they allow conditing on thses with an interface like \opt{smallscreen}{\geometry{a5paper}}. However, both these packages have some pretty basic limitations (e.g. optional only lets you conditionally include code based on options, not exclude it; and tagging’s conditionals don’t work inside command definitions), and are also unmaintained. So for more complex versioning I end up rolling my own solution — but I miss the very clean interface provided by these packages. Are there any modern, slightly wider-featured alternatives to these packages — offering a quick (ideally one-liner) interface for specifying tags/version options at the start of a document, and then offering a robust and flexible interface for conditionals depending on these? I’ve looked through CTAN’s conditional-compilation category, but haven’t found anything suitable — multiaudience and renditions have similar aims, but offer no improvement on optional and tagging, as far as I can see.
- Strange key-value option trailing symbol behaviour in ConTEXt?by Explorer on April 2, 2026 at 9:17 am
I have the following code: \startTEXpage[offset=20pt,width=15cm] \setuptyping[ before={\startframedtext[width=broad,framecolor=magenta]}, after={\stopframedtext}] \starttyping Framed example environment \starttyping ... \stoptyping \stoptyping \setuptyping[ before={\startframedtext[width=broad,framecolor=cyan]}, after={\stopframedtext} ] \starttyping Framed example environment \starttyping ... \stoptyping \stoptyping \setuptyping[ before={\startframedtext[width=broad,framecolor=orange]}, after={\stopframedtext}, ] \starttyping Framed example environment \starttyping ... \stoptyping \stoptyping \stopTEXpage The difference here is the trailing symbol after after={\stopframedtext}: caseA(work!) \setuptyping[ before={\startframedtext[width=broad,framecolor=magenta]}, after={\stopframedtext}] caseB(Not work!) \setuptyping[ before={\startframedtext[width=broad,framecolor=cyan]}, after={\stopframedtext} ] caseC(work!) \setuptyping[ before={\startframedtext[width=broad,framecolor=cyan]}, after={\stopframedtext}, ] The complete code gives only A and C framedbox: I was new to ConTEXt, and is that the option's key-value settings has such restrict requirement on \setuptyping? I was preferrable with the syntax as below: \mycmd[ keyA=ValA, keyB=ValB, keyC=ValC ] It looks dangerous in the ConTeXt case above? I wonder is that we should always avoid such syntax(as case B) in ConTeXt to keep the code safer? Edited Not all the commands are NOT worked with dangerous caseB syntax, and in the following case, the dangerous caseB work... \starttext \definecolor[colorA][ r=.8, g=.2, b=.2] \framed{\colorA This is colorA text} \definecolor[colorB][ r=.5, g=.1, b=.5 ] \framed{\colorB This is colorB text} \definecolor[colorC][ r=.1, g=.1, b=.9, ] \framed{\colorC This is colorC text} \stoptext
- exam class: How to create a solution space that automatically spans multiple pages?by Dimitrios ANAGNOSTOU on April 2, 2026 at 9:04 am
I am using the exam class to create tests and would like to provide students with a solution area that can span multiple pages if needed. The built-in environments such as solutionbox, \fillwithlines, or \makeemptybox work well for fixed-height spaces, but they do not naturally extend across page breaks (or I failed to do so...). What I would like is: a solution environment or command, that provides a large writable area, and automatically continues onto the next page(s) if necessary (e.g., like a long answer space). Here is a minimal example: \documentclass{exam} \usepackage{hyperref, graphicx} \begin{document} \begin{questions} \question[3] In no more than one paragraph, explain why the earth is round. \begin{solutionbox}{1in} The solution \end{solutionbox} \question[10] Long question requiring more space. % Desired: a solution space that can span multiple pages \begin{solution} % large writable area for students \end{solution} \end{questions} \end{document} I tried using solution, but I am not sure how to turn it into a multi-page writable area for students (not just for typeset solutions). What is the best way (within the exam class or with additional packages) to create a solution space for students that can automatically split across multiple pages?
- wrap NewDocumentCommand macro definitionby Franz on April 2, 2026 at 7:07 am
in my research we have lots of unstable notation, i.e., we change the meaning of symbols a lot. Therefore I created a small notation package that provides macros by semantic identifiers (see here: https://gitlab.com/FranzAtGitLab/abs-smooth-notation). I then had the idea that a symbol could link to its definition if a corresponding label is found in the document. Therefore I have \newif\ifasn@links \asn@linkstrue \DeclareOption{nolinks}{\asn@linksfalse} \DeclareOption{links}{\asn@linkstrue} \ProcessOptions\relax \newcommand{\labelprefix}{asn} \makeatletter \newcommand{\maybelink}[2]{% \ifasn@links \@ifundefined{r@#2}% {#1}% {\hypersetup{hidelinks}\hyperref[#2]{#1}}% \else #1% \fi } \makeatother A simple macro is then like this \newcommand{\switchfctdx}{\maybelink{Z}{\labelprefix-switchfctdx}. You can imagine that this comes up a lot in the package. Therefore as a next step I created this: \newcommand{\definesymbol}[2]{% \expandafter\newcommand\csname #1\endcsname{% \maybelink{\ensuremath{#2}}{\labelprefix-#1}% }% } Which reduces the above definition to \definesymbol{switchfctdx}{Z}. However this does only work for the case of simple \newcommands. I also have definitions like this \NewDocumentCommand{\switchfctd}{ m }{{\maybelink{\fixed{\switchfct}}{\labelprefix-switchfctd}}_{#1}}. Of course in these cases it is not clear what part of the macro should be the link (actually every thing that is not an argument makes sense). But what annoys me the most is that I have to repeat the macro name for the label name. I would like to extend the functionality of \definesymbol in one of these ways: Have a \marker that tells \definesymbol what part is used for the link but still use the command name as the label reference automatically. Better: If no marker was set, assume everything is marked. Or even better: Use everything that is not an argument of the \NewDocumentCommand. No marker is needed. I will probably not use the full feature set of \NewDocumentCommand so a solution that can handle any number of mandatory arguments would work for me. EDIT: An example usage of the package would be \documentclass{article} \usepackage{abs-smooth-notation} \begin{document} Define \begin{equation}\label{asn-switchfctd} \switchfctd{x} := \{ \dots \}. \end{equation} The funny thing is, you can click on or hover over the symbol \(\switchfctd{x}\) to jump to its definition. This works for all symbols in the \texttt{abs-smooth-notation} package! To enable linking for a symbol defined by \texttt{\textbackslash{}symbol}, simply create a label \texttt{asn-symbol}. Here is the same for \(\texttt{\textbackslash{}Signature}\) producing \(\Signature\) \begin{equation}\label{asn-Signature} \Signature := \operatorname{diag}(\signature). \end{equation} \end{document} The minimal package code for this example would be \ProvidesPackage{abs-smooth-notation} \newif\ifasn@links \asn@linkstrue % default: links enabled \DeclareOption{nolinks}{\asn@linksfalse} \DeclareOption{links}{\asn@linkstrue} % optional explicit enable \ProcessOptions\relax \newcommand{\labelprefix}{asn} \makeatletter \newcommand{\maybelink}[2]{% \ifasn@links \@ifundefined{r@#2}% {#1}% {\hypersetup{hidelinks}\hyperref[#2]{#1}}% \else #1% \fi } \makeatother \newcommand{\definesymbol}[2]{% \expandafter\newcommand\csname #1\endcsname{% \maybelink{\ensuremath{#2}}{\labelprefix-#1}% }% } \RequirePackage{amsmath} \RequirePackage{hyperref} \providecommand{\fixed}[1]{\mathring{#1}} \definesymbol{switchfct}{F} \NewDocumentCommand{\switchfctd}{ m }{{\maybelink{\fixed{\switchfct}}{\labelprefix-switchfctd}}_{#1}} \definesymbol{signature}{\sigma} \definesymbol{Signature}{\Sigma}
- How to correctly parse tokens and preserve command-argument structure in expl3?by Alexander Rodríguez on April 1, 2026 at 6:49 pm
I am parsing input in expl3 token by token. I want to wrap characters like a or + as [a], [+], while preserving commands such as \textbf{...} and \textit{...}. The problem is that my current approach separates the command from its argument, so something like \textbf{text} is no longer preserved as a single structure. How can I correctly parse the input so that commands keep their arguments, while still processing the content recursively? \documentclass[8pt]{article} \usepackage[ paperwidth=28cm, paperheight=4cm, margin=0.5cm ]{geometry} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\Brackets}{m} { \brackets_process:n {#1} } \cs_new_protected:Npn \brackets_process:n #1 { \tl_map_inline:nn {#1} { \brackets_case:n {##1} } } \cs_new_protected:Npn \brackets_case:n #1 { \tl_if_single:nTF {#1} { \tl_if_head_is_group:nTF {#1} { % Es un grupo \BracketsGroup:n {#1} } { % Es una lista \token_if_cs:NTF #1 { \BracketsCommand:n {#1} } % Es un comando { \token_if_space:NTF #1 { [\c_space_tl] } { \BracketsToken:n {#1} } } % Es un caracter } } { { \BracketsGroup:n {#1} } } } \cs_new_protected:Npn \BracketsGroup:n #1 { \brackets_process:n {#1} } \cs_new_protected:Npn \BracketsCommand:n #1 { #1 } \cs_new_protected:Npn \BracketsToken:n #1 { \str_case:nnF {#1}{{$}{$}{^}{^}{_}{_}}{ [#1] } } \ExplSyntaxOff \begin{document} \Brackets{Text \textbf{textbf \textit{textit} text } text {text {group}} text $ x^{1+1}+2x+4$ $\frac{1}{2} \sqrt[3]{x}$ text. {{Text}} } \vspace{5mm} Expected:\\ [T][e][x][t] \textbf{[t][e][x][t][b][f][ ]\textit{[t][e][x][t][i][t]}[ ][t][e][x][t]}[ ][t][e][x][t][ ]{[t][e][x][t][ ]{[g][r][o][u][p]}}[ ][t][e][x][t][ ]$ [x]^{[1][+][1]}[+][2][x][+][4]$[ ]$\frac{[1]}{[2]} \sqrt[{[3]}]{[x]}$[ ][t][e][x][t][.][ ]{{[T][e][x][t]}} \end{document} Expected behavior:
- Is there a straightforward way to break and align an equation on more than one 'level'?by Simon on April 1, 2026 at 4:46 pm
There is an equation that I would like to break and align as follows: ( in the second line and - in the third line should be aligned the same way that [ in the first line and + in the second line are, which requires aligning on more than one 'level' if level is the correct term. Intuitively, it would work as shown in the MWE, just with && not commented out: & for the first 'level' and && for the second one. (The concept could be extended by &&& for the third one and so on.) \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} E_\mathrm{kinetic}=\frac{1}{2}&\left[m_\mathrm{1}\left(v_\mathrm{1}-v_\mathrm{2}\right)^2\right.\notag\\ &\left.+m_\mathrm{2} % && \left(v_\mathrm{3}+...+...+...+...+a\omega_\mathrm{1}\right.\right.\notag\\ % && -\left.\left.b\omega_\mathrm{2}-...-...-...-...-v_\mathrm{4}\right)\right] \end{align} \end{document}
- How to colorized any line drawed with draw (nor with plot expression)?by Mika Ike on April 1, 2026 at 1:44 pm
How to colorized any line drawed with draw (nor with plot expression)? \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines = middle, %title={Cor baseada no valor de $y$}, title={Color depending on $y$ coordinate}, colormap/hot % Podes usar 'hot', 'cool', 'jet', etc. ] \addplot[ mesh, % Divide o trazo en segmentos para aplicar cores thick, domain=-3:3, samples=100, point meta=y % Indica que a cor depende do valor de y ] {x^2}; % A función matemática \draw[thick, xshift=0.5,rounded corners] (-2,0.5) .. controls (0,-1) and (0,7) .. (1,7.8) .. controls (2,1) and (2,4) .. (3,3) node[anchor=east,pos=0.95] {How to colorize black line with colormap?} node[anchor=north east,pos=0.95] {depending on $y$ coordinate}; \end{axis} \end{tikzpicture} \end{document}
- Retrieve coordinates of self-intersections of a curveby Ventrikle on April 1, 2026 at 11:06 am
I am trying to extract the intersection points of a closed curve using the spath3 package. Currently, I have managed to find these points by splitting the path at self-intersections and then using the spath cs (coordinate system) on the resulting components. However, I noticed that the spath3 documentation doesn't seem to provide a direct command for "finding intersections" and returning them as coordinates. My current workaround involves a somewhat manual process: splitting the path, identifying components, and then grabbing the coordinates at the end of specific segments. Here is my MWE. \documentclass[tikz, border=10pt]{standalone} \usetikzlibrary{spath3, knots, hobby, intersections} \begin{document} \begin{tikzpicture}[ use Hobby shortcut, ] \path[spath/save=trefoil] ([closed]90:2) foreach \k in {1,...,3} {.. (-30+\k*240:.5) .. (90+\k*240:2) } (90:2); \tikzset{ spath/.cd, split at self intersections=trefoil, remove empty components=trefoil, get components of={trefoil}\pathcomponents, } % Label each component at its midpoint for reference \foreach[count=\k] \cpt in \pathcomponents { \node[] at (spath cs:{\cpt} 0.5) {\tiny \k}; } % Extracting coordinates before inserting gaps \foreach[count=\k] \i in {1, 3, 5} { \coordinate (A\k) at (spath cs:\getComponentOf{\pathcomponents}{\i} 1); } \tikzset{ % Gaps are inserted after coordinate retrieval. % If inserted earlier, spath cs would only capture positions within the fragmented arcs. spath/insert gaps after components={trefoil}{10pt}{1,3,5}, } \draw[spath/use=trefoil]; % Mark the original intersection points \foreach \k in {1,2,3} { \fill[red, opacity=0.5] (A\k) circle[radius=2pt] node[above, black, opacity=1] {\color{red}\(\k\)}; } \end{tikzpicture} \end{document} While this code works, it feels like a "workaround." Is there a more concise or idiomatic way to retrieve these intersection coordinates directly using spath3 or its integration with the intersections library?
- circuitikz, how to prettify connection between transformer and connecting lines?by Zarko on March 31, 2026 at 10:52 pm
I would like to reproduce the following image using the circuitikz package: So far I was able to write the following MWE: \documentclass[border=1mm, 11pt]{standalone} \usepackage{circuitikz} \usetikzlibrary{positioning} %---------------------------------------------------------------% \begin{document} \begin{circuitikz}[ node distance = 3mm and 7mm, N/.style = {draw, minimum height=13mm, text width=#1, font=\small\linespread{0,84}\selectfont, align=center}, ] \ctikzset{inductors/coils=6, quadpoles/transformer core/inner = 1.0, quadpoles/transformer core/width = 0.5, quadpoles/transformer core/height= 0.68} \node (n1) [N=13mm] {SPE\\ PHY}; \node (n2) [transformer core, rotate=90, transform shape, right=of n1, anchor=base] {}; \node (n3) [transformer core, right=of n2.south] {}; \node (n4) [N=23mm, right=of n3] {common mode\\ termination}; %--- \draw[semithick] (n2.north east) -- (n2.north east -| n1.east) (n2.north west) -- (n2.north west -| n1.east) % (n2.south east) |- (n3.north west) (n2.south west) |- (n3.south west) % (n3.north east) -- (n3.north east -| n4.west) (n3-L2.midtap) -- (n4.west) (n3.south east) -- (n3.south west -| n4.west); %-------------------- \end{circuitikz} \end{document} which produce: As you can see, connections between transformers and connecting lines are not as on image, which I want to reproduce. Is there a (if possible simple) way to improve these connections?
- Is there a lowercase Greek letter font with a fixed \mathtt in math format?by 2023 Siri on March 31, 2026 at 1:20 pm
I've noticed that monospaced fonts have uppercase Greek letters but no lowercase Greek letters. Is there a mathematical format to resolve this issue with monospaced fonts? \documentclass{article} \begin{document} $\mathtt{\Gamma \Delta \Theta \Lambda \Xi \alpha \beta \gamma \delta}$ \end{document}