Single-key teletype?How can I ensure all teletype/monospaced text is in a certain color?Typesetting single quotesUsing consolas as the default teletype style font for listings package?Using many typewriter fonts in a single documentCan't get teletype texttt to move to next lineCannot change teletype font to beramonoHyphenating identifiers printed in typewriter fontHow to get a single space surrounded in single quotes in courier font?Single character ellipsis in monospace (teletype)Changing all single quotes to be straight when within texttt

Harley Davidson clattering noise from engine, backfire and failure to start

Any gotchas in buying second-hand sanitary ware?

Why did the AvroCar fail to fly above 3 feet?

Can I get a photo of an Ancient Arrow?

How can religions without a hell discourage evil-doing?

Why is Skinner so awkward in Hot Fuzz?

Fastest way from 10 to 1 with everyone in between

Dedicated bike GPS computer over smartphone

What's the reason for the decade jump in the recent X-Men trilogy?

Approach sick days in feedback meeting

What does this circuit symbol mean?

New Site Design!

Opposite of "Concerto Grosso"?

How to represent jealousy in a cute way?

Idiom for 'person who gets violent when drunk"

In The Incredibles 2, why does Screenslaver's name use a pun on something that doesn't exist in the 1950s pastiche?

DBCC SHRINKFILE on the distribution database

Was the Lonely Mountain, where Smaug lived, a volcano?

Do Veracrypt encrypted volumes have any kind of brute force protection?

Parsing text written the millitext font

Why not make one big cpu core?

Is fission/fusion to iron the most efficient way to convert mass to energy?

Can an open source licence be revoked if it violates employer's IP?

usage of mir gefallen



Single-key teletype?


How can I ensure all teletype/monospaced text is in a certain color?Typesetting single quotesUsing consolas as the default teletype style font for listings package?Using many typewriter fonts in a single documentCan't get teletype texttt to move to next lineCannot change teletype font to beramonoHyphenating identifiers printed in typewriter fontHow to get a single space surrounded in single quotes in courier font?Single character ellipsis in monospace (teletype)Changing all single quotes to be straight when within texttt













4















I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in tt text. It would be so much nicer to, well, do what StackExchange does! There's a one-character symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same thing in LaTeX?










share|improve this question



















  • 1





    shortverb is your friend

    – David Carlisle
    Jun 6 at 19:58











  • If you're using VSCode, use ctrl+l,ctrl+t.

    – Tvde1
    Jun 7 at 10:34











  • Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

    – Phelype Oleinik
    Jun 7 at 19:58















4















I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in tt text. It would be so much nicer to, well, do what StackExchange does! There's a one-character symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same thing in LaTeX?










share|improve this question



















  • 1





    shortverb is your friend

    – David Carlisle
    Jun 6 at 19:58











  • If you're using VSCode, use ctrl+l,ctrl+t.

    – Tvde1
    Jun 7 at 10:34











  • Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

    – Phelype Oleinik
    Jun 7 at 19:58













4












4








4


1






I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in tt text. It would be so much nicer to, well, do what StackExchange does! There's a one-character symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same thing in LaTeX?










share|improve this question
















I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in tt text. It would be so much nicer to, well, do what StackExchange does! There's a one-character symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same thing in LaTeX?







code typewriter markup






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 7 at 19:57









Phelype Oleinik

29.7k64998




29.7k64998










asked Jun 6 at 19:57









AddemAddem

3572410




3572410







  • 1





    shortverb is your friend

    – David Carlisle
    Jun 6 at 19:58











  • If you're using VSCode, use ctrl+l,ctrl+t.

    – Tvde1
    Jun 7 at 10:34











  • Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

    – Phelype Oleinik
    Jun 7 at 19:58












  • 1





    shortverb is your friend

    – David Carlisle
    Jun 6 at 19:58











  • If you're using VSCode, use ctrl+l,ctrl+t.

    – Tvde1
    Jun 7 at 10:34











  • Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

    – Phelype Oleinik
    Jun 7 at 19:58







1




1





shortverb is your friend

– David Carlisle
Jun 6 at 19:58





shortverb is your friend

– David Carlisle
Jun 6 at 19:58













If you're using VSCode, use ctrl+l,ctrl+t.

– Tvde1
Jun 7 at 10:34





If you're using VSCode, use ctrl+l,ctrl+t.

