Skip to content

Backtick highlight #56

Answered by cagix
moerk0 asked this question in Q&A
Jan 25, 2024 · 3 comments · 8 replies
Discussion options

You must be logged in to vote

@moerk0 Sorry für die späte Antwort. Bin grad komplett unter Wasser mit Prüfungen ...

Pandoc übersetzt die Markdowndateien nach LaTeX und die Code-Snippets werden wg. der Option --listings mit dem listings-Paket formatiert.

Aus

Blockcode:

```python
def foo():
  """ Wuppie! """
  pass
```

Und Inline-Code sieht `void foo();` so aus.

wird

\begin{document}

Blockcode:

\begin{lstlisting}[language=Python]
def foo():
  """ Wuppie! """
  pass
\end{lstlisting}

Und Inline-Code sieht \passthrough{\lstinline!void foo();!} so aus.

\end{document}

Man kann dem Inline-Code noch die gewünschte Sprache mitgeben:

  Und Inline-Code sieht `void foo();`{.java} so aus.

Was kannst Du von hier aus tun?

Du k…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@moerk0
Comment options

@cagix
Comment options

Answer selected by moerk0
@cagix
Comment options

@cagix
Comment options

@moerk0
Comment options

@cagix
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cagix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #48 on January 26, 2024 15:00.