Hi Alan,
that's an excellent test example! Here's the improved code:
\documentclass{article}
\usepackage{etoolbox}
\begin{document}
\newbool{customer1}
\newbool{customer2}
%...
\newbool{customerN}
\boolfalse{customer1}
\booltrue{customerN}
This is special information:
\ifboolexpr{bool{customer1 ...
Search found 10299 matches
- Tue Oct 28, 2025 7:15 pm
- Forum: General
- Topic: case-statement conditional text
- Replies: 2
- Views: 192
- Tue Oct 28, 2025 3:58 pm
- Forum: Graphics, Figures & Tables
- Topic: Getting Extra \fi error for using subcaption package
- Replies: 8
- Views: 381
Re: Getting Extra \fi error for using subcaption package
I get 0 errors. Perhaps post your updated code and the .log file you get with that code to see the exact error message and related information. I don't get an !Extra \fi error.
Stefan
Stefan
- Tue Oct 28, 2025 12:59 pm
- Forum: Graphics, Figures & Tables
- Topic: Getting Extra \fi error for using subcaption package
- Replies: 8
- Views: 381
Re: Getting Extra \fi error for using subcaption package
Sure, that's why I suggested keeping it, but moving it to a later place. If you have it on the top, first loaded, the other packages are not only interfering but can also change the journal's settings. If you move it to the end, it applies its settings later, when another package's settings cannot ...
- Tue Oct 28, 2025 12:11 pm
- Forum: Graphics, Figures & Tables
- Topic: Getting Extra \fi error for using subcaption package
- Replies: 8
- Views: 381
Re: Getting Extra \fi error for using subcaption package
You have this line here:
\caption{ Numerical, exact solution and absolute error at $T = 5$, with $\Delta t = 0.1$, $\Delta x = 0.12 $ for %Eq.~(\ref{eq-27}).}
Eq.~(\ref{eq-27}).} is commented out by that percent sign, so the closing brace is missing. Remove that % symbol.
Also, I think better ...
\caption{ Numerical, exact solution and absolute error at $T = 5$, with $\Delta t = 0.1$, $\Delta x = 0.12 $ for %Eq.~(\ref{eq-27}).}
Eq.~(\ref{eq-27}).} is commented out by that percent sign, so the closing brace is missing. Remove that % symbol.
Also, I think better ...
- Tue Oct 28, 2025 10:21 am
- Forum: Graphics, Figures & Tables
- Topic: Getting Extra \fi error for using subcaption package
- Replies: 8
- Views: 381
Re: Getting Extra \fi error for using subcaption package
A quick example to show that it's usually working:
\documentclass{article}
\usepackage{subcaption,lipsum}
\begin{document}
\section*{Demo of subcaption with subcaptionbox}
\lipsum[1]
\begin{figure}[htbp!]
\centering
\subcaptionbox{First dummy image}[.45\linewidth]{%
\fbox{\rule{0pt}{3cm}\rule ...
\documentclass{article}
\usepackage{subcaption,lipsum}
\begin{document}
\section*{Demo of subcaption with subcaptionbox}
\lipsum[1]
\begin{figure}[htbp!]
\centering
\subcaptionbox{First dummy image}[.45\linewidth]{%
\fbox{\rule{0pt}{3cm}\rule ...
- Tue Oct 28, 2025 10:14 am
- Forum: Graphics, Figures & Tables
- Topic: Getting Extra \fi error for using subcaption package
- Replies: 8
- Views: 381
Re: Getting Extra \fi error for using subcaption package
Hi,
welcome to the forum!
There may be an error in your code. Perhaps post your code here as a small, reduced copy (complete with relevant preamble like \documentclass, etc.). That code should bring the error when we test it.
Once we can test the code and see the error, we can fix it most of the ...
welcome to the forum!
There may be an error in your code. Perhaps post your code here as a small, reduced copy (complete with relevant preamble like \documentclass, etc.). That code should bring the error when we test it.
Once we can test the code and see the error, we can fix it most of the ...
- Sat Oct 25, 2025 9:24 pm
- Forum: Text Formatting
- Topic: Latex ToC File Updates Everytime
- Replies: 5
- Views: 597
Re: Latex ToC File Updates Everytime
Something does that, but it's hard to say without knowing your document class and packages. Perhaps post that part of your file before \begin{document}.
Stefan
Stefan
- Sat Oct 25, 2025 3:45 pm
- Forum: Text Formatting
- Topic: Latex ToC File Updates Everytime
- Replies: 5
- Views: 597
Re: Latex ToC File Updates Everytime
Hi Anuradha,
LaTeX generates the .doc file every time you run it. Document classes, packages, and macros can write to that file. Without enough information, I cannot say more. Perhaps post the entire preamble of your document.
Stefan
LaTeX generates the .doc file every time you run it. Document classes, packages, and macros can write to that file. Without enough information, I cannot say more. Perhaps post the entire preamble of your document.
Stefan
- Fri Oct 24, 2025 1:28 pm
- Forum: General
- Topic: ifstrequal conditional text
- Replies: 2
- Views: 205
Re: ifstrequal conditional text
Hi Alan,
that's a very good question!
It's important to know that \ifstrequal doesn't expand the strings to compare them.
You can use \expandafter, \expanded, or \ExpandArgs{ee} to force expansion. The latter is documented with xparse , but it's in the LaTeX kernel already. e stands for full ...
that's a very good question!
It's important to know that \ifstrequal doesn't expand the strings to compare them.
You can use \expandafter, \expanded, or \ExpandArgs{ee} to force expansion. The latter is documented with xparse , but it's in the LaTeX kernel already. e stands for full ...
- Tue Oct 21, 2025 6:02 pm
- Forum: Text Formatting
- Topic: Latex ToC File Updates Everytime
- Replies: 5
- Views: 597
Re: Latex ToC File Updates Everytime
Hi Anuradha,
perhaps use in your document:
Stefan
perhaps use in your document:
Code: Select all
\addtocontents{toc}{\protect\changetocdepth{2}}