1

I'm currently converting my thesis into LaTeX, and i have an issue: being an IT thesis, I have tons of code quotes.

The problem is not about the blocks of code: they are not that many and i can wrap them with {verbatim} tags. The problem is about the millions of inline single terms which should be formatted the same way.

Is there a way, for example, to define a macro or shortcut or whatever which, is i select one word and click it, automatically wraps it with {verbatim} (or equivalent) tags?

Hope I've been clear. This could really spare me hours of tedious work, thank You in advance!

8
  • \newcommand{\code}[1]{\texttt{#1}} Jun 22, 2015 at 0:44
  • 2
    this is the job of (la)TeX editor, so what is your's?
    – touhami
    Jun 22, 2015 at 1:17
  • Do you mean auto-conversion: when you type ***, the editor automatically changes it into \texttt{***}? If so, I suppose that is not what this site handles, and if not, you should define a macro Andrew shows.
    – Merzong
    Jun 22, 2015 at 4:57
  • An example of what I mean: i have this phrase "We inserted this <tag> into the code." What I would like to do is just selecting "<tag>" and pressing e.g. ctrl+something to wrap it, without writing myself anything.
    – prtnkl
    Jun 22, 2015 at 12:22
  • To be more clear: writing \vrb instead of \begin{verbatim} is not a big advantage for me, I'd need to assign that to a keyboard shortcut.
    – prtnkl
    Jun 22, 2015 at 12:25

1 Answer 1

0

Update: I moved to TexMaker editor and found what I was looking for. Thanks to everyone who got interested in this question.

If you have the same issue and are looking for an answer, here it is (for TexMaker users).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .