I'm writing a story in which the main character is a strict vegetarian (what you might call vegan today). And I'm wondering, what might they have with them to eat on longer journeys made by foot? By longer journeys I mean when there they might be in the middle of nowhere for days or even weeks. I realise people probably weren't as aware of nutritional needs back then, but I have no idea what would have been practicable.
Not a direct answer - but I'd like to point out that the dietary restrictions in some Christian churches, especially in the Orthodox churches with which I am more familiar, were such that during the long periods of lent the diet was basically 100% vegan by today's standards.
So basically you'd have large swaths of population eating vegan for weeks a couple times a year, and for shorter periods of time beyond that, and also for two days of nearly every week beyond that (the Orthodox rules). Simply put, the diet was anything they ate normally, but without components of animal origin (meat, fat, dairy, eggs, etc). Bread was fine, along with all grains (think: porridge prepared without milk). Vegetable oils were fine (and they are high in calories, which is good when diet is meager). Legumes and pulses were fine (lentil soup, chickpea soup, etc). All fruits were fine, including nuts. After the Colombian Exchange you could probably add to the list things such as tomatoes, potatoes, corn (so you could make polenta), etc.
I believe, but I could be mistaken - someone please correct me if I'm wrong - that the Catholic church also included fish in the list of foods that were okay for lent; so that would be a vegan diet + fish. Although how common fish eating was, probably depended on time, place and social milieu.
Orthodox churches also granted exceptions from lent (made it optional) for various categories of people, such as children, people who were sick, and (related to your question) travelers; but those who were more strongly motivated could still keep lent, of course, as a personal choice. I'm not sure about the Catholic rules in this matter.
What I'm saying is - eating vegan (temporarily) was not an unusual thing in medieval Christendom, at least in some churches. It's still not unusual even today, in some places where it's still practiced according to the old rules.
in the middle of nowhere for days or even weeks
There would be limits imposed by how much food they could carry. Living off the land following a vegan diet would be very difficult in any case, and basically impossible in winter in the absence of stockpiles of food.
In villages or towns your traveler could simply claim to keep a religious oath and they would not draw any undue attention to their diet - but that could probably also vary depending on region, time, which specific church was dominant in the area, etc. The Middle Ages were pretty diverse.
a vegetarian traveller (for example, a monk)
Not all monks were full time vegans - but this also depends on the church, the time period, etc. Some were strict vegans, some were not. Others followed dietary rules much more restrictive than even the vegan diet.
You may want to investigate the history of the churches that were dominant in the time period and location described in your story.