« first day (3659 days earlier)      last day (1297 days later) » 

4:56 AM
Since I use Linux on my personal computer only, I don't have experience of linux server I mean command used to connect and transfer files. How can I create virtual sever and client type environment within my local system to learn the commands?
 
 
3 hours later…
8:03 AM
@Pandya You could use a VM. But what do you need to learn?
 
8:58 AM
@terdon how to transfer files between client and sever.
I think it should be through ssh
 
@Pandya You don't even need two distinct systems for that. You may enable the SSH daemon on your personal computer and use it as both the client and the server. I'd suggest using two distinct users, though.
 
9:14 AM
This ^^
The command you are looking for is "scp"
And you can just do scp localhost:/path/to/file /path/to/copy/of/file
 
 
2 hours later…
11:08 AM
or rsync?
 
11:19 AM
@terdon Yes, I learned scp and sshpass. I have just tried installing tinycore using virt-manager so and configured ssh and then transferred file between host (Debian) and guest (tinycore) using scp. Thanks
@fra-san Yeah I see I can use ssh locally as server and client also. Thanks
 
 
7 hours later…
6:18 PM
@AndrasDeak Just tried this. There are a couple of issues. (a) it skips the first page. A common TeX problem (b) The origin ((0,0)) is actually off the bottom of the page.
@Pandya rsync is generally better. Also, there's that more robust ssh alternative I always forget the name of.
@AndrasDeak So the idea is to have a node containing the entire PDF file? Is that even possible?
 
6:30 PM
@FaheemMitha just page by page. \includegraphics[page=1, width=\linewidth]{...} and then page=2 etc.
@FaheemMitha that sounds surprising. Perhaps a line width issue
 
@AndrasDeak Did you try it yourself with a suitably labelled grid?
 
Nope :)
We discussed that I don't do this
 
TeX tends to do the unexpected if you don't understand it sufficiently well. Which is basically everyone.
 
6:54 PM
OK, I think I know what's wrong
 
7:13 PM
minimal example that works for me with a4 pdfs
\documentclass[a4paper]{article}
\usepackage[top=0cm, bottom=0cm, left=0cm, right=0cm]{geometry}
\usepackage{graphicx}
\usepackage{tikz}

\begin{document}
  \pagestyle{empty}
  \begin{tikzpicture}[inner sep=0pt, outer sep=0pt]
    \draw node[above right] {\includegraphics[page=1, width=\linewidth]{inp.pdf}};
    \begin{scope}[overlay]
      \draw (0, 0) grid (20, 30);
    \end{scope}
  \end{tikzpicture}
\end{document}
 
@AndrasDeak So a linewidth issue? I think you said something about that earlier.
Or was that something else?
 
7:29 PM
@FaheemMitha I'll elaborate in a bit
actually, the \pagestyle{empty} is not necessary
 
@AndrasDeak The modified version seems to work. Thanks. Now I just need to understand why it does.
 
@FaheemMitha so one issue is that if your margins aren't zero or the aspect ratio of the page you're including doesn't match your own document, including with \linewidth/\textwidth will potentially overflow the page (although this horizontal overfull is probably due to wrong margins). When this happens, you see an empty page and the page you wanted to include gets pushed onto the next page.
 
@AndrasDeak I see. Tricky.
 
The other issue was that all your tikz decorations matter for the size of the node by default, which is disabled by the [overlay] specification (the \begin{scope} only applies a tikz setting to whatever is put inside). So even if your grid overflows the page you're including it won't matter, because the grid isn't considered for calculating the size of the node. It's as if it was a ghost.
Finally, I mentioned earlier that nodes have some margins by default. If these are not disabled then your \linewidth page plus these margins will overfull the page. Hence inner sep=0pt, outer sep=0pt.
 
@AndrasDeak Yes, I think that's the part I remember.
 
7:36 PM
so what you'd do is take what I have up there, and put all your form filling inside the \begin{scope} \end{scope} environment to be on the safe side.
when you're done with one page you create a new tikzpicture with page=2. Putting a \clearpage in between is probably optional, tex will start a new page anyway
but I haven't tested it for multipage pdfs :)
 
@AndrasDeak What do you mean by a TikZ decoration?
 
If ever you see an empty page in your document you'll know that the pdf you're including might have the wrong aspect ratio. If all else fails you can manually decrease \includegraphics[width=0.95\linewidth]{...} or whatever and it will just work, it will only be marginally (heh) less perfect
@FaheemMitha all the things you want to write on the pdf. I take it you were using tikz for that?
 
@AndrasDeak I am, yes. Including the grid, I suppose.
@AndrasDeak I don't think \clearpage is necessary.
 
