Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 350901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:35:36+00:00 2026-05-12T11:35:36+00:00

I have a little problem where I would like to insert a svn diff

  • 0

I have a little problem where I would like to insert a svn diff of a LaTeX document into
another LaTeX document, the goal is to show what has changed since revision XXX.
However since the diff contains a lot of LaTeX command I can’t include it right into the document since LaTeX will interpit them and not just “print” them.

Today I have this in my Makefile

DIFF_INFO=diff.info.tex
DIFF_REV=167
diffinfo:
    $(shell echo "\n" > $(DIFF_INFO) )
    $(shell echo "\\section{diff $(DIFF_REV)} \n" >> $(DIFF_INFO) )
    $(shell echo \\\\begin{verbatim} >> $(DIFF_INFO) )
    $(shell svn diff --revision $(DIFF_REV) $(N).tex >> $(DIFF_INFO) )
    $(shell echo \\\\end{verbatim} >> $(DIFF_INFO) )

And at the end of the LaTeX document I have this:

\IfFileExists{diff.info.tex}
{
  \newpage
  \input{diff.info.tex}
}

But this fails hard!

My next idea is to write a perl script that replaces all invalid chars with something that LaTeX can show, but it feels like I’m risking to reinvent the wheel so I figured that I could ask if someone had a better idea?

How do I include and show LaTeX code in the document?

Thanks
Johan


Update:
Thanks “unknown (google)” for pointing out verbatim, it did what I wanted it to.

Update:
I also looks like I should try that listings that las3rjock told us about since it look kind of nice.

Update:
Could not get listings to work in my case, I get some strange utf warnings about invalid chars. But the verbatim is working so I will use that way this time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:35:36+00:00Added an answer on May 12, 2026 at 11:35 am

    There’ a verbatim package that you can include with \usepackage{verbatim} and access using \verbatiminput{filename}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 228k
  • Answers 228k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's a textbox control that supports a RightMargin property. Tested… May 13, 2026 at 1:38 am
  • Editorial Team
    Editorial Team added an answer #detail {margin-bottom:5px;} May 13, 2026 at 1:38 am
  • Editorial Team
    Editorial Team added an answer Workaround/Solution: public function prepare($query) { return $this->handler->prepare($query); //$stmt->setFetchMode(PDO::FETCH_ASSOC); // standard… May 13, 2026 at 1:38 am

Related Questions

Imagine I have a situation where I need to index sentences. Let me explain
I would like to track messages sent and received though Windows Live Messenger. I
I have a bit of a strange question. Can anyone tell me where to
I have a controller action that allows a user to download a file with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.