– Tvde1
Jun 7 at 10:34













Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

– Phelype Oleinik
Jun 7 at 19:58





Unrelated: don't use two-letter font change commands (tt, bf, etc.) in LaTeX. Use the proper more-letter variants (ttfamily, bfseries, etc.)

– Phelype Oleinik
Jun 7 at 19:58










3 Answers
3






active

oldest

votes


















13














enter image description here



documentclassarticle

usepackageshortvrb
MakeShortVerb|
begindocument

this |and| that or |the other|

enddocument


shortvrb is in the core base latex distribution.






share|improve this answer























  • I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

    – Addem
    Jun 8 at 18:01






  • 1





    @Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

    – David Carlisle
    Jun 8 at 18:04



















11














Use fancyvrb and DefineShortVerb (although you might not want to use `)



documentclassarticle
usepackagefancyvrb
DefineShortVerb`
begindocument
I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in
`tt text`. It would be so much nicer to, well, do what StackExchange does! There's a one-character
symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same
thing in LaTeX?
enddocument



enter image description here







share|improve this answer























  • This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

    – AJFarmar
    Jun 7 at 19:46











  • @AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

    – Phelype Oleinik
    Jun 7 at 19:56


















3














Wat StackExchange does is markdown, so you can also use the markdown package:



documentclassarticle
usepackagemarkdown
begindocument
beginmarkdown
This `and` that or `the other`
endmarkdown
enddocument


Or more simple, write a markdown file and export it to LaTeX:



This `and` that or `the other` 


The bonus point of this approach is avoid also many other tedious commands, not only those for verbatim text.






share|improve this answer

























  • I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

    – Chris H
    Jun 7 at 7:54











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494553%2fsingle-key-teletype%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









13














enter image description here



documentclassarticle

usepackageshortvrb
MakeShortVerb|
begindocument

this |and| that or |the other|

enddocument


shortvrb is in the core base latex distribution.






share|improve this answer























  • I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

    – Addem
    Jun 8 at 18:01






  • 1





    @Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

    – David Carlisle
    Jun 8 at 18:04
















13














enter image description here



documentclassarticle

usepackageshortvrb
MakeShortVerb|
begindocument

this |and| that or |the other|

enddocument


shortvrb is in the core base latex distribution.






share|improve this answer























  • I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

    – Addem
    Jun 8 at 18:01






  • 1





    @Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

    – David Carlisle
    Jun 8 at 18:04














13












13








13







enter image description here



documentclassarticle

usepackageshortvrb
MakeShortVerb|
begindocument

this |and| that or |the other|

enddocument


shortvrb is in the core base latex distribution.






share|improve this answer













enter image description here



documentclassarticle

usepackageshortvrb
MakeShortVerb|
begindocument

this |and| that or |the other|

enddocument


shortvrb is in the core base latex distribution.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 6 at 20:02









David CarlisleDavid Carlisle

510k4311591915




510k4311591915












  • I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

    – Addem
    Jun 8 at 18:01






  • 1





    @Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

    – David Carlisle
    Jun 8 at 18:04


















  • I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

    – Addem
    Jun 8 at 18:01






  • 1





    @Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

    – David Carlisle
    Jun 8 at 18:04

















I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

– Addem
Jun 8 at 18:01





I suspect this is conflicting with the vertical bars that I'm using to declare borders in tabular environments. Is that right, and if so, do you happen to know a fix?

– Addem
Jun 8 at 18:01




1




1





@Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

– David Carlisle
Jun 8 at 18:04






@Addem you can turn it off before the table (DeleteShortVerb| ) or use any other character that you do not use, such as MakeShortVerb! or any other character

– David Carlisle
Jun 8 at 18:04












11














Use fancyvrb and DefineShortVerb (although you might not want to use `)



documentclassarticle
usepackagefancyvrb
DefineShortVerb`
begindocument
I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in
`tt text`. It would be so much nicer to, well, do what StackExchange does! There's a one-character
symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same
thing in LaTeX?
enddocument



enter image description here







share|improve this answer























  • This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

    – AJFarmar
    Jun 7 at 19:46











  • @AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

    – Phelype Oleinik
    Jun 7 at 19:56















11














Use fancyvrb and DefineShortVerb (although you might not want to use `)



documentclassarticle
usepackagefancyvrb
DefineShortVerb`
begindocument
I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in
`tt text`. It would be so much nicer to, well, do what StackExchange does! There's a one-character
symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same
thing in LaTeX?
enddocument



enter image description here







share|improve this answer























  • This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

    – AJFarmar
    Jun 7 at 19:46











  • @AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

    – Phelype Oleinik
    Jun 7 at 19:56













11












11








11







Use fancyvrb and DefineShortVerb (although you might not want to use `)



documentclassarticle
usepackagefancyvrb
DefineShortVerb`
begindocument
I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in
`tt text`. It would be so much nicer to, well, do what StackExchange does! There's a one-character
symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same
thing in LaTeX?
enddocument



enter image description here







share|improve this answer













Use fancyvrb and DefineShortVerb (although you might not want to use `)



documentclassarticle
usepackagefancyvrb
DefineShortVerb`
begindocument
I'm writing a document with a ton of pseudocode and it's very tedious to keep wrapping code objects in
`tt text`. It would be so much nicer to, well, do what StackExchange does! There's a one-character
symbol, the back-tick, just like for math there's the dollar-sign. Is there any way to accomplish the same
thing in LaTeX?
enddocument



enter image description here








share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 6 at 20:00









Phelype OleinikPhelype Oleinik

29.7k64998




29.7k64998












  • This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

    – AJFarmar
    Jun 7 at 19:46











  • @AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

    – Phelype Oleinik
    Jun 7 at 19:56

















  • This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

    – AJFarmar
    Jun 7 at 19:46











  • @AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

    – Phelype Oleinik
    Jun 7 at 19:56
















This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

– AJFarmar
Jun 7 at 19:46





This might cause problems when you want to use quotation marks. A chacter like | or @ might be more suitable

– AJFarmar
Jun 7 at 19:46













@AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

– Phelype Oleinik
Jun 7 at 19:56





@AJFarmar That's exactly why I said "you might not want to use `` ` ``", I just used it to imitate the markdown syntax (I could've used more emphasis on that warning, though :-).

– Phelype Oleinik
Jun 7 at 19:56











3














Wat StackExchange does is markdown, so you can also use the markdown package:



documentclassarticle
usepackagemarkdown
begindocument
beginmarkdown
This `and` that or `the other`
endmarkdown
enddocument


Or more simple, write a markdown file and export it to LaTeX:



This `and` that or `the other` 


The bonus point of this approach is avoid also many other tedious commands, not only those for verbatim text.






share|improve this answer

























  • I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

    – Chris H
    Jun 7 at 7:54















3














Wat StackExchange does is markdown, so you can also use the markdown package:



documentclassarticle
usepackagemarkdown
begindocument
beginmarkdown
This `and` that or `the other`
endmarkdown
enddocument


Or more simple, write a markdown file and export it to LaTeX:



This `and` that or `the other` 


The bonus point of this approach is avoid also many other tedious commands, not only those for verbatim text.






share|improve this answer

























  • I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

    – Chris H
    Jun 7 at 7:54













3












3








3







Wat StackExchange does is markdown, so you can also use the markdown package:



documentclassarticle
usepackagemarkdown
begindocument
beginmarkdown
This `and` that or `the other`
endmarkdown
enddocument


Or more simple, write a markdown file and export it to LaTeX:



This `and` that or `the other` 


The bonus point of this approach is avoid also many other tedious commands, not only those for verbatim text.






share|improve this answer















Wat StackExchange does is markdown, so you can also use the markdown package:



documentclassarticle
usepackagemarkdown
begindocument
beginmarkdown
This `and` that or `the other`
endmarkdown
enddocument


Or more simple, write a markdown file and export it to LaTeX:



This `and` that or `the other` 


The bonus point of this approach is avoid also many other tedious commands, not only those for verbatim text.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 7 at 7:54









Chris H

6,64122258




6,64122258










answered Jun 7 at 5:37









FranFran

55.1k6122188




55.1k6122188












  • I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

    – Chris H
    Jun 7 at 7:54

















  • I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

    – Chris H
    Jun 7 at 7:54
















I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

– Chris H
Jun 7 at 7:54





I hope you don't mind me adding a link to the package - it was new to me and presumably to others, and looks useful

– Chris H
Jun 7 at 7:54

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494553%2fsingle-key-teletype%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?