yeah, me neither
 
I don't think I did most of this stuff for my original setup. With the origin wherever it wanted to be.
 
7:40 PM
In this case your origin will roughly be in the bottom left corner.
 
This is my current code:
 
if you prefer it to be in the center of the page just omit [above right] in the includegraphics node
 
\includepdf[pagecommand=
{\begin{tikzpicture}[remember picture, overlay]
    %\draw (-2,-26.0) to[grid with coordinates, major help lines/.append style=LawnGreen, minor help lines/.append style=LawnGreen] (16,1)\
;
  \end{tikzpicture}}
,pages=48]{\Filename}
@AndrasDeak The bottom left is fine. Optimal, really.
 
that's what I thought too :)
 
I guess in your case, you've stuffed a page of a PDF into a node?
My knowledge of TikZ is very sketchy. I worked with it a fair amount around 2011, but remember almost nothing of it.
I don't tend to do well at retaining information.
 
7:44 PM
@FaheemMitha indeed
 
Well, some things are easier than others. I can usually remember math ok.
 
there's a node that contains a pdf page, and it is positioned "above right" with respect to the origin
 
@AndrasDeak Right, so that effectively means that the page is placed above and to the right of the origin. Clever.
I.e. where the node goes, so does the page.
 
yup
as I said earlier you could spell it out as \draw (0, 0) node [above right] {...} which would do the same thing, but the "put in the origin" part would be explicit
 
@AndrasDeak Hmm. Actually, I see your second version has:
\draw (0,0)
 
7:54 PM
Hmm?
 
after the original node line. I would have though one would need to give the positioning on the node line itself.
To be precise, you have:
\begin{scope}[overlay]
\draw (0, 0) grid (20, 30);
 
That's my point. If you don't specify a coordinate for a path (and we technically have a path) it defaults to starting from the origin. The second line is the grid. I'm not sure if \draw grid (20, 30); would work, but that looks too asymmetric to me anyway.
So the origin can be implicit. Hence my remark that you can make it explicit if you find that easier to read.
 
@AndrasDeak Oh, ok.
But then isn't the (0,0) in
\draw (0, 0) grid (20, 30);
also unnecessary?
 
@AndrasDeak Heh. Ok, I'll experiment. I guess I could also read the PGF/TikZ manual, but it's a lot of stuff. Still relatively good documentation, though.
 
7:58 PM
It's insanely detailed, it's very hard to find what you're actually looking for if you don't know the right keywords.
 
The other problem is that when I do, I usually think of things that should be added, which leads me even more astray. The current maintainer is in TeX chat, and is quite cooperative, but patches to documentation isn't exactly productive.
 
In any case I'd always use explicit coordinates for path elements that have two "sides" a rectangle b, a grid b etc.
 
@AndrasDeak It's generally good documentation as those things go. Also has lots of examples, which is nice. But it's a huge hunk of stuff.
 
Yup. But mostly because tikz is so general and powerful.
 
@AndrasDeak I'm not sure I follow. Two "sides"?
 
8:01 PM
It's not jargon. Just like what I wrote as examples. a rectangle b draws a rectangle from a to b. a grid b draws a grid from a to b. In these cases my brain prefers to have explciit coordinates for both a and b. Unlike a single node that has a single leg in my head, where an implciit \draw node {...}; is fine, to me.
 
@AndrasDeak Oh, from point "a" to point "b"?
 
yup
you can actually name points and use that later
 
8:14 PM
@AndrasDeak Thanks for taking the time to go through that for me. I learned something.
 
No problem :)
Oh, and since we put inner sep=0pt, outer sep=0pt into the tikzpicture's settings, it will be applied to every node. So your annotations will start exactly where you put them, assuming you use \draw (x, y) node[right] {Faheem}; to fill your first name for insance. Emphasis on node[right].
 
@AndrasDeak That would actually be handy.
Seems that isn't the default. inner sep=0pt, outer sep=0pt, that is.
 
Yes, that's why we have to add it. One of them might be zero by default. And we probably only need one of those to position text.
But I find it simpler to just zero both.
@FaheemMitha actually, I just assumed you use a left-to-right script. It's all the other way around for right-to-left, obviously
@FaheemMitha we van also port your fancy grid to my approach
*can
 
8:49 PM
@AndrasDeak I write in English, if that's what you mean.
@AndrasDeak I don't think it requires any porting. I just stuck the line in, and it seems to work.
 
@FaheemMitha yeah
@FaheemMitha good point
 

« first day (3659 days earlier)      last day (1297 days later) »