LaTeX.org
LaTeX.org is a TeX and LaTeX forum, suited for LaTeX beginners and experts who help them. Here are the newest questions. Sorry that the code formatting is not preserved through the RSS feed.
- Text Formatting • Changing incorrectly formatted quotations to correctly formatted quotations.by bgreen on August 27, 2025 at 8:41 am
Periodically I tried to find solutions to quotation wrong facing leading quotation mark, e.g. ”They". Searches found posts from 2012 but the quotes package only produced errors and loading csquotes did not seem to make a difference. I have eventualy found the backtick that does result in correct quotation marks. However, there must be an easier way than manually changing hundreds of quotes.Below is the preamble that I typically use (also used for a book class document) and a small text example. Any advice is appreciated.Code: \documentclass{article}\usepackage{xcolor}\usepackage{titlesec}\usepackage[a4paper, total={7in, 10in}]{geometry}\usepackage{graphicx} \usepackage[english] {babel}\usepackage{blindtext}\usepackage[section]{placeins}\usepackage{subcaption}\usepackage[colorlinks]{hyperref}\pagestyle {empty}\usepackage[labelformat=empty]{caption}\usepackage {wrapfig}\usepackage{microtype}\usepackage{parskip}\usepackage{geometry}\titleformat*{\section}{\fontsize{12}{14}\selectfont}\raggedright \begin{document}\pagecolor{yellow!30}Unlike the "rollers" and "combers" , "dumpers" an Argus Junior supplement by 'Handicraft' said no.\end{document}[\code]Statistics: Posted by bgreen — Wed Aug 27, 2025 10:41 am
- LyX • Lyx unable to launch pdf viewerby lyxer on August 24, 2025 at 1:04 pm
Hello all,I'm using Lyx 2.4.1 on Windows 11 (64-bit /ARM). I use SumatraPDF 3.5.2 (64-bit) for pdf preview.Everything was fine until yesterday when Lyx stopped launching SumatraPDF to show the output.I tried exporting the pdf file and I can see it in the folder. Also, when I double click on it, it opens in SumatraPDF.So, it seems the problem is in the link between Lyx and SumatraPDF.I tried uninstalling/Re-installing SumatraPDF but still does not work.What could be the problem?SalehStatistics: Posted by lyxer — Sun Aug 24, 2025 3:04 pm
- Presentations and Posters • Re: [Beamer] adding line boxby Diabloi on August 23, 2025 at 3:39 pm
I didn't solve the problem. I will try to investigate your suggestion.Statistics: Posted by Diabloi — Sat Aug 23, 2025 5:39 pm
- General • Re: Problem starting Miktex with BAT fileby Stefan Kottwitz on August 21, 2025 at 10:44 am
Hi Gerry,were you able to solve it? If yes, what was the cause?If not, perhaps provide some more information. Like the error messages, or a .log file, as attachment here. Try running the commands manually in a cmd window to see any errors, and let us know.StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:44 pm
- General • Re: BAT file does has stopped workingby Stefan Kottwitz on August 21, 2025 at 10:43 am
This looks exactly like the topic here, so I close it and it can continue there. I'll update in the other thread.StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:43 pm
- General • Re: cmd acronym error when compiling with pdfLatexby Stefan Kottwitz on August 21, 2025 at 10:32 am
Sorry to see there's no answer yet. Perhaps that's because no code is here that can be tested.Were you able to fix it? If yes, what was the reason? If not, perhaps post code here, that brings the error message.Thanks!StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:32 pm
- TeXworks • Re: IMage captionsby Stefan Kottwitz on August 21, 2025 at 10:30 am
Hi Sheena,welcome to the forum!That is defined by your document class, or your preamble settings. If you show us the preamble, we may say why, and how to change it.Regarding the second question, you could use this:Code: \renewcommand{\figurename}{Photo}StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:30 pm
- Math & Science • Re: How to Format a Multi-Part Practice Exam with Section Headers in LaTeX?by Stefan Kottwitz on August 21, 2025 at 10:28 am
This looks like spam and an online search confirmed, so it seems no answer is needed. I keep that though as it looks like a valid question, in case anybody is interested in commenting.StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:28 pm
- Presentations and Posters • Re: [Beamer] adding line boxby Stefan Kottwitz on August 21, 2025 at 10:25 am
Hi Roberto,were you able to solve it?Quick idea: use the tikzmark package, set markers in the title, use them as anchors and draw the lines as an overlay.StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:25 pm
- Text Formatting • Re: Trouble converting from Overleaf to TeXStudioby Stefan Kottwitz on August 21, 2025 at 10:22 am
Hi Dlongddsma,sorry to see there's no answer yet. I guess that's because the code is incomplete and cannot be tested.Were you able to solve it? If not perhaps post a compilable example code, with the My CollectionForDisProposal.bib too. Either copied in here as source code formatted (using the "code" button </> above when writing), which is the best for short code, or as an attachment for longer files. I would test that too.Anyway, let us know how it turned out, thanks!StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:22 pm
- General • Re: filename and ifthenby Stefan Kottwitz on August 21, 2025 at 10:17 am
An update: this was resolved on TeXwelt.de.The \ifdefstring command from the etoolbox package is more robust and handles macro expansion better. It works if your file is named TestFile.tex (the online compiler uses an auto-generated filename).Code: \documentclass{article}\usepackage{currfile}\usepackage{etoolbox}\begin{document}currfilename: \currfilename\\\ifdefstring{\currfilename}{TestFile.tex}{ Bastian Host}{empty currfilename}\end{document}Using \currfilename instead of \jobname fixes the issue and should be sufficient.StefanStatistics: Posted by Stefan Kottwitz — Thu Aug 21, 2025 12:17 pm
- Fonts & Character Sets • Re: Getting certain characters when not in math mode [ ] for exampleby WasPentalive on August 19, 2025 at 6:25 pm
Thanks! I will try that right away.I thought I had tried that and got some (stop and you can insert or run or exit here) It did work... I thought I had tried just a bare [ and ] and had trouble... I guess I did not.Thanks again.Statistics: Posted by WasPentalive — Tue Aug 19, 2025 8:25 pm
- Fonts & Character Sets • Re: Getting certain characters when not in math mode [ ] for exampleby Stefan Kottwitz on August 19, 2025 at 5:56 pm
Hi,welcome to the forum!There was no answer yet, perhaps because it wasn't clear what the problem is, no error message and unclear what the output is with your document. This simply works without problem:Code: \documentclass{article}\begin{document}Normal text: [parts]\end{document}Click "Run LaTeX here" to see that it works.The error message you mentioned is for \], and yes, this is code for math equations. But you can write square brackets [ and ] simply in text mode. Even in math mode. Perhaps show some code that fails with it.StefanStatistics: Posted by Stefan Kottwitz — Tue Aug 19, 2025 7:56 pm
- Math & Science • Re: citation in maths modeby Stefan Kottwitz on August 19, 2025 at 5:35 pm
The correct way is to write it as text:Code: \begin{equation*} 55+2\ \text{\cite{dopey}}\end{equation*}StefanStatistics: Posted by Stefan Kottwitz — Tue Aug 19, 2025 7:35 pm
- General • filename and ifthenby Meiro on August 11, 2025 at 11:13 am
Hi,I try to check the name of the latexfile with ifthenelse:Code: \newcommand{\mydocument}{testfile}\ifthenelse{\equal{\mydocument}{testfile}}{Test File}{empty mydocument}\\\jobname:\\\ifthenelse{\equal{\jobname}{testfile}}{job: Test File}{empty job}\\\currfilename:\\\ifthenelse{\equal{\currfilename}{testfile.tex}}{cur: testfile}{empty cur}jobname and currfilename does not work. Any hints?Thanks a lotMeiroStatistics: Posted by Meiro — Mon Aug 11, 2025 1:13 pm
- Text Formatting • Re: Import result from Python into regular sentenceby rotmat on August 5, 2025 at 8:44 pm
Just found that by adding a wildcard after filecontents it works again. Not sure whyStatistics: Posted by rotmat — Tue Aug 05, 2025 10:44 pm
- Text Formatting • Re: Import result from Python into regular sentenceby rotmat on August 5, 2025 at 8:37 pm
Hi, back here again some years later. But installing again on a new computer below example does not work any longer (neither does the inline example here in the forum). Has anything changed in the datatool package and is it supposed to be used in another way? @Bartman, any suggestions?Statistics: Posted by rotmat — Tue Aug 05, 2025 10:37 pm
- Text Formatting • Trouble converting from Overleaf to TeXStudioby dlongddsma on August 5, 2025 at 2:05 am
Since Overleaf is cutting back on the compile time, I'm trying to switch over to TeXstudio. I used a template in Overleaf, and everything compiled beautifully. So I copy and pasted the entire coding from Overleaf into TeXstudio, and it's now screwed up. I'm trying to use Chicago style citations for endnotes, specifically (notes-bibliography). When I compile in overleaf, it compiles perfectly, with numbers after the citation and a beautifully formatted bibliography. Wheelis, Mark. 2002. “Biological Warfare at the 1346 Siege of Caffa.”Emerging Infectious Diseases 8 (9): 971–75. https://doi.org/10.3201/e-id0809.010536.[6] This article rReferences[6] Mark Wheelis. “Biological warfare at the 1346 siege of Caffa”. In: Emerg-ing Infectious Diseases 8.9 (2002), pp. 971–975. issn: 10806040. doi:10.3201/eid0809.010536. url: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2732530/.However, when I compile the exact same code in TeXStudio, the reference is changed to the (author-date) style and there is no bibliography.Wheelis, Mark. 2002. “Biological Warfare at the 1346 Siege of Caffa.”Emerging Infectious Diseases 8 (9): 971–75. https://doi.org/10.3201/e-id0809.010536.[Wheelis2002] This article rHere is the preamble source code followed by the citation code\documentclass[a4paper,12pt]{article}\setlength{\parskip}{0.5pt}%\setlength{\parindent}{20pt}%%preamble: style and/or packages\author{XXXXXXXXXXX}\title{PhD research proposal}\date{January 2023}%\usepackage{package}\usepackage{hyperref}\usepackage{titlesec}\setcounter{secnumdepth}{3}\usepackage{enumitem}\usepackage{varwidth}\usepackage{tasks}\usepackage{setspace}%\doublespacing\usepackage{graphicx}\usepackage{siunitx}%colors, boxes\usepackage[dvipsnames]{xcolor}\usepackage[most]{tcolorbox}\tcbuselibrary{fitting}\definecolor{columbiablue}{rgb}{0.61, 0.87, 1.0}\definecolor{mossgreen}{rgb}{0.68, 0.87, 0.68}%\usepackage[super,sort&compress,comma]{natbib}\usepackage{biblatex} %Imports biblatex package\addbibresource{My CollectionForDisProposal.bib} %Import the bibliography file%indent first line\usepackage{indentfirst}\setlength{\parindent}{30pt}%captions\usepackage[font=footnotesize,labelfont={bf,it}, textfont=it]{caption}\usepackage[labelsep=period]{caption}%landscape pages\usepackage{pdflscape}\usepackage{fancyhdr} %page number at bottom in landscape \fancypagestyle{mylandscape}{\fancyhf{} %Clears the header/footer\fancyfoot{% Footer\makebox[\textwidth][r]{% Right \rlap{\hspace{.75cm}% Push out of margin by \footskip \smash{% Remove vertical height \raisebox{4.87in}{% Raise vertically \rotatebox{90}{\thepage}}}}}}% Rotate counter-clockwise\renewcommand{\headrulewidth}{0pt}% No header rule\renewcommand{\footrulewidth}{0pt}% No footer rule}%temporarily disable superscript\DeclareRobustCommand*{\citen}[1]{% \begingroup \romannumeral-`\x % remove space at the beginning of \setcitestyle \setcitestyle{numbers}% \cite{#1}% \endgroup }\begin{document}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \item Wheelis, Mark. 2002. “Biological Warfare at the 1346 Siege of Caffa.” \textit{Emerging Infectious Diseases} 8 (9): 971–75. \url{https://doi.org/10.3201/e-id0809.010536 ... heelis2002} This Why is this code doing different things in different compilers???Statistics: Posted by dlongddsma — Tue Aug 05, 2025 4:05 am
- Math & Science • citation in maths modeby latex_fun on August 4, 2025 at 11:39 pm
Hi Stefan,If I try to put a citation in maths mode I get an error:! LaTeX Error: Command \upshape invalid in math modeHow can I do this correctly?Kind regardsMWE:Code: \documentclass{amsart}\usepackage{amsfonts}\usepackage{amsmath}\usepackage{amssymb}\usepackage{amsthm}\usepackage{soul}\usepackage[autostyle]{csquotes}\title{Let's help Sister Mary}\author{John Bellushi}% These will be typeset in italics\newtheorem{Theorem}{Theorem}[section]\newtheorem{Corollary}[Theorem]{Corollary}\newtheorem{Hypothesis}[Theorem]{Hypothesis}\newtheorem{Proposition}[Theorem]{Proposition}\newtheorem{Lemma}[Theorem]{Lemma}% These will be typeset in Roman\theoremstyle{definition}\newtheorem{Definition}[Theorem]{Definition}\newtheorem{Example}[Theorem]{Example}\newtheorem{Fact}[Theorem]{Fact}\newtheorem{Remark}[Theorem]{Remark}\begin{document}%\pagenumbering{gobble}\begin{abstract} Save the orphans!\end{abstract}\maketitle %\newpage\pagenumbering{arabic}\section{Introduction}yep\section{The number}It adds up:\begin{equation*} 55+2\ \cite{dopey}\end{equation*}\begin{thebibliography}{1}\bibitem{dopey} Dope, The, ``I'm so sleepy''\end{thebibliography}\end{document} Statistics: Posted by latex_fun — Tue Aug 05, 2025 1:39 am
- Fonts & Character Sets • Getting certain characters when not in math mode [ ] for exampleby WasPentalive on August 4, 2025 at 4:33 am
I am writing a manual for a programming language. I need to explain parts of this language that include the characters [ and ]. I am not working in math mode, just normal text. I have tried \], but that seems to work sometimes and not others.! LaTeX Error: Bad math environment delimiter.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help. ... l.613 Once an expression is closed by \] the top of the stack is stored in? XP.S. I have been working with TeX / LaTeX for about 10 hours now... A little prior experience almost 30 years ago.Statistics: Posted by WasPentalive — Mon Aug 04, 2025 6:33 am
- Presentations and Posters • [Beamer] adding line boxby Diabloi on August 2, 2025 at 12:49 pm
Hello, I am try to replicate this template. I have my personal template coded in a file Style.tex, but i am not able get this quare box like in the foto.The final results should be like this picture. I tried several option without success.actually my personal code is define as below:Code: % Common packages%\usepackage[english]{babel}\usepackage{graphicx}\usepackage{colortbl}\usepackage{textgreek}\usepackage{multirow}\usepackage{amssymb}\usepackage{wasysym}\usepackage{calc}\usepackage{appendixnumberbeamer}\usepackage[defaultmathsizes,LGRgreek]{mathastext}\usepackage{bookmark}\usepackage{IEEEtrantools}\usepackage{tikz}%% Common settings for all lectures in this course%\title{\insertlecture}\subject{\lecturename}%% Beamer theme settings%\usetheme{default}\usecolortheme{default}\useinnertheme{rectangles}\useoutertheme{default}\usefonttheme{default}%\setbeamertemplate{sidebar right}{}\setbeamertemplate{title page}{\vbox{}\vskip1em{\usebeamercolor[fg]{title}\usebeamerfont{title}\inserttitle\par}\ifx\insertsubtitle\@empty\else\vskip0.25em{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}\fi\vskip1em\par\usebeamercolor[fg]{conference}\lecturename\\\usebeamercolor[fg]{location}\location \insertdate\par\vskip0pt plus1filll\leftskip=0pt plus1fill\usebeamercolor[fg]{author}\insertauthor\par\usebeamercolor[fg]{institute}\footnotesize\insertinstitute\vskip1em}\setbeamertemplate{frametitle continuation}{}\setbeamertemplate{bibliography item}{\insertbiblabel}%\definecolor{darkgreen}{rgb}{0.0,0.5,0.0}\definecolor{goldline}{rgb}{0.77,0.61,0.30}%\setbeamercolor{structure}{fg=blue}\setbeamercolor{conference}{fg=red}\setbeamercolor{happy}{fg=darkgreen}\setbeamercolor{sad}{fg=red}\setbeamercolor{location}{fg=black}\setbeamercolor{author}{fg=blue}\setbeamercolor{institute}{fg=black}\setbeamercolor{box}{fg=black,bg=yellow}\setbeamercolor{frametitle}{fg=blue,bg=white}\setbeamercolor{headline}{fg=goldline,bg=white}\setbeamercolor{footline}{fg=goldline,bg=white}\setbeamercolor{bibliography item}{fg=black}\setbeamercolor{bibliography entry author}{fg=black}\setbeamercolor{bibliography entry title}{fg=black}\setbeamercolor{bibliography entry location}{fg=black}\setbeamercolor{bibliography entry note}{fg=black}\setbeamerfont{title}{size=\huge}\setbeamerfont{frametitle}{size=\Large}\setbeamerfont{framesubtitle}{size=\large}\setbeamerfont{footline}{size=\small}\setbeamerfont{page number}{size=\tiny}\setbeamerfont{bibliography item}{size=\small}\setbeamerfont{bibliography entry author}{size=\small}\setbeamerfont{bibliography entry title}{size=\small}\setbeamerfont{bibliography entry location}{size=\small}\setbeamerfont{bibliography entry note}{size=\small}% headline\setbeamertemplate{headline}{\leavevmode\begin{beamercolorbox}[wd=1.0\paperwidth]{headline} % usa lo stesso colore\setlength{\unitlength}{\paperwidth}\begin{picture}(2.0,0.11)(0,0)\linethickness{0.7pt}\put(0.03,0.05){\color{goldline}\line(1,0){0.94}}\end{picture}\end{beamercolorbox}}\setbeamertemplate{footline}{\leavevmode\begin{beamercolorbox}[wd=1.0\paperwidth]{footline}\setlength{\unitlength}{\paperwidth}\begin{picture}(1.0,0.11)(0,0)\put(0.03,0.005){\includegraphics[width=0.08\textwidth]{UniPV}}\linethickness{0.7pt}\put(0.03,0.095){\line(1,0){0.875}}\put(0.12,0.045){\makebox[0.3\paperwidth][l]{Università di Pavia}}\put(0.905,0.091){\framebox[0.065\paperwidth][r]{\usebeamerfont{page number}\insertframenumber/\inserttotalframenumber}}\end{picture}\end{beamercolorbox}}\settowidth{\leftmargini}{\usebeamertemplate{itemize item}}\addtolength{\leftmargini}{\labelsep}\newlength{\fullpage}\setlength{\fullpage}{(\textheight-\footheight-\headheight-60pt)}\newcommand{\fillv}{\vskip0pt plus 1filll}\makeatletter\g@addto@macro\bfseries{\boldmath}\makeatother\def\happy{\usebeamercolor[fg]{happy}\smiley\hskip-1.6pt}\def\sad{\usebeamercolor[fg]{sad}\frownie\hskip-1.6pt}\newcommand{\backup}{\renewcommand{\appendixname}{Backup Slides}\appendix}\newcommand{\backupsection}[1]{\section*{{\appendixname} --- #1}}\newcommand{\backupsubsection}[1]{\subsection*{#1}}\newcommand{\mathsym}[1]{\text{#1}}The presentation is done in this wayCode: \documentclass[italian,10pt,t,ucs]{beamer}\usepackage[utf8]{inputenc}%lettere accentate da tastiera\usepackage[T1]{fontenc}%codifica dei font\usepackage[utf8]{inputenc}%lettere accentate da tastiera\usepackage{multirow} %per fare una cella di una tabella con più punti a capo\usepackage{textcomp} %serve per inserire certi simboli tipo °C\usepackage{bmpsize}%\usepackage{tabularx}\usepackage{booktabs}%\usepackage{amsmath}\usepackage{amssymb}\usepackage{amsfonts}\usepackage{amsthm}\usepackage{amscd}%\usepackage{wrapfig} \def\lecturename{name}\def\location{Pavia, Italia,}\date{ 28 September 2025}\institute{Dipartimento di Ingegneria Industriale e dell'Informazione\\Università di Pavia}\input{Slides_Style_original.tex}%inserire tema da usare\lecture{title here}\subtitle{}\begin{document}\setlength{\abovedisplayskip}{4pt}\setlength{\belowdisplayskip}{4pt}\addtobeamertemplate{block begin}{\vspace*{-1.5em}}{}\begin{frame}\maketitle\end{frame}\begin{frame}\frametitle{Indice}\tableofcontents[subsubsectionstyle=hide]\end{frame}\AtBeginSection[]{\begin{frame}\frametitle{Indice}\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/show/shaded,subsubsectionstyle=hide]\end{frame}}%-------------------------------------------------------------------------------------------------\section{Introduzione}\label{sec:introduzione}\begin{frame}\frametitle{{\insertsection}}\begin{columns}[t,totalwidth=\columnwidth]\begin{column}{0.6\columnwidth}\begin{block}{\alert{Scopo}}Lo scopo del progetto è stato quello di ottimizzare le prestazioni della P-MFC e sfruttare al meglio l'energia prodotta dalle nostre piante per poter alimentare applicazioni per ambito civile, come sensori di temperatura e umidità.\end{block}\end{column}\begin{column}{0.4\columnwidth}\begin{block}{\alert{}}\begin{figure} % [〈number of narrow lines〉] {〈placement〉} [〈overhang〉] {〈width〉} overhang è la larghezza della figura\includegraphics[width=4cm, height=\fullpage]{figure/plant}\end{figure} \end{block}\end{column}\end{columns}\end{frame}end{document}Someone has an idea on how to get this simple results?Statistics: Posted by Diabloi — Sat Aug 02, 2025 2:49 pm
- General • Problem starting Miktex with BAT fileby GerryWolff on August 1, 2025 at 9:46 am
Normally, I run Miktex with this BAT file:miktex-pdflatex %1miktex-bibtex %1miktex-pdflatex %1miktex-pdflatex %1and for a long time it has worked perfectly.But recently it stopped working. Now it simply repeats the lines in the file.How can I get it working again?With thanks.Statistics: Posted by GerryWolff — Fri Aug 01, 2025 11:46 am
- TeXworks • IMage captionsby sheena on July 30, 2025 at 8:14 am
So i am writing a report and i am adding images. for these images , i am adding captions under each, but the captions are uppercase even when the text for the caption is in lowercase, i tried manually making them lowercase , still failed. How do i make the captions lower case?. and instead of figure 1 on the caption how do i make it photo 1?Statistics: Posted by sheena — Wed Jul 30, 2025 10:14 am
- Math & Science • How to Format a Multi-Part Practice Exam with Section Headers in LaTeX?by salen556 on July 28, 2025 at 12:47 pm
Hi everyone,I'm working on compiling a practice exam using LaTeX, and I’ve run into some issues formatting it cleanly.The exam is based on RBT (Revised Bloom's Taxonomy) levels — with sections like Knowledge, Application, Analysis, etc. I want each section to start on a new page with a proper header and clean formatting. But I’m struggling with two main things:Making sure each section starts on a new page with its own heading and proper spacingEnsuring the questions under each section are numbered correctly like 1.1, 1.2 under Knowledge, then 2.1, 2.2 under Application, etc.I’ve seen some examples online, but nothing that fits this exact structure. Here’s a sample exam I’m referencing and building upon:<promotional link removed>Any ideas on which LaTeX packages or structure I should use for this kind of layout? A template suggestion would also be hugely appreciated.Thanks in advance!Statistics: Posted by salen556 — Mon Jul 28, 2025 2:47 pm
- General • BAT file does has stopped workingby GerryWolff on July 28, 2025 at 9:31 am
This BAT file:miktex-pdflatex %1miktex-bibtex %1miktex-pdflatex %1miktex-pdflatex %1normally works fine. But now it simply repeats the commands in the file.I have tried re-installing Miktex but that does not help.How can I fix this problem?Statistics: Posted by GerryWolff — Mon Jul 28, 2025 11:31 am
- General • input files with variable filenamesby lobelt on July 24, 2025 at 9:08 am
I want to input a file with a variable filename.Suppose we have the following files:foobar.texfoo123.texbar123.texfoo456.texbar456.texThe files foo123 and foo456 are latex root files and include foobar.tex.In foobar.tex I want to include bar123 if I compile foo123. When compiling foo456 the file bar456 should be included. And so on.I started with xstring and tried \StrBehind{\jobname}{foo}. But this gives me an empty string.My questions are:How to extract the needed data from \jobnameandhow to build a new filename for using with \inputStatistics: Posted by lobelt — Thu Jul 24, 2025 11:08 am
- General • Re: Help with compile timeoutby Stefan Kottwitz on July 24, 2025 at 8:57 am
Hi,welcome to the forum!LaTeX is free and there's no premium version. You can install it on your computer, I recommend TeX Live.Perhaps you mean Overleaf, you did not mention it though. That's a commercial service. They provide a cloud computing infrastructure with space and processor capacity, an online editor with many features, and employ many people for doing this. So they require money to run this, through their premium service. A very basic service is free, but with limited performance, as you noticed it.Looks like you can decide between installing LaTeX yourself or buy a premium Overleaf license. Many universities and institutions have an institutional license, so their students can use it for free, you could check this.StefanStatistics: Posted by Stefan Kottwitz — Thu Jul 24, 2025 10:57 am
- General • Help with compile timeoutby Quillhead on July 24, 2025 at 7:45 am
Hi. I am currently working on a document which has a lot of images in it and they are all above 2 MB and I am facing an issue of compile timeout and it asks me to buy their premium version but as soon as I comment out some images it compiles again. So how do I resolve this issue because apart from the images I currently have I will be adding more images in the document in the future.Statistics: Posted by Quillhead — Thu Jul 24, 2025 9:45 am
- Conversion Tools • Re: converting a .dvi file to Microsoft Word formatby Stefan Kottwitz on July 21, 2025 at 6:17 pm
tex4ht comes with a lot of options to customize its behavior. If the output is so wrong, perhaps you can find better settings. Did you try the things from the manual?Similar with pandoc, it can be used in various ways.I'm pretty confident that with some reading and tries both tex4ht and pandoc cam produce usable output.Worst scenario, you could copy&paste from the PDF into Word and go manually through it.An interesting option could be the .tex file to an LLM like ChatGPT and tell it, to convert it in a certain way. Or upload the PDF and tell it to render it in html or rtf. The output may be a base for finalizing.StefanStatistics: Posted by Stefan Kottwitz — Mon Jul 21, 2025 8:17 pm
- Conversion Tools • Re: converting a .dvi file to Microsoft Word formatby shachter on July 21, 2025 at 6:05 pm
I tried both pandoc and tex4ht. Neither one worked adequately.Pandoc did not work at all. The command "pandoc -o parasha_puzzles.html parasha_puzzles.tex" immediately produced the following error: Error at "source" (line 1, column 8): unexpected mac \input macMaybe pandoc needs other, uninstalled, files to work properly, but if so it gives no information of what they are.The tex4ht program did not fail immediately with an error message, but it produced output that is useless. In the html file that it produced, all the spacing is gone. There are no line breaks. There are no paragraph breaks. The entire 135-page book is one very long line, and there are no changes in typeface or point size, either, all the characters are the same size and in the same typeface. I can show you the output that it produces, because I put it on my website, but before you look at it, please remember that this is an unpublished book, so please respect my copyright on my unpublished book. Also, the book will be published pseudonymously, so please respect the privacy of my pseudonym.Bearing in mind those two things, you can now look at http://m5.chicago.il.us/docs/parasha_puzzles.html (make sure you type http: and not https: because my website is unforgiving of errors). You will agree that the output of tex4ht is completely useless. Now replace the .html at the end of that URL with a .pdf and you will now see what the book is supposed to look like (except that in the .pdf file, I manually moved the table of contents from the end of the book to immediately after the titlepage). There are spaces where there are supposed to be, there are changes in typeface and pointsize where there are supposed to be. Also there are characters like h with an underdot, which is a legitimate Unicode character that can be rendered in html, but in the output of tex4ht it shows up as "h ." which is different, and utterly unreadable. I am certain you will agree that the HTML generated by text4ht is useless.The .pdf file was generated by running etex on the TeX input document to create a .dvi file, running dvips 3 times on the .dvi file to create 3 PostScript files (titlepage, body, table of contents) and then running gs on the 3 PostScript files to put the table of contents after the titlepage instead of at the end, and to convert the whole thing to PDF. How do I create a Microsoft Word document that looks like what the book is supposed to look like, to satisfy my publisher's bizarre request that all manuscripts be submitted in Microsoft Word format? Thank you in advance for any and all replies. jay at m5 dot chicago dot il dot usStatistics: Posted by shachter — Mon Jul 21, 2025 8:05 pm
- Conversion Tools • Re: converting a .dvi file to Microsoft Word formatby Stefan Kottwitz on July 21, 2025 at 4:15 pm
Hi Jay!.aux files contain external data such as labels for references. A .bbl file contains the bibliography in TeX format.I think would not convert dvi to rtf or word, , but start with the .tex file. There are tools to convert TeX to html, such as tex4ht, and html can be imported in Word, and you keep the logical structure.Or use pandoc to convert from .tex to .html and then open in Word, or to Markdown format first.StefanStatistics: Posted by Stefan Kottwitz — Mon Jul 21, 2025 6:15 pm
- Conversion Tools • converting a .dvi file to Microsoft Word formatby shachter on July 20, 2025 at 6:45 pm
Esteemed Colleagues,This is not a LaTeX-related question, but I looked for, and did not find, a TeX forum, so I am submitting my question here, hopeful that it will be read by someone who can answer it.After writing my most recent book in TeX, I came across a likely publisher for it, likely except for the bizarre requirement "All manuscripts must be submitted in Microsoft Word format". How do I satisfy this publisher's bizarre requirement? Is there a program that can convert a .dvi file to Microsoft Word format?I duly attempted to answer this question on my own before appealing to the readership of this forum, and I found https://en.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats, which offered a technique to convert a LaTeX input file to a file in RTF format, which could then be converted to Microsoft Word format through other means. It seems, however, that LaTeX is not what I thought it was, TeX that has read some input files that define some useful macros. On the contrary, the LaTeX program appears to create .aux, and sometimes .bbl, files, which the conversion-to-RTF procedure requires. I do not know what .aux and .bbl files are. Hence my original question, How can I convert a .dvi file to Microsoft Word format, so I can satisfy this publisher's bizarre requirement? If you think that the answer to this question is not of general interest, please send electronic mail to the address that is indicated below. Thank you in advance for any and all replies. jay at m5 dot chicago dot il dot usStatistics: Posted by shachter — Sun Jul 20, 2025 8:45 pm
- General • cmd acronym error when compiling with pdfLatexby marbocam on July 18, 2025 at 10:39 am
I'm getting this error after updating MiKTeX. It used to work fine, but now I need to press enter to pass the whole acronym list..Any idea how to fix it?Statistics: Posted by marbocam — Fri Jul 18, 2025 12:39 pm
- Text Formatting • For a single citation, how to order the Authors NOT Alphabetically.by Suze on July 17, 2025 at 3:38 pm
I currently have in my .bib file, @article{Hagedorn, author = "The ALICE Collaboration , Abelev B, Adam J", title = "Energy dependence of the transverse momentum distributions of charged particles in pp collisions measured by ALICE", year = "2013", journal = "Eur. Phys. J. C", volume = "73", number = "2662", url = "https://doi.org/10.1140/epjc/s10052-013-2662-9"}Which outputs: Adam J The ALICE Collaboration Abelev B. “Energy dependence of the854transverse momentum distributions of charged particles in pp collisions855measured by ALICE”. In: Eur. Phys. J. C 73.2662 (2013). URL: https :856//doi.org/10.1140/epjc/s10052-013-2662-9.But I need it to be as follows and don't know how to get there: The ALICE Collaboration,Adam J, Abelev B., et al. “Energy dependence of the854transverse momentum distributions of charged particles in pp collisions855measured by ALICE”. In: Eur. Phys. J. C 73.2662 (2013). URL: https :856//doi.org/10.1140/epjc/s10052-013-2662-9.Basically, listing the authors out of alphabetical order, and adding the 'et al' at the end. Thanks!Statistics: Posted by Suze — Thu Jul 17, 2025 5:38 pm
- Math & Science • Re: Quick way to nest within dollar signs?by asantewaah on July 17, 2025 at 9:03 am
In Overleaf, you can select the entire text you want to put in dollar signs and type 'Shift + 4" or however you type $.Statistics: Posted by asantewaah — Thu Jul 17, 2025 11:03 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 15, 2025 at 3:23 am
So, I was talking with a colleague about this, and as I am finding it difficult to make time for working on this between other things (life getting in the way, etc.) he suggested I submit my query to grok. After some time explaining what I was trying to do, it spit out this code:Code: \documentclass{article} \usepackage{tikz,amsmath} \begin{document}\begin{tikzpicture}[scale=0.7] \foreach \row [evaluate=\row as \introw using int(floor(\row))] in {0,0.5,...,3} { \pgfmathsetmacro{\spacing}{ifthenelse(int(\introw), (2*\introw-2)/(4*\introw), (2*\introw+2)/(4*\introw))} \node[anchor=east] at (-1,-\row*1.5) {\row}; \foreach \col in {0,...,\introw} { \def\collabel{\ifodd\col b\else a\fi} \pgfmathsetmacro{\entry}{ifthenelse(\row<1, 1, int(5*\col+1))} \node at (\col*1.5*\spacing,-\row*1.5) {\(\entry\) (\collabel)}; } } \end{tikzpicture}\end{document}I still haven't made enough headway in my various books (yours, TeXbook, TeX By Topic, and Unlocking LaTeX Graphics) to really grasp where, but the output is giving me 100 errors. It says something about division by 0 occurring somewhere. I am somewhat out of my depth as to whether it is even doing what I was getting at. Any thoughts? I noticed immediately that the "ifthenelse" operator was not begun with a backslash, and tried changing that, but clearly wasn't the issue (if even an issue). Would be appreciative of any help.Statistics: Posted by spe420 — Tue Jul 15, 2025 5:23 am
- Decision Guidance • Re: Suggestions for Shared Glossaries between booksby chisao on July 14, 2025 at 11:13 pm
Great thanks StefanLooking forward to becoming a pro.Statistics: Posted by chisao — Tue Jul 15, 2025 1:13 am
- Decision Guidance • Re: Suggestions for Shared Glossaries between booksby Stefan Kottwitz on July 8, 2025 at 10:45 am
Hi Chisao,welcome to the forum!Looks like you got what you need - the TeX Live software, and a suitable editor, also a good choice.There's a very capable package for glossaries: https://ctan.org/pkg/glossaries It can do so much, that the documentation is huge. It's like learning LaTeX on one hand, and learning the glossaries package on the other hand. StefanStatistics: Posted by Stefan Kottwitz — Tue Jul 08, 2025 12:45 pm
- Decision Guidance • Suggestions for Shared Glossaries between booksby chisao on July 8, 2025 at 8:27 am
Hi, I just learned about TeX and it seems like just the solution I have been looking for. I have a collection of books which I want to add indexes and glossaries to. It looks like Latex is great for this. Additionally I know there will be a fair amount of shared glossary entries between books, I am hoping there is a way to expedite the process, something like a shared glossary (would be a dictionary at that point I guess) that I can borrow from to make individual glossaries. I haven't even started learning how it all works yet, so I am posting just to get some certainty about using the right programs.I have just installed TeX Live and the Tex Studio program packaged with my Linux distro. Should that do what I need or is there something else that would be better?Statistics: Posted by chisao — Tue Jul 08, 2025 10:27 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 7, 2025 at 1:48 am
I'm unsure what the error was, but for whatever reason, it resolved when I restarted the program. Very strange. Perhaps, as you say, it inadvertently loaded another file by mistake.Statistics: Posted by spe420 — Mon Jul 07, 2025 3:48 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby Stefan Kottwitz on July 6, 2025 at 9:54 am
Regarding the error in \usepackage{pgfplots,lua-visual-debug}}, with one } too many, that's interesting. Because it's not in the code, where we have \usepackage{pgfplots,luacode}. Could look like a typo or auto-completion-error, but you would see that in the code.Especially as it appears in line 1 (l.1) it looks like it's from another document, like one included by \input, or in some file that's used. It can happen when there are other files in the same folder/directory, that are accidentally loaded. Sometimes people have files in the same folder but named them accidentally like a LaTeX package, or have some downloaded file with an issue.Perhaps post the log file here, as attachment? I know you may nott need it, but it would be interesting to find out why it happens. It could be an issue another time, too.By the way, lua-visual-debug is pretty nice. I don't really have a use for it, but at some point it may help if spacing or complex formula contruction would be strange. Quick example from my LaTeX Cookbook:Code: \documentclass[paper=a4,oneside,fontsize=11pt, parskip=full]{scrartcl}\usepackage{lua-visual-debug}\pagestyle{empty}\begin{document}\section{Some maths}Let's look at an integral approximation of a function$f(x)$ as a sum with weights $w_i$:\begin{equation} \int_a^b f(x)\,\mathrm{d}x \approx (b-a) \sum_{i=0}^n w_i f(x_i)\end{equation}\end{document}Also, btw. if something strange seems to happen with TeX on your local machine, you could easily use any code box here in the forum, copy your .tex code in, and run the online compiler in the forum. Then you see what happens with a current TeX Live 2025, and if there's an issue with local files on your computer instead or really with TeX/LaTeX.StefanStatistics: Posted by Stefan Kottwitz — Sun Jul 06, 2025 11:54 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 6, 2025 at 6:32 am
I was able to find information in the PGF/TikZ documentation pertinent to what I am trying to do. https://tikz.dev/math-algorithmsThanks for your help.Statistics: Posted by spe420 — Sun Jul 06, 2025 8:32 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 5, 2025 at 11:08 pm
So, random tangent, but upon trying to set the following code (from here: https://pgfplots.net/strange-attractors/) in Texifier, I receive an error for a line which, to my lying eyes, is not present in the document:Code: \documentclass{standalone}\usepackage{pgfplots,luacode}\pgfplotsset{compat=1.18}\usepgfplotslibrary{colormaps}\usetikzlibrary{backgrounds}\begin{luacode*} -- Differential equation function f(x,y,z) local a = 0.95 local b = 0.7 local c = 0.6 local d = 3.5 local e = 0.25 local f = 0.1 return {(z-b)*x-d*y, d*x+(z-b)*y, c+a*z-z^3/3-(x^2+y^2)*(1+e*z)+f*z*x^3} end -- Write PGFplots data as coordinates function print_Attractor(h,npoints,option) -- The initial point (x0,y0,z0) local x0 = 0.0 local y0 = 1.0 local z0 = 0.0 -- Add random number between -0.25 and 0.25 local x = x0 + (math.random()-0.5)/2 local y = y0 + (math.random()-0.5)/2 local z = z0 + (math.random()-0.5)/2 tex.sprint("\\addplot3[".. option .."] coordinates{") -- dismiss first 100 points to go into the attractor for i=1, 100 do m = f(x,y,z) x = x + h * m[1] y = y + h * m[2] z = z + h * m[3] end for i=1, npoints do m = f(x,y,z) x = x + h * m[1] y = y + h * m[2] z = z + h * m[3] tex.sprint("("..x..","..y..","..z..")") end tex.sprint("}") end\end{luacode*}\newcommand\addAttractorPlot[3][]{% \directlua{print_Attractor(#2,#3,[[#1]])}}\begin{document}\begin{tikzpicture} \begin{axis}[hide axis, axis equal, zmin = 0, zmax = 1, show background rectangle, /tikz/background rectangle/.style = { left color = black, right color = black!20, shading angle = 135}] \foreach \i in {1,...,10}% step h=0.015, 2000 points: \addAttractorPlot[color of colormap=100*\i] {0.015}{2000}; \end{axis}\end{tikzpicture}\end{document}I get the following three errors on line 1, despite having left it unaltered from the source:no.1:***! Undefined control sequence.l.1 \usepackage {pgfplots,lua-visual-debug}}! Too many }'s.l.1 \usepackage{pgfplots,lua-visual-debug}}***no.2:***! Undefined control sequence.l.1 \usepackage {pgfplots,lua-visual-debug}}! Too many }'s.l.1 \usepackage{pgfplots,lua-visual-debug}}***no.3:***! Undefined control sequence.l.1 \usepackage {pgfplots,lua-visual-debug}}! Too many }'s.l.1 \usepackage{pgfplots,lua-visual-debug}}***Any suggestions? Have I misunderstood something?Statistics: Posted by spe420 — Sun Jul 06, 2025 1:08 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 5, 2025 at 10:16 pm
Great. Will post code here if/when successful.Statistics: Posted by spe420 — Sun Jul 06, 2025 12:16 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby Stefan Kottwitz on July 5, 2025 at 10:05 pm
Found it:Code: \documentclass[tikz,border=50pt]{standalone}%\usepackage{ifthen,amsmath}\let\result\relax\makeatletter\newcommand\binomialCoefficient[2]{% \c@pgf@counta=#1% n \c@pgf@countb=#2% k \c@pgf@countc=\c@pgf@counta% \advance\c@pgf@countc by-\c@pgf@countb% \ifnum\c@pgf@countb>\c@pgf@countc% \c@pgf@countb=\c@pgf@countc\fi% \c@pgf@countc=1% will hold the result \c@pgf@countd=0% counter \pgfmathloop% c -> c*(n-i)/(i+1) for i=0,...,k-1 \ifnum\c@pgf@countd<\c@pgf@countb% \multiply\c@pgf@countc by\c@pgf@counta% \advance\c@pgf@counta by-1% \advance\c@pgf@countd by1% \divide\c@pgf@countc by\c@pgf@countd% \repeatpgfmathloop% \the\c@pgf@countc% \xdef\result{\the\c@pgf@countc}}\makeatother\begin{document}\newdimen\R\R=.4cm\newcommand\mycolor{gray}\begin{tikzpicture}[line width=.8pt] \node[text centered] at (-3.5,-0.3) {$\begin{aligned} &\rlap{Catalan numbers:}\\ C_n &= \frac{1}{n+1}{2n\choose n} = \frac{(2n)!}{(n+1)!\,n!} \\ &= 1, 1, 2, 5, 14, 42, 132, \ldots\end{aligned}$}; \node[shift={(0:{sqrt(3)*\R-8})}, fill=white,inner sep=0pt,anchor=west,font=\tiny]{$=\mathbf{\color{red}1}$}; \foreach \k in {0, ..., 12}{ \begin{scope}[shift={(-60:{sqrt(3)*\R*\k})}] \pgfmathtruncatemacro\ystart{12-\k} \foreach \n in {0,...,\ystart}{ \pgfmathsetmacro{\test}{\n == \k-2 ? 1 : 0} \pgfmathtruncatemacro\newn{\n+\k} \ifthenelse{\n=\k}{\def\mycolor{blue}}{} \ifthenelse{\test=1}{\def\mycolor{green}}{} \begin{scope}[shift={(-120:{sqrt(3)*\R*\n})}] \draw[top color=\mycolor!20, bottom color=\mycolor!60] (30:\R) \foreach \x in {90, 150, ..., 330} { -- (\x:\R)} -- cycle (90:0) node {\tiny$\mathbf{\binomialCoefficient{\newn}{\k}}$}; \ifthenelse{\n=\k}{\xdef\previous{\result}}{} \ifthenelse{\test=1}{ \pgfmathtruncatemacro{\catalan}{\previous-\result} \node[xshift=-10,fill=white,inner sep= 0pt]{$-$}; \node[shift={(0:{sqrt(3)*\R*(\k-1)-8})}, fill=white,inner sep= 0pt,anchor=west,font=\tiny] {$\previous-\result=\mathbf{\color{red}\underline\catalan}$}; }{} \end{scope}} \end{scope}}\end{tikzpicture} \end{document}StefanStatistics: Posted by Stefan Kottwitz — Sun Jul 06, 2025 12:05 am
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 5, 2025 at 9:57 pm
Would you please supply the code for the example you posted on X? I would be grateful if you would please do so. I have just tried copying it off of the image, but I am getting several errors within the first few lines.Statistics: Posted by spe420 — Sat Jul 05, 2025 11:57 pm
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 5, 2025 at 9:26 pm
I see. That makes sense. This certainly betrays my unfamiliarity with the language. Just to be exhaustive, I have these other two examples of code that I am basing my thoughts off of. So, for starters there is this example:Code: \documentclass{article}\usepackage{tikz}\makeatletter\newcommand\binomialCoefficient[2]{% % Store values \c@pgf@counta=#1% n \c@pgf@countb=#2% k % % Take advantage of symmetry if k > n - k \c@pgf@countc=\c@pgf@counta% \advance\c@pgf@countc by-\c@pgf@countb% \ifnum\c@pgf@countb>\c@pgf@countc% \c@pgf@countb=\c@pgf@countc% \fi% % % Recursively compute the coefficients \c@pgf@countc=1% will hold the result \c@pgf@countd=0% counter \pgfmathloop% c -> c*(n-i)/(i+1) for i=0,...,k-1 \ifnum\c@pgf@countd<\c@pgf@countb% \multiply\c@pgf@countc by\c@pgf@counta% \advance\c@pgf@counta by-1% \advance\c@pgf@countd by1% \divide\c@pgf@countc by\c@pgf@countd% \repeatpgfmathloop% \the\c@pgf@countc%}\makeatother\begin{document} \begin{tikzpicture}\foreach \n in {0,...,15} { \foreach \k in {0,...,\n} { \node at (\k-\n/2,-\n) {$\binomialCoefficient{\n}{\k}$}; }}\end{tikzpicture}\end{document}[/LaTeX]And then the code from the original video I referred to in the first post:[LaTeX]\documentclass{standalone}\usepackage{tikz}\usepgflibrary{fpu}\begin{document}\def\N{8}\tikz[x = 0.75 cm, y = 0.5 cm,pascal node/.style={font = \footnotesize}]\path\foreach \n in {0,...,\N} {\foreach \k in {0,...,\n} {(-\n/2+\k, -\n) node [pascal node/.try] {\pgfkeys{/pgf/fpu}\pgfmathparse{round(\n!/(\k!*(\n-\k)!))}\pgfmathfloattoint{\pgfmathresult}\pgfmathresult}}};\end{document}I don't fully understand all of the code, but I see that certain things are defined, for example "pascal node", and referred to. And yes, as you say, that pgf does the calculations for as many iterations of the variable \N as it is told to. I am completely unfamiliar with scripting in lua, or any programming language for that matter. I don't really have any time constraints. This is more so a hobby project than anything else, though I am putting a serious effort into it to make it as professional as possible a presentation. I don't particularly mind having to labor over the finer details, but I don't really know where to start if, say, I wanted to define my own function and do calls to it for an Nth row of my variant of the structure. I can of course manually insert the values now that I have a basic grasp, but I want to use this as an opportunity to learn something new. Appreciate the feedback thus far. Many thanks.Statistics: Posted by spe420 — Sat Jul 05, 2025 11:26 pm
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby Stefan Kottwitz on July 5, 2025 at 9:08 pm
The TeXbook and TeX by Topic are great books, for understanding the background and the history. As an author using LaTeX, one may not need it. But it's good reading stuff, and helps with a deeper understanding of macro programming.LaTeX (and TeX) are primarily for typesetting, nicely presenting. They are not calculators. There are additional tools and packages for doing calculations and embedding results in code for displaying with LaTeX, but that's some extra effort of course. TikZ (pgfmath) is good, or the fp package. LaTeX can also process csv format files with externally calculated data. LuaTeX can use Lua math features. I used it in some examples here: pgfplots.net/tag/luatex. I used pgfmath for the Pascal triangle here on X. That's rather complicated. LuaTeX is easier once it's understood. It means much time for a single table though - it's great to learn this, but if there's time pressure, it's ok to take over data from Excel into the LaTeX document.StefanStatistics: Posted by Stefan Kottwitz — Sat Jul 05, 2025 11:08 pm
- Math & Science • Re: Help: Creating Pascal-esque triangle (different structure and numbers) with TikZ for academic paperby spe420 on July 5, 2025 at 7:51 pm
Thanks for the advice. Apologies for taking my time in responding. Been busy, etc. I took your advice, and have gone with a LaTeX editor, specifically Texifier. Works very well. I have looked around on the internet, and gotten several examples of code that people have used to generate Pascal's Triangle, and begun to mess around with my own variation of it. Here is the rough draft:Code: \documentclass[preview,border=12pt]{standalone}\usepackage{array}\begin{document}Let $A$ be a set of $k$ elements and $B\subseteq A$ has $i$ elements.\begin{center}\begin{tabular}{>{$}l<{$}|*{7}{c}}\multicolumn{1}{l}{$k$} &&&&&&&\\\cline{1-1} 0 &$x_i^0$&&&&&&\\1 &$\Sigma$&$x_i^1$&&&&&\\2 &$\Sigma$&$\Sigma$&$x_i^2$&&&&\\3 &$\Sigma$&$\Sigma$&$\Sigma$&$x_i^3$&&&\\4 &$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$x_i^4$&&\\5 &$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$x_i^5$&\\6 &$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$\Sigma$&$x_i^6$\\\hline\multicolumn{1}{l}{} &0&1&2&3&4&5&6\\\cline{2-8}\multicolumn{1}{l}{} &\multicolumn{7}{c}{$i$}\end{tabular}\end{center}\end{document}So, in place of the ∑ summation symbols, I wish to actually specify a particular equation and have Texifier do the calculation, depending on the value of the index "i" of x. I have a particular set of numbers I am working with, and essentially a binary operation that applies one of two rules depending on the index value of the term in the set. That's the part that I have no idea where to begin with. Messing around with the different examples, I am kind of beginning to understand how the language works. Also waiting on Tex by Topic and The Texbook in the mail. Should be fruitful reading.I would kindly oblige you on the review, but I actually do not have an amazon account.Statistics: Posted by spe420 — Sat Jul 05, 2025 9:51 pm
- General • Re: Weird space after headingby Stefan Kottwitz on July 5, 2025 at 7:17 pm
What does it mean, messing the format?Like this? Or what is messed up?It would be good if you would post complete code. Can you imagine how I can test this with the code snippet in the question? Luckily I researched and found that it's probably that Jake Ryan CV template and I built a document to test it. But your document could be completely different apart from the code lines shows here.StefanStatistics: Posted by Stefan Kottwitz — Sat Jul 05, 2025 9:17 pm