Skip to content

LaTeX use straight quotes also in inline code - #2627

Merged
jfbu merged 1 commit into
sphinx-doc:stablefrom
jfbu:latex_inlinecodeusestraightquotes
Jun 8, 2016
Merged

jfbu merged 1 commit into
sphinx-doc:stablefrom
jfbu:latex_inlinecodeusestraightquotes

Conversation

@jfbu

@jfbu jfbu commented Jun 6, 2016

Copy link
Copy Markdown
Contributor

Was already the case in code-blocks, but not for 'inline' mark-up.

I tested on Sphinx's own doc for example.

Was already the case in code-blocks, but not for ``'inline'`` mark-up.
@tk0miya

tk0miya commented Jun 8, 2016

Copy link
Copy Markdown
Member

Looks good.

@tk0miya tk0miya added this to the 1.4.4 milestone Jun 8, 2016
@jfbu
jfbu merged commit a51681b into sphinx-doc:stable Jun 8, 2016
jfbu added a commit that referenced this pull request Jun 8, 2016
@jfbu
jfbu deleted the latex_inlinecodeusestraightquotes branch June 8, 2016 09:36
jfbu added a commit to jfbu/sphinx that referenced this pull request Jan 2, 2018
…te``

Since sphinx-doc#2627 (1.4.4), `\code`, and then again at sphinx-doc#3116 (1.5)
`\sphinxcode` which is the new name has become more complicated than the
original `\texttt{#1}`. This was to obtain straight codes in PDF output,
and to allow long inline literals to break across lineswq.

This means though that user who wants to customize `\sphinxcode`, for
example to not only do `\texttt` but to use some colour, has to copy
about 10 lines of complicated LaTeX macros with @ letter. This moves all
the code out of `\sphinxcode` into new macro `\sphinxupquote`.

The LaTeX files will contain `\sphinxcode{\sphinxupquote{foo}}` in place
of former `\sphinxcode{foo}`. Moving the `\texttt` from innermost to
outermost level is with no consequence.
jfbu added a commit to jfbu/sphinx that referenced this pull request Jan 2, 2018
…te``

Since sphinx-doc#2627 (1.4.4), `\code`, and then again at sphinx-doc#3116 (1.5)
`\sphinxcode` which is the new name has become more complicated than the
original `\texttt{#1}`. This was to obtain straight quotes in PDF output,
and to allow long inline literals to break across lines.

This means though that users who want to customize `\sphinxcode`, for
example to not only do `\texttt` but to use some colour, have to copy
about 10 lines of complicated LaTeX macros which should be not modified
in any way. This commit moves all the code out of `\sphinxcode` into a
separate macro `\sphinxupquote`.

The LaTeX writer will output `\sphinxcode{\sphinxupquote{foo}}` in place
of former `\sphinxcode{foo}`. Moving the `\texttt` from innermost to
outermost level is with no consequence.
jfbu added a commit to jfbu/sphinx that referenced this pull request Jan 3, 2018
…te``

Since sphinx-doc#2627 (1.4.4), `\code`, and then again at sphinx-doc#3116 (1.5)
`\sphinxcode` which is the new name has become more complicated than the
original `\texttt{#1}`. This was to obtain straight quotes in PDF output,
and to allow long inline literals to break across lines.

This means though that users who want to customize `\sphinxcode`, for
example to not only do `\texttt` but to use some colour, have to copy
about 10 lines of complicated LaTeX macros which should be not modified
in any way. This commit moves all the code out of `\sphinxcode` into a
separate macro `\sphinxupquote`.

The LaTeX writer will output `\sphinxcode{\sphinxupquote{foo}}` in place
of former `\sphinxcode{foo}`. Moving the `\texttt` from innermost to
outermost level is with no consequence.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants