You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the package defines custom box styles to align with the Julia online documentation. However, this leads to inconsistencies when using listings with other programming languages.
MVE
\documentclass{article}
\usepackage{listings}
\let\Bbbk\relax\usepackage[autoload=false, theme=default-plain]{jlcode}
\begin{document}
text1
\begin{jllisting}[language=julia, style=jlcodestyle]
using TypedMatrices
A = Hilbert(5)
\end{jllisting}
text2
\begin{lstlisting}[language=julia, style=jlcodestyle]
using TypedMatrices
A = Hilbert(5)
\end{lstlisting}
text3
\begin{lstlisting}[language=python]
import os
print(os.getcwd())
\end{lstlisting}
text4
\end{document}
Output
Additionally, setting certain document properties such as width can cause errors. For example, when using acmart with ``\begin{lstlisting}[language=julia, style=jlcodestyle]`, code blocks may disappear entirely:
While aligning with the Julia online documentation is reasonable, it may be necessary to use listings for multiple languages in a single article. Moreover, the font and styles applied by the package differ slightly from the default listings output, which can cause inconsistencies.
To address this, it would be helpful to introduce an option allowing the package to provide Julia language support and syntax highlighting without enforcing additional box styles or overriding existing listings settings.
Thank you for this very detailed issue report.
I am happy to see that you have already found a temporary workaround that you shared with the community.
I guess that you workaround should do the job for now for all people that face the same problem, but I am going to add a new package option to fix this with the next update. However, I am little busy with other stuff right now so that it will likely take a few months.
Nevertheless I guess that this issue is something that should be fixed in a decent way by the package itself.
Issue Description
I noticed that the package defines custom box styles to align with the Julia online documentation. However, this leads to inconsistencies when using
listings
with other programming languages.MVE
Output
Additionally, setting certain document properties such as width can cause errors. For example, when using
acmart
with ``\begin{lstlisting}[language=julia, style=jlcodestyle]`, code blocks may disappear entirely:Output
Cause Analysis
The issue seems to be related to the
aboveskip
setting in thejlcodeblockstyle
:Similarly, the margins defined in the box styles may contribute to the problem:
Workaround
To resolve these issues temporarily, I renewed the styles as follows:
Output
Feature Request
While aligning with the Julia online documentation is reasonable, it may be necessary to use
listings
for multiple languages in a single article. Moreover, the font and styles applied by the package differ slightly from the defaultlistings
output, which can cause inconsistencies.To address this, it would be helpful to introduce an option allowing the package to provide Julia language support and syntax highlighting without enforcing additional box styles or overriding existing
listings
settings.Related Issue
See also: #16
The text was updated successfully, but these errors were encountered: