Comments (6)
I suspect that this is due to using \mintinline
inside \section
with
\hypertarget{if-statements}{%
\section{\texorpdfstring{\mintinline[]{text}{if}
statements}{ statements}}\label{if-statements}}
and
\hypertarget{else-statements}{%
\section{\texorpdfstring{\mintinline[]{text}{else}
statements}{ statements}}\label{else-statements}}
Swapping \mintinline
for \Verb{if}
and \Verb{else}
works for me. \Verb
is defined by fvextra
, and \mintinline
uses fvextra
internally so I would have expected both to behave identically, but apparently something is different in this case.
from minted.
Thanks for the response. Any indication why commenting out non-section code allows it to work in sections?
from minted.
My guess is that the section code (which is interacting with the table of contents) fails to open or more likely fails to close a sequence of commands (basically equivalent to an environment that isn't properly closed), and then the unopened/unclosed state is fixed if the right sequence of non-section code appears later in the document. However, given the state of LaTeX error messages, it can be nearly impossible to track down the details of what is happening in some of these cases. I think I found multiple parts of the document that when removed allowed it to compile successfully.
The last minted release (2.7) reimplemented \mintinline
so that it would work better inside other commands, like \section
. However, since \Verb
works here and \mintinline
doesn't, there may be some remaining issues. Unless there is a totally separate, unrelated bug or issue that we're both missing that is causing this. At least from the minted
side, the \mintinline
in sections is the only thing that seems potentially problematic here, and switching to \Verb
does work.
from minted.
I'm using pandoc and pandoc-minted. So I removed any mintinline
creations from the pandoc-minted plugin.
After jumping through another hoop ( https://tex.stackexchange.com/questions/176113/problem-with-in-pdf-bookmark-under-xelatex ) I appear to be creating PDFs again. Thanks for your help.
from minted.
I've done some additional experiments, and it appears that memoir
redefines \section
so that it is incompatible with \mintinline
(but only in some situations). Please leave this issue open for now.
- The documentation for
\mintinline
needs a note that it may not work inside\section
etc. when using some document classes. - It may be worth creating an option that causes
\mintinline
to behave like\Verb
when used inside other commands like\section
.
from minted.
from minted.
Related Issues (20)
- Use a \def macro as the value for the style option HOT 3
- Update the options forwarded to `fvextra` HOT 1
- breakautoindent option doesn't work with some languages HOT 3
- Custom lexer no longer worked in my computer. HOT 6
- Make `langlinenos` with with `\inputminted` HOT 2
- `\mintinline{cpp}{#include}` in section title results in error HOT 12
- Leading Chinese characters introduce unexpected boxes HOT 5
- Didn't receive error message that fvextra was not installed HOT 2
- Minted ignores fontfamily setting HOT 4
- Font settings (migrating from lst-listings) HOT 12
- clearing `\verbatim@nolig@list` does not allow for code ligatures HOT 2
- Is it possible to `/inputminted` a whole github repository or a whole directory? HOT 1
- problems with escapeinside and --enable-pipes HOT 8
- CustomLexer: Setting environment variables HOT 3
- Support custom lexers HOT 2
- Include snippets of external files based on regular expressions/literal delimiters HOT 1
- Add an option to not show error boxes HOT 1
- multicols HOT 7
- Breaking line within \newmintinline throws error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minted.