Git Product home page Git Product logo

Comments (4)

tuetenk0pp avatar tuetenk0pp commented on June 2, 2024 1

Interestingly, the issue appeared in the 3.1.0.2 release.

from sharelatex-full.

tuetenk0pp avatar tuetenk0pp commented on June 2, 2024

Hey @tangruize, thanks for raising the issue. Sorry that I didn't test this properly. Were you able to resolve the issue locally? I will fix this in the next week or so. Can you provide a MWE for me to test with?

from sharelatex-full.

tuetenk0pp avatar tuetenk0pp commented on June 2, 2024

Feel free to submit a PR if you would like :)

from sharelatex-full.

tangruize avatar tangruize commented on June 2, 2024

Yes, minted works after installing python3-pygments in the container. I think python-pygments is no longer needed. But I did not test it from scratch. Here is a tex file using the minted package:

\documentclass{article}

\usepackage{minted}
\setminted{frame=single, linenos=true, escapeinside={||}, autogobble=true}
\usepackage{refcount}

\makeatletter
\define@key{FV}{highlightlines}{\edef\FV@HighlightLinesList{#1}}
\makeatother

\begin{document}
\newcommand\sldots[0]{\scriptsize\ldots}
\renewcommand\theFancyVerbLine{%
\ifnum\value{FancyVerbLine}=1
 \setcounter{FancyVerbLine}{153}\sldots
\else\ifnum\value{FancyVerbLine}=154
\setcounter{FancyVerbLine}{1000}%
\scriptsize{154}%
\else\ifnum\value{FancyVerbLine}=1001
\scriptsize{+}%
\else\ifnum\value{FancyVerbLine}=1002
\setcounter{FancyVerbLine}{154}%
\scriptsize{+}%
\else
\scriptsize\arabic{FancyVerbLine}%
\fi\fi\fi\fi
}

highlightlines \getrefnumber{new2} and \getrefnumber{new3}
\begin{minted}[highlightlines={\getrefnumber{new2},\getrefnumber{new3}}]{python}
# suppressed
hello|\label{new1}|
world|\label{new2}|
hello|\label{new3}|
world|\label{new4}|
\end{minted}

highlightlines \getrefnumber{newa} and \getrefnumber{newb}
\begin{minted}[highlightlines={\getrefnumber{newa},\getrefnumber{newb}}]{python}
# suppressed
hello|\label{newa}|
world|\label{newb}|
hello|\label{newc}|
world|\label{newd}|
\end{minted}

\end{document}

from sharelatex-full.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.