ShareLaTeX - Text formatted as table conversion into LaTeX table
up vote
1
down vote
favorite
I want to convert a plain text formatted as a table into a LaTeX table. I have a routing table I wanted to include in my file but here it is:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet
0/0/0
I tried manually to create a table but I have to include many like this and it would take too long, I also tried consider it as code using begin{listing}... end{listing}
but doesn't format well either.
I was wondering if is there was any tool or suggested command.
PS:
Also the last line "0/0/0" should be part of the previous one.
tables
add a comment |
up vote
1
down vote
favorite
I want to convert a plain text formatted as a table into a LaTeX table. I have a routing table I wanted to include in my file but here it is:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet
0/0/0
I tried manually to create a table but I have to include many like this and it would take too long, I also tried consider it as code using begin{listing}... end{listing}
but doesn't format well either.
I was wondering if is there was any tool or suggested command.
PS:
Also the last line "0/0/0" should be part of the previous one.
tables
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to&
, add a\
at the end of the lines and then add somebegin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.
– David Carlisle
Aug 6 at 8:14
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to convert a plain text formatted as a table into a LaTeX table. I have a routing table I wanted to include in my file but here it is:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet
0/0/0
I tried manually to create a table but I have to include many like this and it would take too long, I also tried consider it as code using begin{listing}... end{listing}
but doesn't format well either.
I was wondering if is there was any tool or suggested command.
PS:
Also the last line "0/0/0" should be part of the previous one.
tables
I want to convert a plain text formatted as a table into a LaTeX table. I have a routing table I wanted to include in my file but here it is:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet
0/0/0
I tried manually to create a table but I have to include many like this and it would take too long, I also tried consider it as code using begin{listing}... end{listing}
but doesn't format well either.
I was wondering if is there was any tool or suggested command.
PS:
Also the last line "0/0/0" should be part of the previous one.
tables
tables
edited Aug 6 at 7:28
CarLaTeX
28.6k446122
28.6k446122
asked Aug 6 at 6:54
Lorenzo Rossi
61
61
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to&
, add a\
at the end of the lines and then add somebegin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.
– David Carlisle
Aug 6 at 8:14
add a comment |
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to&
, add a\
at the end of the lines and then add somebegin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.
– David Carlisle
Aug 6 at 8:14
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to
&
, add a \
at the end of the lines and then add some begin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.– David Carlisle
Aug 6 at 8:14
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to
&
, add a \
at the end of the lines and then add some begin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.– David Carlisle
Aug 6 at 8:14
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
If your aim is to include the output of some program and not to adapt the information, you can include it verbatim
, either by copying it to the LaTeX file or by keeping it in a separate file that is included verbatim. Depending on the text width you may have to adapt the font size.
documentclass{article}
usepackage{verbatim}
begin{document}
noindent
{footnotesize
begin{verbatim}
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
end{verbatim}
}
% Alternatively, load the data from a file.
noindent
{footnotesize
verbatiminput{routing.txt}
}
end{document}
The file routing.txt
contains the following lines:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
If your aim is to include the output of some program and not to adapt the information, you can include it verbatim
, either by copying it to the LaTeX file or by keeping it in a separate file that is included verbatim. Depending on the text width you may have to adapt the font size.
documentclass{article}
usepackage{verbatim}
begin{document}
noindent
{footnotesize
begin{verbatim}
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
end{verbatim}
}
% Alternatively, load the data from a file.
noindent
{footnotesize
verbatiminput{routing.txt}
}
end{document}
The file routing.txt
contains the following lines:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
add a comment |
up vote
1
down vote
If your aim is to include the output of some program and not to adapt the information, you can include it verbatim
, either by copying it to the LaTeX file or by keeping it in a separate file that is included verbatim. Depending on the text width you may have to adapt the font size.
documentclass{article}
usepackage{verbatim}
begin{document}
noindent
{footnotesize
begin{verbatim}
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
end{verbatim}
}
% Alternatively, load the data from a file.
noindent
{footnotesize
verbatiminput{routing.txt}
}
end{document}
The file routing.txt
contains the following lines:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
add a comment |
up vote
1
down vote
up vote
1
down vote
If your aim is to include the output of some program and not to adapt the information, you can include it verbatim
, either by copying it to the LaTeX file or by keeping it in a separate file that is included verbatim. Depending on the text width you may have to adapt the font size.
documentclass{article}
usepackage{verbatim}
begin{document}
noindent
{footnotesize
begin{verbatim}
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
end{verbatim}
}
% Alternatively, load the data from a file.
noindent
{footnotesize
verbatiminput{routing.txt}
}
end{document}
The file routing.txt
contains the following lines:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
If your aim is to include the output of some program and not to adapt the information, you can include it verbatim
, either by copying it to the LaTeX file or by keeping it in a separate file that is included verbatim. Depending on the text width you may have to adapt the font size.
documentclass{article}
usepackage{verbatim}
begin{document}
noindent
{footnotesize
begin{verbatim}
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
end{verbatim}
}
% Alternatively, load the data from a file.
noindent
{footnotesize
verbatiminput{routing.txt}
}
end{document}
The file routing.txt
contains the following lines:
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.0/24 Direct 0 0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GigabitEthernet 0/0/0
answered Aug 6 at 13:40
gernot
26.5k22960
26.5k22960
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f444791%2fsharelatex-text-formatted-as-table-conversion-into-latex-table%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
May be this might help you tex.stackexchange.com/questions/165918/… ? I think you could pull the same work-around mentioned there
– Raaja
Aug 6 at 6:58
there are tools but really with a any text editor it should only be a few seconds work to change each run of white space to
&
, add a\
at the end of the lines and then add somebegin{tabular}
markup that gives the possibility for hand tuning the layout and will give better, more understandable markup and output than an automated generation.– David Carlisle
Aug 6 at 8:14