Hot
- How is it Possible to Take LaTex formula text and Insert It into a Postscript Drawing at A Specified Location and Optimize the File Size and Color?by Stephen Elliott on September 9, 2026 at 9:06 am
I have a Postscript Drawing of a Sequence, and I want to put the formulas for the Sequences inside the Drawing: Figure 1. Drawing with Math Showing at the Bottom Left I went to the website https://viereck.ch/latex-to-svg/ and I converted my Latex equation to .svg format: Figure 2. Conversion from LaTex format to .svg format I was able to get so far by installing inkscape on Ubuntu 26.04 LTS (from the U-Xterm shell): sudo snap install inkscape From the downloaded .svg file at https://viereck.ch/latex-to-svg/ I ran: inkscape equation.svg --export-type=eps --export-filename=equation.eps Then I just cut and pasted the equation.eps file contents with minor editing at the bottom of my Postscript Drawing, with some success -- that the LaTex equation showed up at bottom-left. Also, the Postscript file size was reasonable. This solution is still not a good one though, because: How can I change where the LaTex equation is pasted into on the Postscript drawing? I need to display the formula by the function. I think I figured out that this can be accomplished by using the translate command before the EPS file contents are added at the bottom of the Postscript file. For additional equations, do I need to copy and paste everything in EPS file? What about the comments in the EPS file? Do I need to adjust anything there? How can I set the color of the Equations to mach the color of the graphed values? It seems that if I open two files in inkscape, one with the equation and the other with the graph, that I can cut and paste as .svg format, but that is not ideal, since I cannot set the color still. So, **How can the color for the Equation be Set in LaTex ** for https://viereck.ch/latex-to-svg/ (or another viewer website) so I can cut and paste the equations in the same color as on the graph? Appendix A: Postscript Commands for Sample Equation https://ehubsoft.herokuapp.com/psviewer/ %!PS-Adobe-3.0 %Draw the bounding box for "convert" to work properly 0 0 moveto 8.5 72 mul 0 lineto 8.5 72 mul 11 72 mul lineto 0 72 mul 11 72 mul lineto 0 0 lineto 2 setlinewidth stroke % Define Units are in Part Inches /inch {72 mul} def /halfinch {inch 2 div} def /partinch {inch 1 mul} def /8inch {inch 8 mul} def % Setup Helvetica Font for Text /Helvetica findfont 24 scalefont setfont gsave %translate the coordinates to left-half of the page horizontally and vertically 8.5 inch 2 div 3.5 inch sub 11 inch 2 div 3.5 inch sub translate %stroke a small ball in the center origin newpath 0 0 0.05 inch 0 360 arc stroke %stroke a unit ball in the center origin % newpath % 1 partinch 0 moveto % 0 0 1 partinch 0 360 arc %stroke newpath %select color green and draw X-axis newpath 0.0 1.0 0.0 setrgbcolor 0 inch 0 inch moveto 6.5 inch 0 inch lineto 2 setlinewidth stroke %Print out the X-axis label in green /Helvetica findfont 12 scalefont setfont 6.5 inch -3 moveto ( X-axis) show stroke %Setup Grid Lines for X-axis newpath 0 1 6 { /ictr exch def % Pop the stack index and assign it to variable 'ictr' ictr partinch -0.25 inch moveto ictr partinch 0.25 inch lineto ictr partinch 5 sub -0.4 inch moveto ictr 20 string cvs show } for stroke %select color blue and draw Y-axis newpath 0.0 0.0 1.0 setrgbcolor 0 inch 0 inch moveto 0 inch 8 inch lineto stroke newpath %Print out the Y-axis label in blue /Helvetica findfont 12 scalefont setfont 0 inch 18 sub 8 inch 6 add moveto (Y-Axis) show stroke %Setup Grid Lines for Y-axis newpath 0 1 10 { /ictr exch def % Pop the stack index and assign it to variable 'ictr' -0.25 inch ictr 8inch 10 div moveto 0.25 inch ictr 8inch 10 div lineto -0.6 inch ictr 8inch 10 div moveto ictr 10 div 0.5 mul 20 string cvs show } for stroke %Select Color Purple for Sequence Graph 0.5 0.0 0.5 setrgbcolor %Start Graph of Sequence newpath 1 partinch 0 moveto 1 partinch 1 1 sqrt div 1 1 3 add sqrt div sub 8inch 2 mul lineto %Start Graph 1 1 5 { /ictr exch def % Pop the stack index and assign it to variable 'ictr' %Draw Horizontal Lines ictr partinch 1 ictr sqrt div 1 ictr 3 add sqrt div sub 8inch 2 mul moveto 1 partinch 0 rlineto 0 1 ictr sqrt div 1 ictr 3 add sqrt div sub 8inch 2 mul % 1 ictr 1 add sqrt div 1 ictr 1 add 3 add sqrt div sub 8inch 2 mul sub -1.0 mul rlineto } for stroke %Select Color Purple for Sequence Graph 0.5 0.0 0.5 setrgbcolor %Start Graph of Sequence newpath 1 partinch 0 moveto 1 partinch 1 1 sqrt div 1 1 3 add sqrt div sub 8inch 2 mul lineto %Start Graph of Integral 1 1 5 { /ictr exch def % Pop the stack index and assign it to variable 'ictr' %Draw Horizontal Lines ictr partinch 1 ictr sqrt div 1 ictr 3 add sqrt div sub 8inch 2 mul moveto 1 partinch 0 rlineto 0 1 ictr sqrt div 1 ictr 3 add sqrt div sub 8inch 2 mul % 1 ictr 1 add sqrt div 1 ictr 1 add 3 add sqrt div sub 8inch 2 mul sub -1.0 mul rlineto } for stroke %EPS %%BeginProlog 50 dict begin /q { gsave } bind def /Q { grestore } bind def /cm { 6 array astore concat } bind def /w { setlinewidth } bind def /J { setlinecap } bind def /j { setlinejoin } bind def /M { setmiterlimit } bind def /d { setdash } bind def /m { moveto } bind def /l { lineto } bind def /c { curveto } bind def /h { closepath } bind def /re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto 0 exch rlineto 0 rlineto closepath } bind def /S { stroke } bind def /f { fill } bind def /f* { eofill } bind def /n { newpath } bind def /W { clip } bind def /W* { eoclip } bind def /BT { } bind def /ET { } bind def /BDC { mark 3 1 roll /BDC pdfmark } bind def /EMC { mark /EMC pdfmark } bind def /cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def /Tj { show currentpoint cairo_store_point } bind def /TJ { { dup type /stringtype eq { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse } forall currentpoint cairo_store_point } bind def /cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def /Tf { pop /cairo_font exch def /cairo_font_matrix where { pop cairo_selectfont } if } bind def /Td { matrix translate cairo_font_matrix matrix concatmatrix dup /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def /Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def /g { setgray } bind def /rg { setrgbcolor } bind def /d1 { setcachedevice } bind def /cairo_data_source { CairoDataIndex CairoData length lt { CairoData CairoDataIndex get /CairoDataIndex CairoDataIndex 1 add def } { () } ifelse } def /cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def /cairo_image { image cairo_flush_ascii85_file } def /cairo_imagemask { imagemask cairo_flush_ascii85_file } def %%EndProlog %%BeginSetup %%EndSetup %%Page: 1 1 %%BeginPageSetup %%PageBoundingBox: 100 100 73 25 %%EndPageSetup q 0 0 73 25 rectclip 1 0 0 -1 0 25 cm q 0 g 7.152 10.492 m 7.152 9.871 6.543 9.559 5.863 9.559 c 5.281 9.559 4.82 9.871 4.465 10.492 c 4.18 9.871 3.707 9.559 3.012 9.559 c 2.348 9.559 1.805 9.871 1.371 10.48 c 1.004 11.008 0.816 11.402 0.816 11.66 c 0.816 11.785 0.883 11.852 1.02 11.852 c 1.141 11.852 1.223 11.785 1.25 11.66 c 1.508 10.875 2.078 9.949 2.988 9.949 c 3.434 9.949 3.652 10.234 3.652 10.793 c 3.652 11.078 3.406 12.137 2.934 13.957 c 2.703 14.863 2.293 15.312 1.711 15.312 c 1.52 15.312 1.344 15.273 1.195 15.203 c 1.547 15.07 1.723 14.824 1.723 14.473 c 1.723 14.117 1.547 13.941 1.18 13.941 c 0.734 13.941 0.395 14.32 0.395 14.77 c 0.395 15.395 1.031 15.707 1.695 15.707 c 2.266 15.707 2.73 15.395 3.094 14.77 c 3.352 15.395 3.84 15.707 4.547 15.707 c 5.199 15.707 5.742 15.395 6.176 14.785 c 6.543 14.254 6.734 13.859 6.734 13.602 c 6.734 13.48 6.664 13.414 6.531 13.414 c 6.406 13.414 6.34 13.48 6.297 13.602 c 6.066 14.375 5.457 15.312 4.574 15.312 c 4.125 15.312 3.895 15.043 3.895 14.484 c 3.895 14.309 3.965 13.93 4.113 13.316 c 4.574 11.484 l 4.832 10.465 5.254 9.949 5.852 9.949 c 6.039 9.949 6.219 9.992 6.367 10.059 c 6 10.18 5.824 10.426 5.824 10.793 c 5.824 11.145 6.012 11.32 6.379 11.32 c 6.816 11.32 7.152 10.93 7.152 10.492 c h 7.152 10.492 m f 21.012 10.574 m 12.621 10.574 l 12.406 10.574 12.297 10.684 12.297 10.887 c 12.297 11.09 12.406 11.199 12.621 11.199 c 21.012 11.199 l 21.227 11.199 21.336 11.09 21.336 10.887 c 21.336 10.723 21.188 10.574 21.012 10.574 c 21.012 13.129 m 12.621 13.129 l 12.406 13.129 12.297 13.234 12.297 13.441 c 12.297 13.645 12.406 13.75 12.621 13.75 c 21.012 13.75 l 21.227 13.75 21.336 13.645 21.336 13.441 c 21.336 13.262 21.188 13.129 21.012 13.129 c h 21.012 13.129 m f 30.754 13.793 m 30.754 12.762 30.051 12.109 28.652 11.836 c 28.012 11.715 27.605 11.566 27.387 11.418 c 27.172 11.266 27.062 11.051 27.062 10.793 c 27.062 10.156 27.539 9.844 28.488 9.844 c 29.41 9.844 29.914 10.359 29.98 11.402 c 29.996 11.512 30.062 11.566 30.199 11.566 c 30.348 11.566 30.43 11.445 30.43 11.199 c 30.43 9.855 l 30.43 9.598 30.359 9.477 30.227 9.477 c 30.074 9.477 29.871 9.719 29.738 9.828 c 29.398 9.598 28.977 9.477 28.488 9.477 c 27.281 9.477 26.316 10.02 26.316 11.172 c 26.316 11.633 26.508 12.027 26.898 12.34 c 27.375 12.734 27.824 12.816 28.68 12.965 c 29.559 13.141 30.008 13.535 30.008 14.145 c 30.008 14.918 29.531 15.312 28.57 15.312 c 27.633 15.312 27.035 14.688 26.777 13.453 c 26.738 13.277 26.668 13.18 26.547 13.18 c 26.398 13.18 26.316 13.316 26.316 13.574 c 26.316 15.328 l 26.316 15.586 26.383 15.707 26.52 15.707 c 26.559 15.707 26.629 15.664 26.738 15.57 c 26.98 15.355 26.871 15.395 27.117 15.148 c 27.512 15.516 28 15.707 28.57 15.707 c 29.859 15.707 30.754 15.043 30.754 13.793 c h 30.754 13.793 m f 33.852 7.398 m 33.852 6.992 33.512 6.637 33.102 6.637 c 32.695 6.637 32.344 6.992 32.344 7.398 c 32.344 7.805 32.684 8.172 33.09 8.172 c 33.512 8.172 33.852 7.82 33.852 7.398 c 33.156 15.516 m 34.57 15.559 l 34.57 15.027 l 34.121 15.027 33.852 15 33.77 14.945 c 33.688 14.891 33.66 14.742 33.66 14.5 c 33.66 9.516 l 31.719 9.68 l 31.719 10.195 l 32.168 10.195 32.453 10.234 32.547 10.305 c 32.641 10.371 32.684 10.562 32.684 10.875 c 32.684 14.484 l 32.684 14.742 32.641 14.906 32.547 14.961 c 32.453 15.016 32.152 15.027 31.664 15.027 c 31.664 15.559 l h 33.156 15.516 m f 39.254 9.949 m 39.863 9.949 40.176 10.426 40.176 11.391 c 40.176 14.484 l 40.176 14.742 40.137 14.906 40.039 14.961 c 39.945 15.016 39.645 15.043 39.145 15.043 c 39.145 15.559 l 40.707 15.516 l 42.254 15.559 l 42.254 15.043 l 41.816 15.043 41.535 15.027 41.398 14.988 c 41.262 14.945 41.207 14.852 41.207 14.688 c 41.207 12.148 l 41.207 11.512 41.195 11.062 41.152 10.805 c 41.016 9.977 40.406 9.559 39.336 9.559 c 38.48 9.559 37.84 9.965 37.422 10.777 c 37.422 9.559 l 35.426 9.707 l 35.426 10.223 l 35.914 10.223 36.211 10.262 36.32 10.344 c 36.43 10.426 36.469 10.602 36.469 10.914 c 36.469 14.484 l 36.469 14.742 36.414 14.906 36.32 14.961 c 36.227 15.016 35.926 15.043 35.426 15.043 c 35.426 15.559 l 36.984 15.516 l 38.535 15.559 l 38.535 15.043 l 38.031 15.043 37.746 15.016 37.652 14.961 c 37.555 14.906 37.5 14.742 37.5 14.484 c 37.5 12.043 l 37.5 10.941 38.195 9.949 39.254 9.949 c h 39.254 9.949 m f 51.875 24.328 m 52.035 24.328 52.117 24.246 52.117 24.082 c 52.117 24 52.09 23.934 52.035 23.879 c 50.855 22.969 49.906 21.422 49.199 19.234 c 48.59 17.375 48.289 15.543 48.289 13.75 c 48.289 10.574 l 48.289 8.785 48.59 6.949 49.199 5.09 c 49.906 2.906 50.855 1.359 52.035 0.449 c 52.09 0.395 52.117 0.328 52.117 0.246 c 52.117 0.082 52.035 0 51.875 0 c 51.848 0 51.805 0.016 51.738 0.027 c 50.395 1.059 49.293 2.66 48.426 4.82 c 47.625 6.816 47.23 8.742 47.23 10.574 c 47.23 13.75 l 47.23 15.586 47.625 17.512 48.426 19.508 c 49.293 21.664 50.395 23.27 51.738 24.301 c 51.805 24.312 51.848 24.328 51.875 24.328 c h 51.875 24.328 m f 63.004 0.531 m 58.523 0.531 l 57.969 0.531 57.48 0.746 57.086 1.168 c 56.895 1.371 56.258 2.242 56.258 2.418 c 56.312 2.512 56.312 2.594 56.477 2.594 c 56.57 2.594 56.652 2.539 56.734 2.418 c 57.168 1.75 57.723 1.414 58.391 1.414 c 59.082 1.414 l 58.77 2.594 58.199 4.047 57.383 5.77 c 57.316 5.934 57.277 6.055 57.277 6.121 c 57.277 6.395 57.426 6.531 57.711 6.531 c 57.969 6.531 58.156 6.379 58.281 6.094 c 58.523 5.32 58.703 4.723 58.797 4.316 c 59.543 1.414 l 60.941 1.414 l 60.574 3.027 60.383 4.156 60.383 4.793 c 60.383 5.457 60.535 6.531 61.035 6.531 c 61.32 6.531 61.633 6.258 61.633 5.973 c 61.633 5.906 61.605 5.797 61.551 5.66 c 61.293 5.023 61.172 4.305 61.172 3.477 c 61.172 2.836 61.254 2.145 61.402 1.414 c 62.883 1.414 l 63.355 1.414 63.59 1.25 63.59 0.91 c 63.59 0.598 63.344 0.531 63.004 0.531 c h 63.004 0.531 m f 59.582 15.828 m 58.891 15.828 58.309 16.074 57.805 16.562 c 57.305 17.051 57.047 17.621 57.047 18.312 c 57.047 18.773 57.383 19.113 57.805 19.113 c 58.211 19.113 58.551 18.762 58.551 18.355 c 58.551 17.906 58.227 17.594 57.793 17.594 c 57.75 17.594 57.723 17.594 57.695 17.605 c 57.953 16.941 58.551 16.359 59.406 16.359 c 60.52 16.359 61.145 17.32 61.145 18.488 c 61.145 19.398 60.684 20.375 59.762 21.406 c 57.207 24.285 l 57.031 24.488 57.047 24.477 57.047 24.871 c 62.082 24.871 l 62.477 22.426 l 62.027 22.426 l 61.918 23.117 61.824 23.512 61.742 23.633 c 61.676 23.703 61.266 23.73 60.52 23.73 c 58.254 23.73 l 59.57 22.441 l 60.492 21.57 61.66 20.633 62.055 19.914 c 62.324 19.441 62.461 18.965 62.461 18.488 c 62.461 16.887 61.211 15.828 59.582 15.828 c h 59.582 15.828 m f 54.535 11.758 10.449 0.812 re f 67.781 24.301 m 69.125 23.27 70.227 21.664 71.094 19.508 c 71.895 17.512 72.289 15.586 72.289 13.75 c 72.289 10.574 l 72.289 8.742 71.895 6.816 71.094 4.82 c 70.227 2.66 69.125 1.059 67.781 0.027 c 67.715 0.016 67.676 0 67.648 0 c 67.484 0 67.402 0.082 67.402 0.246 c 67.402 0.328 67.43 0.395 67.484 0.449 c 68.664 1.359 69.617 2.906 70.32 5.09 c 70.934 6.949 71.23 8.785 71.23 10.574 c 71.23 13.75 l 71.23 15.543 70.934 17.375 70.32 19.234 c 69.617 21.422 68.664 22.969 67.484 23.879 c 67.43 23.934 67.402 24 67.402 24.082 c 67.402 24.246 67.484 24.328 67.648 24.328 c 67.676 24.328 67.715 24.312 67.781 24.301 c h 67.781 24.301 m f Q Q %Finish Page showpage
- Issue with linenum (the range does not appear)by Sergi Espinosa Polo on September 9, 2026 at 8:57 am
I have the following problem and I don't know if it's because the document is too long, if I don't know how to configure linenum or if there is some kind of crossing. I have this code, and when compiling, the critical notes appear correctly, the only problem is that the last reference "E (parlaven) -- estamen" does not tell me the line range it is in, which is 5 - 6. I tried to try with \linenum{} and I managed to get any range to appear, (2 - 4, for example), but not the one that corresponds to it, which is 5 - 6. That's why I tried to force it with \linenum. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{reledmac, reledpar} \Xarrangement[A]{paragraph} \Xnotenumfont[A]{\bfseries} \Xnumberonlyfirstinline[A] \Xsymlinenum[A]{||} \Xlinerangeseparator[A]{ - } \firstlinenum{5} \linenumincrement{5} \renewcommand{\numlabfont}{\normalfont\small} \setlength{\linenumsep}{5mm} \begin{document} \beginnumbering \pstart Deus abondós de tot be, en vertut de la tua gracia, comensa aquesta \textit{Disputatió de .v. savis}. \pend \pstart \edtext{E parlaven de Deu. E·n lagremes e·n plors estaven, car gran tristicia avien per raó del mon, qui es en tan torbat estamen}{\linenum{|5|||6|}\lemma{E (parlaven) -- estamen}\Afootnote{qui omnes cum suspiriis et lacrimis de Deo inuicem loquebantur, dolentes quam plurimum de turbato et misero statu mundi \textit{lat}.}}. \pend \endnumbering \end{document} I also attach the screenshots.
- When I use "\d{ð}" to get letter "eth" with dot below, the dot appears under the previous letterby David Graff on September 8, 2026 at 10:44 pm
Here's the "minimal" example. I'm working on an Arabic-to-English dictionary, so I need English, Arabic and Phonetic Alphabet. The parts of the example that involve Arabic are commented out, and apparently don't affect the underdot problem. \documentclass[notitlepage]{article} \usepackage[english,arabic]{babel} % \usepackage{luabidi} \usepackage{titlesec} \usepackage{textcomp} \usepackage{fontspec} \babelfont[*english, *arabic]{rm}{Times New Roman} \begin{document} \pagestyle{empty} % \paragraph{\RLE{أظرَف}} blah blah. % \RLE{ ماأَظرفِك... مِالصّين.} [ma\d{ð}irfik ... ʔi\d{s}\d{s}ħan ... miṣṣiːn.] Blah blah. \end{document} I'm using LuaLaTeX. Note that the example uses both "ṣ" and "\d{s}", and these are rendered correctly, but the dot for ð appears under the preceding "a".
- Vertically center table cells containing characters with no descenders or rotated textby user448253 on September 8, 2026 at 6:50 pm
In the example below the horizontal centering (\tabcolsep=1pt) works fine but how to do the same vertically for the rotated text "Donnes" and for the other lines (no descenders: depth should be set to 0). There should be a gap of (1pt) above and below the fboxes. \documentclass{article} \usepackage{boldline} \usepackage[utf8]{inputenc} \usepackage{rotating} \fboxrule=0.01pt % hair rule \fboxsep=-\fboxrule % don't add to the box dimensions \newcommand{\myTurnA}[1]{\fbox{\rotatebox[origin=c]{90}{#1}}} \newcommand{\myTurnB}[1]{\fbox{\rotatebox[origin=c]{-90}{#1}}} \newcommand{\myItem}[1]{\fbox{#1}} \begin{document} \begin{center} \begin{table} \centering \setlength{\tabcolsep}{1pt} \setlength{\extrarowheight}{0pt} \begin{tabular}{V{3}cV{3}c|c|c|cV{3}} \hlineB{3} \myTurnA{Tour} & \myTurnA{Table} & \myTurnB{Donnes} & \myTurnB{Vs} & \myTurnB{Relais} \\ \hlineB{3} \myItem{1} & \myItem{1} & \myItem{4-6} & \myItem{EO 2} & \myItem{-}\\ \hline \myItem{2} & \myItem{21} & \myItem{4-6} & \myItem{EO 22} & \myItem{7}\\ \hlineB{3} \end{tabular} \end{table} \end{center} \end{document}
- How to add blank page after every pagebreak, but not right before and after \printbibliography?by lAtExFaN on September 8, 2026 at 2:38 pm
This is a kind of follow-up question regarding this and that I insert an empty page after each pagebreak (solved), but I don't want to insert empty pages during biblography get printed (unsoveld). The following MWE should be sufficient - hopefully. \documentclass[twoside=semi]{scrreprt} \documentclass[twoside=semi]{scrreprt} \begin{filecontents}{\jobname.bib} @misc{A01, author = {Author, A.}, year = {2001}, title = {Alpha}, } \end{filecontents} \usepackage{biblatex} \addbibresource{\jobname.bib} \makeatletter \newcommand{\iflabelexists}[3]{\@ifundefined{r@#1}{#3}{#2}} \makeatother \usepackage{afterpage} \newcommand{\repeatafter}{% \null% \thispagestyle{empty}% \addtocounter{page}{-1} \newpage% \afterpage{\repeatafter}% } \usepackage{lipsum} \begin{document} \afterpage{\repeatafter}%activate insertion of a blank page after each pagebreak \lipsum[1-10] \cite{A01} \printbibliography \end{document} So my question is: \printbibliography adds a pagebreak (which is fine/required), but how to not trigger \afterpage from here on until end of bibliography?
- nicematrix column count errorby ebcontrol on September 8, 2026 at 1:47 pm
The following code compiles correctly, but there is a warning in the log file: Package nicematrix Warning: Columns not used. (nicematrix) The preamble of your environment {NiceTabular} is (nicematrix) '| >{$}c<{$} | >{$}l<{$} |'. It announces 4 (nicematrix) columns but you only used 2. The columns that you (nicematrix) did not used won't be created. You won't have (nicematrix) similar warning till the end of the document. The code as below: \documentclass{standalone} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{| >{$}c<{$} | >{$}l<{$} |} \text{Variable} & \text{Formula} \\ \hline x & g^3(y) = \sqrt{y} \end{NiceTabular} \end{document}
- Composite function diagramby D G on September 8, 2026 at 10:59 am
Expected result: Except for the order of composition. Need help for: middle arrows intersection regions with color and labels adding cutting curve in the most right ellipse \documentclass[tikz,border=1cm,12pt]{standalone} \usepackage{fouriernc} \usetikzlibrary{calc,positioning,shapes.geometric} \tikzset{ elps/.style 2 args={ draw, ellipse, minimum width=#1, minimum height=#2 }, node distance=3cm, >=latex } \begin{document} \begin{tikzpicture} \node(Df) [elps={3cm}{5cm},label={above:$D_f$}] {}; \node(Rf) [elps={3cm}{5cm},right=of Df,label={above:$R_f$}] {}; \node(fiDg) [elps={3cm}{5cm},below=-2cm of Df,label={below:$f^{-1}\left(D_g\right)$}] {}; \node(Dg) [elps={3cm}{5cm},below=-2cm of Rf,label={below:$D_g$}] {}; \node(Rg) [elps={3cm}{5cm},right=of Dg,label={below:$R_g$}] {}; \draw[->] (Df) to[bend left=30] node[above] {$f$} (Rf); \draw[->] (Dg) to[bend left=30] node[above] {$g$} (Rg); \draw[->] (Dg) to[bend left=30] node[above] {$f^{-1}$} (fiDg); \end{tikzpicture} \end{document}
- Memoir: Why does the placement of \usepackage[T1]{fontenc} affect the page layout when using \linespread in memoir?by user1362373 on September 8, 2026 at 8:59 am
In memoir, I noticed that when I use \linespread command, the placement of \usepackage[T1]{fontenc} affects the page layout. Consider the following MWE: \documentclass[a4paper,10pt]{memoir} \usepackage[T1]{fontenc} \usepackage[osf]{newpx} \linespread{1.05} \usepackage{lipsum} \checkandfixthelayout \begin{document} \typeout{The value of baselineskip is \the\baselineskip} \typeout{The value of topskip is \the\topskip} \typeout{The value of parskip is \the\parskip} \lipsum[1-6] \end{document} The relevant lines in the output of \checkandfixthelayout are: Text height and width: 598pt by 341pt Upper and lower margins: 125.33748pt and 121.70937pt If I change the order of the lines to \usepackage[osf]{newpx} \linespread{1.05} \usepackage[T1]{fontenc} I get Text height and width: 602.20172pt by 341pt Upper and lower margins: 125.33748pt and 117.50764pt The values of \baselineskip, \topskip and \parskip are not changed. Thus, the order affects the text height and the lower margin (with the sum being unaffected). If I remove the \linespread command, the order of using fontenc and newpx makes no difference. What's the explanation for this behaviour? (Background: I use \linespread{1.05} because this is what was recommended by the LaTeX font catalogue for URW Palladio, which is the font I used before switching to newpx in response to @egreg's answer. The usage example for URW Palladio had the order \usepackage{mathpazo}, \linespread{1.05} and \usepackage[T1]{fontenc}. I noticed the effect of the order when I tried to find the cause for different page layouts after switching from mathpazo to newpx.)
- What set of paper-size value does \newgeometry inherit fromby lyl on September 8, 2026 at 4:28 am
By the following codes, I want my third page to restore geometry to the set of first page(margin=3in) except that top size changes to 0.1in(\restorgeometry and then \newgeometry), that is to say, the left/right/bottom margin is 3in, and the top margin is 0.1in. The output shows that the left/right margin size is different from both the first and second page. I'm confused. what value on earth dees the second \newgeometry inherit from? And how to make some small changes on base of original page set? \documentclass[a4paper]{article} \usepackage{geometry} \geometry{showframe} \geometry{margin=3in} \begin{document} first page, margin=3in\clearpage \newgeometry{margin=1in} second page, margin=1in\clearpage \restoregeometry \newgeometry{top=0.1in} third page, inheritance of left/right margin from the first page(by \string\restorgeometry) is wanted, but seems from neither first nor second page. \end{document}
- Redefine a math operator already defined in mismathby murray on September 8, 2026 at 1:00 am
I use the mismath package, which among other math operators, defines \card, but with a definition different from the one I want, which is simply: \DeclareMathOperator{\card}{card} To effect this substitute definition, I tried the two methods given by @egreg in https://tex.stackexchange.com/a/175272/13492, but neither works as desired. This source shows both methods: % !TEX program = lualatex \NeedsTeXFormat{LaTeX2e}[2026-06-01] \documentclass{article} \usepackage{mismath} \usepackage{amsfonts} %% Need different def of \card from mismath % Method 1 (egreg) \let\card\relax% Different \card defined in mismath! \DeclareMathOperator{\card}{card} % Method 2 (egreg) %% Define \RedeclareMathOperator \makeatletter \newcommand\RedeclareMathOperator{% \@ifstar{\def\rmo@s{m}\rmo@redeclare}{\def\rmo@s{o}\rmo@redeclare}% } % this is taken from \renew@command \newcommand\rmo@redeclare[2]{% \begingroup \escapechar\m@ne\xdef\@gtempa{{\string#1}}\endgroup \expandafter\@ifundefined\@gtempa {\@latex@error{\noexpand#1undefined}\@ehc}% \relax \expandafter\rmo@declmathop\rmo@s{#1}{#2}} % This is just \@declmathop without \@ifdefinable \newcommand\rmo@declmathop[3]{% \DeclareRobustCommand{#2}{\qopname\newmcodes@#1{#3}}% } \@onlypreamble\RedeclareMathOperator \makeatother % Uncomment next line for Method 2 %\RedeclareMathOperator{\card}{card} \begin{document} We have $\card(\mathbb{Z}) = \aleph_{0}$. \end{document} The first method, using \let\card\relax, gives the desired output, but produces this warning: Package mismath Warning: Command \card already exists (mismath) and will not be redefined. The second method (comment out that \let... line and uncomment the \RedeclareMathOperator line) does not allow compilation, causing the error: /card.tex:33: LaTeX Error: \card undefined. Is there some satisfactory way to do this still using \DeclareMathOperator or a variant thereof? Note that the mismath package makes its math operator definition thusly: \AtBeginDocument{\mm@macro{card}{\abs}} where the package defines: \newcommand\mm@macro[2]{ \@ifundefined{#1}{ \expandafter\def\csname #1\endcsname{#2} }{\mm@warning{#1}} }
- Hide contents to appear in TOCby Aviroum on September 7, 2026 at 10:33 pm
Consider this example below. Why does 'contents' appear in toc? \setuphead[chapter] [numberstyle={\switchtobodyfont[heros, 30pt]}, textstyle={\switchtobodyfont[heros, 26pt]}, header=empty, footer=empty, number=no, commandbefore={\blank[0.5em]}, commandafter={\blank[40pt]}, sectionsegments=chapter, align=middle] \setuphead[title][incrementnumber=list,number=no,style={\switchtobodyfont[heros,24pt]},align=middle,indentnext=yes] \setuphead[section] [incrementnumber=list,align=left,number=no, style={\switchtobodyfont[heros 14.4pt]}, before=,after=] \setuphead[subsection] [incrementnumber=list,number=no, style={\switchtobodyfont[heros, 13pt]},before=,after=] \setupcombinedlist[content][list={chapter,title,section,subsection}] \setuplist[chapter][color=green,style=bold,after=\hrule] \setuplist[title][style=bold] \setuplist[section][style=bold] \setuplist[subsection][style=bold] \starttext \completecontent[criterium=all] %\startfrontmatter[] \title{My title} Some text. \title{Second title} % \stopfrontmatter %\startbodymatter[] \chapter{first} \section{fist section} \subsection{sub} \input knuth \chapter{first} \section{fist section} \subsection{sub} \input knuth \chapter{first} \section{fist section} \subsection{sub} \input knuth %\stopbodymatter \stoptext
- Symbol in section title causes improper alphabetic constant errorby Ian Thompson on September 7, 2026 at 6:56 pm
If I attempt to compile the example below using lualatex, it fails with the error message "Improper alphabetic constant". \documentclass{article} \usepackage{unicode-math} \usepackage{hyperref} \begin{document} \section{$\lambda$} \end{document} I'm using TeXLive 2026 under cygwin. The first line of the log file is This is LuaHBTeX, Version 1.24.0 (TeX Live 2026) (format=lualatex 2026.9.6) 7 SEP 2026 19:50 Does anyone have any idea what's going on?
- Use shared counter for theorem environments in ltx-talkby mathmandan on September 7, 2026 at 5:49 pm
Consider the following example: \DocumentMetadata{%uncompress, language = en-US, % pdfversion = 2.0, % pdfstandard = {ua-2, A-4f}, % tagging = on, % tagging-setup = {math/setup=mathml-SE, extra-modules={verbatim-mo}} % } \documentclass{ltx-talk} %\usepackage{amsthm} % optional \newtheorem{thrm}{Theorem} \newtheorem{prop}{Proposition} % separate counters for Theorems and Propositions %\newtheorem{prop}[thrm]{Proposition} % shared counter; raises error \begin{document} \begin{frame} \begin{thrm} The limit of a sum is the sum of the limits. \end{thrm} \begin{prop} The limit of a difference is the difference of the limits. \end{prop} \end{frame} \end{document} This compiles as expected, and shows Theorem 1 and Proposition 1. Now suppose I want Theorems and Propositions to share a counter, so that I would get Theorem 1 followed by Proposition 2. In the past I have done this by replacing \newtheorem{prop}{Proposition} by \newtheorem{prop}[thrm]{Proposition}. (In the above example, comment out one line and un-comment another.) Unfortunately this raises an error for me: ! Undefined control sequence. <argument> \exp:not:n {[{thrm}]} l.17 The shared counter syntax shown above works fine for me in article class documents, and I'm pretty sure it worked for me in an ltx-talk document, as of at least July 2, 2026 (so after the 2026-06-01 LaTeX kernel release). (I am using LuaLaTeX, in a TeXLive installation, up-to-date as of September 7, 2026.) How can I make separate theorem environments share a counter in ltx-talk?
- Hairpins decrescendo horizontal width not working in Musixtexby ABV on September 7, 2026 at 3:46 pm
It is needed to implement Hairpins decrescendo with custom horizontal width in Musixtex. The basic code is as follow: \documentclass[12pt]{article} % ========== FORMATO DE PÁGINA: A4 VERTICAL ========== \usepackage[a4paper,portrait,left=0.4cm,right=0.2cm,top=0.2cm,bottom=0.2cm]{geometry} \pagestyle{empty} % ========== PAQUETES ========== \usepackage{tikz} \usetikzlibrary{quotes} \usetikzlibrary{shapes} \usetikzlibrary{fit,positioning} \usetikzlibrary{arrows.meta} \usetikzlibrary{decorations} \usepackage{amsmath} \usepackage{xcolor} \usetikzlibrary{calc} \usepackage{musicography} \usepackage{musixtex} \input musixper \input musixlyr \input musixjt %\input musixps \xdefinecolor{red-undar}{RGB}{179,35,79} \begin{document} \begin{music} \centerline{\Bigtype R\,A\,Í\,C\,E\,S\,\,\,\,\,\,\,D\,E\,L\,\,\,\,\,\,\,F\,E\,S\,T\,E\,J\,O} \vskip1ex % ========== CONFIGURACIÓN GLOBAL ========== \parindent15mm% \staffbotmarg9\Interligne \font\B=phvb8t at 12pt \font\A=phvb8t at 10pt \A% \setsongraise1{7mm} \setstaffs1{1} \setlines{1}{5} \setclef{1}{\treble} \setclefsymbol{1}{\drumclef}% \generalmeter{\meterfrac{12}8}% \setname1{% \begin{tikzpicture}[baseline] \node[align=center, font=\A, inner sep=0pt, yshift=4mm] {Cajón\\Peruano}; \end{tikzpicture}% } %\nobarnumbers% \systemnumbers% \def\raisebarno{5\internote}% % acerca el número al pentagrama \def\shiftbarno{-5pt}% % posición horizontal \def\writebarno{\eightrm\the\barno\barnoadd}% quita el recuadro, usa texto simple \startrule % ancho de sistema = ancho del texto de la página A4 (sin sobreancho) % ========== SISTEMA 1 (6 compases) ========== %\setcrescheight{-7\Internote} \startpiece \notes\usf p\ibu0i0\qb0{fj}\tbu0\qb0f\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en%\bar \notes\ibl0i0\qb0{j}\tbl0\qb0j\ds\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en\bar%Fin motivo Festejo %Inicio motivo Festejo \notes\icresc\usf p\ibu0i0\qb0{fj}\tbu0\qb0f\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en%\bar \notes\ibl0i0\qb0{j}\tbl0\qb0j\ds\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en\bar%Fin motivo Festejo %Inicio motivo Festejo \notes\usf p\ibu0i0\qb0{fj}\tbu0\qb0f\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en%\bar \notes\ibl0i0\qb0{j}\tbl0\qb0j\ds\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en\bar%Fin motivo Festejo %Inicio motivo Festejo \notes\usf p\ibu0i0\qb0{fj}\tbu0\qb0f\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en%\bar \notes\ibl0i0\qb0{j}\tbl0\qb0j\ds\en%\bar \notes\ibu0i0\qb0{f}\tbu0\qb0f\ds\en% \znotes\raisebox{-20pt}{\tdecresc}\en\setdoubleBAR% \nolyr% \lyricsoff% \endpiece% \end{music} \end{document} The current output is as follow: The desired output is as follow: Note: notices that the width of the decrescendo hairpins should be at the end of the system.
- Selecting fonts for individual alphabets with `lua-unicode-math`by moro11 on September 7, 2026 at 3:42 pm
At the moment i probably wont switch to lua-unicode-math but i tried it out a little and stumbled across a problem i would like to address: setting specific fonts seems not to be supported by \setmathfont. Consider the following examples \documentclass{standalone} \usepackage{fontspec} \usepackage{lua-unicode-math} \setmathfont{STIX Two Math} \setmathfont[range={scr,bfscr}, StylisticSet=1]{STIX Two Math} \begin{document} $A \mathcal{A} \mathscr{A}$ \end{document} \documentclass{standalone} \usepackage{fontspec} \usepackage{lua-unicode-math} \setmathfont{STIX Two Math} \setmathfont[version=bold]{NewCMMath-Bold} \begin{document} $A$ {\boldmath$A$} \end{document} It is clear, that in the first example, not only \symscr but also \symcal (and i would assume all fonts) are replaced by the second call of \setmathfont, while in the second example we have the same problem, where not just the bold version but all fonts are replaced by the second call. Of course, this setup (in particular the option range and version) is just copy pasted from a typical unicode-math setup and there is no reason why the \setmathfont command provided by lua-unicode-math should take the same arguments at the \setmathfont command provided by unicode-math. But considering that the documentation of lua-unicode-math is very thin at the moment and only, there is not much information available on how to configure your fonts. Thus, i choose these setups to express what i would like to do (not stating that i expect it to work like that). Thus, to my main question: what is the intended way to fine tune your font setup manually, beyond loading a pre-defined setup via \usepackage{lmu-<some provided font>}?
- How to Insert a Minipage into a Table of Contents? [closed]by Jethro on September 7, 2026 at 3:29 pm
MWE: \documentclass[12pt]{book} \begin{document} \addtocontents{toc}{\protect\centering I would like to convert this into a centered minipage, say 3in. in width; however, I have been unable to make use of a minipage with the addtocontents command. \par} % % THIS DOES NOT WORK. %\addtocontents{toc}{\protect\centering \begin{minipage}{3in} I would like to convert this into a centered minipage, say 3in. in width; however, I have been unable to make use of a minipage with the addtocontents command. \end{minipage} \par} \tableofcontents \end{document} The output:
- Aliyaphone khanti [closed]by Aliyaphone Kt on September 7, 2026 at 12:57 pm
\documentclass[11pt, a4paper]{article} % --- Packages --- \usepackage[utf8]{utf8} \usepackage[margin=1in]{geometry} % Set margins to 1 inch \usepackage{titlesec} % Customizing section headers \usepackage{enumitem} % Customizing lists \usepackage{hyperref} % Hyperlinks for email/phone \usepackage{xcolor} % Styling colors % --- Page Setup --- \pagestyle{empty} % Disable page numbers and headers/footers % --- Hyperlink Setup --- \hypersetup{ colorlinks=true, linkcolor=black, urlcolor=black } % --- Custom Section Formatting --- % Bold UPPERCASE main headings with a horizontal line beneath \titleformat{\section} {\large\bfseries\scshape\uppercase} % Style: Large, Bold, Small Caps, Uppercase {} % Label {0pt} % Sep {} % Before code [\titlerule] % Horizontal rule under title \titlespacing*{\section}{0pt}{12pt}{8pt} % --- Custom Commands --- % Command for entry headers with right-aligned dates \newcommand{\resumeEntry}[4]{ \noindent \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r} \textbf{#1} & \textit{#2} \\ \textit{#3} & \textit{#4} \\ \end{tabular*}\vspace{-4pt} } \begin{document} % ========================================== % HEADER / CONTACT INFORMATION % ========================================== \begin{center} {\Huge \bfseries Aliyaphone Khanti} \\[6pt] \small Changkhou Village, Xaithany District, Vientiane Capital, Laos \\ Phone: \href{tel:+8562056305551}{+856 20 56305551} \quad$\cdot$\quad Email: \href{mailto:Aliyaphone241@gmail.com}{Aliyaphone241@gmail.com} \end{center} \vspace{10pt} % ========================================== % PROFESSIONAL SUMMARY % ========================================== \section{Professional Summary} Enthusiastic and community-minded professional with a strong background in environmental volunteering and teaching support. Passionate about sustainable development, community engagement, and youth education. Possesses excellent communication and public speaking skills with a proven ability to lead and collaborate effectively. % ========================================== % EXPERIENCE % ========================================== \section{Experience} \resumeEntry{Teaching Assistant (English)}{Hometown, Laos}{Local Community School}{Dates} \begin{itemize}[leftmargin=1.5em, itemsep=2pt] \item Assisted primary English teachers in preparing lesson materials, conducting interactive classroom activities, and supporting student learning. \item Helped students improve their English pronunciation, vocabulary, and basic communication skills through small-group discussions and tutoring. \item Fostered an encouraging and engaging learning environment tailored to students' needs. \end{itemize} % ========================================== % VOLUNTEER WORK & PROJECTS % ========================================== \section{Volunteer Experience} \resumeEntry{Volunteer Coordinator / Participant}{Vientiane, Laos}{"Dek Xang Sang Phan" Environmental Project}{Dates} \begin{itemize}[leftmargin=1.5em, itemsep=2pt] \item Participated in environmental awareness campaigns and educational workshops aimed at promoting youth development and sustainability. \item Collaborated with local volunteers to organize community activities and outreach programs. \end{itemize} \vspace{4pt} \resumeEntry{Project Volunteer}{Laos / Regional}{"AEC Goes Green" Initiative}{Dates} \begin{itemize}[leftmargin=1.5em, itemsep=2pt] \item Contributed to regional environmental initiatives focused on eco-friendly practices, waste reduction, and green sustainability in the AEC community. \item Engaged with local communities to advocate for environmental conservation and green practices. \end{itemize} % ========================================== % SKILLS % ========================================== \section{Skills \& Competencies} \begin{itemize}[leftmargin=1.5em, itemsep=2pt] \item \textbf{Communication Skills:} Excellent verbal and written communication abilities; experienced in cross-cultural and community interaction. \item \textbf{Public Speaking:} Confident presenting to groups, facilitating workshops, and conducting educational sessions. \item \textbf{Interpersonal Skills:} Teamwork, leadership, adaptability, problem-solving, and community outreach. \item \textbf{Languages:} Lao (Native), English (Proficient). \end{itemize} % ========================================== % EDUCATION % ========================================== \section{Education} \resumeEntry{High School Diploma / Degree Title}{Graduation Year}{School / Institution Name}{Location} \end{document}
- `flalign` equations inside an `algorithm2e` environment are slightly indentedby Thibault de Villèle on September 7, 2026 at 10:19 am
Take the following MWE: \documentclass{article} \usepackage[ruled]{algorithm2e} \usepackage{amsmath, mathtools}% mathtools for \mathllap... \begin{document} \begin{algorithm}[h]% \DontPrintSemicolon% \SetKwComment{Comment}{(\,}{\,)}% \KwIn{\(C\), a matrix}% \( C \gets \mathrm{Id}(3) \)\;% % Reduce above/below skips to show the mis-alignment: \setlength{\abovedisplayskip}{-4.5pt plus 0.5pt minus 0.5pt}% \setlength{\belowdisplayskip}{-4.5pt plus 0.5pt minus 0.5pt}% \setlength{\abovedisplayshortskip}{-4.5pt plus 0.1pt minus 0.1pt}% \setlength{\belowdisplayshortskip}{-4.5pt plus 0.1pt minus 0.1pt}% \begin{flalign*}% C &\gets \mathrm{Id}(3) && \mathllap{\Comment*[f]{Should not be indented}}% \end{flalign*}\;% \Return{\(C\)}% \caption{\AmS\ example.}% \end{algorithm} \end{document} Produces (LuaLaTeX, TeXlive 2026): I'd expect the text-style equation (between \( ... \)) to be aligned with the display-style one right below. However, even with a flalign environment, it seems a slight left margin (skip?) is added to flalign environments. How could I get rid of it? I have a few such use cases of this flalign* + \Comment environment in my document, and they all have that indentation.
- Blockwise random order of questions (with answers) using mcexamby Tripedior on September 7, 2026 at 9:10 am
This is a follow-up question to Blockwise random order of questions using mcexam: I would like to randomize the order of questions of each field, but not shuffle questions of different fields together using the mcexam package. The questions should be consecutively numbered (1,2,3,4 in the MWE). My actual application of course has more than two questions in each block, and also more than two blocks. As was already suspected in the answer to that question, there unfortunately are problems when also providing answers to the questions. Answers themselves are already a problem, but things seem to behave even more unpredictably when using the [correct] argument: When using output=exam, the mc@counter seems to correspond to the number of answer options When using output=answers, the mc@counter seems to correspond to the number of the correct answer in the list AFTER randomization I have disabled randomizequestions for now, to remove one factor from the equation (but the idea is to activate it again in the future). My suspicion is that the mc@counter is also used for something related to answers and, thus, the suggestion in the previous question regarding the blockwise random order breaks at this point. Attached you find a new MWE (I added an output of the value of resumequestions to the end hook of the mcquestions environment for debugging purposes). Edit: I would also need questions with more than one correct answer, i.e., where more than one answer gets the [correct] argument. \documentclass[a4paper]{article} \usepackage[ numberofversions=1, seed=11, randomizequestions=false, randomizeanswers=true, writeRfile=false, ]{mcexam} \mcexamoptions{output=answers} %\mcexamoptions{output=exam} \newcounter{resumequestions} \setcounter{resumequestions}{0} \makeatletter \AddToHook{env/mcquestions/end}{\addtocounter{resumequestions}{\value{mc@counter}}Value of resumequestions: \the\value{resumequestions}} \makeatother \renewcommand\mcquestionlabelfmt[1]{\addtocounter{setmcquestionsi}{\value{resumequestions}}\arabic{#1}\addtocounter{setmcquestionsi}{-\value{resumequestions}}} \begin{document} \begin{mcquestions} % First block of questions (1-2, ordered randomly in the future using randomizequestions=true) \question How much is $3+2$? \begin{mcanswerslist} \answer a \answer b \answer c \end{mcanswerslist} \question How much is $2+2$? \begin{mcanswerslist} \answer a \answer b \answer c \answer[correct] d \answer e \answer f \end{mcanswerslist} \end{mcquestions} \begin{mcquestions} % Second block of questions (3-4, ordered randomly in the future using randomizequestions=true) \question Is John Doe alive? \begin{mcanswerslist} \answer a \answer b \answer c \end{mcanswerslist} \question Is Jane Doe alive? \begin{mcanswerslist} \answer a \answer b \answer c \answer d \answer[correct] e \answer f \end{mcanswerslist} \end{mcquestions} \end{document} Screenshot using output=answers:
- Adjusting different column widths automatically in a tableby Soluble on September 7, 2026 at 7:36 am
I saw the adjustment of column width in a table in this link. When I implemented it, I observed that both columns are getting the same width, although it is not necessary in one column. For example, one \documentclass[a4paper,10pt]{article} \usepackage{tabularx} \begin{document} \begin{table} \begin{tabularx}{\columnwidth}{X|X}\hline Limit of sequence & A sequence said to have limit L if given any error e, all the terms of the sequence except finitely many have error at most the given number e.\\\hline \end{tabularx} \end{table} \end{document} I observed that in the output, I get two columns of the same width. But the first column has not many entries; it is the second column only, whose size needs to be adjusted automatically. How can I modify above table? Or is there any other way to adjust automatically the column widths?
- How to adapt extent of \rvert with mathpazo?by user1362373 on September 7, 2026 at 7:15 am
When I use inlined derivatives in Computer Modern, the extent of the vertical line matches that of the slash: \documentclass{standalone} \usepackage{amsmath} \begin{document} $du/dx\rvert_a$ \end{document} By contrast, when I use Mathpazo, the extents do not match: \documentclass{standalone} \usepackage{amsmath} \usepackage[sc,osf]{mathpazo} \usepackage[T1]{fontenc} \begin{document} $du/dx\rvert_a$ \end{document} The bottom of the vertical line is seen to be lower than the bottom of the slash. How can I adjust the vertical line to avoid this mismatch?
- Immediate expanding of \clist_map for use with expand= in tblr environment [closed]by Don Hosek on September 7, 2026 at 1:07 am
For maintainability in a tblr, I’ve developed a macro that works from lists to handle setting the entries. It works pretty well but with one exception: I would like to have it expand the following: \clist_map_inline:Nn \l_fd_clist { & csname pl_##1endcsname } for filling in the cells of a row (the various pl_WHATEVER macros are set earlier in the process). But apparently the expansion is only one level deep (which most of the time is good because otherwise the earlier list handling wouldn’t work correctly). I could split out the code that interprets the input lists and that sets the line and only have the latter part of the expand= option, which might be the best option (it would also allow me to deal with the awkwardness of the fact that I still have a manually generated header row which needs to be kept in sync with the body), but I don’t really like the idea of having to have two macros for each line instead of one like I have now. (Although as I think about it, it also occurs to me that I could do something like \edef\fdline#1#2#3#4{% \noexpand\setfdline{#1}{#2}{#3}{#4}% \clist_map_inline … } but I’d figured I’d see if there was something added in to the TeX core that I’m unfamiliar with or if in the course of writing out this question I’ve come across the best solution.
- The `.bib` file does not work properly on the journal's submission platformby Hausdorff on September 6, 2026 at 6:40 pm
The \cite{} command works correctly on my PC. However, on some journal platforms, citations appear as [?]. I uploaded the following .tex and .bib files to the journal's submission platform (Elsevier). .tex file \documentclass{article} \begin{document} \section{Introduction} This is an example citation of an article \cite{einstein}. \bibliographystyle{plain} \bibliography{references} \end{document} \endinput .bib file @article{einstein, author = {Albert Einstein}, title = {The Foundation of the General Theory of Relativity}, journal = {Annalen der Physik}, volume = {354}, number = {7}, pages = {769--822}, year = {1916} } OUTPUT on my PC OUTPUT on the journal's submission platform (Elsevier). Please let me know how to overcome this issue.
- Redefining \chapter titleclass as "straight" removes all Chapter ToC Entriesby BarbarianLunatic on September 6, 2026 at 1:42 pm
I am currently setting up the structure for the Book-Project I am working on and ran into a problem. As a preliminary: I use a package called typewriter, which does not behave like normal fonts. It places an 'old style' dashed rule instead of a line, for instance. I use a 'Custom ToC Structure', which I wished to include into the MWE, for the sake of completeness... The Problem: I wanted to remove the space at the top of chapters, which appears for no apparent reason and is hard to get rid of, with the typewriter package in use [see Image 1]. So I started looking into \titleclass{\chapter}{straight}, which did give me the desired results for the chapter titlepage, but introduced another problem: --> The Chapter TOC entries are missing [See Image 2]. I do not wish to add too much code in the documents, but want to define the TOC chapter Entries the way they are without the \titleclass{\chapter}{straight}. However much I looked, I could not find anything about this issue. MWE: \documentclass[12pt,oneside]{book} % oneside only for MWE \usepackage[ paperwidth=148mm,%242mm, paperheight=85mm, top=17mm, bottom=10mm, inner=15mm, outer=13mm, ]{geometry} \usepackage{nopageno} \usepackage{lipsum} \usepackage[T1]{fontenc} \usepackage{textcomp} % Definitions for typewriter package (it gives my books an oldschool feel, % without having to buy an actual typewriter) \providecommand\ttgreyone{.18} \providecommand\ttgreytwo{.8} \providecommand\ttrotatebold{5} \providecommand\ttdownbold{20000} \providecommand\ttrightbold{35000} \providecommand\ttdownshifttwo{15300} \providecommand\ttrotatenormal{1.3} \providecommand\ttrightnormal{20000} \providecommand\ttdownnormal{20000} \usepackage{typewriter} \usepackage{scalefnt} % typewriter package does not support commands % like \LARGE or \fontsize, which is why I make use of \scalebox \usepackage[calcwidth]{titlesec} \usepackage{tocloft} \usepackage{titletoc} \usepackage{graphicx} \usepackage{fancyhdr} % For setting up the custom ToC \usepackage{array} % Header Definition with fancyhdr \pagestyle{fancy} %% \fancyhf{} \chead{→ \thepage{} ←} %Chapter formatting \titleclass{\chapter}{straight} % setting class to 'straight' removed the space and % the rule, but also the chapter entries from the TOC \titleformat{\chapter}[display] {} {\centering\cleardoublepage\mbox{}\vspace{.55cm}\scalebox{1.48}{Scroll \thechapter}} {1cm} {\centering\scalebox{1.73}} \titlespacing*{\chapter}{0pt}{1cm}{.1cm} % initial Chapter formatting [Image 1] %\titleformat{\chapter}[display] %{} %{\centering\scalebox{1.48}{Scroll \thechapter}} %{.5cm} %{\centering\scalebox{1.73}} % Custom ToC Structure \makeatletter \def\MBox#1#2#3#4{% \parbox[t]{0.68\linewidth}{#1}% \makebox[0.1\linewidth]{#2}% \makebox[0.05\linewidth][l]{#3}\\[#4]} \renewcommand*\l@part [2]{\MBox{% \scalebox{1.5}{#1}}{}{}{10pt}} \renewcommand*\l@chapter [2]{\hspace*{1.25cm}\MBox{#1}{% \raisebox{-3pt}{% \scalebox{2}{→}}}{\textpeso.#2}{5pt}} \renewcommand*\l@section [2]{\hspace*{1.25cm}\MBox{#1}{% \raisebox{-3pt}{% \scalebox{2}{→}}}{\textpeso.#2}{5pt}} \renewcommand{\numberline}[1]{Scroll #1:~\hfil} \makeatother %ToC Title \setlength{\cftbeforetoctitleskip}{1em} \renewcommand{\contentsname}{\hfil\scalebox{2}{The Tablets of Awakening}} \setlength{\cftaftertoctitleskip}{0em} \setlength\footskip{12pt} \begin{document} \pagenumbering{Roman} \addtocontents{toc}{\protect\thispagestyle{fancy}} %pagenumber on TOC-Page % this is to ensure hyphenation and justified text with the typewriter package \fontdimen2\font=0.4em \fontdimen3\font=0.2em \fontdimen4\font=0.1em \fontdimen7\font=0.1em \hyphenchar\font=`\- % Place TOC \tableofcontents % add part to TOC without pagenumbers \addtocontents{toc}{\cftpagenumbersoff{part}\mbox{}\\[9pt]} \addcontentsline{toc}{part}{\hspace{.5cm}Part 1: The 1st Part of this Work} \chapter{1st Chapter} \pagenumbering{arabic} \thispagestyle{fancy} \lipsum[12][2-5] % to highlight successful justification of text \chapter{2nd Chapter} \thispagestyle{fancy} \end{document} Any Help appreciated!
- How do I use LaTeX to create unicode font handwriting grid templates?by mathrm alpha on September 6, 2026 at 12:12 pm
I want to digitize my handwriting and convert it into a digital font file. Are there any LaTeX grid templates available for this? How can I create a grid with writing guidelines that automatically covers the Unicode range?
- tabularray diagbox not working with xepersianby Shahriar on September 5, 2026 at 6:01 pm
\documentclass{article} \usepackage{xepersian} \settextfont{IRXLotus} \usepackage{tabularray} \UseTblrLibrary{diagbox} \begin{document} \begin{tblr}{ colspec = {c c c}, hlines, vlines, } \diagbox{X}{Y} & A & B \\ 1 & 2 & 3 \\ \end{tblr} \end{document} Running this, I get Undefined control sequence. \end error. The culprit is xepersian + tabularray (if I remove xepersian it renders correctly). But what's the workaround? Versions: xepersian: 26.01.01 tabularray: 2025C diagbox: 2.4 biditools: (not installed) bidi: 26.01.08 Update \makeatletter \providecommand\UseMathForPositioningText{% \m@th } \makeatother Adding this between the two packages loading command makes it work, but the text is not aligned correctly... I don't know whether it's the expected alignment or not.
- How to reduce column separation space for particular column using tabularrayby MadyYuvi on September 5, 2026 at 2:23 pm
My code are: \documentclass[twocolumn]{article} \usepackage{amsmath} \usepackage{array} \usepackage{tabularray} \UseTblrLibrary{booktabs,siunitx} \usepackage{lipsum} \SetTblrInner{ rowsep=0pt, row{1}={l,b}, hborder{1}={belowspace=6pt}, hborder{2}={abovespace=2pt,belowspace=6pt}, hborder{Z}={abovespace=6pt}, width=\linewidth, row{1} = {guard}, } \begin{document} \begin{align} {F_d} = mgf\cos \theta + mg\sin \theta + \delta \tag*{(1)} \end{align} \lipsum[1] \begin{table} \caption{Value of Grid Convergence Index.\label{table1-09544062261479876}} \begin{tblr}{@{}X[1,l]lll@{}} \toprule {} & {\textit{Cpmin}} & {\textit{Cpmin}} & {\textit{Cpmin}}\\ \midrule {GCI N1-N2} & {0.95\%} & {0.46\%} & {0.86\%}\\ {GCI N2-N3} & {0.59\%} & {0.33\%} & {0.58\%}\\ \bottomrule \end{tblr} \end{table} \end{document} which produced the output as below: I need to reduce the column separation (equal space to all column) after first column, I understand that alignment X does the trick, if I applied to all column, but my requirement is all column should be aligned with l, please advise. Expected output: Else, kindly advise how to adjust (decrease) the columnsep after first column manually.
- siunitx rounding to figures doesn't always pad trailing 0by Jakob on September 5, 2026 at 10:23 am
I'm having trouble getting my desired figures padded when the number gets rounded. I don't want to use round-mode=places since I have differing amounts of leading 0s. Here's an example: \documentclass{article} \usepackage{siunitx} \sisetup{ round-mode = figures, round-precision = 3, round-pad = true } \begin{document} \num{0.7603} % 0.760: expected behaviour \num{0.9095} % 0.91: missing trailing 0 \end{document}
- Unicode-math based solution with bold math binary symbols? [duplicate]by Explorer on September 3, 2026 at 2:52 am
The post comes from this classical one, but the unicode-math version, I want to bold some math binary symbols: \documentclass{article} \usepackage{bm} \begin{document} $a + b$ vs $a \bm{+} b$ $a - b$ vs $a \bm{-} b$ $a \times b$ vs $a \bm{\times} b$ $a \div b$ vs $a \bm{\div} b$ \end{document} However, as we all known, unicode-math was conflict with bm package, what I want was as below: The code with unicode-math.... \documentclass{article} \usepackage{unicode-math} \setmathfont{latinmodern-math.otf} \setmathfont[range={`+,\minus,\times,\div}]{STIX Two Math}% ? \begin{document} $a + b$ % vs $a + b$ $a - b$ ? % vs $a - b$ % ? $a \minus b$ % vs $a \minus b$ % ? $a \times b$ % vs $a \times b$ $a \div b$ % vs $a \div b$ \end{document} I found no solution with unicode-math (I only found that STIX Two Math's symbols are thicker, but not in matched style), any suggestions? Notes that other code in the reference link was not the same bahavior of \bm, I want a more Latin Modern Math-like style (it means the tip of + is rounded, but not butt, for example) here...
- How to draw/visualize/simulate to show the diffence between the two almost identical curves?by Black Mild on September 1, 2026 at 9:45 am
This question is related to an interesting question on mathSE. The blue curve $E$ is the ellipse $\left(\frac{4x}{\pi}\right)^2+\left(\frac{y}{\ln\left(\sqrt2+1\right)}\right)^2=1$ and the red curve $L$ is $y^2=\ln^2\left(\sqrt2\cos x-\sqrt{\cos(2x)}\right)$ are almost identical in shapes. So far several answers show that they are different (some 1/10000) but almost identical (it's still open for that exact value/measure of how different they are). Naturally we want to see the difference. The question is to draw/visualize/simulate how different they are. It's interesting in mathematics but challenging in drawing due to very small diffrences. I can draw them (the code below is a MWE); the below left is E over thicker L, the below right is L over a thicker E; however we can not see the difference. Any tools (tikz, pgfplot, asymptote, luadraw, julia, ...) are allowed (standalone can be integrated into LaTeX/beamer). I just think of f(x)-g(x), f(x)/g(x), ... then scale by 10000 in graph, but not yet clear and complete. Please explain some maths behind your way, if any. // https://asymptote.ualberta.ca/ // https://math.stackexchange.com/questions/5147646/why-is-this-curve-almost-an-ellipse-y2-ln2-left-sqrt2-cos-x-sqrt-cos2x/5148177 // The blue curve $E$ is the ellipse $\left(\frac{4x}{\pi}\right)^2+\left(\frac{y}{\ln\left(\sqrt2+1\right)}\right)^2=1$. import graph; usepackage("amsmath"); size(12cm); real a = pi/4; // \approx 0.7854 real b = log(sqrt(2)+1); // = arcsinh(1) \approx 0.8814 write(a); write(b); // The ellipse E real xE(real t) { return a*cos(t); } real yE(real t) { return b*sin(t); } // The curve L real yL_upper(real x) { // Tránh sai số dấu phẩy động lân cận nghiệm bằng hàm max real u = sqrt(max(cos(2*x), 0)); return log(u + sqrt(u^2 + 1)); } real yL_lower(real x) { return -yL_upper(x); } // draw on a picture with pen void draw_curve_E(picture pic=currentpicture, pen p) { draw(pic, graph(xE, yE, 0, 2*pi), p); } void draw_curve_L(picture pic=currentpicture, pen p) { path upper = graph(yL_upper, -a, a, operator ..); path lower = reverse(graph(yL_lower, -a, a, operator ..)); draw(pic, upper -- lower -- cycle, p); } pen penE = blue+1pt; pen penL = red+1pt; pen draw_first = opacity(.3) + 4pt; picture picaxes, picE, picL, picEL, picLE; real extra = .1; xaxis(picaxes, -a-extra, a+extra, gray); yaxis(picaxes, -b-extra, b+extra, gray); add(picE,picaxes); add(picL,picaxes); add(picEL,picaxes); add(picLE,picaxes); draw_curve_E(picE, penE); string sE=" \begin{minipage}[C]{6cm} \[ \left(\frac{4x}{\pi}\right)^2+ \left(\frac{y}{\ln(\sqrt2+1)}\right)^2=1 \] \begin{align*} a&=\pi/4 \approx 0.7854\\ b&=\ln(\sqrt2+1)\\ &=\operatorname{arsinh}(1)\approx0.8814 \end{align*} \[ \frac{x^2}{a^2}+\frac{y^2}{b^2}=1 \] \end{minipage}"; label(picE,Label(scale(.6)*sE,penE),(-a-extra,0),W); draw_curve_L(picL, penL); string sL=" \begin{minipage}[C]{6cm} $$y^2=\ln^2\left(\sqrt2\cos x-\sqrt{\cos(2x)}\right)$$ $$2\sin^2x +\sinh^2 y=1$$ \end{minipage}"; label(picL,Label(scale(.6)*sL,penL),(a+extra,0),E); draw_curve_E(picEL, penE + draw_first); draw_curve_L(picEL, penL); draw_curve_L(picLE, penL + draw_first); draw_curve_E(picLE, penE); real dx=1, dy=1.8; add(shift(-dx,0)*picE); add(shift(dx,0)*picL); add(shift(-dx,-2dy)*picEL); add(shift(dx,-2dy)*picLE); label("They are different but almost identical!",(0,-dy-.2)); label("How do we see their difference ?",(0,-2dy-b-.8)); //shipout(bbox(2mm,invisible)); shipout(bbox(2mm,Fill(.2yellow+.8white)));