diff --git a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st index f9fcb0cd..f7494a11 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st @@ -313,6 +313,18 @@ $$' '\end{equation}' ] +{ #category : 'tests - math' } +MicLaTeXWriterTest >> testMathInLine [ + + self + parseInlined: 'Similarly, let $f_{w,C}$ be the number of documents in corpus $C$ that contain word $w$:' + + + andCheckWeGet: + +'Similarly, let $f_{w,C}$ be the number of documents in corpus $C$ that contain word $w$:' +] + { #category : 'tests - formats' } MicLaTeXWriterTest >> testMonospace [ diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index 216c341f..2b1cb8c8 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -265,6 +265,13 @@ MicLaTeXWriter >> visitMath: aMicMathEnvironment [ canvas raw: aMicMathEnvironment body. canvas newLine ] ] +{ #category : 'blocks - table' } +MicLaTeXWriter >> visitMathInline: aMicMathInline [ + + canvas raw: '$', aMicMathInline bodyString, '$' + +] + { #category : 'blocks - inline' } MicLaTeXWriter >> visitMonospace: aMonospace [ canvas command diff --git a/src/Microdown/MicMathInlineBlock.class.st b/src/Microdown/MicMathInlineBlock.class.st index bc777a4e..f9cc89ce 100644 --- a/src/Microdown/MicMathInlineBlock.class.st +++ b/src/Microdown/MicMathInlineBlock.class.st @@ -46,5 +46,6 @@ MicMathInlineBlock class >> openingDelimiter [ { #category : 'visiting' } MicMathInlineBlock >> accept: aVisitor [ + ^ aVisitor visitMathInline: self ]